/* base.css — reset + layout utilities shared by every generated site. Edit tokens.css, not this, unless a lesson says otherwise. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); font-size: var(--fs-0); line-height: var(--lh-body); color: var(--ink); background: var(--bg); }
img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: var(--lh-head); margin: 0 0 var(--space-2); letter-spacing: -0.01em; }
h1 { font-size: var(--fs-4); } h2 { font-size: var(--fs-3); } h3 { font-size: var(--fs-2); }
p { margin: 0 0 var(--space-2); max-width: var(--measure); }
a { color: inherit; }
ul, ol { padding-left: 1.2em; }
button, input, textarea, select { font: inherit; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Layout */
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-alt); }
.section--brand { background: var(--brand); color: var(--on-brand); }
.section--brand p, .section--brand h2 { color: inherit; }
.grid { display: grid; gap: var(--space-3); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.split { display: grid; gap: var(--space-4); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 1fr; } .split--flip > :first-child { order: 2; } }
.stack > * + * { margin-top: var(--space-2); }
.center { text-align: center; }
.center p { margin-inline: auto; }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--accent); margin-bottom: var(--space-1); }
.lead { font-size: var(--fs-1); color: var(--ink-muted); }
.muted { color: var(--ink-muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; padding: 0.8rem 1.4rem; border-radius: var(--radius-sm); font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.btn--primary, a.btn--primary, .nav a.btn--primary, .site-footer a.btn--primary { background-color: var(--accent); color: var(--on-accent); border: 0; -webkit-appearance: none; appearance: none; box-shadow: var(--shadow-sm); }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--accent-hover); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn--ghost:hover { background: rgba(0,0,0,0.05); }
.section--brand .btn--ghost:hover { background: rgba(255,255,255,0.12); }
.btn--lg { min-height: 56px; padding: 1rem 1.8rem; font-size: var(--fs-1); }

/* Cards / media */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: var(--space-3); border: 1px solid var(--line); }
.media { border-radius: var(--radius); overflow: hidden; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.ratio-4-3 { aspect-ratio: 4 / 3; } .ratio-3-4 { aspect-ratio: 3 / 4; } .ratio-16-9 { aspect-ratio: 16 / 9; } .ratio-1-1 { aspect-ratio: 1 / 1; }
.band { position: relative; min-height: clamp(260px, 45vw, 520px); }
.band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Header / nav */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(150%) blur(8px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--ink); } /* brand name in ink by default; the logo carries the color */
.brand img { height: 36px; width: auto; }
.nav { display: flex; gap: var(--space-3); align-items: center; }
.nav a:not(.btn) { text-decoration: none; font-weight: 600; }
.nav a:not(.btn):hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--brand); text-decoration: underline; text-underline-offset: 6px; }
/* Rule: never style `.nav a` color without :not(.btn) — it silently recolors the header CTA (lesson 2026-08-15) */
.nav-toggle { display: none; background: none; border: 0; padding: 0.5rem; cursor: pointer; }
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: var(--space-2) var(--gutter); display: none; }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: var(--space-2); }
}

/* Sticky mobile CTA bar (call/book intents) */
.cta-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: none; padding: 0.6rem var(--gutter) calc(0.6rem + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,0.08); }
.cta-bar .btn { width: 100%; }
@media (max-width: 720px) { .cta-bar { display: block; } body.has-cta-bar { padding-bottom: 84px; } }

/* Reveal (main.js adds .in) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* Footer */
.site-footer { padding-block: var(--space-4); border-top: 1px solid var(--line); color: var(--ink-muted); font-size: 0.95rem; }
.site-footer .container { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.site-footer a { color: inherit; }
/* A filled button still needs a measurable EDGE. A vivid accent can sit under 2:1 against the
   surface behind it: the label passes, the control does not (WCAG 1.4.11 wants 3:1). A hairline in
   a darker step of the same hue guarantees the boundary on any surface. */
.btn--primary { border: 1px solid var(--accent-ink, var(--accent-hover)); }
