/* Blockline Barbers — "street" theme tokens. Source of truth: ../../DESIGN.md */

/* Anton (OFL) is optional: put the latin-subset woff2 at template/street/assets/fonts/anton.woff2
   and build.js adds the @font-face + preload. Without it the display stack falls back to Impact. */

:root {
  color-scheme: dark;

  /* Color */
  --bg: #0E0E0E;
  --surface: #171717;
  --surface-2: #222222;
  --line: #2E2E2E;
  --line-strong: #4A4A4A;
  --text: #F2F2EE;
  --text-muted: #A3A3A0;
  --text-faint: #6E6E6B;   /* 24px+ only */
  --accent: #FFD400;
  --accent-hover: #FFE14D;
  --accent-press: #E6BF00;
  --on-accent: #0E0E0E;
  --success: #3DDC84;
  --warning: #FF9F1A;
  --error: #FF5C5C;
  --paper: #F2F2EE;
  --on-paper: #0E0E0E;

  /* Type */
  --font-display: "Anton", Impact, "Arial Narrow", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

  --fs-label: 13px;
  --fs-body: 16px;
  --fs-lead: 19px;
  --fs-h4: 24px;
  --fs-h3: 32px;
  --fs-h2: clamp(40px, 6vw, 72px);
  --fs-display: clamp(64px, 14vw, 176px);

  --lh-label: 1.3;
  --lh-body: 1.6;
  --lh-lead: 1.5;
  --lh-h4: 1.05;
  --lh-h3: 1;
  --lh-h2: .95;
  --lh-display: .88;

  --track-display: .005em;
  --track-label: .08em;
  --track-button: .06em;

  /* Spacing (4-based) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;
  --section-y: clamp(64px, 10vw, 128px);
  --gutter: 16px;
  --max: 1280px;
  --measure: 64ch;

  /* Shape & depth */
  --r-0: 0;
  --r-pill: 999px;
  --border: 1px solid var(--line);
  --border-control: 2px solid var(--line-strong);
  --shadow-hard: 4px 4px 0 var(--text);
  --focus-ring: 3px solid var(--accent);
  --focus-offset: 3px;

  /* Controls */
  --control-h: 52px;
  --fs-button: 15px;

  /* Motion */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur: 180ms;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; --fs-body: 17px; }
}
@media (min-width: 1280px) {
  :root { --gutter: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { --dur: 0ms; }
}

/* Street barber theme (Blockline Barbers). Tokens come from tokens.css, prepended by build.js. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--fs-body)/var(--lh-body) var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, address { margin: 0; }
ul { padding: 0; list-style: none; }
address { font-style: normal; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--track-display);
}
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
main:focus { outline: none; }

:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--s-4); top: var(--s-4); z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: var(--s-3) var(--s-4); font-weight: 600; text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus { transform: none; outline-color: var(--text); }

.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }
.i--sm { width: 14px; height: 14px; }

.label {
  font: 500 var(--fs-label)/var(--lh-label) var(--font-mono);
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  color: var(--text-muted);
}

.pill {
  display: inline-block; vertical-align: middle;
  margin-left: var(--s-2);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--accent); color: var(--on-accent);
  font: 500 11px/1.4 var(--font-mono);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  transform: translateY(-.25em);
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--control-h);
  padding: 0 var(--s-5);
  border: 2px solid transparent;
  border-radius: var(--r-0);
  font: 600 var(--fs-button)/1 var(--font-body);
  letter-spacing: var(--track-button);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-hard); transform: translate(-2px, -2px); }
.btn--primary:active { background: var(--accent-press); box-shadow: none; transform: none; }
.btn--primary:focus-visible { outline-color: var(--text); }
.btn--secondary { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--secondary:hover { border-color: var(--text); }
.btn--secondary:active { background: var(--surface); }
.btn--solid-bg { background: var(--bg); }
.btn--sm { min-height: 44px; padding: 0 var(--s-4); }
.btn[aria-disabled="true"] { background: var(--surface-2); color: var(--text-faint); border-color: var(--line); box-shadow: none; transform: none; pointer-events: none; }

.link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: 5px;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.link:hover { background: var(--accent); color: var(--on-accent); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgb(14 14 14 / .92);
  border-bottom: var(--border);
  -webkit-backdrop-filter: saturate(1.2);
}
.nav__in { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: var(--s-4); }
.nav__brand {
  font: 400 26px/1 var(--font-display);
  text-transform: uppercase; letter-spacing: .01em;
  text-decoration: none;
}
.nav__toggle {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  background: none; color: var(--text);
  border: 2px solid var(--line-strong); border-radius: var(--r-0);
  cursor: pointer;
}
.nav__toggle .i--close, .nav__toggle[aria-expanded="true"] .i--open { display: none; }
.nav__toggle[aria-expanded="true"] .i--close { display: block; }
.nav__links { display: none; }
.nav__links a:not(.btn) {
  font: 500 14px/1 var(--font-mono);
  text-transform: uppercase; letter-spacing: var(--track-label);
  text-decoration: none;
  color: var(--text-muted);
}
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__links a:not(.btn).is-current { color: var(--text); box-shadow: inset 0 -2px var(--accent); }

/* Mobile menu panel */
.nav.is-open .nav__links {
  display: flex; flex-direction: column; align-items: stretch; gap: var(--s-5);
  position: absolute; left: 0; right: 0; top: 100%;
  padding: var(--s-5) var(--gutter) var(--s-6);
  background: var(--bg);
  border-bottom: var(--border);
}
.nav.is-open .nav__links ul { display: grid; }
.nav.is-open .nav__links ul a { display: block; padding: var(--s-4) 0; border-bottom: var(--border); font-size: 16px; }
.no-js .nav__toggle, html:not(.js) .nav__toggle { display: none; }

@media (min-width: 768px) {
  .nav__toggle { display: none; }
  .nav__links, .nav.is-open .nav__links {
    display: flex; flex-direction: row; align-items: center; gap: var(--s-6);
    position: static; padding: 0; border: 0; background: none;
  }
  .nav__links ul, .nav.is-open .nav__links ul { display: flex; gap: var(--s-6); }
  .nav.is-open .nav__links ul a { padding: var(--s-2) 0; border: 0; font-size: 14px; }
  .nav__links a:not(.btn) { padding: var(--s-2) 0; }
}
html:not(.js) .nav__links { display: flex; }
html:not(.js) .nav__links ul { display: flex; gap: var(--s-4); }

/* ---------- Hero ---------- */
.hero { padding: var(--s-7) 0 var(--s-8); }
.hero__grid { display: grid; gap: var(--s-7); }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); margin-bottom: var(--s-5); }
.hero__title {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  margin-bottom: var(--s-6);
  font-size: clamp(56px, 15vw, 152px);
}
.hero__line { display: block; }
.hero__line + .hero__line { color: var(--accent); }
.hero__lead { font-size: var(--fs-lead); line-height: var(--lh-lead); color: var(--text-muted); max-width: 40ch; margin-bottom: var(--s-6); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.hero__media { position: relative; aspect-ratio: 4 / 5; }
.hero__media > * { width: 100%; height: 100%; }
.hero__media img { object-fit: cover; filter: saturate(.85) contrast(1.05); }

@media (min-width: 1024px) {
  .hero { padding: var(--s-8) 0 var(--s-9); }
  .hero__grid { grid-template-columns: 7fr 5fr; align-items: end; gap: var(--s-8); }
  .hero__title { font-size: clamp(72px, 7.4vw, 120px); }
  .hero__line { white-space: nowrap; }
}

/* Open / closed status */
.status { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--text-muted); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: var(--r-pill); background: var(--text-faint); }
.status.is-open { color: var(--text); }
.status.is-open::before { background: var(--success); }
.status[hidden] { display: none; }

/* ---------- Placeholders ---------- */
.ph {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end;
  min-height: 100%;
  background-color: var(--surface);
  background-image: repeating-linear-gradient(135deg, var(--line) 0 1px, transparent 1px 18px);
  border: var(--border);
}
.ph__label {
  margin: var(--s-4);
  padding: 6px 10px;
  background: var(--bg);
  border: var(--border);
  font: 500 var(--fs-label)/1.3 var(--font-mono);
  text-transform: uppercase; letter-spacing: var(--track-label);
  color: var(--text-muted);
}
.ph__no {
  position: absolute; top: var(--s-3); right: var(--s-4);
  font: 400 40px/1 var(--font-display);
  color: var(--text-faint);
}

/* Brand panel: stands in for the hero photo until there is one */
.brandpanel {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 100%;
  padding: var(--s-5);
  background: var(--surface);
  border: var(--border);
  container-type: inline-size;
}
.brandpanel__mark {
  font: 400 calc(100cqi / var(--n) * 2.05)/.86 var(--font-display);
  text-transform: uppercase;
  color: var(--bg);
  -webkit-text-stroke: 2px var(--line-strong);
}
.brandpanel__mark span { display: block; }
.brandpanel__mark span:last-child { color: var(--accent); -webkit-text-stroke: 0; }
.brandpanel__foot { display: flex; justify-content: space-between; gap: var(--s-4); border-top: var(--border); padding-top: var(--s-4); }

/* ---------- Ticker ---------- */
.tick { background: var(--accent); color: var(--on-accent); overflow: hidden; border-block: 2px solid var(--bg); }
.tick__track { display: flex; width: max-content; animation: tick 40s linear infinite; }
.tick__group { display: flex; align-items: center; flex: none; }
.tick__item, .tick__sep {
  padding: var(--s-4) var(--s-3);
  font: 500 15px/1 var(--font-mono);
  text-transform: uppercase; letter-spacing: var(--track-label);
  white-space: nowrap;
}
.tick__sep { opacity: .5; }
.tick:hover .tick__track { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tick__track { animation: none; } }

/* ---------- Sections ---------- */
.sec { padding: var(--section-y) 0; }
.sec + .sec { border-top: var(--border); }
.sec__head { display: grid; gap: var(--s-3); justify-items: start; margin-bottom: var(--s-7); }
.sec__head .link { margin-top: var(--s-2); }

/* ---------- Menu (the one inverted band) ---------- */
.menu { background: var(--paper); color: var(--on-paper); border-top: 0; }
.menu + .sec { border-top: 0; }
.menu .label { color: #4A4A47; }
.menu__grid { display: grid; gap: var(--s-7); }
.menu__head { display: grid; gap: var(--s-4); justify-items: start; align-content: start; }
.menu__intro { color: #4A4A47; max-width: 34ch; margin-bottom: var(--s-2); }
.menu .btn--primary { background: var(--on-paper); color: var(--paper); }
.menu .btn--primary:hover { background: #262626; box-shadow: 4px 4px 0 var(--accent); }
.menu .btn--primary:active { background: #000; box-shadow: none; }
.menu .btn--primary:focus-visible { outline-color: var(--on-paper); }
.menu .pill { background: var(--on-paper); color: var(--accent); }
.menu__list { border-top: 2px solid var(--on-paper); }
.menu__row {
  display: grid; grid-template-columns: 1fr auto; gap: var(--s-2) var(--s-5); align-items: start;
  padding: var(--s-5) 0;
  border-bottom: 1px solid rgb(14 14 14 / .18);
}
.menu__name { font-size: var(--fs-h4); line-height: var(--lh-h4); }
.menu__note { margin-top: var(--s-2); color: #4A4A47; font-size: 15px; line-height: 1.5; max-width: 46ch; }
.menu__price {
  font: 500 22px/1 var(--font-mono);
  white-space: nowrap; text-align: right;
}
.menu__cur { font-size: .7em; vertical-align: .3em; margin-right: 1px; }
.menu__from { display: block; font-size: 11px; letter-spacing: var(--track-label); text-transform: uppercase; color: #4A4A47; margin-bottom: 4px; }
@media (min-width: 1024px) {
  .menu__grid { grid-template-columns: 4fr 8fr; gap: var(--s-8); }
  .menu__head { position: sticky; top: 112px; }
  .menu__name { font-size: var(--fs-h3); line-height: var(--lh-h3); }
}

/* ---------- Work grid ---------- */
.work__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
.work__item { aspect-ratio: 1; }
.work__item > * { width: 100%; height: 100%; }
.work__item img { object-fit: cover; filter: saturate(.85) contrast(1.05); }
.work__item--1 { grid-column: span 2; aspect-ratio: 4 / 3; }
.work__item--6 { grid-column: span 2; aspect-ratio: 16 / 9; }
@media (min-width: 768px) {
  .work__grid { grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }
  .work__item--1 { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
  .work__item--4, .work__item--5, .work__item--6 { grid-column: span 2; aspect-ratio: 2 / 1; }
}
@media (min-width: 1024px) {
  .work__grid { grid-template-columns: repeat(6, 1fr); }
  .work__item--1 { grid-column: span 3; grid-row: span 2; }
  .work__item--2, .work__item--3 { grid-column: span 3; aspect-ratio: 2 / 1; }
  .work__item--4, .work__item--5, .work__item--6 { grid-column: span 2; aspect-ratio: 1; }
}

/* Only 3 slots when no gallery photos are set yet */
.work__grid--empty .work__item--1 { grid-column: span 2; aspect-ratio: 2 / 1; }
@media (min-width: 768px) {
  .work__grid--empty { grid-template-columns: repeat(3, 1fr); }
  .work__grid--empty .work__item { grid-column: span 1; grid-row: auto; aspect-ratio: 4 / 5; }
}

/* ---------- Shop ---------- */
.shop__grid { display: grid; gap: var(--s-7); }
.shop__text { display: grid; gap: var(--s-4); align-content: center; }
.shop__body { font-size: var(--fs-lead); line-height: var(--lh-lead); color: var(--text-muted); max-width: var(--measure); }
.shop__media { aspect-ratio: 4 / 3; }
.shop__media > * { width: 100%; height: 100%; }
.shop__media img { object-fit: cover; filter: saturate(.85) contrast(1.05); }
@media (min-width: 1024px) {
  .shop__grid { grid-template-columns: 7fr 5fr; gap: var(--s-8); }
  .shop__media { aspect-ratio: 4 / 5; }
  .shop__grid--solo { grid-template-columns: 1fr; }
}

/* ---------- Visit ---------- */
.visit__grid { display: grid; gap: var(--s-7); }
.hours { background: var(--surface); border: var(--border); padding: var(--s-5); }
.hours__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); }
.hours__top .status { font: 500 var(--fs-label)/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: var(--track-label); }
.hours__table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 15px; }
.hours__table th, .hours__table td { padding: var(--s-3) var(--s-3); border-top: var(--border); text-align: left; color: var(--text-muted); font-weight: 500; }
.hours__table td { text-align: right; white-space: nowrap; }
.hours__table tr.is-closed td { color: var(--text-muted); font-style: italic; }
.hours__table tr.is-today th, .hours__table tr.is-today td { color: var(--text); background: var(--surface-2); }
.hours__table tr.is-today th { box-shadow: inset 4px 0 var(--accent); }
.today-tag {
  display: none; margin-left: var(--s-2);
  font-size: 11px; letter-spacing: var(--track-label); text-transform: uppercase;
  color: var(--accent);
}
.is-today .today-tag { display: inline; }
.loc { display: grid; gap: var(--s-4); align-content: start; }
.loc__addr { font: 400 var(--fs-h3)/1.05 var(--font-display); text-transform: uppercase; }
.loc__cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-2); }
.loc__note { color: var(--text-muted); max-width: 40ch; }
@media (min-width: 1024px) {
  .visit__grid { grid-template-columns: 7fr 5fr; gap: var(--s-8); }
  .hours { padding: var(--s-6); }
  .loc { padding-top: var(--s-6); }
  .loc__addr { font-size: 40px; }
}

/* ---------- Footer ---------- */
.foot { border-top: var(--border); padding: var(--s-8) 0 calc(var(--s-8) + 72px); }
.foot__name {
  font: 400 calc((100vw - 2 * var(--gutter)) / var(--n) * 2.25)/.85 var(--font-display);
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
  margin-bottom: var(--s-7);
}
@media (min-width: 1376px) { .foot__name { font-size: calc(var(--max) / var(--n) * 2.25); } }
.foot__cols { display: grid; gap: var(--s-6); padding-bottom: var(--s-7); border-bottom: var(--border); }
.foot__cols .label { margin-bottom: var(--s-3); }
.foot__cols address { color: var(--text-muted); }
.foot__links { display: grid; gap: var(--s-1); }
.foot__links a { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; text-decoration: none; color: var(--text-muted); }
.foot__links a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.foot__meta, .foot__credit { margin-top: var(--s-5); font: 500 var(--fs-label)/1.6 var(--font-mono); color: var(--text-muted); letter-spacing: .02em; }
.foot__credit { margin-top: var(--s-2); }
.foot__credit a { text-decoration-color: var(--accent); text-underline-offset: 3px; }
@media (min-width: 768px) {
  .foot { padding-bottom: var(--s-8); }
  .foot__cols { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Mobile bottom bar ---------- */
.mbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: 1fr auto; gap: var(--s-2);
  padding: var(--s-2) var(--gutter) calc(var(--s-2) + env(safe-area-inset-bottom));
  background: var(--bg); border-top: var(--border);
  transform: translateY(110%);
  transition: transform var(--dur) var(--ease);
}
.mbar.is-visible { transform: none; }
.mbar--single { grid-template-columns: 1fr; }
@media (min-width: 768px) { .mbar { display: none; } }

/* Brand panel is shorter than a photo on phones and tablets */
@media (max-width: 1023px) { .hero__media:has(.brandpanel) { aspect-ratio: 3 / 2; } }
