/* ==========================================================================
   ShikhaAI — design tokens
   Spacing: 4px base. Every margin, padding and gap is a step on the scale.
   Type:    Lexend for headings (built for reading fluency),
            Atkinson Hyperlegible Next for body (built for low-vision readers).
   Radius:  12px for containers and controls, 8px for anything nested inside one.
   Colour:  Blue from the flame logo for anything you can act on.
            Pencil yellow for emphasis only: highlights, badges, step numbers.
            Navy "board" for the interactive stage and the closing band.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;
  --space-9: 64px;
  --space-10: 80px;
  --space-11: 96px;

  /* Type ramp — size / line height */
  --fs-display: 3.25rem;  --lh-display: 4rem;     /* 52 / 64 */
  --fs-h2: 2.5rem;        --lh-h2: 3rem;          /* 40 / 48 */
  --fs-h3: 1.5rem;        --lh-h3: 2rem;          /* 24 / 32 */
  --fs-h4: 1.25rem;       --lh-h4: 1.75rem;       /* 20 / 28 */
  --fs-lead: 1.25rem;     --lh-lead: 2rem;        /* 20 / 32 */
  --fs-body: 1.125rem;    --lh-body: 1.75rem;     /* 18 / 28 */
  --fs-small: 1rem;       --lh-small: 1.5rem;     /* 16 / 24 */
  --fs-caption: 0.875rem; --lh-caption: 1.25rem;  /* 14 / 20 */

  --font-heading: "Lexend", "Segoe UI", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* Shape and depth */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(22 24 29 / 0.04), 0 16px 40px -24px rgb(22 24 29 / 0.28);

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --duration: 160ms;
  --duration-slow: 320ms;

  /* Layout */
  --container: 1200px;
  --gutter: var(--space-5);
  --header-height: 72px;
  --grid-size: 32px;

  /* Colour — light */
  --bg: #F7F5F0;
  --surface: #FFFFFF;
  --surface-2: #EFECE5;
  --line: #E2DED5;
  --line-strong: #CBC6BB;
  --text: #16181D;
  --text-2: #454A55;
  --text-3: #5E6370;

  --accent: #1D5CC2;
  --accent-hover: #174DA6;
  --accent-tint: #E8F1FD;
  --on-accent: #FFFFFF;

  --marker: #FFD449;
  --marker-soft: #FFF0B8;
  --on-marker: #16181D;

  --grid-line: rgb(29 92 194 / 0.08);
  --dot-a: 29 92 194;
  --dot-b: 230 172 0;

  --board: #0E1B36;
  --board-2: #16284D;
  --board-line: rgb(134 184 246 / 0.18);
  --board-text: #EAF1FF;
  --board-text-2: #A9BCE0;
  --board-accent: #86B8F6;

  --code-bg: #14171D;
  --code-line: #262A33;
  --code-text: #E6E8EE;
  --code-muted: #8A90A0;
  --code-accent: #9DB8FA;

  --skeleton: #E7E3DB;
  --skeleton-shine: #F2EFE9;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1115;
    --surface: #171A21;
    --surface-2: #1C2028;
    --line: #2A2F3A;
    --line-strong: #3B4150;
    --text: #EDEEF1;
    --text-2: #B4B8C2;
    --text-3: #9096A3;

    --accent: #86B8F6;
    --accent-hover: #A6CBF9;
    --accent-tint: #1B2638;
    --on-accent: #0F1115;

    --marker: rgb(255 212 73 / 0.32);
    --marker-soft: #2A2614;
    --on-marker: #FFE08A;

    --grid-line: rgb(134 184 246 / 0.06);
    --dot-a: 134 184 246;
    --dot-b: 255 212 73;

    --board: #121D33;
    --board-2: #1A2945;

    --code-bg: #0B0D11;
    --code-line: #232733;

    --skeleton: #1F232C;
    --skeleton-shine: #282D38;

    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 40px -24px rgb(0 0 0 / 0.7);
  }
}

@media (max-width: 719px) {
  :root {
    --fs-display: 2.25rem; --lh-display: 2.75rem; /* 36 / 44 */
    --fs-h2: 2rem;         --lh-h2: 2.5rem;       /* 32 / 40 */
    --fs-lead: 1.125rem;   --lh-lead: 1.75rem;    /* 18 / 28 */
    --gutter: var(--space-4);
  }
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + var(--space-4));
}
html:not(.motion-paused) { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text);
  text-wrap: balance;
}

p, ul, ol, dl, dd, blockquote, figure, fieldset { margin: 0; }
fieldset { padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
img { height: auto; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
code, kbd, pre { font-family: var(--font-mono); }
p { text-wrap: pretty; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection { background: var(--marker); color: var(--on-marker); }

.visually-hidden {
  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(--space-4);
  top: var(--space-4);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.icon { width: 20px; height: 20px; flex: none; }
.icon-sm { width: 16px; height: 16px; }

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--space-11); }
.section + .section { padding-top: 0; }
.section--band {
  background: var(--surface-2);
  border-block: 1px solid var(--line);
}
.section--band + .section,
.section + .section--band { padding-top: var(--space-11); }

@media (max-width: 719px) {
  .section { padding-block: var(--space-9); }
  .section--band + .section,
  .section + .section--band { padding-top: var(--space-9); }
}

.section-head {
  max-width: 720px;
  margin-bottom: var(--space-8);
}
.section-head :is(h1, h2) + p { margin-top: var(--space-4); }

@media (max-width: 719px) {
  .section-head { margin-bottom: var(--space-6); }
}

/* ==========================================================================
   Typography helpers
   ========================================================================== */

.eyebrow {
  display: inline-flex;
  align-items: center;
  height: 28px;
  margin-bottom: var(--space-4);
  padding: 0 var(--space-3);
  background: var(--marker-soft);
  border-radius: var(--radius-sm);
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  font-weight: 700;
  color: var(--on-marker);
}

.display {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: -0.025em;
}
.h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: -0.02em;
}
.h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  letter-spacing: -0.01em;
}
.h4 {
  font-size: var(--fs-h4);
  line-height: var(--lh-h4);
  letter-spacing: -0.005em;
}

.lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-lead);
  color: var(--text-2);
}
.small { font-size: var(--fs-small); line-height: var(--lh-small); }
.caption {
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  color: var(--text-3);
}
.muted { color: var(--text-2); }

/* Highlighter pen: draws across the phrase when it scrolls into view. */
.marker {
  background-image: linear-gradient(transparent 58%, var(--marker) 58%, var(--marker) 92%, transparent 92%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.js:not(.motion-paused) .marker {
  background-size: 0% 100%;
  transition: background-size 900ms var(--ease) 240ms;
}
.js:not(.motion-paused) .is-visible .marker,
.js:not(.motion-paused) .marker.is-drawn { background-size: 100% 100%; }

.text-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--duration) var(--ease);
}
.text-link:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }

.inline-icon-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

code.inline {
  padding: 0 var(--space-1);
  font-size: 0.9em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  white-space: nowrap;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 48px;
  padding: 0 var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--duration) var(--ease),
    border-color var(--duration) var(--ease),
    color var(--duration) var(--ease);
}
.btn--sm { height: 40px; padding: 0 var(--space-4); }
.btn--block { width: 100%; }

.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--primary[aria-disabled="true"] { cursor: progress; background: var(--accent-hover); }

.btn--secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
}
.btn--secondary:hover { background: var(--surface-2); border-color: var(--text-3); }

.btn--board {
  background: rgb(255 255 255 / 0.06);
  border-color: var(--board-line);
  color: var(--board-text);
}
.btn--board:hover { background: rgb(255 255 255 / 0.12); border-color: var(--board-text-2); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  transition: background-color var(--duration) var(--ease);
}
.icon-btn:hover { background: var(--surface-2); }

.spin { animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-slow) var(--ease);
}
.site-header.is-scrolled,
.site-header.is-open { border-bottom-color: var(--line); }

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-right: auto;
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; }
.brand-name {
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  line-height: var(--lh-h4);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand-name span { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: var(--space-1); }
.nav-links a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: 700;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--duration) var(--ease), background-color var(--duration) var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }

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

.motion-toggle .icon-play { display: none; }
.motion-toggle[aria-pressed="true"] .icon-pause { display: none; }
.motion-toggle[aria-pressed="true"] .icon-play { display: block; }

.menu-toggle { display: none; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu ul {
  display: grid;
  gap: var(--space-1);
  padding-block: var(--space-4) var(--space-5);
}
.mobile-menu li > a:not(.btn) {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.mobile-menu li > a:not(.btn):hover { background: var(--surface-2); }
.mobile-menu-cta { padding-top: var(--space-3); }

@media (max-width: 1023px) {
  .nav-links,
  .nav-actions .btn--secondary { display: none; }
  .menu-toggle { display: inline-flex; }
}
/* Narrow phones: the menu carries the download button instead. */
@media (max-width: 419px) {
  .nav-actions .btn--primary { display: none; }
}

/* ==========================================================================
   Hero — graph paper, floating idea dots, and the lesson builder
   ========================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: var(--space-9) var(--space-11);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  background-position: -1px -1px;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
}
.hero-dots {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--space-5);
  row-gap: var(--space-8);
  align-items: start;
}
.hero-copy {
  grid-column: 1 / span 6;
  padding-top: var(--space-8);
  padding-right: var(--space-6);
}
/* On wide screens the pitch stays in view while the builder scrolls past. */
@media (min-width: 1024px) {
  .hero-copy { position: sticky; top: calc(var(--header-height) + var(--space-6)); }
}
.hero-builder { grid-column: 7 / span 6; }

.hero-copy .lead { margin-top: var(--space-5); }
.hero-copy .btn-row { margin-top: var(--space-6); }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-5);
}
.hero-meta li { display: inline-flex; align-items: center; gap: var(--space-2); }
.hero-meta .icon { color: var(--accent); width: 16px; height: 16px; }

@media (max-width: 1023px) {
  .hero-copy,
  .hero-builder { grid-column: 1 / -1; }
  .hero-copy { padding-top: 0; padding-right: 0; max-width: 720px; }
}
@media (max-width: 719px) {
  .hero { padding-block: var(--space-8) var(--space-9); }
  .hero-copy .btn-row { margin-top: var(--space-5); }
  .hero-copy .btn { flex: 1 1 auto; }
}

/* ---------- Lesson builder card ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.builder {
  overflow: hidden;
  box-shadow: var(--shadow);
}
.builder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 56px;
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--line);
}
.builder-head h2 {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: 600;
  letter-spacing: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 var(--space-2);
  background: var(--marker-soft);
  border-radius: var(--radius-sm);
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  font-weight: 700;
  color: var(--on-marker);
  white-space: nowrap;
}

.builder-controls {
  display: grid;
  gap: var(--space-5);
  padding: var(--space-5);
}

.field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: 700;
  color: var(--text);
}
.field-label output,
.field-label .field-hint {
  font-weight: 400;
  color: var(--text-2);
}
.field-label output strong { color: var(--accent); font-weight: 700; }

/* Topic chips (radio inputs) */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip { position: relative; }
.chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.chip span {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 var(--space-4);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: 700;
  color: var(--text-2);
  transition: background-color var(--duration) var(--ease), border-color var(--duration) var(--ease), color var(--duration) var(--ease);
}
.chip:hover span { border-color: var(--text-3); color: var(--text); }
.chip input:checked + span {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--accent);
}
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Grade slider */
.range {
  width: 100%;
  height: 24px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  --fill: 36%;
}
.range:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: var(--radius-sm);
  background: linear-gradient(to right, var(--accent) var(--fill), var(--surface-2) var(--fill));
}
.range::-moz-range-track {
  height: 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.range::-moz-range-progress {
  height: 8px;
  border-radius: var(--radius-sm);
  background: var(--accent);
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -8px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  box-shadow: 0 1px 2px rgb(22 24 29 / 0.2);
}
.range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
}
.range-scale {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-2);
}

/* Segmented controls (format, speed) */
.segmented {
  display: inline-flex;
  gap: var(--space-1);
  padding: var(--space-1);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.segment { position: relative; }
.segment input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.segment span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 40px;
  padding: 0 var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: 700;
  color: var(--text-2);
  transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.segment:hover span { color: var(--text); }
.segment input:checked + span {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}
.segment input:checked + span .icon { color: var(--accent); }
.segment input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.builder-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-4);
}
.builder-actions .btn { min-width: 168px; }

@media (max-width: 479px) {
  .builder-controls { padding: var(--space-4); }
  .builder-head { padding-inline: var(--space-4); }
  .builder-actions fieldset { flex: 1 1 100%; }
  .builder-actions .segmented { display: flex; width: 100%; }
  .builder-actions .segment { flex: 1 1 0; }
  .builder-actions .segment span { width: 100%; justify-content: center; padding: 0 var(--space-2); }
  .builder-actions .btn { width: 100%; }
}

/* ---------- Stage: the navy board where the lesson appears ---------- */

.stage {
  position: relative;
  min-height: 480px;
  padding: var(--space-5);
  background-color: var(--board);
  background-image:
    linear-gradient(to right, var(--board-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--board-line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  background-position: -1px -1px;
  color: var(--board-text);
}
.stage-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  margin-bottom: var(--space-4);
}
.stage-label strong {
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  line-height: var(--lh-h4);
  font-weight: 600;
}
.stage-label span {
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  color: var(--board-text-2);
}

/* Build pipeline */
.pipeline { display: none; gap: var(--space-3); }
.stage[data-state="building"] .pipeline { display: grid; }
.stage[data-state="building"] .result { display: none; }

.pipeline li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 48px;
  padding: 0 var(--space-4);
  background: var(--board-2);
  border: 1px solid var(--board-line);
  border-radius: var(--radius-sm);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--board-text-2);
  transition: color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.pipeline .icon { color: var(--board-text-2); }
.pipeline .status-active,
.pipeline .status-done { display: none; }
.pipeline li[data-status="active"] { color: var(--board-text); border-color: var(--board-accent); }
.pipeline li[data-status="active"] .status-pending { display: none; }
.pipeline li[data-status="active"] .status-active { display: block; color: var(--board-accent); }
.pipeline li[data-status="done"] { color: var(--board-text); }
.pipeline li[data-status="done"] .status-pending { display: none; }
.pipeline li[data-status="done"] .status-done { display: block; color: var(--marker); }
@media (prefers-color-scheme: dark) {
  .pipeline li[data-status="done"] .status-done { color: #FFD449; }
}

.pipeline-skeleton { display: none; }
.stage[data-state="building"] .pipeline-skeleton {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-2);
}
.pipeline-skeleton span {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  background: linear-gradient(100deg, var(--board-2) 30%, #213560 50%, var(--board-2) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.6s linear infinite;
}

/* Result */
.result.is-entering { animation: fade-up var(--duration-slow) var(--ease); }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.storyboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}
.scene { display: grid; align-content: start; gap: var(--space-2); }
.scene-art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  background: var(--board-2);
  border: 1px solid var(--board-line);
  border-radius: var(--radius-sm);
  color: var(--board-accent);
}
.scene:nth-child(even) .scene-art { color: #FFD449; }
.scene-art .icon { width: 32px; height: 32px; }
.scene-num {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  color: var(--board-text-2);
}
.scene-caption {
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  color: var(--board-text-2);
}

.script {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: rgb(255 255 255 / 0.04);
  border: 1px solid var(--board-line);
  border-radius: var(--radius-sm);
}
.script p,
.turn p {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--board-text);
}

.word { border-radius: 2px; transition: background-color 120ms linear, color 120ms linear; }
.word.is-spoken {
  background: #FFD449;
  box-shadow: 0 0 0 2px #FFD449;
  color: var(--board);
}

.dialogue { display: grid; gap: var(--space-4); }
.turn {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: var(--space-3);
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-family: var(--font-heading);
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  font-weight: 700;
}
.avatar--a { background: #86B8F6; color: #0E1B36; }
.avatar--b { background: #FFD449; color: #0E1B36; }
.turn-name {
  display: block;
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  font-weight: 700;
  color: var(--board-text-2);
}

.listen-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.listen-row .icon-stop { display: none; }
.listen-row [aria-pressed="true"] .icon-listen { display: none; }
.listen-row [aria-pressed="true"] .icon-stop { display: block; }

.speed {
  display: inline-flex;
  gap: var(--space-1);
  padding: var(--space-1);
  background: rgb(255 255 255 / 0.04);
  border: 1px solid var(--board-line);
  border-radius: var(--radius);
}
.speed .segment span {
  height: 32px;
  padding: 0 var(--space-2);
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  color: var(--board-text-2);
}
.speed .segment:hover span { color: var(--board-text); }
.speed .segment input:checked + span {
  background: rgb(255 255 255 / 0.12);
  border-color: var(--board-line);
  color: var(--board-text);
}

.stage-note {
  margin-top: var(--space-3);
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  color: var(--board-text-2);
}

.stage-stale {
  display: none;
  position: absolute;
  left: var(--space-5);
  right: var(--space-5);
  bottom: var(--space-5);
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-2) var(--space-4);
  background: #FFD449;
  border-radius: var(--radius-sm);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: 700;
  color: #0E1B36;
}
.stage[data-stale="true"] .stage-stale { display: flex; }
.stage[data-stale="true"] .result { opacity: 0.35; }

@media (max-width: 479px) {
  .stage { padding: var(--space-4); min-height: 0; }
  .storyboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scene-art { aspect-ratio: 16 / 10; }
  .pipeline-skeleton { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline-skeleton span { aspect-ratio: 16 / 10; }
  .stage-stale { position: static; margin-top: var(--space-4); }
}

/* ==========================================================================
   Stats
   ========================================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-5);
  padding-block: var(--space-6);
  border-block: 1px solid var(--line);
}
.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
}
.stat-value {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums tabular-nums;
}
.stat-label {
  margin-top: var(--space-1);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--text-2);
}

@media (max-width: 719px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: var(--space-6);
  }
}

/* ==========================================================================
   Loading states — skeleton until the image has decoded
   ========================================================================== */

.media-loading { position: relative; overflow: hidden; }
.media-loading img { opacity: 0; transition: opacity var(--duration-slow) var(--ease); }
.media-loading.is-loaded img { opacity: 1; }
.media-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--skeleton) 30%, var(--skeleton-shine) 50%, var(--skeleton) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.6s linear infinite;
  transition: opacity var(--duration-slow) var(--ease);
  pointer-events: none;
}
.media-loading.is-loaded::after { opacity: 0; animation: none; }
html:not(.js) .media-loading img { opacity: 1; }
html:not(.js) .media-loading::after { display: none; }

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

.skeleton {
  display: block;
  height: 1em;
  border-radius: 4px;
  background: linear-gradient(100deg, var(--skeleton) 30%, var(--skeleton-shine) 50%, var(--skeleton) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.6s linear infinite;
}

/* ==========================================================================
   How it works
   ========================================================================== */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}
.step-num,
.install-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--marker);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: 700;
  color: var(--on-marker);
}
@media (prefers-color-scheme: dark) {
  .step-num,
  .install-step-num { background: #FFD449; color: #16181D; }
}
.step h3 { margin-top: var(--space-4); }
.step p { margin-top: var(--space-2); color: var(--text-2); }

@media (max-width: 899px) {
  .steps { grid-template-columns: 1fr; gap: var(--space-6); }
}

/* Product frame */
.product { margin-top: var(--space-9); }
.frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.frame-bar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: 40px;
  padding: 0 var(--space-4);
  border-bottom: 1px solid var(--line);
}
.frame-dots { display: flex; gap: var(--space-2); }
.frame-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.frame-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frame-media {
  position: relative;
  aspect-ratio: 1304 / 731;
  background: var(--code-bg);
}
.frame-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.product figcaption { max-width: 720px; margin-top: var(--space-4); }

@media (max-width: 719px) {
  .product { margin-top: var(--space-8); }
}

/* ==========================================================================
   Formats — tabs
   ========================================================================== */

.tablist { margin-bottom: var(--space-5); }

.tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 40px;
  padding: 0 var(--space-4);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: 700;
  color: var(--text-2);
  cursor: pointer;
  transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}
.tab[aria-selected="true"] .icon { color: var(--accent); }

.tabpanel {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--space-5);
  row-gap: var(--space-6);
  align-items: center;
  padding: var(--space-8);
}
.tabpanel[hidden] { display: none; }
.tabpanel.is-entering { animation: fade-up var(--duration-slow) var(--ease); }
.tabpanel-copy { grid-column: 1 / span 6; }
.tabpanel-visual { grid-column: 8 / span 5; }
.tabpanel-copy p { margin-top: var(--space-3); color: var(--text-2); }

.check-list {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.check-list li {
  display: flex;
  gap: var(--space-3);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}
.check-list .icon {
  margin-top: calc((var(--lh-small) - 20px) / 2);
  color: var(--accent);
}

.crop {
  position: relative;
  /* Shows the Preview panel of the app screenshot: x 680–1300, y 0–500. */
  aspect-ratio: 620 / 500;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--code-bg);
}
.crop img {
  position: absolute;
  top: 0;
  left: -109.68%;
  width: 210.32%;
  max-width: none;
}
.tabpanel-visual figcaption { margin-top: var(--space-3); }

.hosts {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--board);
  border-radius: var(--radius-sm);
  color: var(--board-text);
}
.host {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--board-2);
  border: 1px solid var(--board-line);
  border-radius: var(--radius-sm);
}
.host strong { display: block; font-size: var(--fs-small); line-height: var(--lh-small); }
.host span:not(.avatar) { font-size: var(--fs-caption); line-height: var(--lh-caption); color: var(--board-text-2); }
.host-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-2);
}
.host-specs dt { font-size: var(--fs-caption); line-height: var(--lh-caption); color: var(--board-text-2); }
.host-specs dd { font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 700; }

@media (max-width: 899px) {
  .tabpanel { padding: var(--space-6); }
  .tabpanel-copy,
  .tabpanel-visual { grid-column: 1 / -1; }
  .tabpanel-visual { max-width: 480px; }
}
@media (max-width: 719px) {
  .tablist { display: flex; }
  .tab { flex: 1 1 0; justify-content: center; padding: 0 var(--space-3); }
  .tabpanel { padding: var(--space-5); }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}
.feature { padding: var(--space-6); }
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--accent-tint);
  border-radius: var(--radius-sm);
  color: var(--accent);
}
.feature h3 { margin-top: var(--space-5); }
.feature p {
  margin-top: var(--space-2);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--text-2);
}

.notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-8);
}
.note { display: flex; gap: var(--space-4); }
.note .icon { margin-top: calc((var(--lh-small) - 20px) / 2); color: var(--text-3); }
.note h3 {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: 700;
}
.note p {
  margin-top: var(--space-1);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--text-2);
}

@media (max-width: 1023px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 719px) {
  .feature-grid,
  .notes { grid-template-columns: 1fr; }
  .feature { padding: var(--space-5); }
  .notes { margin-top: var(--space-6); }
}

/* ==========================================================================
   Stories
   ========================================================================== */

.stories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}
.story {
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
}
.story blockquote {
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  line-height: var(--lh-h4);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.story .story-context {
  flex: 1;
  margin-top: var(--space-4);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--text-2);
}
.story footer {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}
.story cite {
  display: block;
  font-style: normal;
  font-weight: 700;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

@media (max-width: 1023px) {
  .stories { grid-template-columns: 1fr; max-width: 720px; }
}
@media (max-width: 719px) {
  .story { padding: var(--space-5); }
}

/* Founder note */
.founder {
  max-width: 880px;
  padding-left: var(--space-6);
  border-left: 4px solid var(--marker);
}
@media (prefers-color-scheme: dark) {
  .founder { border-left-color: #FFD449; }
}
.founder blockquote {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.founder figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
  margin-top: var(--space-5);
}
.founder figcaption strong { font-weight: 700; }
.founder .founder-note { margin-top: var(--space-2); }

@media (max-width: 719px) {
  .founder { padding-left: var(--space-5); }
  .founder blockquote { font-size: var(--fs-h3); line-height: var(--lh-h3); }
}

/* ==========================================================================
   Cost tiers
   ========================================================================== */

.tiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}
.tier { padding: var(--space-6); }
.tier--default { border-color: var(--accent); }
.tier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.tier p {
  margin-top: var(--space-3);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--text-2);
}
.tiers-note { margin-top: var(--space-5); }

@media (max-width: 899px) {
  .tiers { grid-template-columns: 1fr; max-width: 640px; }
  .tier { padding: var(--space-5); }
}

/* ==========================================================================
   Install
   ========================================================================== */

.install-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--space-5);
  row-gap: var(--space-8);
  align-items: start;
}
.install-intro { grid-column: 1 / span 5; }
.install-steps { grid-column: 7 / span 6; }
.install-intro .section-head { margin-bottom: var(--space-6); }

.requirements { display: grid; gap: var(--space-3); margin-top: var(--space-3); }
.requirements li { display: flex; gap: var(--space-3); }
.requirements .icon { margin-top: calc((var(--lh-body) - 20px) / 2); color: var(--accent); }

.release { margin-top: var(--space-6); padding: var(--space-5); }
.release-version {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin-top: var(--space-1);
}
.release-version strong {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 600;
}
.release-meta { margin-top: var(--space-1); }
.release .btn { margin-top: var(--space-4); }

.release-skeleton { display: none; }
.release[aria-busy="true"] .release-skeleton { display: grid; gap: var(--space-2); margin-top: var(--space-2); }
.release[aria-busy="true"] .release-content { display: none; }
html:not(.js) .release .release-skeleton { display: none; }
html:not(.js) .release .release-content { display: block; }
.release-skeleton .skeleton:nth-child(1) { width: 96px; height: 32px; }
.release-skeleton .skeleton:nth-child(2) { width: 240px; height: 20px; }

.steps-list { display: grid; gap: var(--space-8); }
.install-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  column-gap: var(--space-4);
}
.install-step h3 { padding-top: calc((32px - var(--lh-h4)) / 2); }
.install-step p {
  margin-top: var(--space-2);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--text-2);
}

.code {
  margin-top: var(--space-4);
  background: var(--code-bg);
  border: 1px solid var(--code-line);
  border-radius: var(--radius);
  overflow: hidden;
}
.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  height: 48px;
  padding: 0 var(--space-2) 0 var(--space-4);
  border-bottom: 1px solid var(--code-line);
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  color: var(--code-muted);
}
.code pre {
  margin: 0;
  padding: var(--space-4);
  overflow-x: auto;
  font-size: var(--fs-caption);
  line-height: 1.5rem;
  color: var(--code-text);
}
.code .prompt { color: var(--code-muted); user-select: none; }
.code .hl { color: var(--code-accent); }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 32px;
  padding: 0 var(--space-3);
  background: transparent;
  border: 1px solid var(--code-line);
  border-radius: var(--radius-sm);
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  font-weight: 700;
  color: var(--code-text);
  cursor: pointer;
  transition: background-color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.copy-btn:hover { background: rgb(255 255 255 / 0.06); border-color: var(--code-muted); }
.copy-btn:focus-visible { outline-color: var(--code-accent); }
.copy-btn .icon-done { display: none; color: var(--code-accent); }
.copy-btn[data-state="copied"] .icon-copy { display: none; }
.copy-btn[data-state="copied"] .icon-done { display: block; }

@media (max-width: 1023px) {
  .install-intro,
  .install-steps { grid-column: 1 / -1; }
  .install-intro { max-width: 640px; }
}
@media (max-width: 719px) {
  .install-grid { row-gap: var(--space-6); }
  .steps-list { gap: var(--space-6); }
  .install-step { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-3); }
}

/* ==========================================================================
   FAQ — accordion
   ========================================================================== */

.faq-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--space-5);
  row-gap: var(--space-6);
  align-items: start;
}
.faq-intro { grid-column: 1 / span 4; }
.faq-more { margin-top: var(--space-4); }
.faq-list { grid-column: 6 / span 7; border-top: 1px solid var(--line); }

.faq-item { border-bottom: 1px solid var(--line); }
.faq-item h3 {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 700;
}
.faq-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-5) 0;
  background: none;
  border: 0;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
}
.faq-trigger:hover { color: var(--accent); }
.faq-trigger .icon {
  color: var(--text-3);
  transition: transform var(--duration-slow) var(--ease);
}
.faq-trigger[aria-expanded="true"] .icon { transform: rotate(180deg); }

.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--duration-slow) var(--ease);
}
.faq-panel > div { overflow: hidden; }
.faq-panel p {
  max-width: 640px;
  padding-bottom: var(--space-5);
  color: var(--text-2);
}
.faq-item.is-open .faq-panel { grid-template-rows: 1fr; }
html:not(.js) .faq-panel { grid-template-rows: 1fr; }

@media (max-width: 1023px) {
  .faq-intro,
  .faq-list { grid-column: 1 / -1; }
}

/* ==========================================================================
   Closing call to action — navy board
   ========================================================================== */

.cta-band {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--space-5);
  row-gap: var(--space-6);
  align-items: center;
  padding: var(--space-9);
  background-color: var(--board);
  background-image:
    linear-gradient(to right, var(--board-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--board-line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  background-position: -1px -1px;
  border-radius: var(--radius);
  color: var(--board-text);
}
.cta-band h2 { color: var(--board-text); }
.cta-band p { margin-top: var(--space-3); color: var(--board-text-2); }
.cta-band .marker {
  background-image: linear-gradient(transparent 58%, rgb(255 212 73 / 0.4) 58%, rgb(255 212 73 / 0.4) 92%, transparent 92%);
}
.cta-copy { grid-column: 1 / span 7; }
.cta-band .btn-row { grid-column: 8 / span 5; justify-content: flex-end; }
.cta-band .btn--primary { background: #86B8F6; color: #0E1B36; }
.cta-band .btn--primary:hover { background: #A6CBF9; }

@media (max-width: 1023px) {
  .cta-copy,
  .cta-band .btn-row { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 719px) {
  .cta-band { padding: var(--space-6) var(--space-5); }
  .cta-band .btn { flex: 1 1 auto; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding-block: var(--space-9) var(--space-6);
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--space-5);
  row-gap: var(--space-6);
}
.footer-brand { grid-column: 1 / span 5; }
.footer-brand p {
  max-width: 400px;
  margin-top: var(--space-4);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--text-2);
}
.footer-col--product { grid-column: 8 / span 2; }
.footer-col--project { grid-column: 10 / span 3; }
.footer-col h2 {
  font-family: var(--font-body);
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  font-weight: 700;
  color: var(--text);
}
.footer-col ul { display: grid; gap: var(--space-2); margin-top: var(--space-4); }
.footer-col a {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}
.footer-col a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text-2);
  transition: color var(--duration) var(--ease), background-color var(--duration) var(--ease);
}
.social-link:hover { color: var(--text); background: var(--surface-2); }

@media (max-width: 899px) {
  .footer-brand { grid-column: 1 / -1; }
  .footer-col--product { grid-column: 1 / span 6; }
  .footer-col--project { grid-column: 7 / span 6; }
}

/* ==========================================================================
   Reveal on scroll — only when motion is on
   ========================================================================== */

.js:not(.motion-paused) [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 480ms var(--ease), transform 480ms var(--ease);
}
.js:not(.motion-paused) [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Motion paused — by the header toggle, or by the device's reduced-motion setting. */
html.motion-paused *,
html.motion-paused *::before,
html.motion-paused *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  transition-delay: 0ms !important;
}
@media (prefers-reduced-motion: reduce) {
  html:not(.js) *,
  html:not(.js) *::before,
  html:not(.js) *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
