/* 34th Street Barber Shop: website concept.
   Street-sign green and barber-pole red and blue on concrete and white. */

:root {
  --green: #00663f;
  --green-deep: #004f31;
  --red: #c8102e;
  --red-deep: #a20c25;
  --blue: #1f3f99;
  --asphalt: #26292b;
  --concrete: #e7e6e1;
  --concrete-deep: #d4d3cc;
  --white: #ffffff;
  --muted: #565a5d;
  --rule: rgba(38, 41, 43, 0.16);

  --font: "Overpass", "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.125rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 1.5rem + 2vw, 3rem);

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--nav-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--asphalt);
  background: var(--white);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.1;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

p,
figure {
  margin: 0;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--asphalt);
  color: var(--white);
}

.skip:focus {
  top: 12px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 20px 10px;
  border: 2px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn--lg {
  min-height: 56px;
  padding: 16px 24px 13px;
  font-size: 1.0625rem;
}

.btn--red {
  background: var(--red);
  color: var(--white);
}

.btn--red:hover {
  background: var(--red-deep);
}

.btn--green {
  background: var(--green);
  color: var(--white);
}

.btn--green:hover {
  background: var(--green-deep);
}

.btn--outline {
  border-color: var(--asphalt);
  background: transparent;
  color: var(--asphalt);
}

.btn--outline:hover {
  background: var(--asphalt);
  color: var(--white);
}

.btn--white {
  background: var(--white);
  color: var(--green);
}

.btn--white:hover {
  background: var(--concrete);
}

/* Preview notice */

.preview-bar {
  background: var(--asphalt);
  color: #ececea;
  font-size: var(--step--1);
  line-height: 1.4;
}

.preview-bar p {
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding: 9px var(--gutter) 7px;
}

.preview-bar a {
  color: var(--white);
  text-underline-offset: 2px;
}

/* Navigation */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.97);
}

.nav__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand__plate {
  display: inline-block;
  padding: 6px 11px 3px;
  border-radius: 8px;
  background: var(--green);
  box-shadow: inset 0 0 0 3px var(--green), inset 0 0 0 5px var(--white);
  color: var(--white);
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.brand__name {
  font-size: 1.0625rem;
  white-space: nowrap;
}

.nav__links {
  display: flex;
  gap: 24px;
  margin-left: auto;
  font-size: 1rem;
  font-weight: 600;
}

.nav__links a {
  padding: 6px 0;
  text-decoration: none;
}

.nav__links a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav__phone {
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nav__phone:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.nav__menu-btn {
  display: none;
  min-height: 44px;
  padding: 10px 14px 8px;
  border: 2px solid var(--asphalt);
  border-radius: 10px;
  background: transparent;
  color: var(--asphalt);
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 1023px) {
  .nav__phone {
    display: none;
  }
}

@media (max-width: 899px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    border-bottom: 1px solid var(--rule);
    background: var(--white);
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__links a {
    padding: 12px 0;
    border-bottom: 1px solid var(--rule);
    font-size: 1.125rem;
  }

  .nav__actions {
    margin-left: auto;
  }

  .nav__menu-btn {
    display: inline-flex;
    align-items: center;
  }
}

@media (max-width: 759px) {
  .nav__book {
    display: none;
  }
}

/* Hero: the street sign on a barber pole */

.hero {
  padding-block: clamp(32px, 6vw, 72px) clamp(44px, 7vw, 88px);
  background: var(--concrete);
}

.hero__grid {
  display: grid;
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
}

.hero__copy {
  container-type: inline-size;
  --sign: clamp(2.75rem, 16cqi, 6.25rem);
}

.sign-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: var(--sign);
}

.sign {
  display: inline-flex;
  font-weight: 800;
  line-height: 1;
}

.sign--street {
  align-items: flex-start;
  gap: 0.34em;
  padding: 0.2em 0.4em 0.08em 0.3em;
  border-radius: 0.14em;
  background: var(--green);
  box-shadow: inset 0 0 0 0.07em var(--green), inset 0 0 0 0.105em var(--white);
  color: var(--white);
  letter-spacing: -0.005em;
}

.sign__block {
  padding-top: 0.55em;
  font-size: 0.26em;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sign__name {
  white-space: nowrap;
}

.sign--plate {
  margin-top: 0.14em;
  margin-left: 0.55em;
  padding: 0.32em 0.6em 0.18em;
  border-radius: 0.26em;
  background: var(--white);
  box-shadow: inset 0 0 0 0.15em var(--white), inset 0 0 0 0.23em var(--green);
  color: var(--green);
  font-size: 0.36em;
}

.hero__post {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: clamp(20px, 3.5vw, 40px);
  padding-left: calc(var(--sign) * 0.68 - 15px);
}

.pole {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 30px;
  min-height: 220px;
}

.pole__cap {
  flex: none;
  width: 30px;
  height: 14px;
  background: linear-gradient(90deg, #6f7478, #eef0f1 38%, #b3b7ba 62%, #62676b);
}

.pole__cap:first-child {
  height: 12px;
  border-radius: 3px 3px 2px 2px;
}

.pole__cap:last-child {
  height: 18px;
  border-radius: 2px 2px 9px 9px;
}

.pole__glass {
  --tile: 52px;
  position: relative;
  flex: 1;
  width: 22px;
  overflow: hidden;
  background-color: var(--white);
  background-image: linear-gradient(135deg,
    var(--red) 0 12.5%, var(--white) 12.5% 25%, var(--blue) 25% 37.5%, var(--white) 37.5% 50%,
    var(--red) 50% 62.5%, var(--white) 62.5% 75%, var(--blue) 75% 87.5%, var(--white) 87.5% 100%);
  background-size: var(--tile) var(--tile);
  animation: pole-spin 1.8s linear infinite paused;
}

.pole__glass::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.3), rgba(255, 255, 255, 0.55) 32%, rgba(255, 255, 255, 0) 58%, rgba(0, 0, 0, 0.28));
}

.pole[data-open="true"] .pole__glass {
  animation-play-state: running;
}

.pole[data-open="false"] .pole__glass {
  filter: saturate(0.45) brightness(0.94);
}

@keyframes pole-spin {
  to {
    background-position: 0 calc(var(--tile) * -1);
  }
}

.hero__text {
  max-width: 34rem;
  padding-block: clamp(22px, 3vw, 32px) 8px;
}

.hero__status {
  margin-bottom: 10px;
  font-weight: 800;
  text-wrap: balance;
}

.lead {
  font-size: var(--step-1);
  line-height: 1.45;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero__rating {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 22px;
  font-weight: 700;
  text-decoration: none;
}

.hero__rating:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.stars {
  color: var(--red);
  letter-spacing: 2px;
}

.hero__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

@media (max-width: 959px) {
  .hero__photo img {
    aspect-ratio: 4 / 3;
    object-position: 50% 35%;
  }
}

/* Shared section rhythm */

.section {
  padding-block: clamp(60px, 8vw, 108px);
}

.section-head {
  max-width: 40rem;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.section-head h2,
.reviews h2,
.about h2,
.book h2,
.students h2 {
  font-size: var(--step-3);
}

.section-head p {
  margin-top: 12px;
  color: var(--muted);
  font-size: var(--step-1);
}

.fine {
  margin-top: 22px;
  color: var(--muted);
  font-size: var(--step--1);
}

/* Prices */

.price-board {
  display: grid;
  gap: 26px 72px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 900px) {
  .price-board {
    grid-template-columns: 1fr 1fr;
  }
}

.price-board__row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.price-board h3,
.price {
  font-size: var(--step-1);
  font-weight: 800;
}

.price {
  font-variant-numeric: tabular-nums;
}

.price-board__leader {
  flex: 1;
  min-width: 24px;
  border-bottom: 3px dotted var(--concrete-deep);
}

.price-board__desc {
  margin-top: 4px;
  color: var(--muted);
  font-size: 1rem;
}

/* Students: a second street sign */

.students {
  display: grid;
  gap: 24px;
  margin-top: clamp(56px, 7vw, 88px);
  padding: clamp(28px, 5vw, 52px);
  border-radius: 18px;
  background: var(--green);
  box-shadow: inset 0 0 0 9px var(--green), inset 0 0 0 12px var(--white);
  color: var(--white);
}

@media (min-width: 900px) {
  .students {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 48px;
  }
}

.students p {
  max-width: 38rem;
  margin-top: 12px;
}

/* Reviews */

.reviews {
  background: var(--concrete);
}

.reviews__grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 900px) {
  .reviews__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 80px;
  }
}

.reviews__stars {
  margin-bottom: 14px;
  color: var(--red);
  font-size: 1.5rem;
  letter-spacing: 4px;
}

.reviews h2 {
  max-width: 17ch;
}

.reviews__summary .btn {
  margin-top: 30px;
}

.mentions {
  display: grid;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mention__text {
  font-weight: 600;
}

.mention__text strong {
  margin-right: 6px;
  font-size: var(--step-2);
  font-weight: 900;
}

.mention__bar {
  height: 12px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--concrete-deep);
}

.mention__bar span {
  display: block;
  width: calc(var(--v) * 100%);
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

/* About */

.about__grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 900px) {
  .about__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 80px;
  }
}

.about__photo img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.about__text p {
  max-width: 34rem;
  margin-top: 18px;
}

/* Photo strip */

.strip__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

@media (min-width: 760px) {
  .strip__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.strip img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* Booking and visit */

.book {
  background: var(--concrete);
}

.book__grid {
  display: grid;
  gap: 64px;
}

@media (min-width: 960px) {
  .book__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 80px;
  }
}

.book__intro {
  max-width: 34rem;
  margin-top: 14px;
}

.book__intro a {
  font-weight: 700;
  white-space: nowrap;
}

.form {
  display: grid;
  gap: 20px;
  margin-top: 30px;
}

.field {
  display: grid;
  gap: 6px;
  align-content: start;
}

.field label {
  font-size: 1rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 14px 10px;
  border: 2px solid #bdbcb5;
  border-radius: 10px;
  background: var(--white);
  color: var(--asphalt);
  font: inherit;
  font-size: 1.0625rem;
}

.field textarea {
  min-height: 0;
  resize: vertical;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  border-color: var(--blue);
  outline-offset: 1px;
}

.field [aria-invalid="true"] {
  border-color: var(--red);
}

.field__msg {
  color: var(--red-deep);
  font-size: 0.9375rem;
  font-weight: 700;
}

.field-row {
  display: grid;
  gap: 20px;
}

@media (min-width: 560px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.optional {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 400;
}

.form__submit {
  justify-self: start;
}

.form__done {
  margin-top: 30px;
  padding: clamp(24px, 4vw, 36px);
  border-radius: 14px;
  background: var(--white);
  box-shadow: inset 0 0 0 3px var(--green);
}

.form__done h3 {
  font-size: var(--step-2);
}

.form__done [data-summary] {
  margin-top: 12px;
  font-size: var(--step-1);
}

.form__done .btn {
  margin-top: 24px;
}

.visit address {
  margin-top: 20px;
  font-size: var(--step-1);
  font-style: normal;
  font-weight: 700;
  line-height: 1.35;
}

.visit__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 12px;
  font-weight: 700;
}

.visit__links a {
  text-underline-offset: 4px;
}

.hours {
  width: 100%;
  margin-top: 28px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.hours th,
.hours td {
  padding: 11px 0 9px;
  border-bottom: 1px solid var(--rule);
  font-weight: 400;
  text-align: left;
}

.hours td {
  text-align: right;
}

.hours .is-today th,
.hours .is-today td {
  color: var(--green-deep);
  font-weight: 800;
}

.map {
  margin-top: 28px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: var(--concrete-deep);
}

.map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Footer */

.footer {
  padding-block: 64px 32px;
  background: var(--asphalt);
  color: #d3d4d2;
}

.footer__grid {
  display: grid;
  gap: 36px;
}

@media (min-width: 900px) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

.footer h2 {
  margin-bottom: 10px;
  color: var(--white);
  font-size: 1rem;
}

.footer p,
.footer a {
  font-size: 1rem;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer__brand p {
  max-width: 22rem;
  margin-top: 16px;
}

.footer__links {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.footer__base {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 48px;
  padding-top: 20px;
  color: #aeb1b3;
}

.footer__base::before {
  content: "";
  position: absolute;
  top: 0;
  right: var(--gutter);
  left: var(--gutter);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer .footer__base p,
.footer .footer__base a {
  font-size: var(--step--1);
}

.footer .footer__base a {
  color: var(--white);
  text-decoration: underline;
}

/* Mobile call and book bar */

.action-bar {
  display: none;
}

@media (max-width: 759px) {
  .action-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 10px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--rule);
    background: rgba(255, 255, 255, 0.97);
  }

  body {
    padding-bottom: 78px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pole__glass {
    animation: none;
  }

  .btn {
    transition: none;
  }
}
