/* =============================================================================
   TÔNG ĐƠ BARBER CLUB — design tokens
   Palette: Asphalt (shop floor at close) / Chrome White (mirror light) /
   Barbicide (the disinfectant-jar blue on every barber's counter) /
   Clipper Steel / Pole Red (one stripe, used in milligrams).
   Type: Bungee (signage display, Vietnamese subset) + Be Vietnam Pro (body).
   ========================================================================== */
:root {
  --asphalt: #101319;
  --night: #171c26;
  --chrome: #f4f6f9;
  --steel: #c6cdd8;
  --steel-dim: #8b93a3;
  --barbicide: #2244ee;
  --barbicide-deep: #1a35c2;
  /* lifted blue for text/indicators on the dark sections — #2244ee only
     reaches 2.77:1 on asphalt, which fails AA */
  --barbicide-lite: #8ea2ff;
  --pole-red: #e03a2f;
  --open-green: #2fbf71;

  --display: "Bungee", "Bungee Fallback", "Arial Black", sans-serif;
  --body: "Be Vietnam Pro", "Be Vietnam Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-pad: clamp(3.5rem, 9vw, 7rem);
  --maxw: 1160px;
  --radius: 10px;
  /* must be >= the sticky bar's real rendered height (button + padding +
     border), since body padding-bottom is derived from it */
  --bar-h: 76px;

  /* light ring by default (17:1 on asphalt); light sections override below */
  --focus-ring: var(--chrome);
}

/* Width-matched fallbacks. Both webfonts load with display=swap, so the
   fallback paints first and the swap re-wraps text. Line boxes here are CSS
   multipliers (1.05 / 1.6) so vertical metrics don't matter; only advance
   width does. size-adjust values are measured, not guessed: at the hero's
   own sizes Bungee sets ~0.92x the width of Arial Black, and Be Vietnam Pro
   ~1.10x the width of Segoe UI. Re-measure with canvas measureText if the
   faces are ever swapped.
   Honest scope: this narrows the fallback-to-real jump, but did NOT measurably
   move aggregate CLS (0.013 desktop before and after). The residual is a
   spread of sub-0.02 swap shifts across the chips, nav and hero — well inside
   the 0.1 "good" threshold, and not worth reshaping the hero to chase. */
@font-face {
  font-family: "Bungee Fallback";
  src: local("Arial Black"), local("Arial Bold"), local("Helvetica Bold");
  size-adjust: 92.2%;
}
@font-face {
  font-family: "Be Vietnam Fallback";
  src: local("Segoe UI"), local("Arial"), local("Helvetica");
  size-adjust: 110.4%;
}

/* ---------- reset-lite ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--asphalt);
  color: var(--chrome);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; }

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 2px;
}

.nowrap { white-space: nowrap; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--barbicide); color: #fff; font-weight: 600;
  padding: .75rem 1.25rem; border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none; transition: top .15s ease;
}
.skip-link:focus { top: 0; }

/* ---------- type ---------- */
h1, h2, h3, .display { font-family: var(--display); font-weight: 400; line-height: 1.05; }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.8rem); letter-spacing: .01em; }

.kicker {
  font-family: var(--body); font-weight: 700; font-size: .8rem;
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--barbicide); margin-bottom: .75rem;
}
.kicker--onblue { color: var(--chrome); opacity: .85; }
.kicker--ondark { color: var(--steel); }
.work .kicker { color: var(--barbicide-lite); }

.section-head {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--gutter) clamp(1.75rem, 4vw, 3rem);
}
/* keep anchored headings clear of the sticky topbar */
section[id] { scroll-margin-top: 4.5rem; }
.section-sub { color: var(--steel-dim); max-width: 46ch; margin-top: .6rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; text-decoration: none; font-weight: 700;
  padding: .8rem 1.4rem; border-radius: 6px;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: scale(.97); }

/* the queue-ticket button — punched notches left and right */
.btn--ticket {
  background: var(--barbicide); color: #fff;
  font-family: var(--display); font-size: .95rem; letter-spacing: .04em;
  -webkit-mask-image:
    radial-gradient(circle 7px at 0 50%, transparent 97%, #000),
    radial-gradient(circle 7px at 100% 50%, transparent 97%, #000);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(circle 7px at 0 50%, transparent 97%, #000),
    radial-gradient(circle 7px at 100% 50%, transparent 97%, #000);
  mask-composite: intersect;
}
.btn--ticket:hover { background: var(--barbicide-deep); }

.btn--ghost {
  border: 2px solid rgba(244, 246, 249, .55); color: var(--chrome);
}
.btn--ghost:hover { border-color: var(--chrome); background: rgba(244, 246, 249, .08); }

.btn--big { padding: 1rem 1.9rem; font-size: 1.05rem; }

/* ---------- barber-pole rule (the one red allowed on the page) ----------
   The crawl animates transform on an over-wide child so it runs on the
   compositor; animating background-position would repaint every frame. */
.pole-rule { height: 8px; overflow: hidden; }
.pole-rule::before {
  content: ""; display: block; height: 100%;
  width: 200%;
  background: repeating-linear-gradient(135deg,
    var(--pole-red) 0 12px, var(--chrome) 12px 24px, var(--barbicide) 24px 36px);
  animation: pole-crawl 40s linear infinite;
  will-change: transform;
}
@keyframes pole-crawl {
  to { transform: translate3d(-50%, 0, 0); }
}

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .65rem var(--gutter);
  background: color-mix(in srgb, var(--asphalt) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.topbar__brand {
  font-family: var(--display); font-size: 1.05rem;
  color: var(--chrome); text-decoration: none; letter-spacing: .02em;
}
.topbar__nav { display: none; margin-inline: auto; gap: 1.6rem; }
.topbar__nav a {
  color: var(--steel); text-decoration: none; font-weight: 500; font-size: .95rem;
}
.topbar__nav a:hover { color: var(--chrome); }
.topbar__book { margin-left: auto; padding: .6rem 1.2rem; font-size: .85rem; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  margin-top: calc(-1 * (0.65rem * 2 + 2.1rem)); /* pull behind sticky topbar */
  overflow: hidden;
}
.hero__media, .hero__media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(16, 19, 25, .55) 0%, rgba(16, 19, 25, .15) 40%, rgba(16, 19, 25, .88) 88%),
    linear-gradient(100deg, rgba(16, 19, 25, .55) 0%, transparent 60%);
}
.hero__vert {
  position: absolute; top: 50%; right: clamp(.25rem, 2vw, 1.5rem);
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--display); font-size: clamp(2.4rem, 7vh, 5rem);
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 246, 249, .28);
  letter-spacing: .12em; user-select: none;
  display: none;
}
.hero__content {
  position: relative; z-index: 1;
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  /* extra bottom padding on mobile keeps the CTAs clear of the sticky bar */
  padding: 7rem var(--gutter) calc(var(--bar-h) + 1.5rem);
}
@media (min-width: 768px) {
  .hero__content { padding-bottom: clamp(2.5rem, 7vh, 5rem); }
}
.hero__kicker {
  font-weight: 600; font-size: .85rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--steel);
  margin-bottom: 1rem;
}
.hero__title {
  font-size: clamp(2.4rem, 9.5vw, 5.6rem);
  color: var(--chrome);
  text-shadow: 0 2px 24px rgba(0, 0, 0, .45);
}
.hero__sub {
  margin-top: 1.1rem; max-width: 44ch;
  font-size: clamp(1rem, 2.6vw, 1.15rem); color: var(--steel);
}
.hero__chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.chip {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .85rem; font-weight: 600;
  padding: .45rem .9rem; border-radius: 99px;
  background: rgba(16, 19, 25, .55); border: 1px solid rgba(198, 205, 216, .3);
  backdrop-filter: blur(6px);
}
.chip__dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--steel-dim);
  flex: none;
}
.chip--status.is-open .chip__dot { background: var(--open-green); box-shadow: 0 0 8px var(--open-green); }
.chip--status.is-closed .chip__dot { background: var(--pole-red); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

.noscript-note {
  padding: 1rem var(--gutter); background: var(--barbicide); color: #fff; text-align: center;
}
.noscript-note a { color: #fff; }

/* ---------- the lookbook ----------
   A styles board, not a gallery: every tile is a booking link, so the tap
   target is the whole card and the label carries the service + price. */
.look { padding: var(--section-pad) 0; }
.look__grid {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1fr 1fr; gap: .9rem;
}
.look__card {
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  background: var(--night); border: 1px solid rgba(198, 205, 216, .14);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .15s ease, transform .12s ease;
}
.look__card img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  transition: filter .2s ease;
}
.look__card:hover { border-color: var(--barbicide-lite); }
.look__card:hover img { filter: brightness(1.06); }
.look__card:active { transform: scale(.99); }
.look__body {
  display: flex; flex-direction: column; gap: .3rem;
  padding: .85rem .9rem 1rem;
}
.look__name {
  font-family: var(--display); font-size: .95rem; letter-spacing: .01em;
  color: var(--chrome); line-height: 1.15;
}
.look__note { font-size: .82rem; color: var(--steel-dim); line-height: 1.45; }
.look__meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; margin-top: .35rem;
}
.look__time { font-size: .8rem; font-weight: 600; color: var(--steel); }
.look__cta {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .8rem; font-weight: 700; color: var(--barbicide-lite);
}

/* ---------- the Barbicide board ---------- */
.board {
  background: var(--barbicide);
  background-image: repeating-linear-gradient(135deg,
    rgba(255, 255, 255, .035) 0 2px, transparent 2px 14px);
  color: #fff;
  padding: var(--section-pad) 0;
  --focus-ring: #fff;
}
.board .section-sub { color: rgba(255, 255, 255, .78); }
.board__groups {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; gap: 2.6rem;
}
.board__group-name {
  font-size: 1.15rem; letter-spacing: .1em;
  border-bottom: 3px solid rgba(255, 255, 255, .35);
  padding-bottom: .5rem; margin-bottom: .4rem;
}
.board__list { list-style: none; padding: 0; }
.board__row {
  display: flex; align-items: baseline; gap: .7rem;
  padding: .85rem .5rem; margin: 0 -.5rem;
  text-decoration: none; border-radius: 6px;
  transition: background .15s ease;
}
.board__row:hover { background: rgba(255, 255, 255, .09); }
.board__service { min-width: 0; }
.board__name { display: block; font-weight: 700; font-size: 1.05rem; }
.board__note { display: block; font-size: .85rem; color: rgba(255, 255, 255, .85); margin-top: .15rem; }
.board__leader {
  flex: 1 1 2rem; border-bottom: 2px dotted rgba(255, 255, 255, .4);
  transform: translateY(-6px);
}
.board__meta { text-align: right; flex: none; }
.board__mins { display: block; font-size: .78rem; color: rgba(255, 255, 255, .85); }
.board__price { font-family: var(--display); font-size: 1.05rem; white-space: nowrap; }
.board__note--group { color: rgba(255,255,255,.75); }
.board__note, .board__mins { font-weight: 500; }
.board > .board__note {
  max-width: var(--maxw); margin: 2.4rem auto 0; padding: 0 var(--gutter);
  color: rgba(255, 255, 255, .82); font-size: .95rem;
}

/* ---------- crew ---------- */
.crew, .reviews { --focus-ring: var(--barbicide); }
.crew { background: var(--chrome); color: var(--asphalt); padding: var(--section-pad) 0; }
.crew .kicker { color: var(--barbicide); }
.crew .section-sub { color: #5a6270; }
.crew__grid {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; gap: 1.5rem;
}
.crew__card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  border: 1px solid #e2e6ec;
}
.crew__card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.crew__body { padding: 1.2rem 1.3rem 1.5rem; }
.crew__name { font-size: 1.15rem; }
.crew__years {
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--barbicide); margin-top: .35rem;
}
.crew__line { margin-top: .6rem; color: #454c59; font-size: .95rem; }
.crew__insta {
  display: inline-block; margin-top: .8rem; font-weight: 600; font-size: .9rem;
  color: var(--barbicide); text-decoration: none;
}
.crew__insta:hover { text-decoration: underline; }

/* ---------- reviews ---------- */
.reviews { background: var(--chrome); color: var(--asphalt); padding: 0 0 var(--section-pad); }
.reviews .section-sub { color: #5a6270; }
.reviews__grid {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; gap: 1.2rem;
}
.review {
  background: #fff; border: 1px solid #e2e6ec; border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
}
.stars { display: inline-flex; gap: 2px; color: var(--barbicide); }
.review__text { margin-top: .7rem; color: #2b313c; }
/* Avatars are the reviewer's initial, not a photo — see the note in main.js */
.review__by {
  margin-top: 1rem; font-weight: 700; font-size: .9rem;
  display: flex; align-items: center; gap: .65rem;
}
.review__avatar {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--display); font-size: .95rem; line-height: 1;
  background: var(--barbicide); color: #fff;
}
.review__meta { font-weight: 500; font-size: .82rem; color: #5a6270; }
/* photo tile that closes the grid, with the aggregate rating over it */
.review--photo {
  position: relative; padding: 0; overflow: hidden;
  border: 0; min-height: 200px;
  display: flex;
}
.review--photo picture { position: absolute; inset: 0; }
.review--photo img { width: 100%; height: 100%; object-fit: cover; }
.review__overlay {
  position: relative; z-index: 1;
  margin-top: auto; width: 100%;
  display: flex; flex-direction: column; align-items: flex-start; gap: .15rem;
  padding: 1.6rem 1.3rem 1.2rem;
  background: linear-gradient(to top, rgba(11, 13, 18, .92) 35%, transparent);
  color: var(--chrome);
}
.review__score { font-family: var(--display); font-size: 2rem; line-height: 1; }
.review__overlay .stars { color: #ffd046; }
.review__count { font-size: .82rem; color: var(--steel); }

.reviews__more { text-align: center; margin-top: 2rem; }
.link-arrow {
  font-weight: 700; color: var(--barbicide); text-decoration: none;
  border-bottom: 2px solid currentColor; padding-bottom: 2px;
}

/* ---------- find us ---------- */
.find { padding: var(--section-pad) 0; }
.find .kicker { color: var(--steel); }
.find__grid {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; gap: 2rem;
}
.find__map iframe {
  width: 100%; height: 320px; border: 0; border-radius: var(--radius);
  display: block;
}
.find__policy {
  font-size: 1.05rem; border-left: 4px solid var(--barbicide);
  padding-left: 1rem; color: var(--chrome);
}
.find__list { margin-top: 1.5rem; display: grid; gap: .9rem; }
.find__list div { display: grid; grid-template-columns: 6.5rem 1fr; gap: .8rem; }
.find__list dt {
  font-family: var(--display); font-size: .72rem; letter-spacing: .06em;
  color: var(--steel-dim); padding-top: .2rem;
}
.find__list dd { margin: 0; color: var(--steel); }
.find__list a { color: var(--chrome); }
.find__list [data-open-status].is-open { color: var(--open-green); font-weight: 600; }
.find__list [data-open-status].is-closed { color: var(--steel); }
.find__photo { margin-top: 1.6rem; border-radius: var(--radius); }

/* ---------- footer ---------- */
.footer { background: #0b0d12; padding: var(--section-pad) 0 2rem; }
.footer__grid {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; gap: 2.5rem;
}
.footer__logo { font-family: var(--display); font-size: 1.6rem; }
.footer__line { color: var(--steel-dim); margin-top: .6rem; font-size: .92rem; }
.footer__contact { margin-top: 1.2rem; line-height: 2; }
.footer__contact a { color: var(--steel); text-decoration: none; }
.footer__contact a:hover { color: var(--chrome); text-decoration: underline; }
.footer__h {
  font-size: .8rem; letter-spacing: .28em; text-transform: uppercase;
  font-family: var(--body); font-weight: 700; color: var(--steel-dim);
  margin-bottom: .9rem;
}
.hours-table { border-collapse: collapse; width: 100%; max-width: 22rem; }
.hours-table th, .hours-table td {
  text-align: left; padding: .35rem 0; font-weight: 400; color: var(--steel);
  font-size: .95rem;
}
.hours-table td { text-align: right; }
.hours-table .is-today th, .hours-table .is-today td {
  color: var(--chrome); font-weight: 700;
}
.footer__legal {
  max-width: var(--maxw); margin: 3rem auto 0; padding: 0 var(--gutter);
  color: var(--steel-dim); font-size: .85rem;
  display: flex; flex-wrap: wrap; gap: .4rem 1.2rem;
  justify-content: space-between;
}
.footer__credit a {
  color: var(--steel); text-decoration: none;
  border-bottom: 1px solid rgba(198, 205, 216, .35);
}
.footer__credit a:hover { color: var(--chrome); border-bottom-color: currentColor; }

/* ---------- sticky mobile bar ---------- */
.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; gap: .7rem;
  /* min-height, not height: with border-box the safe-area padding would
     otherwise eat the content box on notched phones */
  min-height: var(--bar-h);
  padding: .6rem var(--gutter) calc(.6rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--asphalt) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(198, 205, 216, .18);
}
.sticky-bar__book { flex: 1; padding: .85rem 1rem; font-size: 1rem; }
.sticky-bar__call {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid rgba(198, 205, 216, .5); color: var(--chrome);
}
body { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); }

/* ---------- breakpoints ---------- */
@media (min-width: 768px) {
  .sticky-bar { display: none; }
  body { padding-bottom: 0; }

  .hero__vert { display: block; }

  .look__grid { grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
  .board__groups { grid-template-columns: 1fr 1fr; column-gap: 3.5rem; }
  .crew__grid { grid-template-columns: repeat(3, 1fr); }
  .reviews__grid { grid-template-columns: 1fr 1fr; }
  .find__grid { grid-template-columns: 1.1fr 1fr; align-items: start; }
  .find__map iframe { height: 100%; min-height: 480px; }
  .footer__grid { grid-template-columns: 1.4fr 1fr; }
}

@media (min-width: 1100px) {
  .topbar__nav { display: flex; }
  .look__grid { grid-template-columns: repeat(4, 1fr); }
  .reviews__grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pole-rule { animation: none; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
