/* ═══════════════════════════════════════════════════════════════════════
   Choyce design system — tokens + components. Every page uses only this.
   Direction: "the pinned poster" (seed 524250474).
   Display face fixed by brand brief (Fraunces); text face from the sheet.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* Colour. One ground, one ink, one accent used rarely.
     Light: bone ground, espresso ink. Ratios measured, not guessed. */
  /* Choyce's own palette, kept exactly. Only the ROLES changed so it passes AA:
     periwinkle and gold are filled surfaces with dark labels, never small text.
     Every ratio below is measured.  */
  --cream:   #F8F3EE;   /* ground */
  --ink-900: #1E1B18;   /* ink      15.55:1 on cream  AAA */
  --muted:   #6B6157;   /* secondary 5.48:1 on cream  AA  (replaces #9E9590, which failed at 2.66) */
  --surface: #EDE8E1;   /* one tone step from ground. Never a line, never a shadow. */
  --brand:   #789ECE;   /* periwinkle — leads */
  --gold:    #C9A86A;   /* the rare second accent */
  --link:    #496A94;   /* periwinkle dark enough to be read  5.05:1 */

  --ground:    var(--cream);
  --ink:       var(--ink-900);
  --accent:    var(--brand);
  --accent-ink:var(--ink-900); /* ink on periwinkle = 6.19:1 AA. White would be 2.77 and fail. */
  --field:     var(--ink-900); /* inverted band */
  --field-ink: var(--cream);

  /* Type. Five steps, extreme contrast: display is ~8x body. */
  --display: "Fraunces", Georgia, serif;
  --text:    "Outfit", system-ui, -apple-system, sans-serif;
  /* The wordmark, set like the logo: geometric, light, widely tracked. */
  --mark-tracking: 0.18em;

  --step-small:   clamp(1rem, 0.98rem + 0.08vw, 1.0625rem);
  --step-body:    clamp(1.0625rem, 1.02rem + 0.3vw, 1.25rem);
  --step-lead:    clamp(1.375rem, 1.2rem + 0.8vw, 1.875rem);
  --step-head:    clamp(2.25rem, 1.4rem + 3.6vw, 4.5rem);
  --step-display: clamp(3.25rem, 1rem + 9vw, 8rem);

  /* Space. One scale. Section gaps far exceed internal gaps. */
  --s1: 4px;  --s2: 8px;  --s3: 16px; --s4: 24px;
  --s5: 40px; --s6: 64px; --s7: 104px; --s8: 168px;
  --gutter: clamp(16px, 4vw, 32px);
  --measure: 62ch;
  --maxw: 1360px;

  /* One corner decision for the whole site: square. Pictures square too. */
  --radius: 0;

  /* Motion. Transform and opacity only. */
  --fast: 140ms;  --base: 260ms;  --slow: 520ms;
  --ease: cubic-bezier(.2,.6,.2,1);

  --z-base: 0; --z-sticky: 10; --z-bar: 20; --z-nav: 30; --z-toast: 40;
}

:root[data-theme="dark"], 
html:not([data-theme="light"]) body.dark { color-scheme: dark; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:   #141210;                /* cream on this: 16.95:1 AAA */
    --ink:      #F8F3EE;
    --muted:    #B5ABA2;                /* 8.29:1 ground, 7.44 on surface */
    --accent:   #789ECE;                /* 6.75:1 on ground, 6.06 on surface */
    --accent-ink: #1E1B18;
    --surface:  #201D19;
    --link:     #789ECE;                /* light enough to read on dark */
    --field:    #F8F3EE;
    --field-ink:#1E1B18;
  }
}
:root[data-theme="dark"] {
  --ground: #141210; --ink: #F8F3EE; --muted: #B5ABA2;
  --accent: #789ECE; --accent-ink: #1E1B18; --surface: #201D19;
  --link: #789ECE; --field: #F8F3EE; --field-ink: #1E1B18;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--text); font-size: var(--step-body); line-height: 1.55;
  font-synthesis-weight: none;
}
img, video { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--display);
  font-variation-settings: "opsz" 120, "SOFT" 0, "WONK" 0;
  font-weight: 700; letter-spacing: -0.03em; line-height: 0.92;
  margin: 0; text-wrap: balance;
}
h1 { font-size: var(--step-display); line-height: 0.86; }
h2 { font-size: var(--step-head); }
h3 { font-size: var(--step-lead); line-height: 1.1; }
p  { margin: 0 0 var(--s3); max-width: var(--measure); text-wrap: pretty; }
.lead { font-size: var(--step-lead); line-height: 1.3; max-width: 28ch; }
.small { font-size: var(--step-small); }   /* running text keeps the full ink */
.muted { color: var(--muted); }           /* secondary notes only */
.num { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { width: min(100% - (var(--gutter) * 2), var(--maxw)); margin-inline: auto; }
/* Editorial 12-column grid. Asymmetry comes from the spans, not the grid. */
.grid12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s4); }
@media (max-width: 760px) { .grid12 { grid-template-columns: repeat(4, 1fr); } }
section { padding-block: var(--s7); }

/* ── Controls. One shape, flat fill, no shadow. ──────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  font-family: var(--text); font-weight: 600; font-size: var(--step-body);
  padding: 15px 28px; border: 0; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink);
  cursor: pointer; text-decoration: none;
  transition: transform var(--fast) var(--ease), opacity var(--fast) var(--ease);
}
.btn:hover { opacity: .88; }
.btn:active { transform: translateY(1px); }
.btn--quiet { background: var(--surface); color: var(--ink); }
.btn--on-field { background: var(--field-ink); color: var(--field); }

/* Hair-type chips — the personalisation control. Keyboard operable. */
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); padding: 0; margin: 0; list-style: none; }
.chip {
  font: inherit; font-size: var(--step-small); font-weight: 600;
  padding: 10px 16px; border: 0; border-radius: var(--radius);
  background: var(--surface); color: var(--ink); cursor: pointer;
  transition: transform var(--fast) var(--ease), opacity var(--fast) var(--ease);
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
.chip:hover { opacity: .8; }
.chip:active { transform: translateY(1px); }

/* The always-visible profile pill. */
.profile-pill {
  font: inherit; font-size: var(--step-small); font-weight: 600;
  background: var(--surface); color: var(--ink);
  border: 0; border-radius: var(--radius); padding: 8px 14px; cursor: pointer;
}

/* Stylist card — picture-led. No box, no border: the photograph is the card. */
.stylist { display: grid; gap: var(--s3); }
.stylist img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.stylist h3 { font-size: var(--step-body); font-family: var(--text); font-weight: 600; letter-spacing: 0; line-height: 1.3; }

/* Time slots. On the website these are information, not controls: the site
   cannot take a booking, so nothing here behaves like a button. */
.slots { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; padding: 0; margin: 0; }
.slot {
  display: inline-block; font-size: var(--step-small); font-weight: 600;
  font-variant-numeric: tabular-nums; padding: 12px 18px; min-width: 88px;
  text-align: center; background: var(--surface); color: var(--ink);
}
.slot--gone { opacity: .45; text-decoration: line-through; }

/* Price row — a real table keeps its own conventions. */
.menu { width: 100%; border-collapse: collapse; max-width: 56rem; }
.menu th { text-align: left; font-weight: 600; font-size: var(--step-small); color: var(--muted); padding-block: var(--s2); }
.menu td { padding-block: var(--s3); vertical-align: top; }
.menu td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

/* Review — a quotation is a blockquote at statement size, never a headline. */
.review { margin: 0; max-width: 46ch; }
.review p { font-size: var(--step-lead); line-height: 1.35; }
.review figcaption { font-size: var(--step-small); color: var(--muted); }

/* Sticky booking bar. Sits on a solid inverted field, so it needs no lift. */
.bookbar[hidden] { display: none; }   /* a class display beats the [hidden] UA rule */
.bookbar .small { color: var(--field-ink); }
.bookbar {
  position: sticky; bottom: 0; z-index: var(--z-bar);
  display: flex; gap: var(--s3); align-items: center; justify-content: space-between;
  background: var(--field); color: var(--field-ink);
  padding: var(--s3) var(--gutter);
}

/* Empty state, toast, field. */
.empty { max-width: 44ch; }
.toast {
  position: fixed; inset-inline: var(--gutter); bottom: var(--s4); z-index: var(--z-toast);
  background: var(--field); color: var(--field-ink); padding: var(--s3) var(--s4);
  max-width: 34rem; margin-inline: auto;
}
.field { display: grid; gap: var(--s2); max-width: 28rem; }
.field label { font-size: var(--step-small); font-weight: 600; }
.field input, .field select {
  font: inherit; padding: 14px 16px; border: 2px solid var(--muted);
  border-radius: var(--radius); background: var(--ground); color: var(--ink);
}
.field input:focus-visible { border-color: var(--accent); }
.field .err { font-size: var(--step-small); color: var(--accent); font-weight: 600; }

/* Skeleton — shape of the thing, not a spinner. */
.skeleton { background: var(--surface); }
.skeleton--img { aspect-ratio: 4 / 5; }
.skeleton--line { height: 1em; margin-block: var(--s2); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: var(--gutter); top: var(--s3); z-index: var(--z-nav); background: var(--field); color: var(--field-ink); padding: var(--s2) var(--s3); }

/* ── Motion. Entrances stagger; reduced motion keeps content, drops travel. */
.rise { opacity: 0; transform: translateY(24px); }
.js .rise { transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease); }
.rise.is-in { opacity: 1; transform: none; }
html:not(.js) .rise { opacity: 1; transform: none; }

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