/* =========================================================================
   KILN Web Design — styles.css
   Direction: "The firing". Deep glaze ground, cream type, terracotta brand
   marks, ember for action. One variable face (Archivo, wght 400–700,
   wdth 100–125%) self-hosted. Mobile-first; min-width queries layer up.
   No inline styles anywhere, so a strict CSP (style-src 'self') works.
   ========================================================================= */

/* ---------- 1. Font ---------- */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 100% 125%;
  font-style: normal;
  font-display: swap;
}

/* ---------- 2. Tokens ---------- */
:root {
  color-scheme: dark;

  /* Primitives: glaze ramp (green-black, one temperature) */
  --glaze-950: #0C1512;
  --glaze-900: #111D19;
  --glaze-850: #15231E;
  --glaze-800: #182722;
  --glaze-700: #22352E;
  --line: #2A3F37;          /* hairlines, decorative */
  --line-strong: #5E7A6E;   /* input + outline-button borders: 3.96:1 on 950, 3.47:1 on 850 (WCAG 1.4.11) */

  --cream: #F5F1EA;         /* logo cream; primary text 16.5:1 */
  --muted: #A7B8B0;         /* secondary text 8.9:1 */
  --faint: #8A9C94;         /* tertiary text 6.4:1 (never on 700) */

  --terra: #B5553A;         /* brand terracotta: marks, rules, dot */
  --terra-deep: #9A452E;    /* selection bg (cream on it 5.6:1) */
  --ember: #E8805F;         /* actions, accent text (6.8:1 on 950) */
  --ember-hi: #F09474;      /* hover */
  --danger: #F2A08A;        /* error text on dark, paired with icon + copy */

  /* Semantic roles */
  --bg: var(--glaze-950);
  --surface: var(--glaze-900);
  --surface-2: var(--glaze-800);
  --text: var(--cream);
  --text-2: var(--muted);
  --text-3: var(--faint);
  --action: var(--ember);
  --action-text: var(--glaze-950);
  --focus: var(--ember);
  --iris: #1A2C26;          /* the circle and the section it opens onto: one step above the page */

  /* Type */
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-display: clamp(2.35rem, 1rem + 6.1vw, 5.75rem);
  --fs-h2: clamp(2rem, 1.15rem + 3.1vw, 3.6rem);
  --fs-h3: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem);
  --fs-lead: clamp(1.125rem, 1.02rem + 0.4vw, 1.3125rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-label: 0.8125rem;

  /* Space (4px base) */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.25rem; --s-6: 1.5rem; --s-8: 2rem; --s-10: 2.5rem;
  --s-12: 3rem; --s-16: 4rem; --s-20: 5rem; --s-24: 6rem;
  --section: clamp(4.5rem, 2.5rem + 8vw, 9.5rem);
  --gutter: clamp(1rem, 0.4rem + 3vw, 3rem);
  --container: 82.5rem;

  /* Shape & depth */
  --r-s: 6px;
  --r-m: 10px;
  --r-l: 16px;
  --shadow-frame: 0 2px 4px rgba(3, 8, 6, 0.3), 0 40px 80px -32px rgba(3, 8, 6, 0.85);

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --t-press: 140ms;
  --t-ui: 200ms;

  --header-h: 4rem;
}
@media (min-width: 64em) { :root { --header-h: 4.75rem; } }

/* ---------- 3. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  scrollbar-color: var(--line-strong) var(--bg);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html.menu-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
input, textarea, select { font-size: max(16px, 1rem); }
a, button, summary, label, [role="button"] { touch-action: manipulation; }
::selection { background: var(--terra-deep); color: var(--cream); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
:where(a, button, summary):focus-visible { border-radius: var(--r-s); }
/* Landmarks focused programmatically (skip link, menu links) are not controls: no ring */
main:focus, section[tabindex="-1"]:focus { outline: none; }
p, li, dd { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; font-weight: 600; }
.tnum { font-variant-numeric: tabular-nums lining-nums; }

.visually-hidden {
  position: absolute !important; top: 0; left: 0; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Skip link */
:where(a, button, label):has(> .visually-hidden) { position: relative; }
.skip-link {
  position: fixed; top: var(--s-3); left: var(--s-3); z-index: 100;
  padding: var(--s-3) var(--s-5); border-radius: var(--r-m);
  background: var(--cream); color: var(--glaze-950); font-weight: 600; text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--t-ui) var(--ease-out);
}
.skip-link:focus-visible { transform: none; }

/* ---------- 4. Layout primitives ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}
.section { padding-block: var(--section); }
.section + .section { padding-top: 0; }
.section.contact { padding-top: var(--section); }

/* Type roles */
.display {
  font-size: var(--fs-display);
  font-stretch: 125%;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.h2 {
  font-size: var(--fs-h2);
  font-stretch: 125%;
  line-height: 1.06;
  letter-spacing: -0.03em;
}
.h3 {
  font-size: var(--fs-h3);
  font-stretch: 115%;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--text-2); max-width: 36ch; }
.prose { max-width: 62ch; color: var(--text-2); }
.prose > * + * { margin-top: var(--s-4); }
.prose strong { color: var(--text); font-weight: 600; }
.label {
  font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-3);
}
.accent { color: var(--ember); }

.section-head { display: grid; gap: var(--s-5); margin-bottom: clamp(var(--s-10), 5vw, var(--s-16)); }
.section-head .prose { font-size: var(--fs-lead); }
.section-head .start-note { font-size: var(--fs-body); }
.start-note strong { color: var(--text); font-weight: 600; }

/* ---------- 5. Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 3rem; padding: 0 1.375rem;
  border: 1px solid transparent; border-radius: var(--r-m);
  font-size: 1rem; font-weight: 600; letter-spacing: 0.005em; line-height: 1.1;
  text-decoration: none; cursor: pointer;
  user-select: none; -webkit-user-select: none;
  transition: background-color var(--t-ui) ease, border-color var(--t-ui) ease,
              color var(--t-ui) ease, transform var(--t-press) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 1.125rem; height: 1.125rem; flex-shrink: 0; transition: transform var(--t-ui) var(--ease-out); }
.btn--primary { background: var(--action); color: var(--action-text); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); }
.btn--sm { min-height: 2.75rem; padding: 0 1rem; font-size: var(--fs-small); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: progress; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.5em; min-height: 2.75rem;
  color: var(--text); font-weight: 600; text-decoration: underline;
  text-decoration-color: var(--line-strong); text-underline-offset: 0.3em; text-decoration-thickness: 1px;
  transition: text-decoration-color var(--t-ui) ease, color var(--t-ui) ease;
}
.link-arrow svg { width: 1.1em; height: 1.1em; transition: transform var(--t-ui) var(--ease-out); }
.text-link { color: var(--ember); text-underline-offset: 0.2em; overflow-wrap: anywhere; }

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--ember-hi); }
  .btn--ghost:hover { border-color: var(--cream); }
  .btn:hover svg { transform: translateX(3px); }
  .link-arrow:hover { text-decoration-color: var(--ember); }
  .link-arrow:hover svg { transform: translateX(3px); }
  .text-link:hover { color: var(--ember-hi); }
}

.icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 6. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top);
  background: rgba(12, 21, 18, 0.82);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-ui) ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); height: var(--header-h); }
.brand { display: inline-flex; align-items: center; min-height: 44px; padding-block: var(--s-1); }
.brand svg { width: auto; height: 2.125rem; }
@media (min-width: 64em) { .brand svg { height: 2.5rem; } }

.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: var(--s-1); }
.nav__link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-3);
  color: var(--text-2); font-size: var(--fs-small); font-weight: 500; text-decoration: none;
  border-radius: var(--r-s);
}
.nav__link[aria-current="true"] { color: var(--text); }
@media (hover: hover) and (pointer: fine) { .nav__link:hover { color: var(--text); } }
.header-actions { display: flex; align-items: center; gap: var(--s-2); }
.header-cta { display: none; }
.menu-btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 44px; min-width: 44px; padding: 0 var(--s-3);
  border: 1px solid var(--line-strong); border-radius: var(--r-m); background: transparent;
  font-size: var(--fs-small); font-weight: 600; cursor: pointer;
}
.menu-btn:active { transform: scale(0.97); }
@media (min-width: 64em) {
  .nav { display: block; }
  .menu-btn { display: none; }
  .header-cta { display: inline-flex; }
}

/* Mobile menu (native <dialog>: focus trap + Esc for free) */
.menu {
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none;
  margin: 0; padding: 0; border: 0; background: var(--glaze-900); color: var(--text);
}
.menu::backdrop { background: rgba(5, 10, 8, 0.6); }
/* The panel opens as a circle from the Menu button (clip-path), so its solid background is never see-through. */
.menu[open] { animation: menu-iris 280ms var(--ease-in-out); }
@keyframes menu-iris {
  from { clip-path: circle(0 at calc(100% - var(--gutter) - 3rem) calc(env(safe-area-inset-top) + var(--header-h) / 2)); }
  to   { clip-path: circle(150vmax at calc(100% - var(--gutter) - 3rem) calc(env(safe-area-inset-top) + var(--header-h) / 2)); }
}
.menu__inner {
  display: flex; flex-direction: column; min-height: 100%;
  padding: env(safe-area-inset-top) max(var(--gutter), env(safe-area-inset-right)) calc(var(--s-6) + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
}
.menu__top { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.menu__list { display: grid; gap: 0; margin-top: var(--s-8); }
.menu__link {
  display: flex; align-items: center; justify-content: space-between; min-height: 3.75rem;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.25rem); font-stretch: 125%; font-weight: 600; letter-spacing: -0.02em;
  text-decoration: none;
}
.menu__link svg { color: var(--text-3); }
.menu__foot { margin-top: auto; display: grid; gap: var(--s-4); padding-top: var(--s-10); }
.menu__meta { color: var(--text-2); font-size: var(--fs-small); }
@media (prefers-reduced-motion: reduce) { .menu[open] { animation: none; } } /* appears at once, solid; links fade (19g) */

/* ---------- 7. Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: calc(100svh - var(--header-h));
  padding-block: clamp(var(--s-10), 6vw, var(--s-20)) var(--section);
  display: flex; align-items: center;
  overflow-x: clip;
}
.hero__grid { display: grid; gap: var(--s-8); width: 100%; }
.hero h1 { max-width: 14ch; }
.hero h1 .line { display: block; }
.hero__copy { display: grid; gap: var(--s-6); align-content: start; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-6); }
.hero__actions .btn--primary { width: 100%; }
.hero__meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); color: var(--text-3); font-size: var(--fs-small); }
.hero__meta span { display: inline-flex; align-items: center; gap: var(--s-2); }
.hero__meta .icon { width: 1.05rem; height: 1.05rem; color: var(--terra); }

@media (min-width: 30em) { .hero__actions .btn--primary { width: auto; } }
@media (min-width: 64em) {
  .hero h1 { max-width: none; }
  .hero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(var(--s-10), 4vw, var(--s-20)); row-gap: var(--s-12); }
  .hero h1 { grid-column: 1 / -1; }
  .hero__copy { padding-top: var(--s-4); }
}

/* ---------- 8. Signature: before / after the kiln ---------- */
.demo { position: relative; min-width: 0; }
.demo::before {
  /* the kiln mouth: static ember glow behind the frame */
  content: ""; position: absolute; z-index: -1; inset: 8% -6% -14% 4%;
  background: radial-gradient(closest-side, rgba(232, 128, 95, 0.26), rgba(181, 85, 58, 0.1) 55%, transparent);
  pointer-events: none;
}
.demo__frame {
  border-radius: var(--r-l); overflow: hidden;
  background: var(--glaze-800); border: 1px solid var(--line);
  box-shadow: var(--shadow-frame);
}
.demo__bar { display: flex; align-items: center; gap: var(--s-3); height: 2.5rem; padding: 0 var(--s-4); border-bottom: 1px solid var(--line); }
.demo__dots { display: flex; gap: 6px; flex-shrink: 0; }
.demo__dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.demo__url {
  flex: 1; min-width: 0; max-width: 22rem; margin-inline: auto;
  padding: 0.25rem 0.75rem; border-radius: var(--r-s); background: var(--glaze-950);
  color: var(--text-3); font-size: 0.75rem; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.demo__screen {
  --p: 50;
  --x: calc(24px + (100% - 48px) * var(--p) / 100);
  position: relative;
  aspect-ratio: 16 / 10;                     /* same ratio as both images (2400 x 1500): nothing is cropped at any width */
  overflow: hidden; background: var(--glaze-800);   /* holds the space while the images load */
}
/* Both layers fill the identical box, so the two images line up at every handle position. */
.demo__layer { position: absolute; inset: 0; overflow: hidden; }
.demo__layer picture { display: block; width: 100%; height: 100%; }
.demo__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.demo__layer--after { clip-path: inset(0 0 0 var(--x)); }   /* AFTER shows to the right of the handle */
.demo__handle {
  position: absolute; top: 0; bottom: 0; left: var(--x); z-index: 3;
  width: 2px; margin-left: -1px; background: var(--cream);
  box-shadow: 0 0 0 1px rgba(12, 21, 18, 0.25);
  pointer-events: none;
}
.demo__knob {
  position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--cream); color: var(--glaze-950);
  box-shadow: 0 6px 18px -4px rgba(3, 8, 6, 0.55);
  transition: transform var(--t-press) var(--ease-out);
}
.demo__knob svg { width: 22px; height: 22px; }
.demo__range {
  position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; background: transparent;
  touch-action: pan-y;                       /* thumb drags move the handle; vertical swipes still scroll the page */
}
.demo__range::-webkit-slider-thumb { -webkit-appearance: none; width: 48px; height: 48px; border: 0; background: transparent; cursor: ew-resize; }
.demo__range::-moz-range-thumb { width: 48px; height: 48px; border: 0; background: transparent; cursor: ew-resize; }
.demo__range::-moz-range-track { background: transparent; }
.demo__range:focus-visible ~ .demo__handle .demo__knob {
  /* dark ring fills the offset gap so the ember ring keeps 3:1 over the light sample sites */
  outline: 2px solid var(--ember); outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--glaze-950), 0 6px 18px -4px rgba(3, 8, 6, 0.55);
}
.demo__range:active ~ .demo__handle .demo__knob { transform: scale(0.94); }
.demo__tag {
  position: absolute; bottom: 12px; z-index: 2; pointer-events: none;
  padding: 0.3rem 0.6rem; border-radius: var(--r-s);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(12, 21, 18, 0.86); color: var(--cream);
}
.demo__tag--before { left: 12px; opacity: var(--tag-before, 1); }   /* main.js fades each tag as the handle passes over it */
.demo__tag--after { right: 12px; opacity: var(--tag-after, 1); background: var(--ember); color: var(--glaze-950); }
.demo__caption { display: flex; gap: var(--s-3); margin-top: var(--s-4); color: var(--text-3); font-size: var(--fs-small); max-width: 60ch; }
.demo__caption svg { margin-top: 0.2em; color: var(--terra); }

/* ---------- 9. Problems ---------- */
.problems__grid { display: grid; gap: var(--s-10); }
.problem-list { border-top: 1px solid var(--line); }
.problem {
  display: grid; gap: var(--s-3);
  padding-block: clamp(var(--s-8), 3vw, var(--s-12));
  border-bottom: 1px solid var(--line);
}
.problem__title { display: flex; gap: var(--s-4); align-items: baseline; }
.problem__title::before {
  content: ""; flex-shrink: 0; width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--terra); transform: translateY(-0.15em);
}
.problem__fix { color: var(--text-2); max-width: 58ch; padding-left: calc(0.5rem + var(--s-4)); }
.problem__setup { padding-left: calc(0.5rem + var(--s-4)); color: var(--text-3); font-size: var(--fs-small); }
.problem__setup strong { color: var(--text-2); font-weight: 600; }
@media (min-width: 64em) {
  .problems__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(var(--s-10), 5vw, var(--s-24)); }
  .problems__head { position: sticky; top: calc(var(--header-h) + var(--s-8)); align-self: start; margin-bottom: 0; }
  .problem { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); column-gap: var(--s-10); }
  .problem__fix, .problem__setup { padding-left: 0; }
  .problem__setup { grid-column: 2; }
}

/* ---------- 10. Work / case studies ---------- */
.case { display: grid; gap: var(--s-8); padding-block: clamp(var(--s-10), 5vw, var(--s-20)); border-top: 1px solid var(--line); }
.case:last-child { padding-bottom: 0; }
.case__media { position: relative; min-width: 0; }
.shot {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center;
  border: 1px solid var(--line); border-radius: var(--r-l);
  background: var(--glaze-900); /* holds the space while the image loads */
  box-shadow: var(--shadow-frame);
}
.shot--phone { display: none; }
.case__body { display: grid; gap: var(--s-5); align-content: start; min-width: 0; }
.case__meta { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  display: inline-flex; align-items: center; min-height: 1.75rem; padding: 0 0.625rem;
  border: 1px solid var(--line-strong); border-radius: var(--r-s);
  color: var(--text-2); font-size: var(--fs-label); font-weight: 500;
}
.case__who { color: var(--text-3); font-size: var(--fs-small); margin-top: calc(var(--s-3) * -1); }
.case__lede {
  /* one-line story headline inside a case study; a statement, not a second heading */
  color: var(--text); font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  font-stretch: 115%; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2;
}
.outcome {
  display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); align-items: start;
  padding: var(--s-4) var(--s-5); border-radius: var(--r-m); background: var(--glaze-850);
  border: 1px solid var(--line);
}
.outcome svg { color: var(--ember); margin-top: 0.15em; }
.outcome p { color: var(--text); font-weight: 500; }
.checklist { display: grid; gap: var(--s-2); }
.checklist li { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); color: var(--text-2); }
.checklist .icon { color: var(--ember); margin-top: 0.2em; width: 1.1rem; height: 1.1rem; }
.quote {
  padding-left: var(--s-5); border-left: 1px solid var(--terra);
  color: var(--text-2); font-size: var(--fs-lead); line-height: 1.5;
}
.quote cite { display: block; margin-top: var(--s-2); font-style: normal; font-size: var(--fs-small); color: var(--text-3); }
.placeholder-mark { color: var(--ember); }
/* Testimonial: deliberately quieter than the .outcome badge above it (no panel, small type, a 1px ember rule).
   It is a direct child of .case__body, so it picks up that block's one-time "stack" reveal automatically. */
.testimonial { padding-left: var(--s-5); border-left: 1px solid var(--ember); max-width: 62ch; }
.testimonial blockquote p { color: var(--text); font-size: var(--fs-small); line-height: 1.5; }
.testimonial figcaption { margin-top: var(--s-2); font-size: var(--fs-small); line-height: 1.4; color: var(--text-3); }
.testimonial figcaption strong { color: var(--text); font-weight: 600; }
@media (min-width: 48em) {
  .shot--phone {
    display: block; position: absolute; right: clamp(-1rem, -2vw, 0rem); bottom: -8%; width: 24%;
    aspect-ratio: 750 / 1624; border-radius: 22px;
    border: 3px solid var(--glaze-700); background: var(--glaze-850);
  }
  .case--phone-left .shot--phone { right: auto; left: clamp(-1rem, -2vw, 0rem); }
}
@media (min-width: 48em) and (max-width: 63.99em) {
  .case__media { margin-bottom: var(--s-12); } /* room for the phone's overhang when stacked */
}
@media (min-width: 64em) {
  .case { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(var(--s-10), 5vw, var(--s-20)); align-items: center; }
  .case--flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } /* mirror the columns, not just the order */
  .case--flip .case__media { order: 2; }
  .case--flip .shot--phone { right: auto; left: clamp(-1rem, -2vw, 0rem); }
}

/* ---------- 11. About ---------- */
.about { display: grid; gap: var(--s-10); align-items: center; }
.portrait { position: relative; max-width: 32rem; }
.portrait img {
  width: 100%; aspect-ratio: 7 / 8; object-fit: cover; border-radius: var(--r-l);
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}
.portrait figcaption { margin-top: calc(var(--s-6) * -1); position: relative; color: var(--text-3); font-size: var(--fs-small); }
.portrait__credit { display: block; margin-top: var(--s-2); font-size: var(--fs-label); line-height: 1.4; color: var(--text-3); }
.portrait__credit a {
  display: inline-block; padding-block: 0.7rem; margin-block: -0.7rem;   /* ~44px tap area, no extra visible space */
  color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong);
  text-underline-offset: 0.2em; text-decoration-thickness: 1px;
}
@media (hover: hover) and (pointer: fine) { .portrait__credit a:hover { color: var(--text); text-decoration-color: currentColor; } }
.portrait figcaption strong { display: block; color: var(--text); font-size: 1.0625rem; font-stretch: 115%; font-weight: 600; }
.about__body { display: grid; gap: var(--s-6); }
.tagline {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); font-stretch: 125%; font-weight: 600;
  letter-spacing: -0.02em; line-height: 1.15;
}
.tagline .dot { color: var(--terra); }
@media (min-width: 64em) {
  .about { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(var(--s-12), 6vw, var(--s-24)); }
}

/* ---------- 12. Platforms ---------- */
.platforms { display: grid; gap: var(--s-4); }
.platform {
  display: grid; gap: var(--s-4); align-content: start;
  padding: clamp(var(--s-6), 3vw, var(--s-10));
  border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line);
}
.platform__name { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.platform__for { color: var(--ember); font-weight: 600; font-size: var(--fs-small); }
.platform p { color: var(--text-2); }
@media (min-width: 48em) { .platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 13. Process: the firing schedule ---------- */
.curve { display: none; }
.steps { display: grid; gap: 0; position: relative; }
.steps::before {
  /* temperature rising: mobile/tablet vertical rule */
  content: ""; position: absolute; left: 0.3125rem; top: 0.6rem; bottom: 0.6rem; width: 1px;
  background: linear-gradient(to bottom, var(--line-strong), var(--terra) 70%, var(--ember));
}
.step { position: relative; display: grid; gap: var(--s-2); padding: 0 0 var(--s-10) var(--s-10); }
.step:last-child { padding-bottom: 0; }
.step::before {
  content: ""; position: absolute; left: 0; top: 0.45rem; width: 0.625rem; height: 0.625rem; border-radius: 50%;
  background: var(--bg); box-shadow: inset 0 0 0 2px var(--terra);
}
.step:last-child::before { background: var(--ember); box-shadow: none; }
.step__when { color: var(--ember); font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.step p { color: var(--text-2); max-width: 40ch; }
@media (min-width: 64em) {
  .curve { display: block; width: 100%; height: auto; margin-bottom: var(--s-6); overflow: visible; }
  .curve__grid line { stroke: var(--line); stroke-width: 1; }
  .curve__path { fill: none; stroke: url(#heat); stroke-width: 2; stroke-linecap: round; }
  .curve__point { fill: var(--bg); stroke: var(--terra); stroke-width: 2; }
  .curve__point--end { fill: var(--ember); stroke: none; }
  .curve__fill { fill: url(#heat-fill); }
  .curve.is-armed .curve__path { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .curve.is-armed .curve__point, .curve.is-armed .curve__fill { opacity: 0; }
  .curve.is-drawn .curve__path { stroke-dashoffset: 0; transition: stroke-dashoffset 1400ms var(--ease-in-out); }
  .curve.is-drawn .curve__point { opacity: 1; transition: opacity 300ms ease; }
  .curve.is-drawn .curve__point:nth-of-type(1) { transition-delay: 200ms; }
  .curve.is-drawn .curve__point:nth-of-type(2) { transition-delay: 550ms; }
  .curve.is-drawn .curve__point:nth-of-type(3) { transition-delay: 900ms; }
  .curve.is-drawn .curve__point:nth-of-type(4) { transition-delay: 1250ms; }
  .curve.is-drawn .curve__fill { opacity: 1; transition: opacity 800ms ease 900ms; }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: auto auto auto; column-gap: var(--s-8); row-gap: var(--s-2); }
  .steps::before, .step::before { display: none; }
  /* Each step spans the same three rows (heading, label, text), so the labels sit on one line across all four columns. */
  .step { padding: 0; grid-row: span 3; grid-template-rows: subgrid; row-gap: var(--s-2); }
  @supports not (grid-template-rows: subgrid) { .step { grid-row: auto; grid-template-rows: none; align-content: start; } }
}

/* Ownership promise */
.promise {
  display: grid; gap: var(--s-5); margin-top: clamp(var(--s-16), 7vw, var(--s-24));
  padding: clamp(var(--s-8), 5vw, var(--s-16));
  border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line);
  position: relative; overflow: hidden; isolation: isolate;
}
.promise::after {
  content: ""; position: absolute; z-index: -1; right: -20%; bottom: -60%; width: 70%; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(181, 85, 58, 0.2), transparent);
  pointer-events: none;
}
.promise__statement { font-size: clamp(1.75rem, 1.1rem + 2.6vw, 3.25rem); font-stretch: 125%; font-weight: 600; line-height: 1.08; letter-spacing: -0.03em; max-width: 20ch; }
.promise p { color: var(--text-2); max-width: 56ch; }

/* ---------- 14. Pricing ---------- */
.price-list { border-top: 1px solid var(--line); }
.price {
  display: grid; gap: var(--s-4);
  padding-block: clamp(var(--s-8), 3vw, var(--s-10));
  border-bottom: 1px solid var(--line);
}
.price__name { display: grid; gap: var(--s-1); }
.price__for { color: var(--text-3); font-size: var(--fs-small); }
.price__includes { display: grid; gap: var(--s-2); }
.price__includes li { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); color: var(--text-2); }
.price__includes .icon { color: var(--terra); width: 1.1rem; height: 1.1rem; margin-top: 0.22em; }
.price__amount { display: grid; gap: var(--s-1); align-content: start; }
.price__from { color: var(--text-3); font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.price__value { font-size: clamp(2rem, 1.5rem + 1.6vw, 2.75rem); font-stretch: 125%; font-weight: 600; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums lining-nums; }
.price__value small { font-size: 0.42em; font-stretch: 100%; letter-spacing: 0; color: var(--text-3); font-weight: 500; }
.monthly { margin-top: clamp(var(--s-12), 5vw, var(--s-16)); display: grid; gap: var(--s-6); }
.monthly__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2) var(--s-4); }
.monthly__head p { color: var(--text-3); font-size: var(--fs-small); }
.monthly__grid { display: grid; gap: var(--s-4); }
.plan {
  display: grid; gap: var(--s-3); padding: var(--s-6);
  border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line);
}
.plan__top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); flex-wrap: wrap; }
.plan__price { font-size: 1.5rem; font-stretch: 125%; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums lining-nums; }
.plan__price small { font-size: 0.6em; font-stretch: 100%; color: var(--text-3); font-weight: 500; letter-spacing: 0; }
.plan p { color: var(--text-2); }
.extras {
  display: grid; gap: var(--s-5); margin-top: var(--s-10);
  padding-top: var(--s-8); border-top: 1px solid var(--line);
}
.extras p { font-size: var(--fs-lead); color: var(--text); max-width: 48ch; }
@media (min-width: 48em) {
  .monthly__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .extras { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
}
@media (min-width: 64em) {
  .price { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr); column-gap: var(--s-10); align-items: start; }
  .price__amount { justify-items: end; text-align: right; }
}

/* ---------- 15. FAQ ---------- */
.faq__grid { display: grid; gap: var(--s-10); }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-6);
  min-height: 4rem; padding-block: var(--s-5); cursor: pointer; list-style: none;
  font-size: 1.125rem; font-weight: 600; line-height: 1.35;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { color: var(--text-3); transition: transform var(--t-ui) var(--ease-out), color var(--t-ui) ease; }
.faq-item[open] summary .icon { transform: rotate(45deg); color: var(--ember); }
.faq-item__a { padding: 0 var(--s-12) var(--s-6) 0; color: var(--text-2); max-width: 64ch; }
.faq-item__a > * + * { margin-top: var(--s-3); }
@media (hover: hover) and (pointer: fine) { .faq-item summary:hover .icon { color: var(--text); } }
@media (min-width: 64em) {
  .faq__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(var(--s-10), 5vw, var(--s-24)); }
  .faq__grid .section-head { position: sticky; top: calc(var(--header-h) + var(--s-8)); align-self: start; }
}

/* ---------- 16. Contact / audit ---------- */
.contact {
  position: relative; isolation: isolate;
  border-top: 1px solid var(--line);
  background: linear-gradient(to bottom, var(--glaze-950), var(--glaze-900));
  overflow: clip;
}
.contact::before {
  content: ""; position: absolute; z-index: -1; left: 50%; bottom: 0; width: min(90rem, 140%); aspect-ratio: 2 / 1;
  transform: translateX(-50%);
  background: radial-gradient(closest-side at 50% 100%, rgba(232, 128, 95, 0.16), transparent);
  pointer-events: none;
}
.contact__grid { display: grid; gap: var(--s-12); }
.contact__intro { display: grid; gap: var(--s-6); align-content: start; }
.included { display: grid; gap: var(--s-4); }
.included li { display: grid; grid-template-columns: auto 1fr; gap: var(--s-4); align-items: start; }
.included__n {
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  border: 1px solid var(--terra); color: var(--ember); font-size: var(--fs-label); font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.included strong { display: block; color: var(--text); font-weight: 600; }
.included span { color: var(--text-2); font-size: var(--fs-small); }
.contact__alt { display: grid; gap: var(--s-2); color: var(--text-2); font-size: var(--fs-small); }
.contact__alt a { font-weight: 600; }

.form-card {
  padding: clamp(var(--s-6), 4vw, var(--s-10));
  border-radius: var(--r-l); background: var(--glaze-850); border: 1px solid var(--line);
  box-shadow: var(--shadow-frame);
}
.form { display: grid; gap: var(--s-5); }
.form__row { display: grid; gap: var(--s-5); }
.field { display: grid; gap: var(--s-2); min-width: 0; }
.field label { font-size: var(--fs-small); font-weight: 600; color: var(--text); }
.field .opt { color: var(--text-3); font-weight: 400; }
.field input, .field textarea {
  width: 100%; min-height: 3rem; padding: 0.75rem 0.875rem;
  border: 1px solid var(--line-strong); border-radius: var(--r-m);
  background: var(--glaze-950); color: var(--text); caret-color: var(--ember);
  transition: border-color var(--t-ui) ease, box-shadow var(--t-ui) ease;
}
.field textarea { min-height: 8.5rem; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); opacity: 1; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px rgba(232, 128, 95, 0.28); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field__error { display: none; gap: var(--s-2); align-items: center; color: var(--danger); font-size: var(--fs-small); }
.field__error.is-shown { display: flex; }
.field__error .icon { width: 1rem; height: 1rem; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form__fine { color: var(--text-3); font-size: var(--fs-label); line-height: 1.5; }
.form__fine a { color: var(--text-2); }
.form-status { display: none; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-radius: var(--r-m); font-size: var(--fs-small); }
.form-status.is-shown { display: grid; grid-template-columns: auto 1fr; }
.form-status--error { background: rgba(242, 160, 138, 0.1); border: 1px solid rgba(242, 160, 138, 0.4); color: var(--cream); }
.form-status--error .icon { color: var(--danger); }
.form-success { display: none; gap: var(--s-4); text-align: left; }
.form-success.is-shown { display: grid; }
.form-success .icon { width: 2.5rem; height: 2.5rem; color: var(--ember); }
.form-success p { color: var(--text-2); }
.spinner { width: 1.1rem; height: 1.1rem; border-radius: 50%; border: 2px solid rgba(12, 21, 18, 0.3); border-top-color: var(--glaze-950); animation: spin 700ms linear infinite; display: none; }
.is-loading .spinner { display: block; }
.is-loading .btn__arrow { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 1600ms; } }
@media (min-width: 40em) { .form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) {
  .contact__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: clamp(var(--s-12), 6vw, var(--s-24)); }
}

/* ---------- 17. Privacy + footer ---------- */
.privacy { padding-block: var(--s-16); border-top: 1px solid var(--line); background: var(--glaze-900); }
.privacy__inner { display: grid; gap: var(--s-4); max-width: 68ch; }
.privacy h2 { font-size: 1.25rem; font-stretch: 115%; }
.privacy p, .privacy li { color: var(--text-2); font-size: var(--fs-small); }
.privacy ul { padding-left: 1.1rem; display: grid; gap: var(--s-1); }

.site-footer { padding-block: var(--s-16) calc(var(--s-10) + env(safe-area-inset-bottom)); background: var(--glaze-900); border-top: 1px solid var(--line); }
.footer__grid { display: grid; gap: var(--s-10); }
.footer__brand { display: grid; gap: var(--s-4); align-content: start; }
.footer__brand svg { height: 3.25rem; width: auto; }
.footer__brand p { color: var(--text-2); }
.footer__col { display: grid; gap: var(--s-2); align-content: start; }
.footer__col h2 { margin-bottom: var(--s-1); }
.footer__col > a, .footer__col > span {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; width: fit-content;
  color: var(--text-2); text-decoration: none; overflow-wrap: anywhere;
}
.footer__col .icon { color: var(--terra); width: 1.1rem; height: 1.1rem; }
@media (hover: hover) and (pointer: fine) { .footer__col a:hover { color: var(--text); } }
.footer__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3);
  margin-top: var(--s-12); padding-top: var(--s-6); border-top: 1px solid var(--line);
  color: var(--text-3); font-size: var(--fs-label);
}
@media (min-width: 40em) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer__brand { grid-column: 1 / -1; } }
@media (min-width: 64em) { .footer__grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.2fr); } .footer__brand { grid-column: auto; } }

/* ---------- 18. Mobile thumb-reach CTA ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: var(--s-3) max(var(--gutter), env(safe-area-inset-right)) calc(var(--s-3) + env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
  background: rgba(17, 29, 25, 0.9);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 260ms var(--ease-drawer);
}
.dock.is-visible { transform: none; }
.dock[hidden] { display: none; }
@media (min-width: 64em) { .dock { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .dock { transform: none; opacity: 0; visibility: hidden; transition: opacity 160ms ease, visibility 0s linear 160ms; }
  .dock.is-visible { opacity: 1; visibility: visible; transition: opacity 160ms ease; }
}

/* ---------- 19. Motion ----------
   Thesis: the kiln mouth opens. One authored focal moment (the iris), a
   rehearsed headline entrance, and quiet supporting motion.
   Animated properties are transform, opacity and clip-path only.
   Scroll-linked effects use CSS `animation-timeline` where supported; main.js
   drives the same effects for browsers without it. Every effect has a
   prefers-reduced-motion path, and content is visible unless JS has run (.js). */

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* 19a. Hero headline: words rise through a mask, one after another */
.hero h1 .w {
  display: inline-block; vertical-align: top;
  overflow: clip;                                  /* the mask each word rises through */
  padding: 0 0.06em 0.2em; margin: 0 -0.06em -0.2em; /* room for descenders and tracking; net layout unchanged */
}
.hero h1 .w > span { display: inline-block; }
@keyframes word-rise { from { transform: translateY(125%); } to { transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .hero h1 .w > span { animation: word-rise 640ms var(--ease-out) backwards; }
  .hero h1 .line:first-child .w:nth-child(2) > span { animation-delay: 60ms; }
  .hero h1 .line:first-child .w:nth-child(3) > span { animation-delay: 120ms; }
  .hero h1 .line:first-child .w:nth-child(4) > span { animation-delay: 180ms; }
  .hero h1 .line:last-child .w:nth-child(1) > span { animation-delay: 240ms; }
  .hero h1 .line:last-child .w:nth-child(2) > span { animation-delay: 300ms; }
}
@media (prefers-reduced-motion: reduce) {
  .hero h1 .w > span { animation: fade-in 240ms linear backwards; }  /* fade, no movement, no stagger */
}

/* 19b. Iris: a circle opens from the centre of the screen and the next section
   continues on its colour. The circle is a fixed layer inside #why. It starts when
   #why's top edge reaches the middle of the screen, so it is always centred ON that
   edge and can only grow out of it (a dome rising over the hero, never a floating
   dot). It is fully open at 80% of the way, and #why's own background takes over
   when the edge reaches the top of the screen. */
#why {
  position: relative; z-index: 1;            /* above the hero, so the circle can cover it */
  background-color: var(--iris);
  --line: #35493F;                           /* hairlines re-tuned for this background */
  padding-top: calc(var(--section) * 0.4);   /* was a full --section: the heading sits close to the colour edge */
  padding-bottom: calc(var(--section) * 0.5);
}
#why + .section { padding-top: calc(var(--section) * 0.5); } /* spacing split across the colour edge; total unchanged */
.iris {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: var(--iris);
  clip-path: circle(0 at 50% 50%);           /* closed: nothing painted, nothing clickable */
}
@keyframes iris-open {
  from { clip-path: circle(0 at 50% 50%); }
  80%  { clip-path: circle(75vmax at 50% 50%); }   /* covers any screen: 75vmax > half the diagonal */
  to   { clip-path: circle(75vmax at 50% 50%); }
}
@supports (animation-timeline: view()) and (view-timeline-name: --a) {
  @media (prefers-reduced-motion: no-preference) {
    #why { view-timeline: --why block; }
    .iris {
      animation: iris-open linear backwards;
      animation-timeline: --why;
      animation-range: cover 50svh cover 100svh; /* section top edge: middle of screen -> top of screen */
    }
  }
}
/* reduced motion: no circle; the section is simply its own colour (a static band) */

/* 19c. Header follows the section behind it: tint crossfades (opacity), links swap colour */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(26, 44, 38, 0.82);
  opacity: 0; transition: opacity var(--t-ui) ease;
}
.site-header[data-on="iris"]::before { opacity: 1; }
.site-header[data-on="iris"] .nav__link { color: var(--cream); }

/* 19d. Case studies: the text stacks in once (19e). The screenshots themselves are static. */

/* 19e. One-time reveals. main.js adds .js, then .is-in as each item enters view. */
.js [data-reveal="rise"]:not(.is-in) { opacity: 0; transform: translateY(18px); }
.js [data-reveal="rise"] { transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out); }


.js [data-reveal="stack"] > * { transition: opacity 450ms var(--ease-out), transform 450ms var(--ease-out); }
.js [data-reveal="stack"]:not(.is-in) > * { opacity: 0; transform: translateY(14px); }
.js [data-reveal="stack"].is-in > :nth-child(2) { transition-delay: 50ms; }
.js [data-reveal="stack"].is-in > :nth-child(3) { transition-delay: 100ms; }
.js [data-reveal="stack"].is-in > :nth-child(4) { transition-delay: 150ms; }
.js [data-reveal="stack"].is-in > :nth-child(5) { transition-delay: 200ms; }
.js [data-reveal="stack"].is-in > :nth-child(6) { transition-delay: 250ms; }
.js [data-reveal="stack"].is-in > :nth-child(7) { transition-delay: 300ms; }
.js [data-reveal="stack"].is-in > :nth-child(8) { transition-delay: 350ms; }

@media (prefers-reduced-motion: reduce) {    /* opacity only: no movement, no stagger */
  .js [data-reveal="rise"]:not(.is-in) { transform: none; }
  .js [data-reveal="rise"] { transition: opacity 200ms linear; }
  .js [data-reveal="stack"]:not(.is-in) > * { transform: none; }
  .js [data-reveal="stack"] > * { transition: opacity 200ms linear; }
  .js [data-reveal="stack"].is-in > * { transition-delay: 0ms; }
}

/* 19f. Ticker between Work and About: slides sideways as it crosses the screen */
.marquee { overflow: clip; border-block: 1px solid var(--line); padding-block: clamp(1.25rem, 0.75rem + 2.5vw, 2.75rem); }
.marquee__track {
  display: flex; align-items: center; width: max-content;
  font-size: clamp(2.75rem, 1.5rem + 5vw, 6.5rem); font-stretch: 125%; font-weight: 600;
  letter-spacing: -0.035em; line-height: 1.05; white-space: nowrap;
  color: var(--line-strong);                 /* decorative, aria-hidden */
}
.marquee__group { display: flex; align-items: center; flex-shrink: 0; }
.marquee__dot { flex-shrink: 0; width: 0.2em; height: 0.2em; margin-inline: 0.45em; border-radius: 50%; background: var(--terra); }
.marquee + .section { padding-top: calc(var(--section) * 0.7); }
#work { padding-bottom: calc(var(--section) * 0.7); }
@keyframes marquee-drift { from { transform: translateX(0); } to { transform: translateX(-110vw); } }
@supports (animation-timeline: view()) and (view-timeline-name: --a) {
  @media (prefers-reduced-motion: no-preference) {
    .marquee__track { animation: marquee-drift linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
  }
}
@media (prefers-reduced-motion: reduce) {    /* still: one line of words, wrapped and centred */
  .marquee { padding-inline: var(--gutter); }
  .marquee__track { width: auto; justify-content: center; white-space: normal; }
  .marquee__group { flex-wrap: wrap; justify-content: center; }
  .marquee__group:not(:first-child) { display: none; }
}

/* 19g. Full-screen menu: the panel opens as a circle (see .menu), then links arrive one after another, each under 300ms */
@keyframes menu-item { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .menu[open] .menu__list > li, .menu[open] .menu__foot > * { animation: menu-item 280ms var(--ease-out) backwards; }
  .menu[open] .menu__list > li:nth-child(1) { animation-delay: 110ms; }
  .menu[open] .menu__list > li:nth-child(2) { animation-delay: 160ms; }
  .menu[open] .menu__list > li:nth-child(3) { animation-delay: 210ms; }
  .menu[open] .menu__list > li:nth-child(4) { animation-delay: 260ms; }
  .menu[open] .menu__list > li:nth-child(5) { animation-delay: 310ms; }
  .menu[open] .menu__foot > :nth-child(1) { animation-delay: 380ms; }
  .menu[open] .menu__foot > :nth-child(2) { animation-delay: 430ms; }
}
@media (prefers-reduced-motion: reduce) {
  .menu[open] .menu__list > li, .menu[open] .menu__foot > * { animation: fade-in 160ms linear backwards; }
}

/* ---------- 20. Windows High Contrast / forced colors ----------
   The logo's cream fill would vanish on a forced light background;
   map it to the system text colour (the dot keeps its accent role). */
@media (forced-colors: active) {
  #kiln-logo path { fill: CanvasText; }
  #kiln-logo circle { fill: Highlight; }
  .demo__knob { forced-color-adjust: none; }
}

/* ---------- 21. Print ---------- */
@media print {
  .site-header, .dock, .menu, .demo, .form-card { display: none !important; }
  body { background: #fff; color: #000; }
  [data-reveal], [data-reveal] > * { opacity: 1 !important; transform: none !important; }
  .marquee { display: none; }
}
