/* ==========================================================================
   Flowfox — "Forest & fox"
   Contrast (WCAG 2.x, relative luminance):
     cream  #F4EDE1 on forest #0F2A20 ........ ~13:1
     muted  #C9C2B4 on forest ................ ~8.6:1   (on moss only 4.46 -> use --muted-moss)
     muted-moss #D6CFC1 on moss #2E5A44 ...... ~5.1:1
     forest on fox #F16739 (logo) ............ ~4.9:1   (buttons, fox band)
     fox on forest ........................... ~4.9:1   (accent text on dark)
     fox-ink #A8401C on cream ................ ~5.3:1   (accent text on light)
     ink-muted #555B51 on cream .............. ~5.6:1
   ========================================================================== */

:root {
  --forest: #0F2A20;
  --forest-deep: #0A1F17;
  --forest-comp: #0B2318;
  --moss: #2E5A44;
  --line-dark: rgba(244, 237, 225, 0.14);
  --line-dark-strong: rgba(244, 237, 225, 0.3);
  --cream: #F4EDE1;
  --cream-2: #EBE2D2;
  --line-light: #D6CAB4;
  --muted: #C9C2B4;
  --muted-moss: #D6CFC1;
  --ink: #10140F;
  --ink-muted: #555B51;
  --fox: #F16739;
  --fox-hover: #F48056;
  --fox-ink: #A8401C;
  --error: #FFB09F;

  --font-display: "Syne", "Trebuchet MS", sans-serif;
  --font-body: "Epilogue", "Segoe UI", sans-serif;
  --font-mono: "DM Mono", "Cascadia Mono", ui-monospace, monospace;

  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.12rem, 1.05rem + 0.4vw, 1.35rem);
  --step-2: clamp(1.35rem, 1.2rem + 0.8vw, 1.85rem);
  --step-3: clamp(1.7rem, 1.4rem + 1.6vw, 2.6rem);
  --step-4: clamp(2rem, 1.5rem + 2.8vw, 3.75rem);
  --step-5: clamp(2.45rem, 1.3rem + 5.4vw, 5.4rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: clamp(4rem, 3rem + 5vw, 7.5rem);

  --r-sm: 6px;
  --r-field: 10px;
  --r-tile: 12px;
  --r-panel: 16px;
  --r-pill: 999px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-back: cubic-bezier(0.34, 1.3, 0.64, 1);
  --dur-fast: 160ms;
  --dur: 240ms;

  --wrap: 76rem;
  --gutter: clamp(1.25rem, 0.8rem + 2.2vw, 2.5rem);
  --header-h: 4.25rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--forest);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open { overflow: hidden; }

svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--fox);
  outline-offset: 3px;
  border-radius: 4px;
}

.on-light :focus-visible { outline-color: var(--fox-ink); }

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  background: var(--fox);
  color: var(--forest);
  padding: 0.75rem 1rem;
  border-radius: var(--r-sm);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus { top: 0.75rem; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.mono { font-family: var(--font-mono); }

/* Keyframe diamond — the recurring bullet */
.dia {
  display: inline-block;
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--fox);
  transform: rotate(45deg);
}

.dia--hollow {
  background: transparent;
  border: 1.5px solid var(--fox);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.6rem 1.35rem;
  border: 1.5px solid transparent;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) ease-out,
    border-color var(--dur-fast) ease-out,
    color var(--dur-fast) ease-out;
}

.btn:active { transform: translateY(1px); }

.btn--fox { background: var(--fox); color: var(--forest); }
.btn--fox:hover { background: var(--fox-hover); transform: translateY(-1px); }
.btn--fox:active { transform: translateY(1px); }

.btn--ghost { border-color: var(--line-dark-strong); color: var(--cream); }
.btn--ghost:hover { border-color: var(--cream); background: rgba(244, 237, 225, 0.06); }

.btn .arrow { display: inline-block; transition: transform var(--dur) var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--forest);
  border-bottom: 1px solid var(--line-dark);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.brand-logo { display: block; width: auto; height: 30px; }
.site-footer .brand-logo { height: 38px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-list {
  list-style: none;
  display: flex;
  gap: var(--space-1);
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.8rem;
  border-radius: var(--r-pill);
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur-fast) ease-out, background-color var(--dur-fast) ease-out;
}

.nav-list a:hover { color: var(--cream); background: rgba(244, 237, 225, 0.07); }

.nav-cta { margin-left: var(--space-3); white-space: nowrap; }

.nav-toggle { display: none; }

@media (max-width: 59.99rem) {
  .header-inner { flex-wrap: wrap; padding-block: 0.5rem; gap: var(--space-2); }
  .nav-list { flex-wrap: wrap; }
  .nav-list a { padding: 0 0.6rem; }
  .nav-cta { display: none; }

  /* With JS: off-canvas panel behind a real button */
  .js .header-inner { flex-wrap: nowrap; padding-block: 0; }

  .js .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 44px;
    min-width: 44px;
    padding: 0 1rem;
    border: 1.5px solid var(--line-dark-strong);
    border-radius: var(--r-pill);
    background: transparent;
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--dur-fast) ease-out;
  }

  .js .nav-toggle:hover { border-color: var(--cream); }

  .nav-toggle-bars { position: relative; width: 16px; height: 10px; }

  .nav-toggle-bars span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform var(--dur) var(--ease-out);
  }

  .nav-toggle-bars span:first-child { top: 0; }
  .nav-toggle-bars span:last-child { bottom: 0; }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bars span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .js .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-6);
    padding: var(--space-6) var(--gutter) var(--space-8);
    background: var(--forest);
    overflow-y: auto;
  }

  .js .site-nav.is-open { display: flex; }
  .js .nav-list { flex-direction: column; gap: 0; }

  .js .nav-list a {
    display: flex;
    min-height: 60px;
    padding: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--line-dark);
    color: var(--cream);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--step-3);
  }

  .js .nav-list a:hover { background: transparent; color: var(--fox); }
  .js .nav-cta { display: inline-flex; margin: 0; align-self: flex-start; }
}

/* ---------- Reveal ---------- */
[data-reveal] {
  transition:
    opacity 520ms var(--ease-out),
    transform 520ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.js [data-reveal]:not(.is-in) {
  opacity: 0;
  transform: translateY(18px);
}

/* ---------- Bands & section heads ---------- */
.band { padding-block: var(--space-9); }
.band--cream { background: var(--cream); color: var(--ink); }
.band--fox { background: var(--fox); color: var(--forest); }
.band--deep { background: var(--forest-deep); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.band--cream .eyebrow { color: var(--ink-muted); }
.band--fox .eyebrow { color: var(--forest); }
.band--fox .dia { background: var(--forest); }

.sec-head {
  display: grid;
  gap: var(--space-5);
  margin-bottom: clamp(2.25rem, 1.5rem + 2.5vw, 4rem);
}

.sec-head h2 { font-size: var(--step-4); margin-top: var(--space-3); max-width: 16ch; }

.sec-aside { display: grid; gap: var(--space-4); align-content: end; }
.sec-aside p { color: var(--muted); max-width: 46ch; }
.band--cream .sec-aside p { color: var(--ink-muted); }

@media (min-width: 56rem) {
  .sec-head {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: end;
    column-gap: var(--space-8);
  }
}

/* Easing-curve graph beside titles */
.curve {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--muted);
}

.band--cream .curve { color: var(--ink-muted); }

.curve svg { width: 58px; height: 58px; flex: none; overflow: visible; }
.curve .c-axis { stroke: currentColor; stroke-width: 1; opacity: 0.45; fill: none; }
.curve .c-handle { stroke: currentColor; stroke-width: 1; opacity: 0.7; fill: none; }
.curve .c-path { stroke: var(--fox); stroke-width: 2.25; fill: none; stroke-linecap: round; }
.band--cream .curve .c-path { stroke: var(--fox-ink); }
.curve .c-dot { fill: var(--fox); }
.band--cream .curve .c-dot { fill: var(--fox-ink); }

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(2rem, 1rem + 4vw, 5rem) clamp(3.5rem, 2rem + 5vw, 7rem);
  overflow: clip;
}

.hero-grid {
  display: grid;
  gap: clamp(2.5rem, 1rem + 4vw, 4.5rem);
  align-items: center;
}

@media (min-width: 64rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
}

.hero h1 {
  margin-top: var(--space-4);
  font-size: var(--step-5);
  line-height: 0.96;
  letter-spacing: -0.035em;
  text-wrap: initial;
}

.hero h1 em { font-style: normal; color: var(--fox); }

.hero-lead {
  margin-top: var(--space-5);
  max-width: 36ch;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.hero-actions .btn { white-space: nowrap; }

.hero-note {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: var(--space-5);
  font-size: var(--step--1);
  color: var(--muted);
}

/* ---------- Stage (comp + timeline) ---------- */
.stage {
  margin: 0;
  background: var(--forest-deep);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-panel);
  overflow: hidden;
}

.stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.95rem;
  border-bottom: 1px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.stage-file { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-fps { flex: none; }

.comp {
  background-color: var(--forest-comp);
  background-image: radial-gradient(rgba(244, 237, 225, 0.09) 1px, transparent 1.3px);
  background-size: 22px 22px;
  background-position: 11px 11px;
}

.fox-svg { width: 100%; height: auto; }
.fox-svg .sel { fill: none; stroke: rgba(244, 237, 225, 0.32); stroke-width: 1; }
.fox-svg .sel rect { vector-effect: non-scaling-stroke; }
.fox-svg .sel .sel-h { fill: var(--forest-comp); stroke: rgba(244, 237, 225, 0.6); }
.fox-svg .sel-label { fill: var(--muted); stroke: none; font-family: var(--font-mono); font-size: 11px; }
.fox-svg .ground { stroke: rgba(244, 237, 225, 0.22); stroke-width: 1.5; stroke-dasharray: 2 6; }

/* Layers. Base state = fully assembled, so no-JS and reduced motion show the finished mark. */
.fx { transform-box: fill-box; }
.fx-ear-l, .fx-ear-r { transform-origin: 50% 100%; }
.fx-head, .fx-eyes, .fx-spark { transform-origin: 50% 50%; }
.fx-muzzle { transform-origin: 50% 0%; }
.fx-nose { transform-origin: 50% 50%; }
.fx-tail { transform-origin: 0% 100%; }
.fx-head-line { stroke-dasharray: 1; stroke-dashoffset: 0; opacity: 0; }

/* All hero animations share one 5 s timeline with no delays, so the scrubber
   can map frame -> currentTime 1:1 (120 frames @ 24 fps). */
.stage.is-anim .fx-all       { animation: fx-out 5s linear infinite both; }
.stage.is-anim .fx-ear-l     { animation: fx-ear-l 5s var(--ease-out) infinite both; }
.stage.is-anim .fx-ear-r     { animation: fx-ear-r 5s var(--ease-out) infinite both; }
.stage.is-anim .fx-head-line { animation: fx-draw 5s var(--ease-in-out) infinite both; }
.stage.is-anim .fx-head      { animation: fx-fill 5s var(--ease-out) infinite both; }
.stage.is-anim .fx-muzzle    { animation: fx-muzzle 5s var(--ease-out) infinite both; }
.stage.is-anim .fx-eyes      { animation: fx-eyes 5s var(--ease-out) infinite both; }
.stage.is-anim .fx-nose      { animation: fx-nose 5s var(--ease-out) infinite both; }
.stage.is-anim .fx-tail      { animation: fx-tail 5s var(--ease-out) infinite both; }
.stage.is-anim .fx-spark--a  { animation: fx-spark-a 5s var(--ease-out) infinite both; }
.stage.is-anim .fx-spark--b  { animation: fx-spark-b 5s var(--ease-out) infinite both; }

@keyframes fx-out {
  0%, 93% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(6px); }
}

@keyframes fx-ear-l {
  0%, 8% { opacity: 0; transform: translateY(-22px) rotate(-28deg); }
  22% { opacity: 1; transform: translateY(1.5px) rotate(4deg); }
  28%, 100% { opacity: 1; transform: none; }
}

@keyframes fx-ear-r {
  0%, 8% { opacity: 0; transform: translateY(-22px) rotate(28deg); }
  22% { opacity: 1; transform: translateY(1.5px) rotate(-4deg); }
  28%, 100% { opacity: 1; transform: none; }
}

@keyframes fx-draw {
  0% { stroke-dashoffset: 1; opacity: 1; }
  20% { stroke-dashoffset: 0; opacity: 1; }
  30% { stroke-dashoffset: 0; opacity: 1; }
  38%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes fx-fill {
  0%, 16% { opacity: 0; transform: scale(0.86); }
  30%, 100% { opacity: 1; transform: none; }
}

@keyframes fx-muzzle {
  0%, 26% { opacity: 0; transform: scale(0); }
  36% { opacity: 1; transform: scale(1.12); }
  42%, 100% { opacity: 1; transform: none; }
}

@keyframes fx-eyes {
  0%, 28% { opacity: 0; transform: scaleY(0); }
  34% { opacity: 1; transform: none; }
  78% { transform: none; }
  80% { transform: scaleY(0.1); }
  83%, 100% { opacity: 1; transform: none; }
}

@keyframes fx-nose {
  0%, 38% { opacity: 0; transform: scale(0); }
  44% { opacity: 1; transform: scale(1.25); }
  48%, 100% { opacity: 1; transform: none; }
}

@keyframes fx-tail {
  0%, 34% { opacity: 0; transform: rotate(50deg) scale(0.6); }
  50% { opacity: 1; transform: rotate(-6deg) scale(1.02); }
  56%, 100% { opacity: 1; transform: none; }
}

@keyframes fx-spark-a {
  0%, 54% { opacity: 0; transform: scale(0) rotate(-90deg); }
  60% { opacity: 1; transform: scale(1.3) rotate(10deg); }
  66%, 100% { opacity: 1; transform: none; }
}

@keyframes fx-spark-b {
  0%, 58% { opacity: 0; transform: scale(0) rotate(-90deg); }
  64% { opacity: 1; transform: scale(1.3) rotate(10deg); }
  70%, 100% { opacity: 1; transform: none; }
}

/* Timeline strip */
.tl {
  --thumb: 16px;
  padding: 0.7rem 0.95rem 0.95rem;
  border-top: 1px solid var(--line-dark);
}

.tl-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.35rem;
}

.tl-play {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1.5px solid var(--line-dark-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  transition: border-color var(--dur-fast) ease-out, color var(--dur-fast) ease-out, transform var(--dur-fast) var(--ease-out);
}

.tl-play:hover { border-color: var(--fox); color: var(--fox); }
.tl-play:active { transform: scale(0.94); }
.tl-play svg { width: 16px; height: 16px; fill: currentColor; }
.tl-play[data-state="playing"] .i-play,
.tl-play[data-state="paused"] .i-pause { display: none; }

.tl-tc {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--fox);
}

.tl-hint {
  display: none;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  text-align: right;
}

.has-player .tl-play { display: grid; }
.has-player .tl-hint { display: block; }

.tl-body {
  display: grid;
  grid-template-columns: 5.4rem minmax(0, 1fr);
}

.tl-names,
.tl-tracks {
  display: grid;
  grid-template-rows: 44px repeat(4, 30px);
}

.tl-names {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.tl-names span {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  border-top: 1px solid var(--line-dark);
  white-space: nowrap;
}

.tl-names span:first-child { border-top: 0; }

.tl-names i {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 2px;
  background: var(--moss);
}

.tl-names i.sw--fox { background: var(--fox); }

.tl-tracks { position: relative; }

.tl-ruler,
.tl-scrub { grid-row: 1; grid-column: 1; }

.tl-ruler {
  align-self: end;
  height: 14px;
  margin-inline: calc(var(--thumb) / 2);
  background-image:
    linear-gradient(to right, rgba(244, 237, 225, 0.4) 0 1px, transparent 1px),
    linear-gradient(to right, rgba(244, 237, 225, 0.2) 0 1px, transparent 1px);
  background-size: 20% 100%, 5% 45%;
  background-repeat: repeat-x;
  background-position: 0 100%, 0 100%;
  border-right: 1px solid rgba(244, 237, 225, 0.4);
}

.tl-scrub {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  margin: 0;
  background: transparent;
  cursor: ew-resize;
  visibility: hidden;
}

.has-player .tl-scrub { visibility: visible; }

.tl-scrub::-webkit-slider-runnable-track { height: 44px; background: transparent; }

.tl-scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: var(--thumb);
  height: 22px;
  margin-top: 6px;
  border: 0;
  border-radius: 3px;
  background: var(--fox);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 50% 100%, 0 62%);
}

.tl-scrub::-moz-range-track { height: 44px; background: transparent; }

.tl-scrub::-moz-range-thumb {
  width: var(--thumb);
  height: 22px;
  border: 0;
  border-radius: 3px;
  background: var(--fox);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 50% 100%, 0 62%);
}

.tl-scrub:focus-visible { outline: 2px solid var(--fox); outline-offset: 2px; }

.tl-track {
  position: relative;
  border-top: 1px solid var(--line-dark);
}

.tl-track::before {
  content: "";
  position: absolute;
  top: 50%;
  height: 10px;
  left: calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--from, 0));
  right: calc(var(--thumb) / 2 + (100% - var(--thumb)) * (1 - var(--to, 1)));
  transform: translateY(-50%);
  border-radius: 3px;
  background: rgba(46, 90, 68, 0.85);
}

.tl-kf {
  position: absolute;
  top: 50%;
  left: calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--at, 0));
  width: 9px;
  height: 9px;
  background: var(--fox);
  border: 1px solid var(--forest-deep);
  transform: translate(-50%, -50%) rotate(45deg);
}

.tl-playhead {
  position: absolute;
  top: 26px;
  bottom: 0;
  left: calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--p, 0.706));
  width: 2px;
  margin-left: -1px;
  background: var(--fox);
  pointer-events: none;
}

/* ---------- Work types ---------- */
.tiles {
  list-style: none;
  display: grid;
  gap: var(--space-7) var(--space-5);
}

@media (min-width: 36rem) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 68rem) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.tile { display: flex; flex-direction: column; gap: 0.7rem; }

.tile-preview {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  margin-bottom: 0.35rem;
  border-radius: var(--r-tile);
  background: var(--forest);
  color: var(--cream);
  overflow: hidden;
}

.tile-preview > svg { width: 70%; height: auto; }

.tile-loop {
  position: absolute;
  left: 0.75rem;
  bottom: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}

.tile-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; }
.tile h3 { font-size: var(--step-1); letter-spacing: -0.01em; }
.tile-num { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-muted); }
.tile p { font-size: 0.97rem; color: var(--ink-muted); }

.tile .tile-days {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fox-ink);
}

.tile-days .dia { background: var(--fox-ink); }

/* Paused when off-screen (set by JS) */
.tile.is-paused .a,
.tile.is-paused .a * { animation-play-state: paused; }

/* 01 Logo reveal */
.t1-ring {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: t1-ring 3.6s var(--ease-out) infinite;
}
@keyframes t1-ring {
  0% { stroke-dashoffset: 1; opacity: 1; }
  35%, 88% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

.t1-mark { transform-box: fill-box; transform-origin: center; animation: t1-mark 3.6s var(--ease-back) infinite; }
@keyframes t1-mark {
  0%, 28% { transform: scale(0) rotate(-45deg); opacity: 1; }
  46%, 88% { transform: none; opacity: 1; }
  100% { transform: none; opacity: 0; }
}

.t1-word, .t1-word2 { transform-box: fill-box; transform-origin: 0 50%; }
.t1-word { animation: t1-word 3.6s var(--ease-out) infinite; }
.t1-word2 { animation: t1-word2 3.6s var(--ease-out) infinite; }
@keyframes t1-word {
  0%, 44% { transform: scaleX(0); opacity: 1; }
  60%, 88% { transform: none; opacity: 1; }
  100% { transform: none; opacity: 0; }
}
@keyframes t1-word2 {
  0%, 52% { transform: scaleX(0); opacity: 1; }
  68%, 88% { transform: none; opacity: 1; }
  100% { transform: none; opacity: 0; }
}

/* 02 Kinetic type */
.kt {
  width: 74%;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
}

.kt-lead { display: block; font-size: 0.95rem; color: var(--muted); letter-spacing: 0; }

.kt-window {
  display: block;
  height: 1.12em;
  overflow: hidden;
  margin-top: 0.35rem;
  font-size: clamp(2rem, 1.4rem + 1.6vw, 2.5rem);
  letter-spacing: -0.03em;
  color: var(--fox);
}

.kt-roll { display: flex; flex-direction: column; animation: kt-roll 4.8s var(--ease-in-out) infinite; }
.kt-roll span { display: block; height: 1.12em; line-height: 1.12; }

@keyframes kt-roll {
  0%, 22% { transform: translateY(0); }
  30%, 55% { transform: translateY(-1.12em); }
  63%, 88% { transform: translateY(-2.24em); }
  96%, 100% { transform: translateY(-3.36em); }
}

/* 03 UI micro-interactions */
.ui {
  display: grid;
  gap: 14px;
  width: 70%;
  padding: 16px;
  border-radius: 10px;
  background: var(--moss);
}

.ui-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ui-label { flex: 1; max-width: 58%; height: 8px; border-radius: 4px; background: rgba(244, 237, 225, 0.5); }
.ui-label--short { max-width: 38%; }

.ui-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex: none;
  border-radius: var(--r-pill);
  background: rgba(244, 237, 225, 0.25);
}

.ui-fill { position: absolute; inset: 0; border-radius: inherit; background: var(--fox); animation: ui-fill 3.2s ease-out infinite; }

.ui-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cream);
  transform: translateX(20px);
  animation: ui-knob 3.2s var(--ease-back) infinite;
}

.ui-check { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--fox); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.ui-check-path { stroke-dasharray: 1; stroke-dashoffset: 0; animation: ui-check 3.2s var(--ease-out) infinite; }

@keyframes ui-knob {
  0%, 20% { transform: none; }
  34%, 80% { transform: translateX(20px); }
  94%, 100% { transform: none; }
}
@keyframes ui-fill {
  0%, 22% { opacity: 0; }
  34%, 80% { opacity: 1; }
  92%, 100% { opacity: 0; }
}
@keyframes ui-check {
  0%, 36% { stroke-dashoffset: 1; }
  50%, 80% { stroke-dashoffset: 0; }
  92%, 100% { stroke-dashoffset: 1; }
}

/* 04 Product orbit: two nested eased translates trace an ellipse */
.t4-x { transform: translateX(58px); animation: t4-x 3s cubic-bezier(0.37, 0, 0.63, 1) infinite alternate; }
.t4-y { animation: t4-y 3s cubic-bezier(0.37, 0, 0.63, 1) infinite alternate; animation-delay: -1.5s; }
.t4-x--b { transform: translateX(-58px); animation-delay: -3s; }
.t4-y--b { animation-delay: -4.5s; }
@keyframes t4-x { from { transform: translateX(-58px); } to { transform: translateX(58px); } }
@keyframes t4-y { from { transform: translateY(-20px); } to { transform: translateY(20px); } }

.t4-screen { transform-box: fill-box; transform-origin: 50% 50%; animation: t4-screen 3s var(--ease-in-out) infinite; }
@keyframes t4-screen {
  0%, 100% { transform: none; }
  50% { transform: scaleX(0.3); }
}

/* 05 Data & chart builds */
.t5-bar {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: t5-bar 4s var(--ease-back) infinite;
  animation-delay: calc(var(--d, 0) * 110ms);
}
@keyframes t5-bar {
  0%, 8% { transform: scaleY(0); }
  30%, 86% { transform: none; }
  96%, 100% { transform: scaleY(0); }
}

.t5-line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: t5-line 4s var(--ease-out) infinite; }
@keyframes t5-line {
  0%, 36% { stroke-dashoffset: 1; opacity: 1; }
  62%, 86% { stroke-dashoffset: 0; opacity: 1; }
  96%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

/* 06 Loading loops */
.t6-arc { transform-box: fill-box; transform-origin: center; animation: t6-spin 1.4s linear infinite; }
@keyframes t6-spin { to { transform: rotate(360deg); } }

.t6-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: t6-dot 1.2s var(--ease-in-out) infinite;
  animation-delay: calc(var(--d, 0) * 150ms);
}
@keyframes t6-dot {
  0%, 60%, 100% { transform: none; opacity: 0.55; }
  30% { transform: translateY(-8px); opacity: 1; }
}

/* 07 Character loop */
.t7-body { transform-box: fill-box; transform-origin: 50% 100%; animation: t7-bob 1.6s var(--ease-in-out) infinite; }
@keyframes t7-bob {
  0%, 100% { transform: scaleY(0.95); }
  45% { transform: translateY(-12px) scaleY(1.03); }
  80% { transform: none; }
}

.t7-shadow { transform-box: fill-box; transform-origin: center; animation: t7-shadow 1.6s var(--ease-in-out) infinite; }
@keyframes t7-shadow {
  0%, 100% { transform: none; opacity: 1; }
  45% { transform: scale(0.7); opacity: 0.55; }
}

.t7-eyes { transform-box: fill-box; transform-origin: center; animation: t7-blink 3.2s ease-in-out infinite; }
@keyframes t7-blink {
  0%, 40%, 48%, 100% { transform: none; }
  44% { transform: scaleY(0.1); }
}

/* 08 Transitions pack */
.tr {
  position: relative;
  width: 70%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  background: var(--moss);
  overflow: hidden;
}

.tr-wipe {
  position: absolute;
  inset: 0;
  background: var(--fox);
  transform: translateX(-48%);
  animation: tr-wipe 3.6s var(--ease-in-out) infinite;
}

.tr-iris {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 130%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--cream);
  transform: translate(-50%, -50%) scale(0.3);
  animation: tr-iris 3.6s var(--ease-in-out) infinite;
}

@keyframes tr-wipe {
  0%, 10% { transform: translateX(-101%); }
  30%, 45% { transform: none; }
  60%, 100% { transform: translateX(101%); }
}
@keyframes tr-iris {
  0%, 52% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  72%, 86% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* ---------- How it works ---------- */
.steps {
  position: relative;
  list-style: none;
  display: grid;
  gap: var(--space-7);
}

.steps::before {
  content: "";
  position: absolute;
  left: calc(0.4rem - 1px);
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--line-dark-strong);
}

.step { position: relative; padding-left: 2.25rem; }

.step-dia {
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 0.8rem;
  height: 0.8rem;
  background: var(--fox);
  border: 2px solid var(--forest);
  box-sizing: content-box;
  margin-left: -2px;
  transform: rotate(45deg);
}

.step-tc {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fox);
}

.step h3 { margin-top: 0.5rem; font-size: var(--step-2); }
.step p:last-child { margin-top: 0.7rem; color: var(--muted); max-width: 38ch; }

@media (min-width: 56rem) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); }
  .steps::before { left: 0; right: 0; top: calc(0.4rem - 1px); bottom: auto; width: auto; height: 2px; }
  .step { padding-left: 0; padding-top: 2.4rem; }
  .step-dia { top: 0; }
}

/* ---------- Comparison ---------- */
.compare {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.98rem;
}

.compare th,
.compare td {
  padding: 1.1rem 1.15rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-light);
}

.compare thead th {
  padding-block: 1.3rem;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 700;
}

.compare tbody th { width: 19%; font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; }
.compare td { color: var(--ink-muted); }

.compare .is-us {
  background: var(--forest);
  color: var(--cream);
  border-bottom-color: var(--line-dark);
}

.compare thead .is-us { color: var(--fox); border-radius: var(--r-tile) var(--r-tile) 0 0; }
.compare tbody tr:last-child .is-us { border-bottom: 0; border-radius: 0 0 var(--r-tile) var(--r-tile); }

@media (max-width: 47.99rem) {
  .compare thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .compare,
  .compare tbody,
  .compare tr,
  .compare th,
  .compare td { display: block; width: 100%; }

  .compare tr {
    margin-bottom: var(--space-4);
    border: 1px solid var(--line-light);
    border-radius: var(--r-tile);
    overflow: hidden;
  }

  .compare tbody th { width: 100%; padding: 1rem 1rem 0.6rem; border: 0; font-size: var(--step-1); }

  .compare td {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 0;
    border-top: 1px solid var(--line-light);
  }

  .compare td::before {
    content: attr(data-label);
    padding-top: 0.15rem;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--ink-muted);
  }

  .compare td.is-us { border-top-color: var(--forest); }
  .compare td.is-us::before { color: var(--muted); }
  .compare tbody tr:last-child .is-us { border-radius: 0; }
}

/* ---------- Deliverables (fox band) ---------- */
.files-grid { display: grid; gap: var(--space-6); align-items: center; }

@media (min-width: 56rem) {
  .files-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); column-gap: var(--space-8); }
}

.files-grid h2 { margin-top: var(--space-3); font-size: var(--step-4); max-width: 14ch; }
.files-grid .files-copy p:last-child { margin-top: var(--space-4); max-width: 44ch; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1rem;
  border: 1.5px solid var(--forest);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--forest);
}

.chip .dia { background: var(--forest); width: 0.45rem; height: 0.45rem; }

/* ---------- Pricing ---------- */
.plans { display: grid; gap: var(--space-4); }

@media (min-width: 60rem) { .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.plan {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: clamp(1.35rem, 1rem + 1.2vw, 2.1rem);
  border: 1px solid var(--line-dark-strong);
  border-radius: var(--r-panel);
}

.plan--pro { background: var(--moss); border-color: var(--moss); }
.plan--pack { border-style: dashed; }

.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; min-height: 1.9rem; }
.plan-name { font-size: var(--step-2); }

.plan-tag {
  padding: 0.3rem 0.65rem;
  border-radius: var(--r-pill);
  background: var(--fox);
  color: var(--forest);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.plan-tag--line { background: transparent; color: var(--cream); border: 1px solid var(--line-dark-strong); }

.plan-desc { color: var(--muted); }
.plan--pro .plan-desc,
.plan--pro .plan-price small { color: var(--muted-moss); }

.plan-price {
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.plan-price small {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}

.plan ul {
  list-style: none;
  display: grid;
  gap: 0.65rem;
  padding-top: var(--space-4);
  border-top: 1px solid var(--line-dark);
  font-size: 0.97rem;
}

.plan li { display: grid; grid-template-columns: 0.9rem minmax(0, 1fr); gap: 0.7rem; align-items: baseline; }

.plan li::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  background: var(--fox);
  transform: translateY(-0.1em) rotate(45deg);
}

.plan-cta { margin-top: auto; padding-top: var(--space-4); }
.plan-cta .btn { width: 100%; }

.pricing-note { margin-top: var(--space-5); font-size: var(--step--1); color: var(--muted); }

/* Pause explainer */
.pause {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-7);
  padding: clamp(1.35rem, 1rem + 1.5vw, 2.5rem);
  border-radius: var(--r-panel);
  background: var(--forest-deep);
  border: 1px solid var(--line-dark);
}

@media (min-width: 60rem) {
  .pause { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; column-gap: var(--space-8); }
}

.pause h3 { font-size: var(--step-3); }
.pause-copy p { margin-top: var(--space-3); color: var(--muted); max-width: 42ch; }

.pause-strip { margin: 0; display: grid; gap: 0.75rem; }

.day-row { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.75rem; align-items: center; }
.day-row-label { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }

.days {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(20, minmax(0, 1fr));
  gap: 3px;
}

.days li {
  aspect-ratio: 1 / 1.5;
  border-radius: 3px;
  border: 1px solid var(--line-dark-strong);
}

.days .used { background: var(--fox); border-color: var(--fox); }

.days .held {
  border-color: rgba(244, 237, 225, 0.22);
  background: repeating-linear-gradient(135deg, rgba(244, 237, 225, 0.22) 0 2px, transparent 2px 5px);
}

.days .saved { border: 1.5px solid var(--cream); }

.legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.legend li { display: inline-flex; align-items: center; gap: 0.5rem; }
.legend i { width: 10px; height: 14px; border-radius: 2px; border: 1px solid var(--line-dark-strong); }
.legend .used { background: var(--fox); border-color: var(--fox); }
.legend .held { background: repeating-linear-gradient(135deg, rgba(244, 237, 225, 0.3) 0 2px, transparent 2px 5px); }
.legend .saved { border: 1.5px solid var(--cream); }

.pause-strip figcaption { font-size: 0.9rem; color: var(--muted); }

@media (max-width: 30rem) {
  .day-row { grid-template-columns: 1fr; gap: 0.35rem; }
}

/* ---------- FAQ ---------- */
.faq-grid { display: grid; gap: var(--space-7); }

@media (min-width: 60rem) {
  .faq-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); column-gap: var(--space-8); }
  .faq-head { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; }
}

.faq-head h2 { margin-top: var(--space-3); font-size: var(--step-4); }
.faq-head p:last-child { margin-top: var(--space-4); color: var(--ink-muted); max-width: 36ch; }
.faq-head a { color: var(--fox-ink); text-underline-offset: 3px; }

.faq-list { border-top: 1px solid var(--line-light); }
.faq-list details { border-bottom: 1px solid var(--line-light); }

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  padding: 1.2rem 0;
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  line-height: 1.25;
  transition: color var(--dur-fast) ease-out;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: "";
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  margin-right: 0.3rem;
  border: 2px solid var(--fox-ink);
  transform: rotate(45deg);
  transition: transform var(--dur) var(--ease-out), background-color var(--dur) ease-out;
}

.faq-list details[open] summary::after { background: var(--fox-ink); transform: rotate(225deg); }
.faq-list summary:hover { color: var(--fox-ink); }

.faq-a { padding: 0 0 1.4rem; max-width: 62ch; color: var(--ink-muted); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: var(--space-7); }

@media (min-width: 60rem) {
  .contact-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); column-gap: var(--space-8); align-items: start; }
}

.contact-copy h2 { margin-top: var(--space-3); font-size: var(--step-4); }
.contact-copy > p { margin-top: var(--space-4); color: var(--muted); max-width: 40ch; }

.next { list-style: none; display: grid; gap: var(--space-4); margin-top: var(--space-6); }

.next li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 0.75rem;
  padding-top: var(--space-4);
  border-top: 1px solid var(--line-dark);
}

.next-num { font-family: var(--font-mono); font-size: 0.85rem; color: var(--fox); padding-top: 0.15rem; }
.next p { color: var(--muted); }
.next strong { display: block; color: var(--cream); font-weight: 600; }

.direct { margin-top: var(--space-6); color: var(--muted); }
.direct a { color: var(--fox); text-underline-offset: 3px; }

.form {
  display: grid;
  gap: 1.15rem;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-panel);
  background: var(--forest);
}

.field { display: grid; gap: 0.4rem; min-width: 0; }
.field-row { display: grid; gap: 1.15rem; }

@media (min-width: 40rem) { .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.form label,
.form legend { font-weight: 600; font-size: 0.95rem; }

.opt { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.hint { font-size: 0.85rem; color: var(--muted); }

.form input[type="text"],
.form input[type="email"],
.form input[type="url"],
.form select,
.form textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--line-dark-strong);
  border-radius: var(--r-field);
  background: var(--forest-deep);
  color: var(--cream);
  transition: border-color var(--dur-fast) ease-out, box-shadow var(--dur-fast) ease-out;
}

.form textarea { min-height: 7.5rem; resize: vertical; line-height: 1.5; }
.form ::placeholder { color: var(--muted); opacity: 0.8; }

.form select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23F16739' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  background-size: 12px 8px;
}

.form select option { background: var(--forest-deep); color: var(--cream); }

.form input:hover,
.form select:hover,
.form textarea:hover { border-color: rgba(244, 237, 225, 0.5); }

.form input:focus-visible,
.form select:focus-visible,
.form textarea:focus-visible {
  outline: none;
  border-color: var(--fox);
  box-shadow: 0 0 0 3px rgba(241, 103, 57, 0.35);
}

.form [aria-invalid="true"] { border-color: var(--error); }

.field-error { font-size: 0.88rem; color: var(--error); }
.field-error:empty { margin-top: -0.4rem; }

.form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.form legend { padding: 0; margin-bottom: 0.25rem; }
.form fieldset .hint { margin-bottom: 0.6rem; }

.checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr));
  gap: 0.5rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0.5rem 0.8rem;
  border: 1.5px solid var(--line-dark);
  border-radius: var(--r-field);
  font-size: 0.93rem;
  cursor: pointer;
  transition: border-color var(--dur-fast) ease-out, background-color var(--dur-fast) ease-out;
}

.check:hover { border-color: var(--line-dark-strong); }
.check input { width: 1.1rem; height: 1.1rem; margin: 0; flex: none; accent-color: var(--fox); }
.check:has(input:checked) { border-color: var(--fox); background: rgba(241, 103, 57, 0.09); }
.check:has(input:focus-visible) { outline: 3px solid var(--fox); outline-offset: 2px; }
.check input:focus-visible { outline: none; }

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.25rem;
}

.form-fine { max-width: 34ch; font-size: 0.85rem; color: var(--muted); }
.form-fine a { color: var(--cream); text-underline-offset: 3px; }

.form-status {
  padding: 0.95rem 1.05rem;
  border: 1px solid rgba(241, 103, 57, 0.45);
  border-radius: var(--r-field);
  background: rgba(241, 103, 57, 0.1);
  font-size: 0.95rem;
}

.form-status:empty { padding: 0; border: 0; margin-top: -1.15rem; }
.form-status a { color: var(--fox); }

/* ---------- Footer ---------- */
.site-footer {
  padding-block: var(--space-8) var(--space-6);
  background: var(--forest);
  border-top: 1px solid var(--line-dark);
}

.footer-grid { display: grid; gap: var(--space-6); }

@media (min-width: 48rem) {
  .footer-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); }
}

.footer-line {
  margin-top: var(--space-4);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-3);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.footer-line em { font-style: normal; color: var(--fox); }
.footer-sub { margin-top: var(--space-3); color: var(--muted); max-width: 36ch; font-size: 0.95rem; }

.footer-h {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.footer-links { list-style: none; }

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  transition: color var(--dur-fast) ease-out;
}

.footer-links a:hover { color: var(--fox); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line-dark);
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Legal pages ---------- */
.legal { padding-block: clamp(3rem, 2rem + 4vw, 6rem); background: var(--cream); color: var(--ink); }
.legal-inner { max-width: 70ch; }
.legal h1 { margin-top: var(--space-3); font-size: var(--step-4); }
.legal .updated { margin-top: var(--space-4); font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-muted); }
.legal .intro { margin-top: var(--space-6); font-size: var(--step-1); line-height: 1.55; }
.legal h2 { margin-top: 2.6rem; margin-bottom: 0.8rem; font-size: var(--step-2); }
.legal p, .legal li { line-height: 1.7; color: #2B302A; }
.legal p + p { margin-top: 1rem; }
.legal ul { display: grid; gap: 0.45rem; margin-top: 0.8rem; padding-left: 1.25rem; }
.legal li::marker { color: var(--fox-ink); }
.legal a { color: var(--fox-ink); text-underline-offset: 3px; }
.legal a:hover { color: var(--ink); }

/* ---------- 404 ---------- */
.nf { padding-block: clamp(3rem, 2rem + 5vw, 7rem); }
.nf-grid { display: grid; gap: var(--space-7); align-items: center; }

@media (min-width: 56rem) {
  .nf-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}

.nf h1 { margin-top: var(--space-4); font-size: var(--step-5); line-height: 0.98; letter-spacing: -0.035em; }
.nf h1 em { font-style: normal; color: var(--fox); }
.nf-lead { margin-top: var(--space-5); max-width: 38ch; font-size: var(--step-1); color: var(--muted); }
.nf-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.nf-art { border-radius: var(--r-panel); border: 1px solid var(--line-dark); overflow: hidden; }
.nf-art svg { width: 100%; height: auto; }
.nf-ear { transform-box: fill-box; transform-origin: 50% 100%; transform: rotate(-16deg); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal],
  .js [data-reveal]:not(.is-in) { opacity: 1; transform: none; transition: none; }

  .a,
  .a * { animation: none !important; }

  .btn,
  .btn .arrow,
  .faq-list summary::after,
  .nav-toggle-bars span { transition: none; }

  .btn:hover,
  .btn--fox:hover,
  .btn:hover .arrow { transform: none; }
}
