/* ============================================================
   components.css — the component library.
   Every component is base class + modifier classes.
   States (hover/focus/disabled) are defined ONCE on the base.
   Catalogue each component in COMPONENTS.md.
   ============================================================ */

/* ---- Button ------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font: inherit;
  font-weight: var(--btn-weight);
  text-transform: var(--btn-transform);
  letter-spacing: var(--btn-tracking);
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--btn-radius);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
}
.btn:hover    { transform: translateY(-1px); }
.btn:active   { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn--primary   { background: var(--color-brand); color: var(--color-on-brand); }
.btn--primary:hover { background: var(--color-brand-hover); color: var(--color-on-brand); }
.btn--secondary { background: transparent; border-color: var(--color-border); color: var(--color-text); }
.btn--secondary:hover { border-color: var(--color-brand); }
.btn--ghost     { background: transparent; color: var(--color-brand); padding-inline: var(--space-2); }
.btn--accent    { background: var(--color-accent); color: var(--color-on-accent); }
.btn--accent:hover { background: color-mix(in srgb, var(--color-accent) 88%, var(--color-on-accent)); color: var(--color-on-accent); }
.btn--danger    { background: var(--color-danger); color: #fff; }
.btn--danger:hover { background: color-mix(in srgb, var(--color-danger) 85%, #000); }

/* Sizes — share the control-height scale so buttons line up with inputs */
.btn--sm { height: var(--control-height-sm); padding-inline: var(--space-3); font-size: var(--text-sm); }
.btn--lg { height: var(--control-height-lg); padding-inline: var(--space-8); font-size: var(--text-lg); }
.btn { height: var(--control-height); }
.btn--block { width: 100%; }

/* ---- Card -------------------------------------------------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}
.card--featured { border-color: var(--color-brand); box-shadow: var(--shadow-md); }
.card__title { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.card__body  { color: var(--color-text-muted); }

/* ---- Pill / badge ------------------------------------------ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-full);
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

/* ---- Nav --------------------------------------------------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-4);
}
.nav__links { display: flex; gap: var(--space-6); align-items: center; }
.nav__brand { font-weight: var(--weight-bold); color: var(--color-text); display: inline-flex; align-items: center; gap: var(--space-2); }
.nav__brand img { display: block; width: auto; height: 28px; border-radius: var(--radius-sm); }
.nav__links a[aria-current="page"] { color: var(--color-text); font-weight: var(--weight-medium); }
/* Hamburger toggle — hidden on desktop, revealed on mobile only once JS
   enhances the nav. Without JS the links simply wrap (see below). */
.nav__toggle {
  display: none; align-items: center; justify-content: center;
  width: var(--control-height); height: var(--control-height); padding: 0;
  color: var(--color-text); background: transparent;
  border: 1px solid var(--color-border); border-radius: var(--radius-md); cursor: pointer;
}
.nav__toggle:hover { border-color: var(--color-brand); }
.nav__toggle:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
@media (max-width: 640px) {
  .nav { flex-wrap: wrap; }
  /* No-JS fallback: the links wrap onto their own row and stay reachable. */
  .nav__links { flex-wrap: wrap; flex-basis: 100%; gap: var(--space-4); }
  /* Enhanced: the toggle controls a stacked disclosure menu. */
  .nav.is-enhanced .nav__toggle { display: inline-flex; }
  .nav.is-enhanced .nav__links { display: none; flex-direction: column; align-items: stretch; flex-basis: 100%; }
  .nav.is-enhanced .nav__links.is-open { display: flex; }
  .nav.is-enhanced .nav__links a { padding-block: var(--space-2); }
}

/* ---- Nav dropdown ----------------------------------------- */
.nav__dropdown { position: relative; }
.nav__dropdown-toggle {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--color-link); font-size: inherit; font-family: inherit;
  display: inline-flex; align-items: center; gap: var(--space-1);
}
.nav__dropdown-toggle:hover { color: var(--color-brand-hover); }
.nav__dropdown-toggle:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; border-radius: 2px; }
.nav__dropdown-toggle svg { transition: transform 0.2s; }
.nav__dropdown-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav__dropdown-menu {
  position: absolute; top: calc(100% + var(--space-2)); left: 0;
  min-width: 14rem; background: var(--color-surface, #1a1a1a);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); padding: var(--space-2);
  display: none; flex-direction: column; gap: 0; z-index: 100;
}
.nav__dropdown-menu.is-open { display: flex; }
.nav__dropdown-menu a {
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  color: var(--color-text-muted); font-size: var(--text-sm);
  display: block;
}
.nav__dropdown-menu a:hover { background: var(--color-surface-2); color: var(--color-text); }
@media (max-width: 640px) {
  .nav__dropdown-menu { position: static; box-shadow: none; border: none; padding: var(--space-1) 0 var(--space-1) var(--space-4); background: transparent; }
  .nav__dropdown-menu a { padding-block: var(--space-1); }
}

/* ---- Nav overlay (fixed, transparent-to-solid on scroll) --
   Opt-in via client.json's "nav": { "variant": "overlay" }
   (see build.js's nav.variant token). Meant to sit over a
   full-bleed .hero-photo section on the same page. JS in ui.js
   toggles .is-solid past a small scroll offset. With no JS the
   header just stays in its transparent starting state — that's
   why .hero-photo__scrim (below) darkens the top of the photo
   too, so nav text is readable either way. */
.site-header--overlay {
  position: fixed; inset-inline: 0; top: 0; z-index: var(--z-dropdown);
  background: transparent;
  /* Deliberately slower than --transition-base (200ms): this fade
     covers the whole header, so a quick snap reads as a flicker —
     give the eye time to register it. */
  transition: background 700ms ease, box-shadow 700ms ease, backdrop-filter 700ms ease, color 700ms ease;
}
.site-header--overlay .nav__brand,
.site-header--overlay .nav__links a:not(.btn) { color: #fff; }
.site-header--overlay .nav__toggle { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.site-header--overlay.is-solid {
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-header--overlay.is-solid .nav__brand,
.site-header--overlay.is-solid .nav__links a:not(.btn) { color: var(--color-text); }
.site-header--overlay.is-solid .nav__toggle { color: var(--color-text); border-color: var(--color-border); }
@media (max-width: 640px) {
  /* The stacked mobile disclosure menu has no background of its own
     (see .nav.is-enhanced .nav__links.is-open); give it one here so
     open links aren't floating unreadably over the photo before the
     header has gone solid. */
  .site-header--overlay .nav.is-enhanced .nav__links.is-open {
    background: rgba(10, 8, 6, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-inline: calc(-1 * var(--space-4));
    padding: var(--space-4);
  }
  .site-header--overlay.is-solid .nav.is-enhanced .nav__links.is-open {
    background: var(--color-surface);
  }
}

/* ---- Hero photo (full-bleed image hero) --------------------
   Pairs with .site-header--overlay: the header floats over this
   section. Structure:
     <section class="hero-photo">
       <div class="hero-photo__media" style="background-image:url(...)"></div>
       <div class="hero-photo__scrim"></div>
       <div class="hero-photo__content container"> ... </div>
     </section>
   The scroll parallax (ui.js sets --parallax-y as the visitor
   scrolls) is skipped entirely under prefers-reduced-motion —
   see ui.js's own matchMedia guard — so motion-sensitive visitors
   just get the still, scaled photo below with no JS required. */
.hero-photo {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  overflow: hidden; isolation: isolate;
}
.hero-photo__media {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: sepia(0.15) brightness(0.82);
  /* Scaled up beyond the section bounds so the parallax translate
     (ui.js) has headroom to move without exposing bare edges. */
  transform: scale(1.15) translate3d(0, calc(var(--parallax-y, 0) * 1px), 0);
  will-change: transform;
}
.hero-photo__scrim {
  position: absolute; inset: 0;
  /* Darkened at both ends on purpose: top protects nav-over-photo
     legibility even before .is-solid kicks in (or with no JS at
     all), bottom protects the headline/actions. */
  background: linear-gradient(180deg,
    rgba(10, 8, 6, 0.55) 0%,
    rgba(10, 8, 6, 0.08) 20%,
    rgba(10, 8, 6, 0.15) 55%,
    rgba(10, 8, 6, 0.88) 100%);
}
.hero-photo__content {
  position: relative; z-index: 1;
  padding-block: var(--space-24) var(--space-16);
  color: #fff;
}
.hero-photo__content .eyebrow { color: rgba(255, 255, 255, 0.75); }

/* ---- Grid -------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

/* ---- Grid system (12 columns) -----------------------------
   .grid-12 is the container; .col-span-N (1–12) sets width.
   Gap uses tokens. Below 640px every column goes full-width so
   layouts stay mobile-first without per-column breakpoints. */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-6);
}
.grid-12.gap-sm { gap: var(--space-3); }
.grid-12.gap-lg { gap: var(--space-12); }

.col-span-1  { grid-column: span 1; }
.col-span-2  { grid-column: span 2; }
.col-span-3  { grid-column: span 3; }
.col-span-4  { grid-column: span 4; }
.col-span-5  { grid-column: span 5; }
.col-span-6  { grid-column: span 6; }
.col-span-7  { grid-column: span 7; }
.col-span-8  { grid-column: span 8; }
.col-span-9  { grid-column: span 9; }
.col-span-10 { grid-column: span 10; }
.col-span-11 { grid-column: span 11; }
.col-span-12 { grid-column: span 12; }
.col-start-2 { grid-column-start: 2; }  /* offset helper example */
.col-start-3 { grid-column-start: 3; }
.col-start-4 { grid-column-start: 4; }

@media (max-width: 640px) {
  .grid-12 > [class*="col-span"] { grid-column: 1 / -1; }
}

/* Responsive tiers (Bootstrap-style): col-md-N applies ≥768px,
   col-lg-N ≥1024px. Combine with a base .col-span-N for the
   small-screen width, e.g. class="col-span-12 col-md-6 col-lg-4". */
@media (min-width: 768px) {
  .col-md-1{grid-column:span 1}.col-md-2{grid-column:span 2}.col-md-3{grid-column:span 3}
  .col-md-4{grid-column:span 4}.col-md-5{grid-column:span 5}.col-md-6{grid-column:span 6}
  .col-md-7{grid-column:span 7}.col-md-8{grid-column:span 8}.col-md-9{grid-column:span 9}
  .col-md-10{grid-column:span 10}.col-md-11{grid-column:span 11}.col-md-12{grid-column:span 12}
}
@media (min-width: 1024px) {
  .col-lg-1{grid-column:span 1}.col-lg-2{grid-column:span 2}.col-lg-3{grid-column:span 3}
  .col-lg-4{grid-column:span 4}.col-lg-5{grid-column:span 5}.col-lg-6{grid-column:span 6}
  .col-lg-7{grid-column:span 7}.col-lg-8{grid-column:span 8}.col-lg-9{grid-column:span 9}
  .col-lg-10{grid-column:span 10}.col-lg-11{grid-column:span 11}.col-lg-12{grid-column:span 12}
}

/* ---- Icon -------------------------------------------------
   <svg class="icon"><use href="assets/icons.svg#icon-NAME"></use></svg>
   Sizes in em so an icon scales with its surrounding text. */
.icon {
  width: 1.25em; height: 1.25em;
  flex: 0 0 auto;
  vertical-align: -0.18em;   /* optical alignment with text baseline */
  color: inherit;            /* strokes use currentColor */
}
.icon--sm { width: 1em;   height: 1em;   vertical-align: -0.12em; }
.icon--lg { width: 1.5em; height: 1.5em; vertical-align: -0.25em; }
.icon--xl { width: 2rem;  height: 2rem; }

/* ---- External icon utility (Lucide / Iconoir) -------------
   Renders any monochrome SVG via CSS mask so it inherits
   currentColor — works with Lucide & Iconoir CDN files alike:
   <i class="ico" style="--ico:url('…/coffee.svg')" aria-hidden="true"></i>
   Stroke icons stay crisp; multicolour icons aren't supported (by design). */
.ico {
  display: inline-block;
  width: 1.25em; height: 1.25em;
  flex: 0 0 auto;
  vertical-align: -0.18em;
  background-color: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat;
          mask: var(--ico) center / contain no-repeat;
}
.ico--sm { width: 1em;   height: 1em;   vertical-align: -0.12em; }
.ico--lg { width: 1.5em; height: 1.5em; vertical-align: -0.25em; }
.ico--xl { width: 2rem;  height: 2rem; }

/* ---- Hero -------------------------------------------------- */
.hero { text-align: center; padding-block: var(--space-24); }
.hero__title    { max-width: 18ch; margin-inline: auto; }
.hero__subtitle { max-width: var(--max-width-prose); margin-inline: auto; font-size: var(--text-lg); color: var(--color-text-muted); }
.hero__actions  { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }

/* Fluid headline: scales without breakpoints */
.hero__title { font-size: clamp(var(--text-3xl), 6vw, var(--text-4xl)); }

/* ============================================================
   The 10 most important components continue below.
   Patterns adapted from Tailwind UI + Chakra UI, expressed in
   token-driven vanilla CSS. Interactivity lives in scripts/ui.js.
   ============================================================ */

/* ---- 2. Form field ---------------------------------------- */
.field { display: flex; flex-direction: column; gap: var(--space-2); max-width: var(--max-width-prose); }
.field__label { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--color-text); }
.field__label .req { color: var(--color-danger); }
.field__hint  { font-size: var(--text-xs); color: var(--color-text-muted); }
.field__error { font-size: var(--text-xs); color: var(--color-danger); }

.input {
  height: var(--control-height);
  padding: 0 var(--space-3);
  font: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
textarea.input { height: auto; padding-block: var(--space-3); resize: vertical; min-height: 6rem; }
.input::placeholder { color: var(--color-text-muted); }
.input:hover { border-color: color-mix(in srgb, var(--color-border) 60%, var(--color-text-muted)); }
.input:focus-visible {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-brand) 30%, transparent);
}
.input:disabled { opacity: 0.5; cursor: not-allowed; }
/* Invalid state — paired with .field__error text, never colour alone */
.field--invalid .input,
.input[aria-invalid="true"] {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-danger) 25%, transparent);
}

/* ---- 5. Modal / dialog (native <dialog>) ------------------ */
.modal {
  width: min(32rem, calc(100vw - var(--space-8)));
  padding: 0;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.modal::backdrop { background: var(--color-overlay); backdrop-filter: blur(2px); }
.modal__header { display: flex; align-items: start; justify-content: space-between; gap: var(--space-4); padding: var(--space-6) var(--space-6) 0; }
.modal__title  { font-size: var(--text-lg); }
.modal__body   { padding: var(--space-4) var(--space-6); color: var(--color-text-muted); }
.modal__footer { display: flex; gap: var(--space-3); justify-content: flex-end; padding: 0 var(--space-6) var(--space-6); }
.modal__close  {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border: 0; border-radius: var(--radius-md);
  background: transparent; color: var(--color-text-muted); cursor: pointer; font-size: var(--text-lg);
}
.modal__close:hover { background: var(--color-surface-2); color: var(--color-text); }

/* ---- 6. Dropdown menu ------------------------------------- */
.menu { position: relative; display: inline-block; }
.menu__list {
  position: absolute; top: calc(100% + var(--space-2)); left: 0; z-index: var(--z-dropdown);
  min-width: 12rem; padding: var(--space-2); margin: 0; list-style: none;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
}
.menu__list[hidden] { display: none; }
.menu__item {
  display: flex; align-items: center; gap: var(--space-2); width: 100%;
  padding: var(--space-2) var(--space-3); font: inherit; text-align: left;
  color: var(--color-text); background: transparent; border: 0; border-radius: var(--radius-sm); cursor: pointer;
}
.menu__item:hover, .menu__item:focus-visible { background: var(--color-surface-2); outline: none; }
.menu__item--danger { color: var(--color-danger); }
.menu__sep { height: 1px; margin: var(--space-2) 0; background: var(--color-border); border: 0; }

/* ---- 7. Alert (static) + Toast (transient) ---------------- */
.alert {
  display: flex; gap: var(--space-3); align-items: start;
  padding: var(--space-4); border: 1px solid var(--color-border);
  border-left-width: 4px; border-radius: var(--radius-md);
  background: var(--color-surface);
}
.alert__title { font-weight: var(--weight-medium); }
.alert__body  { color: var(--color-text-muted); font-size: var(--text-sm); }
.alert--info    { border-left-color: var(--color-brand);   background: color-mix(in srgb, var(--color-brand) 8%, var(--color-surface)); }
.alert--success { border-left-color: var(--color-success); background: color-mix(in srgb, var(--color-success) 8%, var(--color-surface)); }
.alert--warn    { border-left-color: var(--color-warn);    background: color-mix(in srgb, var(--color-warn) 8%, var(--color-surface)); }
.alert--danger  { border-left-color: var(--color-danger);  background: color-mix(in srgb, var(--color-danger) 8%, var(--color-surface)); }

.toast-region {
  position: fixed; bottom: var(--space-6); right: var(--space-6); z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: var(--space-3); width: min(22rem, calc(100vw - var(--space-8)));
}
.toast {
  display: flex; gap: var(--space-3); align-items: start;
  padding: var(--space-4); background: var(--color-surface-2);
  border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  animation: toast-in var(--transition-base);
}
@keyframes toast-in { from { opacity: 0; transform: translateY(var(--space-2)); } }

/* ---- 8. Table --------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table caption { padding: var(--space-3) var(--space-4); text-align: left; color: var(--color-text-muted); }
.table th, .table td { padding: var(--space-3) var(--space-4); text-align: left; border-bottom: 1px solid var(--color-border); }
.table thead th { font-weight: var(--weight-medium); color: var(--color-text-muted); background: var(--color-surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--color-surface); }
.table--zebra tbody tr:nth-child(even) { background: color-mix(in srgb, var(--color-surface) 50%, transparent); }

/* ---- 9. Tabs ---------------------------------------------- */
.tabs__list { display: flex; gap: var(--space-2); border-bottom: 1px solid var(--color-border); }
.tabs__tab {
  padding: var(--space-3) var(--space-4); font: inherit; font-weight: var(--weight-medium);
  color: var(--color-text-muted); background: transparent; border: 0; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs__tab:hover { color: var(--color-text); }
.tabs__tab[aria-selected="true"] { color: var(--color-brand); border-bottom-color: var(--color-brand); }
.tabs__panel { padding-block: var(--space-6); }
.tabs__panel[hidden] { display: none; }

/* ---- Site footer — .site-footer --------------------------- */
.site-footer { border-top: 1px solid var(--color-border); background: var(--color-surface); }
.site-footer__top {
  display: grid; gap: var(--space-8) var(--space-12);
  grid-template-columns: 1.5fr repeat(3, 1fr);
  grid-auto-rows: auto;
  padding-block: var(--space-16);
}
.site-footer__brand {
  display: flex; flex-direction: column; gap: var(--space-3); max-width: 22rem;
  grid-column: 1; grid-row: 1 / 3;
}
.site-footer__brandname { font-weight: var(--weight-bold); color: var(--color-text); display: inline-flex; align-items: center; gap: var(--space-2); }
.site-footer__brandname img { display: block; width: auto; height: 28px; border-radius: var(--radius-sm); }
.site-footer__tagline { color: var(--color-text-muted); font-size: var(--text-sm); }
.site-footer__col { display: flex; flex-direction: column; gap: var(--space-3); }
.site-footer__heading {
  margin: 0;
  font-size: var(--text-xs); font-weight: var(--weight-medium);
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted);
}
.site-footer__links { display: flex; flex-direction: column; gap: var(--space-2); }
.site-footer__col a { color: var(--color-text-muted); font-size: var(--text-sm); }
.site-footer__col a:hover { color: var(--color-text); }
.site-footer__bottom {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  flex-wrap: wrap; padding-block: var(--space-6);
  border-top: 1px solid var(--color-border); color: var(--color-text-muted); font-size: var(--text-sm);
}
.site-footer__social { display: flex; gap: var(--space-3); }
.site-footer__social a { color: var(--color-text-muted); }
.site-footer__social a:hover { color: var(--color-brand); }
@media (max-width: 768px) {
  .site-footer__top { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .site-footer__brand { grid-column: 1 / -1; grid-row: auto; }
}

/* ---- Sidebar nav / table of contents — .sidenav ----------
   A sticky vertical nav for in-page or cross-page wayfinding.
   Active item marked with aria-current (set in markup or by the
   scrollspy in ui.js). */
.sidenav { position: sticky; top: var(--space-6); align-self: start; }
.sidenav__title {
  font-size: var(--text-xs); font-weight: var(--weight-medium);
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--color-text-muted); padding: 0 var(--space-3) var(--space-2);
}
.sidenav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.sidenav__link {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-md);
  font-size: var(--text-sm); color: var(--color-text-muted);
  border-left: 2px solid transparent;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.sidenav__link:hover { color: var(--color-text); background: var(--color-surface); }
.sidenav__link[aria-current="true"] {
  color: var(--color-brand); font-weight: var(--weight-medium);
  background: color-mix(in srgb, var(--color-brand) 10%, transparent);
  border-left-color: var(--color-brand);
}
.sidenav__num { font-variant-numeric: tabular-nums; color: var(--color-text-muted); }
.sidenav__link[aria-current="true"] .sidenav__num { color: var(--color-brand); }

/* ---- 10. Badge (semantic; supersedes plain .pill) --------- */
.badge {
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: var(--space-1) var(--space-3); font-size: var(--text-xs); font-weight: var(--weight-medium);
  border-radius: var(--radius-full); background: var(--color-surface-2);
  color: var(--color-text-muted); border: 1px solid var(--color-border);
}
.badge--brand   { background: color-mix(in srgb, var(--color-brand) 15%, transparent);   color: var(--color-link);   border-color: transparent; }
.badge--success { background: color-mix(in srgb, var(--color-success) 15%, transparent); color: var(--color-success); border-color: transparent; }
.badge--warn    { background: color-mix(in srgb, var(--color-warn) 15%, transparent);    color: var(--color-warn);    border-color: transparent; }
.badge--danger  { background: color-mix(in srgb, var(--color-danger) 15%, transparent);  color: var(--color-danger);  border-color: transparent; }
.badge--dot::before { content: ""; width: 0.5em; height: 0.5em; border-radius: var(--radius-full); background: currentColor; }

/* ============================================================
   PHASE 1 — Integrations (Irish SMB). See specs/integrations.md
   and specs/personas.md. Three components ship together:
   .enquiry (lead form) · .pay (Stripe deposit) · .consent (banner)
   ============================================================ */

/* ---- Choice control (checkbox / radio row) ----------------
   Used for the consent + marketing opt-ins. The control is a row,
   not a column, so the label sits beside the box. Consent boxes
   are NEVER pre-checked — that's enforced in markup, not CSS. */
.choice { display: flex; gap: var(--space-3); align-items: flex-start; cursor: pointer; }
.choice input[type="checkbox"], .choice input[type="radio"] {
  flex: 0 0 auto; width: 1.15em; height: 1.15em; margin-top: 0.15em;
  accent-color: var(--color-brand); cursor: pointer;
}
.choice__text { font-size: var(--text-sm); color: var(--color-text); }
.choice__text a { color: var(--color-brand); text-decoration: underline; }
.choice__hint { display: block; color: var(--color-text-muted); font-size: var(--text-xs); margin-top: var(--space-1); }
.choice:has(input:focus-visible) .choice__text {
  outline: 2px solid var(--color-brand); outline-offset: 3px; border-radius: var(--radius-sm);
}

/* ---- Enquiry form — .enquiry ------------------------------
   A token-styled lead form. Works with zero JS (native validation +
   a normal POST); ui.js only adds inline errors + a success state.
   The honeypot field is visually hidden but reachable by bots. */
.enquiry { display: grid; gap: var(--space-4); max-width: 34rem; }
.enquiry__form { display: grid; gap: var(--space-5); }
.enquiry__row { display: grid; gap: var(--space-4); }
@media (min-width: 560px) { .enquiry__row--2 { grid-template-columns: 1fr 1fr; } }
.enquiry .field { max-width: none; }
/* Honeypot: off-screen, not display:none (some bots skip hidden fields). */
.enquiry__pot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.enquiry__consent { display: grid; gap: var(--space-3); padding: var(--space-4);
  background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.enquiry__status { font-size: var(--text-sm); }
.enquiry[data-state="sent"] .enquiry__form { display: none; }
.enquiry__sent { display: none; }
.enquiry[data-state="sent"] .enquiry__sent { display: flex; }

/* ---- Pay block — .pay ------------------------------------
   A deposit / fixed-price call to action. Card data never touches
   the page: the button is a link to a Stripe-hosted Payment Link.
   Price is shown inclusive of Irish VAT (specs/integrations.md). */
.pay {
  display: grid; gap: var(--space-4); max-width: 24rem;
  padding: var(--space-6); background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
}
.pay__amount { display: flex; align-items: baseline; gap: var(--space-2); }
.pay__price { font-size: var(--text-3xl); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
.pay__vat { font-size: var(--text-sm); color: var(--color-text-muted); }
.pay__desc { color: var(--color-text-muted); font-size: var(--text-sm); }
.pay__methods { display: flex; gap: var(--space-2); align-items: flex-start;
  font-size: var(--text-xs); color: var(--color-text-muted); }

/* ---- Consent banner — .consent ---------------------------
   GDPR/ePrivacy gate. No third-party script with cookies loads
   until the visitor accepts. Hidden by default; ui.js reveals it
   when no prior choice is stored, and re-hides on a decision. */
.consent {
  position: fixed; inset: auto var(--space-4) var(--space-4) var(--space-4);
  z-index: var(--z-overlay); margin-inline: auto; max-width: 40rem;
  display: none; gap: var(--space-4); align-items: center; flex-wrap: wrap;
  padding: var(--space-6); background: var(--color-surface-2);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.consent[data-open] { display: flex; }
.consent__text { flex: 1 1 16rem; font-size: var(--text-sm); color: var(--color-text-muted); }
.consent__text strong { color: var(--color-text); }
.consent__text a { color: var(--color-brand); text-decoration: underline; }
.consent__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }
/* A consent-gated embed shows its façade until consent is granted. */
.embed-gate__facade { display: grid; place-items: center; gap: var(--space-3); min-height: 16rem;
  padding: var(--space-6); text-align: center; background: var(--color-surface);
  border: 1px dashed var(--color-border); border-radius: var(--radius-lg); color: var(--color-text-muted); }
[data-consent-granted] .embed-gate__facade { display: none; }
.embed-gate__live { display: none; }
[data-consent-granted] .embed-gate__live { display: block; }
/* Demo stand-in shown in place of a real iframe on the reference pages. */
.embed-gate__placeholder { display: grid; place-items: center; min-height: 8rem; margin: 0;
  padding: var(--space-6); text-align: center; font-size: var(--text-sm); color: var(--color-text-muted);
  background: var(--color-surface); border: 1px dashed var(--color-border); border-radius: var(--radius-lg); }

/* ============================================================
   PHASE 2 — Scheduling + Maps & reviews (Irish SMB).
   ============================================================ */

/* ---- Scheduler — .scheduler -------------------------------
   A consent-gated booking embed. Reuses .embed-gate, adding a
   provider-branded façade so the page stays fast/cookie-free
   until the visitor chooses to load Acuity / Calendly / Cal.com. */
.scheduler { max-width: 44rem; }
.scheduler__facade { display: grid; gap: var(--space-4); justify-items: center; text-align: center;
  min-height: 18rem; padding: var(--space-8); background: var(--color-surface);
  border: 1px dashed var(--color-border); border-radius: var(--radius-lg); }
.scheduler__provider { display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-sm); color: var(--color-text-muted); }
.scheduler__provider .badge { text-transform: none; }

/* ---- Star rating — .rating --------------------------------
   Accessible: the visual stars are decorative; the accessible name
   comes from aria-label on the container. --rating (0–5) sets fill. */
.rating { display: inline-flex; align-items: center; gap: var(--space-1); }
.rating__stars { --rating: 0; position: relative; display: inline-block;
  font-size: var(--text-lg); line-height: 1; color: var(--color-border); }
.rating__stars::before { content: "★★★★★"; }
.rating__stars::after { content: "★★★★★"; position: absolute; inset: 0; overflow: hidden;
  width: calc(var(--rating) / 5 * 100%); color: var(--color-warn); }
.rating__count { font-size: var(--text-sm); color: var(--color-text-muted); }

/* ---- Review card — .review --------------------------------
   Rendered from CACHED Google review data, not a live cookie-heavy
   widget. Plain content; no third-party script needed. */
.reviews { display: grid; gap: var(--space-4); }
@media (min-width: 720px) { .reviews--grid { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); } }
.review { display: grid; gap: var(--space-3); padding: var(--space-6);
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.review__head { display: flex; align-items: center; gap: var(--space-3); }
.review__avatar { width: 2.25rem; height: 2.25rem; flex: 0 0 auto; border-radius: var(--radius-full);
  display: grid; place-items: center; font-weight: var(--weight-bold);
  background: color-mix(in srgb, var(--color-brand) 18%, var(--color-surface-2)); color: var(--color-text); }
.review__who { display: grid; }
.review__name { font-weight: var(--weight-medium); }
.review__date { font-size: var(--text-xs); color: var(--color-text-muted); }
.review__body { color: var(--color-text); font-size: var(--text-sm); }
.review__source { font-size: var(--text-xs); color: var(--color-text-muted); }

/* ---- Map block — .mapblock --------------------------------
   Consent-gated map with a static address + Eircode fallback that
   ALWAYS shows (works with no JS, no consent, no network to Google). */
.mapblock { display: grid; gap: var(--space-4); }
.mapblock__address { display: grid; gap: var(--space-1); font-size: var(--text-sm);
  padding: var(--space-4); background: var(--color-surface-2);
  border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.mapblock__address dt { color: var(--color-text-muted); font-size: var(--text-xs); }
.mapblock__eircode { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }

/* ============================================================
   PHASE 3 — Point of sale (Square / SumUp deep links).
   The site CONNECTS to the trader's existing PoS; it never
   duplicates the checkout. Buttons are links, not forms.
   ============================================================ */
.pos { display: grid; gap: var(--space-4); max-width: 32rem; }
.pos__options { display: grid; gap: var(--space-3); }
@media (min-width: 520px) { .pos__options { grid-template-columns: 1fr 1fr; } }
.pos__option { display: flex; align-items: center; gap: var(--space-3); text-align: left;
  padding: var(--space-4); background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); color: var(--color-text); text-decoration: none;
  transition: border-color var(--transition-fast), transform var(--transition-fast); }
.pos__option:hover { border-color: var(--color-brand); transform: translateY(-1px); }
.pos__option:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.pos__icon { font-size: var(--text-2xl); color: var(--color-brand); flex: 0 0 auto; }
.pos__label { display: grid; gap: var(--space-1); }
.pos__name { font-weight: var(--weight-medium); }
.pos__sub { font-size: var(--text-xs); color: var(--color-text-muted); }
.pos__provider { font-size: var(--text-xs); color: var(--color-text-muted); }

/* ============================================================
   EXTENDED COMPONENTS — carousel, accordion, pricing, stats,
   timeline, team, features, cta, steps, testimonial, progress,
   avatar-group, divider, skip-link.
   ============================================================ */

/* ---- A. Carousel — .carousel ------------------------------
   Horizontal scroll-snap container. Zero JS for basic function.
   JS can add prev/next button behaviour as progressive enhancement. */
.carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  gap: var(--space-4); scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
  padding-block: var(--space-2); }
.carousel::-webkit-scrollbar { display: none; }
.carousel { scrollbar-width: none; }
.carousel__slide { scroll-snap-align: start; flex: 0 0 min(20rem, 80vw); }
.carousel__controls { display: flex; justify-content: space-between; gap: var(--space-2); margin-top: var(--space-3); }
.carousel--peek { padding-inline: var(--space-4); }

/* ---- B. Accordion / FAQ — .accordion ---------------------
   Native <details>/<summary>. Zero JS required. */
.accordion { display: grid; gap: 1px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; }
.accordion__item { background: var(--color-surface); }
.accordion__trigger { display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); padding: var(--space-5) var(--space-6);
  font-weight: var(--weight-medium); cursor: pointer; list-style: none;
  color: var(--color-text); }
.accordion__trigger::-webkit-details-marker { display: none; }
.accordion__trigger::marker { display: none; }
.accordion__trigger::after { content: "+"; font-size: var(--text-lg); line-height: 1;
  color: var(--color-text-muted); flex: 0 0 auto;
  transition: transform var(--transition-fast); }
details[open] > .accordion__trigger::after { content: "×"; }
.accordion__body { padding: 0 var(--space-6) var(--space-5);
  color: var(--color-text-muted); font-size: var(--text-sm); }

/* ---- C. Pricing table — .pricing -------------------------*/
.pricing { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.pricing__plan { background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-8); display: grid; gap: var(--space-4); }
.pricing__plan--featured { border-color: var(--color-brand); box-shadow: var(--shadow-md); }
.pricing__name { font-weight: var(--weight-bold); font-size: var(--text-lg); }
.pricing__price { font-size: var(--text-3xl); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
.pricing__period { font-size: var(--text-sm); color: var(--color-text-muted); }
.pricing__desc { color: var(--color-text-muted); font-size: var(--text-sm); }
.pricing__features { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.pricing__feature { display: flex; gap: var(--space-2); font-size: var(--text-sm); align-items: flex-start; }
.pricing__feature::before { content: "✓"; color: var(--color-brand); font-weight: var(--weight-bold); flex: 0 0 auto; }
.pricing__feature--unavailable { color: var(--color-text-muted); }
.pricing__feature--unavailable::before { content: "–"; color: var(--color-text-muted); }

/* ---- D. Stats / numbers — .stats -------------------------*/
.stats { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); text-align: center; }
.stat__value { font-size: var(--text-3xl); font-weight: var(--weight-bold); color: var(--color-brand);
  font-variant-numeric: tabular-nums; line-height: var(--leading-tight); }
.stat__label { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-1); }
.stat__sub { font-size: var(--text-xs); color: var(--color-text-muted); }

/* ---- E. Timeline — .timeline -----------------------------*/
.timeline { display: grid; gap: 0; position: relative; }
.timeline__item { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4) var(--space-6); padding-bottom: var(--space-8); }
.timeline__marker { display: flex; flex-direction: column; align-items: center; gap: 0; }
.timeline__dot { width: 0.75rem; height: 0.75rem; border-radius: var(--radius-full);
  background: var(--color-brand); flex: 0 0 auto; margin-top: 0.25rem; }
.timeline__dot--muted { background: var(--color-border); }
.timeline__line { flex: 1; width: 2px; background: var(--color-border); margin-top: var(--space-2); }
.timeline__item:last-child .timeline__line { display: none; }
.timeline__content { padding-bottom: var(--space-2); }
.timeline__date { font-size: var(--text-xs); color: var(--color-text-muted); margin-bottom: var(--space-1); }
.timeline__title { font-weight: var(--weight-medium); }
.timeline__body { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-1); }

/* ---- F. Team grid — .team --------------------------------*/
.team { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.team__member { display: grid; gap: var(--space-3); text-align: center; }
.team__avatar { width: 5rem; height: 5rem; border-radius: var(--radius-full); margin-inline: auto;
  background: color-mix(in srgb, var(--color-brand) 18%, var(--color-surface-2));
  display: grid; place-items: center; font-size: var(--text-2xl); font-weight: var(--weight-bold);
  color: var(--color-text); overflow: hidden; }
.team__avatar img { width: 100%; height: 100%; object-fit: cover; }
.team__name { font-family: var(--font-heading); font-weight: var(--weight-medium); }
.team__role { font-size: var(--text-sm); color: var(--color-text-muted); }
.team__bio { font-size: var(--text-sm); color: var(--color-text-muted); }

/* ---- G. Feature grid — .features -------------------------*/
.features { display: grid; gap: var(--space-8); grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.feature { display: grid; gap: var(--space-3); }
.feature__icon { width: 2.5rem; height: 2.5rem; border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-brand) 15%, transparent);
  display: grid; place-items: center; color: var(--color-brand); font-size: var(--text-xl); }
.feature__title { font-weight: var(--weight-medium); }
.feature__body { color: var(--color-text-muted); font-size: var(--text-sm); }

/* ---- H. CTA section — .cta -------------------------------*/
.cta { text-align: center; padding-block: var(--space-20); display: grid; gap: var(--space-6); place-items: center; }
.cta--filled { background: color-mix(in srgb, var(--color-brand) 8%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--color-brand) 25%, transparent);
  border-radius: var(--radius-lg); padding: var(--space-16); }
.cta__title { font-size: clamp(var(--text-2xl), 4vw, var(--text-3xl)); font-weight: var(--weight-bold); max-width: 22ch; }
.cta__body { color: var(--color-text-muted); max-width: var(--max-width-prose); }
.cta__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; justify-content: center; }

/* ---- I. Steps / process — .steps -------------------------*/
.steps { display: grid; gap: var(--space-8); counter-reset: steps; }
.step { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4); counter-increment: steps; }
.step__num { width: 2.5rem; height: 2.5rem; border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--color-brand) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-brand) 40%, transparent);
  color: var(--color-brand); font-weight: var(--weight-bold); display: grid;
  place-items: center; flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.step__num::before { content: counter(steps); }
.step__title { font-weight: var(--weight-medium); margin-bottom: var(--space-1); }
.step__body { color: var(--color-text-muted); font-size: var(--text-sm); }

/* ---- J. Testimonial — .testimonial -----------------------
   Large pull-quote style. Distinct from .review (card-sized). */
.testimonial { display: grid; gap: var(--space-6); max-width: var(--max-width-prose); }
.testimonial__quote { font-size: var(--text-xl); color: var(--color-text); line-height: var(--leading-normal); }
.testimonial__quote::before { content: "\201C"; color: var(--color-brand); font-size: var(--text-4xl);
  line-height: 0.8; vertical-align: -0.3em; margin-right: var(--space-1); }
.testimonial__cite { display: flex; align-items: center; gap: var(--space-4); }
.testimonial__avatar { width: 3rem; height: 3rem; border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--color-brand) 18%, var(--color-surface-2));
  display: grid; place-items: center; font-size: var(--text-lg); font-weight: var(--weight-bold);
  color: var(--color-text); overflow: hidden; flex: 0 0 auto; }
.testimonial__avatar img { width: 100%; height: 100%; object-fit: cover; }
.testimonial__who { display: grid; }
.testimonial__name { font-weight: var(--weight-medium); }
.testimonial__company { font-size: var(--text-sm); color: var(--color-text-muted); }

/* ---- K. Progress bar — .progress -------------------------*/
.progress { display: grid; gap: var(--space-2); }
.progress__label { display: flex; justify-content: space-between; font-size: var(--text-sm); }
.progress__track { height: 0.5rem; background: var(--color-surface-2); border-radius: var(--radius-full); overflow: hidden; }
.progress__fill { height: 100%; background: var(--color-brand); border-radius: var(--radius-full);
  transition: width var(--transition-base); width: var(--progress, 0%); }
.progress__fill--success { background: var(--color-success); }
.progress__fill--warn { background: var(--color-warn); }

/* ---- L. Avatar group — .avatar-group ---------------------
   Stacked overlapping avatars — "3 people doing X". */
.avatar-group { display: flex; align-items: center; }
.avatar-group__item { width: 2.25rem; height: 2.25rem; border-radius: var(--radius-full);
  border: 2px solid var(--color-bg);
  background: color-mix(in srgb, var(--color-brand) 18%, var(--color-surface-2));
  display: grid; place-items: center; font-size: var(--text-xs);
  font-weight: var(--weight-bold); overflow: hidden; margin-left: -0.5rem; }
.avatar-group__item:first-child { margin-left: 0; }
.avatar-group__item img { width: 100%; height: 100%; object-fit: cover; }
.avatar-group__count { background: var(--color-surface-2); color: var(--color-text-muted); }

/* ---- M. Divider — .divider --------------------------------*/
.divider { display: flex; align-items: center; gap: var(--space-4);
  color: var(--color-text-muted); font-size: var(--text-sm); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--color-border); }
.divider--vertical { width: 1px; height: 100%; background: var(--color-border);
  margin-inline: var(--space-4); align-self: stretch; }
.divider--vertical::before, .divider--vertical::after { display: none; }

/* ---- N. Skip link — .skip-link ---------------------------
   Accessibility: visible only on keyboard focus. */
.skip-link { position: absolute; top: var(--space-2); left: var(--space-2); z-index: 9999;
  padding: var(--space-2) var(--space-4); background: var(--color-brand); color: var(--color-on-brand);
  border-radius: var(--radius-md); font-weight: var(--weight-medium);
  transform: translateY(-200%); transition: transform var(--transition-fast); }
.skip-link:focus { transform: translateY(0); }

/* ============================================================
   SECTION KIT — the page-building blocks a local-business site
   is assembled from. Every look-and-feel decision reads a theme
   knob (see tokens.css "THEME KNOBS"), so a client re-skins these
   from theme.css alone. Catalogued in COMPONENTS.md.
   ============================================================ */

/* ---- Site header sticky — .site-header--sticky ---------------
   Opt-in via client.json "nav": { "variant": "sticky" }. The header
   element is also the .container, so the full-bleed bar is painted
   with border-image outset (no extra wrapper, no overflow). */
.site-header--sticky {
  position: sticky; top: 0; z-index: var(--z-dropdown);
  border-image: conic-gradient(var(--header-bg) 0 0) fill 0 / 0 / 0 100vmax;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.site-header--sticky .nav__brand { font-family: var(--font-heading); font-stretch: var(--heading-stretch);
  text-transform: var(--heading-transform); font-weight: var(--heading-weight); font-size: var(--text-lg); }
.site-header--sticky .nav__brand .ico { color: var(--color-brand); }
.site-header--sticky .nav__links a:not(.btn) { color: var(--color-text-muted); font-size: var(--text-sm);
  font-weight: var(--weight-medium); transition: color var(--transition-fast); }
.site-header--sticky .nav__links a:not(.btn):hover { color: var(--color-text); }
.site-header--sticky ~ main [id] { scroll-margin-top: var(--space-20); }

/* ---- Section head — .section-head ----------------------------
   Eyebrow + headline + optional intro above any section.
   --split puts the intro beside the headline on wide screens. */
.section-head { display: grid; gap: var(--space-4); margin-bottom: var(--space-12); }
.section-head h2 { font-size: var(--text-section); text-wrap: balance; max-width: 20ch; }
.section-head p:not(.eyebrow) { color: var(--color-text-muted); font-size: var(--text-lg); text-wrap: pretty; }
.section-head p a { text-decoration: underline; text-underline-offset: 0.2em; }
.section-head--center { justify-items: center; text-align: center; }
@media (min-width: 860px) {
  .section-head--split { grid-template-columns: 1fr 1fr; column-gap: var(--space-12); align-items: end; }
  .section-head--split .eyebrow { grid-column: 1 / -1; }
}

/* ---- Hero split — .hero--split -------------------------------
   Left-aligned copy beside a photo. Structure:
     <section class="hero hero--split">
       <div class="container hero__grid">
         <div class="hero__content"> eyebrow, .hero__title, .hero__subtitle,
              .hero__actions, .hero__proof </div>
         <figure class="hero__media media"> <img> <figcaption class="media__card"> </figure>
       </div>
     </section> */
.hero--split { text-align: left; padding-block: var(--space-16) var(--space-20);
  background-image: var(--surface-texture); overflow: clip; }
.hero__grid { display: grid; gap: var(--space-12); align-items: center; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: 1.2fr 0.8fr; gap: var(--space-16); } }
.hero--split .stats--strip { margin-top: var(--space-16); }
@media (max-width: 959px) { .hero__media.media--portrait img { aspect-ratio: 4 / 3; } }
@media (max-width: 520px) {
  .hero--split .hero__actions { width: 100%; }
  .hero--split .hero__actions .btn { flex: 1 1 100%; }
}
.hero__content { display: grid; gap: var(--space-6); justify-items: start; }
.hero--split .hero__title { font-size: var(--text-display); margin-inline: 0; max-width: 12ch; text-wrap: balance; }
.hero__title em, .section-head h2 em, .cta__title em { font-style: var(--emphasis-style); color: var(--emphasis-color); }
.hero--split .hero__subtitle { margin-inline: 0; max-width: 46ch; text-wrap: pretty; }
.hero--split .hero__actions { justify-content: flex-start; }
.hero__proof { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-6);
  font-size: var(--text-sm); color: var(--color-text-muted); }
.hero__proof strong { color: var(--color-text); font-weight: var(--weight-medium); }

/* ---- Media frame — .media ------------------------------------
   A cropped photo with an optional floating fact card. Always give
   the <img> width/height (no layout shift) and real alt text. */
.media { position: relative; margin: 0; border-radius: var(--radius-lg); }
.media img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; aspect-ratio: 4 / 3;
  background: var(--color-surface-2);
  filter: var(--media-filter); }
.media--portrait img { aspect-ratio: 4 / 5; }
.media--wide img { aspect-ratio: 16 / 9; }
.media--natural img { filter: none; }
.media__card { position: absolute; left: var(--space-4); bottom: var(--space-4); max-width: calc(100% - var(--space-8));
  display: grid; gap: var(--space-1); padding: var(--space-4) var(--space-5);
  background: color-mix(in srgb, var(--color-bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--color-border); border-radius: var(--radius-md); }
@media (min-width: 960px) { .media__card { left: calc(-1 * var(--space-8)); bottom: var(--space-8); } }
/* Small screens: the card tucks under the photo instead of covering it. */
@media (max-width: 599px) {
  .media__card { position: relative; left: auto; bottom: auto; max-width: none;
    margin: calc(-1 * var(--space-8)) var(--space-4) 0; background: var(--color-surface); }
}
.media__label { font-family: var(--eyebrow-font); font-size: var(--text-xs); letter-spacing: var(--eyebrow-tracking);
  text-transform: uppercase; color: var(--color-text-muted); }
.media__value { font-family: var(--font-data); font-size: var(--text-2xl); font-weight: var(--weight-bold);
  line-height: 1; color: var(--color-brand); font-variant-numeric: tabular-nums; }
.media__note { font-size: var(--text-sm); color: var(--color-text); }

/* ---- Stat strip — .stats--strip ------------------------------
   .stats laid out as a ruled, left-aligned band of figures. */
.stats--strip { text-align: left; gap: 0; grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--color-border); }
@media (min-width: 720px) { .stats--strip { grid-template-columns: repeat(4, 1fr); } }
.stats--strip .stat { padding: var(--space-6) var(--space-6) var(--space-6) 0; }
.stats--strip .stat + .stat { padding-left: var(--space-6); border-left: 1px solid var(--color-border); }
@media (max-width: 719px) {
  .stats--strip .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .stats--strip .stat:nth-child(n + 3) { border-top: 1px solid var(--color-border); }
}
.stats--strip .stat__value { font-family: var(--font-data); color: var(--color-text); }

/* ---- Ticker — .ticker ----------------------------------------
   A slow horizontal band of short phrases. Pure CSS. The track holds
   the list TWICE (second copy aria-hidden) so the loop is seamless.
   Reduced motion → base.css stops the animation; it reads as a row. */
.ticker { overflow: hidden; border-block: 1px solid var(--color-border); background: var(--color-surface);
  padding-block: var(--space-4); }
.ticker__track { display: flex; width: max-content; animation: ticker 40s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__list { display: flex; flex: 0 0 auto; margin: 0; padding: 0; list-style: none; }
.ticker__item { display: inline-flex; align-items: center; gap: var(--space-6); padding-right: var(--space-6);
  font-family: var(--font-heading); font-stretch: var(--heading-stretch); font-weight: var(--heading-weight);
  text-transform: var(--heading-transform); font-size: var(--text-lg); white-space: nowrap; color: var(--color-text-muted); }
.ticker__item::after { content: ""; width: 0.5rem; height: 0.5rem; background: var(--color-accent); flex: 0 0 auto; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---- Tiles — .tiles ------------------------------------------
   A ruled grid of short numbered facts: services, stations, steps
   of a treatment, what's included. */
.tiles { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  background: var(--color-border); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); overflow: hidden; margin: 0; padding: 0; list-style: none; }
@media (min-width: 900px) { .tiles--4 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 899px) {
  .tiles--4 { grid-template-columns: repeat(2, 1fr); }
  .tiles--4 .tile { padding: var(--space-4); }
  .tiles--4 .tile__title { font-size: var(--text-lg); }
}
.tile { display: grid; gap: var(--space-2); align-content: start; padding: var(--space-6);
  background: var(--color-surface); transition: background var(--transition-base); }
.tile:hover { background: var(--color-surface-2); }
.tile__index { font-family: var(--font-data); font-size: var(--text-sm); color: var(--color-brand);
  font-variant-numeric: tabular-nums; }
.tile__title { font-family: var(--font-heading); font-stretch: var(--heading-stretch); font-weight: var(--heading-weight);
  text-transform: var(--heading-transform); font-size: var(--text-xl); line-height: var(--leading-tight); }
.tile__meta { font-family: var(--font-data); font-size: var(--text-sm); color: var(--color-text-muted); }
.tile__body { font-size: var(--text-sm); color: var(--color-text-muted); }
.tiles__note { margin-top: var(--space-4); max-width: none; font-family: var(--font-data); font-size: var(--text-sm); color: var(--color-text-muted); }
.tiles__note strong { color: var(--color-brand); font-weight: var(--weight-medium); }

/* ---- Steps row — .steps--row ---------------------------------
   .steps laid out across the page on wide screens. */
.steps--row { margin: 0; padding: 0; list-style: none; }
@media (min-width: 860px) {
  .steps--row { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--space-8); }
  .steps--row .step { grid-template-columns: 1fr; padding-top: var(--space-6); border-top: 1px solid var(--color-border); }
}
.steps--row .step__num { font-family: var(--font-data); border-radius: var(--radius-md); }
.steps--row .step__title { font-family: var(--font-heading); font-stretch: var(--heading-stretch);
  font-weight: var(--heading-weight); text-transform: var(--heading-transform); font-size: var(--text-xl); }

/* ---- Timetable — .timetable ----------------------------------
   A week of classes or sessions, one column per day. Scrolls
   sideways with snap on small screens. Each day is a list, so it
   reads correctly with no CSS at all. */
.timetable { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(11rem, 1fr); gap: var(--space-3);
  overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: var(--space-3);
  margin-inline: calc(-1 * var(--space-6)); padding-inline: var(--space-6); scroll-padding-inline: var(--space-6); }
@media (min-width: 1100px) {
  .timetable { grid-auto-columns: minmax(0, 1fr); overflow: visible; margin-inline: 0; padding-inline: 0; }
}
.timetable__day { scroll-snap-align: start; display: grid; gap: var(--space-2); align-content: start; }
.timetable__name { font-family: var(--eyebrow-font); font-size: var(--text-xs); letter-spacing: var(--eyebrow-tracking);
  text-transform: uppercase; color: var(--color-text-muted); font-weight: var(--weight-medium);
  padding-bottom: var(--space-2); border-bottom: 1px solid var(--color-border); }
.timetable__list { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.timetable__slot { display: grid; gap: var(--space-1); padding: var(--space-3);
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  border-left: 3px solid var(--color-border); }
.timetable__slot--accent { border-left-color: var(--color-brand); }
.timetable__time { font-family: var(--font-data); font-size: var(--text-xs); color: var(--color-text-muted);
  font-variant-numeric: tabular-nums; }
.timetable__class { font-size: var(--text-sm); font-weight: var(--weight-medium); }
.timetable__meta { font-size: var(--text-xs); color: var(--color-text-muted); }
.timetable__legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin-top: var(--space-4);
  font-size: var(--text-sm); color: var(--color-text-muted); }

/* ---- Pricing extras — .pricing__badge ------------------------
   Additions to .pricing: a badge on the featured plan, a CTA
   pinned to the bottom, theme-driven type. */
.pricing__plan { position: relative; }
.pricing__plan:has(.pricing__cta) { grid-template-rows: auto auto auto 1fr auto; }
.pricing__plan--featured:has(.pricing__badge) { background: color-mix(in srgb, var(--color-brand) 6%, var(--color-surface)); }
.pricing__badge { position: absolute; top: 0; right: var(--space-6); transform: translateY(-50%);
  padding: var(--space-1) var(--space-3); border-radius: var(--radius-sm);
  background: var(--color-brand); color: var(--color-on-brand);
  font-family: var(--eyebrow-font); font-size: var(--text-xs); font-weight: var(--weight-bold);
  letter-spacing: var(--eyebrow-tracking); text-transform: uppercase; }
.pricing__name { font-family: var(--font-heading); font-stretch: var(--heading-stretch);
  text-transform: var(--heading-transform); }
.pricing__price { font-family: var(--font-data); }
.pricing__cta { align-self: end; }

/* ---- Team cards — .team--cards -------------------------------
   .team as side-by-side cards with a photo or monogram. */
.team--cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.team--cards .team__member { grid-template-columns: auto 1fr; gap: var(--space-5); align-items: start; text-align: left;
  padding: var(--space-6); background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); }
.team--cards .team__avatar { margin: 0; border-radius: var(--radius-md); background: var(--gradient-brand);
  color: var(--color-on-brand); font-family: var(--font-heading); font-stretch: var(--heading-stretch); }
.team--cards .team__name { font-family: var(--font-heading); font-stretch: var(--heading-stretch);
  font-weight: var(--heading-weight); text-transform: var(--heading-transform); font-size: var(--text-xl); }
.team--cards .team__role { font-family: var(--eyebrow-font); font-size: var(--text-xs); letter-spacing: var(--eyebrow-tracking);
  text-transform: uppercase; color: var(--color-brand); }
.team--cards .team__bio { margin-top: var(--space-2); }

/* ---- Hours — .hours ------------------------------------------
   Opening hours as a ruled list. build.js renders it from
   client.json "business.hours" ({{business.hoursList}}), the same
   data that feeds the JSON-LD. ui.js marks today's row. */
.hours { display: grid; margin: 0; font-size: var(--text-sm); }
.hours__row { display: flex; justify-content: space-between; gap: var(--space-6);
  padding-block: var(--space-3); border-bottom: 1px solid var(--color-border); }
.hours__row dt { font-weight: var(--weight-medium); }
.hours__row dd { margin: 0; font-family: var(--font-data); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.hours__row.is-today dt, .hours__row.is-today dd { color: var(--color-brand); }
.hours__row.is-today dt::after { content: " · today"; font-weight: var(--weight-normal); }

/* ---- Split — .split ------------------------------------------
   Two columns that stack on small screens. */
.split { display: grid; gap: var(--space-12); align-items: start; }
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--space-16); }
  .split--wide-end { grid-template-columns: 1fr 1.25fr; }
  .split--wide-start { grid-template-columns: 1.25fr 1fr; }
  .split--center { align-items: center; }
}
.split__title { font-size: var(--text-lg); margin-bottom: var(--space-4); }

/* ---- Checklist — .checklist ----------------------------------
   Icon-led list of short points: <li><i class="ico …"></i><div><strong>…</strong><span>…</span></div></li> */
.checklist { display: grid; gap: var(--space-5); margin: 0; padding: 0; list-style: none; }
.checklist li { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4); align-items: start; }
.checklist .ico { color: var(--color-brand); margin-top: 0.15em; }
.checklist strong { display: block; font-weight: var(--weight-medium); }
.checklist span { color: var(--color-text-muted); font-size: var(--text-sm); }

/* ---- CTA band — .cta--band -----------------------------------
   .cta as a brand-filled closing band: copy left, action right. */
.cta--band { text-align: left; place-items: start; grid-template-columns: 1fr; gap: var(--space-6);
  padding: var(--space-12) var(--space-8); border-radius: var(--radius-lg);
  background: var(--gradient-brand); color: var(--color-on-brand); }
@media (min-width: 860px) { .cta--band { grid-template-columns: 1fr auto; align-items: center; padding: var(--space-16); } }
.cta--band .cta__title { font-size: var(--text-section); max-width: 18ch; text-wrap: balance; }
.cta--band .cta__title em { color: inherit; }
.cta--band .cta__body { color: inherit; opacity: 0.85; margin-top: var(--space-3); }
.cta--band .btn { background: var(--color-on-brand); color: var(--color-brand); border-color: transparent; }
.cta--band .btn:hover { background: color-mix(in srgb, var(--color-on-brand) 88%, var(--color-brand)); }

/* ---- Spotlight — .spotlight ----------------------------------
   A brand-filled panel for the one special thing a business sells
   beyond the everyday: a retreat, a wedding package, gift vouchers,
   a resale shop. Optional wide photo, copy, and a details card.
     <div class="spotlight">
       <figure class="spotlight__media"><img …></figure>
       <div class="spotlight__body">
         <div class="spotlight__copy"> eyebrow, h2, p, .btn </div>
         <div class="spotlight__card"> .spotlight__price, dl.spotlight__meta, .btn </div>
       </div>
     </div> */
.spotlight { background: var(--color-brand); color: var(--color-on-brand);
  border-radius: var(--radius-lg); overflow: hidden; }
.spotlight__media { margin: 0; }
.spotlight__media img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; filter: var(--media-filter); }
.spotlight__body { display: grid; gap: var(--space-8); align-items: center; padding: var(--space-8); }
@media (min-width: 860px) { .spotlight__body { grid-template-columns: 1.3fr 1fr; gap: var(--space-16); padding: var(--space-16); } }
.spotlight__copy { display: grid; gap: var(--space-5); justify-items: start; }
.spotlight h2 { font-size: var(--text-section); text-wrap: balance; }
.spotlight .eyebrow { color: var(--color-on-brand); }
.spotlight p:not(.eyebrow) { color: color-mix(in srgb, var(--color-on-brand) 82%, var(--color-brand)); }
.spotlight .btn--primary { background: var(--color-on-brand); color: var(--color-brand); }
.spotlight__card { display: grid; gap: var(--space-5); padding: var(--space-6);
  background: color-mix(in srgb, var(--color-on-brand) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-on-brand) 22%, transparent); border-radius: var(--radius-md); }
.spotlight__price { font-family: var(--font-heading); font-stretch: var(--heading-stretch); font-size: var(--text-3xl); line-height: 1; }
.spotlight__price small { font-family: var(--font-sans); font-size: var(--text-sm); opacity: 0.75; }
.spotlight__meta { display: grid; gap: var(--space-2); margin: 0; font-size: var(--text-sm); }
.spotlight__meta div { display: flex; gap: var(--space-3); align-items: baseline; }
.spotlight__meta dt { min-width: 5.5rem; opacity: 0.7; }
.spotlight__meta dd { margin: 0; }

/* ---- Action bar — .actionbar ---------------------------------
   Phone-only bar pinned to the bottom with the one or two actions
   that matter (call, WhatsApp, book). Hidden on wider screens. */
.actionbar { display: none; }
@media (max-width: 640px) {
  .actionbar { position: fixed; inset: auto 0 0 0; z-index: var(--z-dropdown); display: grid;
    grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--space-2);
    padding: var(--space-3) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom));
    background: var(--header-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--color-border); }
  body:has(.actionbar) { padding-bottom: calc(var(--control-height) + var(--space-8)); }
}
