/* Nine Sixteen Barbershop. Black and white, one type family (Sora),
   hairlines instead of boxes. */

:root {
  --black: #000;
  --raise: #0e0e0e;       /* hover on rows */
  --white: #fff;
  --text: #ededed;
  --grey: #a3a3a3;        /* secondary text: 8:1 on black */
  --line: #262626;        /* hairlines */
  --line-strong: #5e5e5e; /* button outlines */
  --red: #d0202c;         /* one small detail only */
  --sans: "Sora", "Avenir Next", "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --bar: 3.75rem;        /* height of the top bar; 4.5rem on wide screens */
  --band: clamp(3.5rem, 8vw, 7.5rem); /* space above and below a section */
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

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

html {
  scroll-padding-top: calc(var(--bar) + 1rem);
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--black);
}

body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--sans);
  font-size: clamp(1.0625rem, .98rem + .25vw, 1.25rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, dl, dd, ul, .hours-note { margin-top: 1rem; color: var(--grey); font-size: .95em; }

dd { margin: 0; }
.hiring .about-text { color: var(--text); }
.hiring-ask { margin-top: 1.5rem; color: var(--white); font-weight: 600; }

address { margin: 0; }
ul { padding: 0; list-style: none; }
address { font-style: normal; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

:focus-visible { outline: 2px solid var(--white); outline-offset: 4px; }
main:focus { outline: none; }

.skip {
  position: absolute; left: 1rem; top: -6rem; z-index: 20;
  padding: .8rem 1.1rem; background: var(--white); color: var(--black); font-weight: 600;
}
.skip:focus { top: 1rem; }

.wrap { width: 100%; max-width: 84rem; margin: 0 auto; padding: 0 var(--pad); }

/* small spaced capitals: labels, nav, buttons */
.eyebrow, .label, .nav a, .btn, .card-cta, .hero-meta, .foot-mark, .hours-row.is-today dt::after {
  font-weight: 600; font-size: max(.8125rem, .78em); line-height: 1.2; letter-spacing: .16em; text-transform: uppercase;
}

/* ---------- top bar ---------- */

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: clamp(.9rem, 3vw, 2.25rem);
  min-height: var(--bar); padding: 0 var(--pad);
  background: rgb(0 0 0 / 82%); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .75rem; margin-right: auto; text-decoration: none; color: var(--white); }
.top-logo { width: 2.5rem; height: 2.5rem; flex: none; }
.brand-name { font-weight: 800; letter-spacing: .02em; text-transform: uppercase; font-size: 1.0625rem; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: clamp(1.25rem, 2.5vw, 2.25rem); }
.nav a { padding: .8rem 0; white-space: nowrap; text-decoration: none; color: var(--grey); transition: color .2s var(--ease); }
.nav a:hover { color: var(--white); }
.wide-only { display: none; margin-left: .45em; }
.menu-btn { display: none; }

/* Phones and narrow tablets: one row (logo, name, Book, menu button); the links
   open as a panel under the bar. Wider than this, the links fit in the bar. */
@media (max-width: 61.99rem) {
  .top { gap: .625rem; }
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 2.75rem; height: 2.75rem; padding: 0; margin: 0;
    background: none; color: var(--white); border: 1px solid var(--line-strong); border-radius: 0;
    font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: border-color .2s var(--ease);
  }
  .menu-btn:hover, .menu-btn[aria-expanded="true"] { border-color: var(--white); }
  .menu-bars { position: relative; display: block; width: 1.125rem; height: .875rem; }
  .menu-bars span { position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; transition: transform .25s var(--ease), opacity .2s var(--ease); }
  .menu-bars span:nth-child(1) { top: 0; }
  .menu-bars span:nth-child(2) { top: calc(50% - 1px); }
  .menu-bars span:nth-child(3) { bottom: 0; }
  .menu-btn[aria-expanded="true"] .menu-bars span:nth-child(1) { transform: translateY(.375rem) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-bars span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] .menu-bars span:nth-child(3) { transform: translateY(-.375rem) rotate(-45deg); }

  .nav {
    position: absolute; top: calc(100% + 1px); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    max-height: calc(100vh - var(--bar)); max-height: calc(100svh - var(--bar)); overflow-y: auto;
    padding: 0 var(--pad); background: var(--black); border-bottom: 1px solid var(--line);
    visibility: hidden; opacity: 0; transform: translateY(-.5rem);
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s linear .2s;
  }
  .top.menu-open .nav { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav a {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    min-height: 3.75rem; padding: .5rem 0; color: var(--white);
  }
  .nav a + a { border-top: 1px solid var(--line); }
  .nav a:focus-visible { outline-offset: -2px; }
}
/* Very narrow phones: the badge alone stands for the name */
@media (max-width: 21.99rem) { .brand-name { display: none; } }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: .8rem 1.6rem;
  border: 1px solid transparent; border-radius: 0;
  text-decoration: none; text-align: center; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn-small { min-height: 2.75rem; padding: .5rem 1.1rem; flex: none; }
.btn-big { min-height: 3.75rem; padding: 1rem 2.25rem; }
.btn-accent { background: var(--white); color: var(--black); border-color: var(--white); }
.btn-accent:hover { background: transparent; color: var(--white); }
.btn-outline { border-color: var(--line-strong); color: var(--white); }
.btn-outline:hover { border-color: var(--white); }

/* ---------- hero ---------- */

.hero .wrap { padding-top: clamp(2.5rem, 7vw, 6rem); padding-bottom: clamp(2rem, 5vw, 3.5rem); }

.hero-logo { width: clamp(6.5rem, 12vw, 11rem); margin: 0 0 clamp(1.75rem, 4vw, 3rem) -.25rem; }

h1, h2 { color: var(--white); font-weight: 800; text-transform: uppercase; text-wrap: balance; word-spacing: .06em; }

h1 { font-size: 1rem; line-height: 1; }
.h1-main {
  display: block; letter-spacing: -.055em; line-height: .92;
  font-size: clamp(3.5rem, 20vw, 10.5rem);
}
.h1-sub {
  display: block; margin-top: clamp(1rem, 2.2vw, 1.75rem);
  font-weight: 400; letter-spacing: .5em; color: var(--grey);
  font-size: clamp(.9rem, .7rem + .9vw, 1.5rem);
}

.tagline { margin-top: clamp(1.5rem, 3vw, 2.25rem); max-width: 34ch; font-size: 1.15em; line-height: 1.4; color: var(--text); }
.tagline:empty { display: none; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: clamp(2rem, 4vw, 3rem); }

/* Coming soon page */
.soon-line {
  display: inline-block; margin-top: clamp(2rem, 4vw, 3rem); padding: .9rem 1.4rem;
  border: 1px solid var(--line-strong); color: var(--white);
  font-weight: 600; font-size: max(.9rem, .9em); line-height: 1.2; letter-spacing: .28em; text-transform: uppercase;
}
.soon .hero .wrap { padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.soon .band { padding-top: 0; }
.soon .band .wrap::before { content: ""; display: block; height: 1px; background: var(--line); margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }

.hero-meta {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: clamp(3rem, 7vw, 5.5rem); padding-top: 1rem;
  border-top: 1px solid var(--line); color: var(--grey);
}
.mark-dot {
  display: inline-block; width: .5em; height: .5em; margin: 0 .5em 0 .34em; vertical-align: .08em;
  overflow: hidden; color: transparent; letter-spacing: 0; user-select: none;
  background: var(--red);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
}

/* ---------- sections ---------- */

.band { padding: var(--band) 0; }
.band + .band .wrap::before { content: ""; display: block; height: 1px; background: var(--line); margin-bottom: var(--band); }
.band + .band { padding-top: 0; }

h2 { letter-spacing: -.04em; line-height: 1; font-size: clamp(1.9rem, 1.2rem + 3vw, 3.75rem); }
.section-head { margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.section-head p { margin-top: .8rem; color: var(--grey); }
.label { color: var(--grey); margin-bottom: 1rem; }

.about-text { max-width: none; font-size: 1.15em; line-height: 1.55; }
.about-text p + p { margin-top: 1em; }

/* ---------- barbers: a roster, one row each ---------- */

.cards { border-top: 1px solid var(--line); }
.card { border-bottom: 1px solid var(--line); }
.card-link {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: clamp(.9rem, 2.5vw, 2rem);
  padding: clamp(.9rem, 1.8vw, 1.5rem) 0;
  text-decoration: none; color: var(--white);
  transition: background-color .25s var(--ease), padding .25s var(--ease);
}

.avatar { display: block; width: clamp(5rem, 10vw, 9.5rem); aspect-ratio: 1 / 1; overflow: hidden; background: #111; }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; filter: grayscale(1) contrast(1.06); transition: filter .35s var(--ease); }
/* The picture turns to colour while its Book button is hovered or focused */
.card-link:has(a.card-cta:hover) .avatar img, .card-link:has(a.card-cta:focus-visible) .avatar img { filter: none; }
.avatar-initials { display: grid; place-items: center; border: 1px solid var(--line); background: none; color: var(--grey); }
.avatar-initials span { font-weight: 600; font-size: clamp(1.05rem, 1.9vw, 1.6rem); letter-spacing: .06em; }

.card-body { display: flex; flex-direction: column; min-width: 0; }
.card-name {
  font-weight: 800; text-transform: uppercase; letter-spacing: -.035em; line-height: 1.05;
  font-size: clamp(1.0625rem, .7rem + 1.7vw, 2.5rem); overflow-wrap: anywhere;
}
.card-title { margin-top: .4rem; color: var(--grey); font-size: .95em; line-height: 1.35; }
.card-cta {
  display: inline-flex; align-items: center; gap: .6em;
  min-height: 2.75rem; padding: .55rem 1rem;
  background: var(--white); color: var(--black); border: 1px solid var(--white);
  white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
a.card-cta { text-decoration: none; cursor: pointer; }
a.card-cta:hover { background: transparent; color: var(--white); }
span.card-cta { background: none; color: var(--grey); border-color: var(--line-strong); }
.arrow { display: inline-block; transition: transform .25s var(--ease); }
a:hover > .arrow { transform: translateX(4px); }

.empty, .help { color: var(--grey); }
.help { margin-top: 2rem; }
.help a, .empty a { color: var(--white); font-weight: 600; white-space: nowrap; text-underline-offset: .2em; }

/* ---------- visit ---------- */

.visit-grid { display: grid; gap: var(--band); }
.hours, .links { border-top: 1px solid var(--line); }
.hours-row { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; min-height: 3.5rem; padding: .85rem 0; border-bottom: 1px solid var(--line); line-height: 1.3; }
.hours-row dt { color: var(--white); font-weight: 400; }
.hours-row dd { color: var(--grey); text-align: right; }
.hours-row.is-today dt::after { content: "Today"; margin-left: .8rem; color: var(--grey); font-size: .8125rem; }
.hours-row.is-today dt { font-weight: 600; }
.hours-row.is-today dd { color: var(--white); font-weight: 600; }

address { margin-top: 1rem; margin-bottom: 1.75rem; font-size: 1.3em; line-height: 1.35; color: var(--white); }
.row-link {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  min-height: 3.5rem; padding: .85rem 0; border-bottom: 1px solid var(--line);
  color: var(--white); text-decoration: none; font-weight: 400;
  transition: background-color .25s var(--ease), padding .25s var(--ease);
}
.row-link:hover { background: var(--raise); padding-left: .75rem; padding-right: .75rem; }

/* ---------- footer: name, address and phone, then one set of links ---------- */

.foot { border-top: 1px solid var(--line); color: var(--grey); padding: clamp(2.5rem, 5vw, 4rem) 0; font-size: .92em; }
.foot .wrap { display: grid; gap: 1.5rem; }
.foot p { margin: 0; font-size: 1em; }
.foot-name { color: var(--white); font-weight: 800; text-transform: uppercase; letter-spacing: .01em; }
.foot .foot-lines { display: grid; gap: .15rem; margin-top: .15rem; }
.foot-lines a { color: var(--white); text-decoration: none; white-space: nowrap; }
.foot-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .625rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.foot-nav a {
  display: flex; align-items: center; justify-content: flex-start; gap: .6rem; min-height: 2.75rem;
  font-size: max(.8125rem, .85em); font-weight: 600; line-height: 1.2; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
  text-decoration: none; color: var(--grey); transition: color .2s var(--ease);
}
.foot-nav a:hover { color: var(--white); }
.foot-nav .icon { order: -1; width: 1.25rem; height: 1.25rem; }

/* ---------- phones ---------- */

@media (max-width: 45.99rem) {
  .desk-only { display: none; }
  /* The opening screen fills the display, so the barbers and everything after start below the fold */
  main:not(.soon) > .hero { min-height: calc(100vh - var(--bar)); min-height: calc(100svh - var(--bar)); display: flex; flex-direction: column; justify-content: center; }
  .hero-meta { display: none; }
  /* Jump buttons: the main one full width, the rest in an even two-column grid.
     A button left alone on the last row takes the full width. */
  .actions { display: grid; grid-template-columns: 1fr 1fr; gap: .625rem; }
  .actions > .btn { min-width: 0; min-height: 3.5rem; padding: .5rem; letter-spacing: .12em; white-space: normal; }
  .actions > .btn:first-child,
  .actions > .btn:nth-child(even of :not(.desk-only)):nth-last-child(1 of :not(.desk-only)) { grid-column: 1 / -1; }
  /* Hours and Location are each a section of their own */
  .visit-grid > * + * { padding-top: var(--band); border-top: 1px solid var(--line); }
}

/* Short phone screens (small phones with the browser's bars showing): tighten the opening screen */
@media (max-width: 45.99rem) and (max-height: 41rem) {
  .hero .wrap { padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .hero-logo { width: 4.75rem; margin-bottom: 1.1rem; }
  .h1-main { font-size: clamp(3rem, 17vw, 4.25rem); }
  .h1-sub { margin-top: .8rem; }
  .actions { margin-top: 1.5rem; gap: .5rem; }
  .actions > .btn { min-height: 3rem; }
}

/* ---------- wider screens ---------- */

@media (min-width: 34rem) {
  .wide-only { display: inline; }
  .foot-nav { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 46rem) {
  :root { --bar: 4.5rem; }
  .phone-only { display: none; }
  .menu-btn { width: 3rem; height: 3rem; }
  .btn-small { min-height: 3rem; padding: .6rem 1.5rem; }
  .card-cta { min-height: 3.25rem; padding: .7rem 1.5rem; }
  .h1-main { font-size: clamp(5rem, 10.5vw, 11rem); }
  .visit-grid { grid-template-columns: 1fr 1fr; gap: clamp(3rem, 8vw, 8rem); }
  .section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 2rem; }
  .section-head p { margin-top: 0; }
}

/* Narrow tablets: the three opening buttons stay on one row */
@media (min-width: 46rem) and (max-width: 59.99rem) {
  .hero .btn-big { padding-left: 1.5rem; padding-right: 1.5rem; }
}

/* The section links sit in the top bar */
@media (min-width: 62rem) {
  .nav .icon-word { display: none; }
  .nav-menu { display: none; }
  .nav .icon-link { padding: .55rem 0; }
}

/* Wide enough for the footer links to sit in one row beside the name */
@media (min-width: 72rem) {
  .foot .wrap { grid-template-columns: 1fr auto; align-items: start; gap: 2rem; }
  .foot-nav { display: flex; align-items: center; gap: 1.75rem; min-height: 1.6em; padding: 0; border: 0; }
  .foot-nav a { min-height: 0; line-height: inherit; }
  .foot-nav .icon-word { display: none; }
  .foot-nav .icon { width: auto; height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.row-plain { cursor: default; color: var(--grey); }

/* Location map preview, toned to sit on the black page */
.map { margin-top: 1.25rem; border: 1px solid var(--line); background: #111; }
.map iframe { display: block; width: 100%; aspect-ratio: 4 / 3; border: 0; filter: grayscale(1) invert(.92) contrast(.88); }

/* Instagram icon link, top bar and footer */
.icon-link { display: inline-flex; align-items: center; justify-content: center; color: var(--grey); transition: color .2s var(--ease); }
.icon-link:hover { color: var(--white); }
.icon { display: block; flex: none; }

/* Instagram profile embed */
/* Height follows the width: Instagram's header, then two rows of three square photos */
.insta-frame { max-width: 540px; border: 1px solid var(--line); background: #fff; container-type: inline-size; }
.insta-frame iframe { display: block; width: 100%; height: 480px; height: calc(122px + 66.7cqw); border: 0; }
.insta .links { max-width: 540px; margin-top: 1.25rem; }

.walkins { margin-top: clamp(2rem, 4vw, 3rem); text-align: center; color: var(--white); font-weight: 800; font-size: 1.15em; text-transform: uppercase; letter-spacing: .08em; }

/* One combined "Location and hours" link where the top bar is a row; separate links in the stacked menu */
@media (max-width: 61.99rem) { .nav-bar { display: none; } }
/* Two columns: Location on the left so it lines up with the text above, Hours on the right */
@media (min-width: 46rem) { .visit-grid > #location { order: -1; } }
