/*
 * CAPI landing page.
 *
 * The look is the web app's (apps/web/src/styles/globals.css): the same dark
 * surfaces, hairlines, accent, typefaces and square corners, and the same
 * components: accent button, bordered panel, KPI card, chip, mono label,
 * underlined tab, hovered row, expand square, pulsing run dot.
 *
 * Sizes come from fixed tables: font sizes from Tailwind's default type scale
 * and gaps from the spacing steps below. Motion follows the transitions.dev
 * recipes, each named where it is used.
 */

@font-face {
  font-family: "Hanken Grotesk";
  src: url("assets/fonts/hanken-grotesk-v12-latin-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("assets/fonts/hanken-grotesk-v12-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("assets/fonts/hanken-grotesk-v12-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("assets/fonts/hanken-grotesk-v12-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono-v24-latin-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("assets/fonts/jetbrains-mono-v24-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* The web app's dark theme, value for value. */
  --bg: #0b0c0d;
  --bg-side: #08090a;
  --panel: #0f1112;
  --panel-2: #15181a;
  --panel-3: #1d2123;
  --line: rgba(230, 240, 238, 0.1);
  --line-2: rgba(230, 240, 238, 0.21);
  --fg: #e9edec;
  --fg-2: rgba(233, 237, 236, 0.62);
  --fg-3: rgba(233, 237, 236, 0.52);
  --accent: #7fbe94;
  --on-accent: #07120c;
  --warn: #d9b65c;
  --err: #d8654f;
  /* The floating bars, the navigation once the page scrolls and the footer:
     one surface, so the two are let through by the same amount. */
  --glass: rgba(11, 12, 13, 0.72);
  --glass-blur: blur(16px);
  /* The faint 56 px grid the app paints under every view. */
  --grid:
    repeating-linear-gradient(180deg, transparent 0 55px, rgba(233, 237, 236, 0.05) 55px 56px),
    repeating-linear-gradient(90deg, transparent 0 55px, rgba(233, 237, 236, 0.05) 55px 56px);

  --font-sans: "Hanken Grotesk", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Spacing steps */
  --sp-25: 2px;
  --sp-50: 4px;
  --sp-75: 8px;
  --sp-100: 12px;
  --sp-200: 16px;
  --sp-300: 24px;
  --sp-400: 32px;
  --sp-500: 40px;
  --sp-600: 48px;
  --sp-700: 64px;
  --sp-800: 80px;
  --sp-900: 96px;

  /* Motion: the timings and distances of the transitions.dev recipes. */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-quick: 150ms;
  --dur-fast: 250ms;
  --dur-hover: 300ms;
  --dur-medium: 350ms;
  --dur-slow: 500ms;
  --dur-reveal: 700ms;
  --stagger: 40ms;
  --blur-small: 2px;
  --blur-medium: 3px;

  --container: 1200px;
  --gutter: var(--sp-300);
  --section-pad: var(--sp-700);
}

@media (min-width: 768px) {
  :root {
    --gutter: var(--sp-500);
    --section-pad: var(--sp-900);
  }
}

/* ---------- Base ---------- */

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

* {
  scrollbar-color: var(--line-2) transparent;
  scrollbar-width: thin;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--sp-900);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

p,
li,
figcaption {
  text-wrap: pretty;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

::placeholder {
  color: var(--fg-3);
}

/* The app's focus: the accent, square, never a browser default. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: currentColor;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: var(--sp-200);
  left: var(--sp-200);
  z-index: 100;
  padding: var(--sp-75) var(--sp-100);
  background: var(--accent);
  color: var(--on-accent);
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease);
}

.skip-link:focus {
  transform: none;
}

/* ---------- Text styles ----------
 * One class per named style. Headings carry the app's page title cut (600,
 * tightened) and step down the same scale on narrow screens, where the
 * desktop size would break Portuguese headings into too many lines.
 */

.heading-1,
.heading-2,
.heading-3,
.heading-4,
.heading-5,
.heading-6 {
  font-weight: 600;
  letter-spacing: -0.028em;
}

.heading-1 {
  font-size: 2.25rem;
  line-height: 2.5rem;
}
.heading-2 {
  font-size: 1.875rem;
  line-height: 2.25rem;
}
.heading-3 {
  font-size: 1.5rem;
  line-height: 2rem;
}
.heading-4 {
  font-size: 1.5rem;
  line-height: 2rem;
}
.heading-5 {
  font-size: 1.25rem;
  line-height: 1.75rem;
}
.heading-6 {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

/* Heading 7: the app's KPI figure, set in the mono face. */
.heading-7 {
  font-family: var(--font-mono);
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 640px) {
  .heading-1 {
    font-size: 3.75rem;
    line-height: 1;
  }
  .heading-2 {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
  .heading-3 {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
  .heading-5 {
    font-size: 1.5rem;
    line-height: 2rem;
  }
}

@media (min-width: 1024px) {
  /* The hero's line, one step up the scale from the 60 px a Heading 1
     usually is: asked for larger on the hero video. */
  .heading-1 {
    font-size: 4.5rem;
    line-height: 1;
  }
  .heading-2 {
    font-size: 3rem;
    line-height: 1;
  }
  .heading-3 {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
  .heading-4 {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
  .heading-7 {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
}

.title-1 {
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 500;
}
.title-2 {
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 500;
}
.title-3 {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 500;
}
.title-4 {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
}

.body-1 {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 600;
}
.body-2 {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 500;
}
.body-3 {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 400;
}
.body-6 {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 400;
}

.button-md {
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 600;
}
.button-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
}

.caption-2 {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 400;
}
.caption-5 {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 400;
}

/* Caption 6: the app's mono label, used for eyebrows, column heads, field
   labels and chips. */
.caption-6 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.fg-2 {
  color: var(--fg-2);
}
.fg-3 {
  color: var(--fg-3);
}
.accent {
  color: var(--accent);
}

/* ---------- Layout ---------- */

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

.section {
  padding-block: var(--section-pad);
  background-image: var(--grid);
}

/* Every other band sits on the app's rail colour, flat, so the page has a
   rhythm without leaving the palette. */
.section.is-flat {
  background: var(--bg-side);
}

.section-head {
  display: grid;
  gap: var(--sp-300);
  margin-bottom: var(--sp-600);
}

.section-head > :first-child {
  max-width: 680px;
}

.section-head .lede {
  max-width: 440px;
  color: var(--fg-2);
}

@media (min-width: 900px) {
  .section-head {
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
    align-items: end;
    gap: var(--sp-700);
    margin-bottom: var(--sp-700);
  }
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--sp-75);
  margin-bottom: var(--sp-200);
  color: var(--fg-3);
}

/* The app's run dot: a 6 px square in the accent. */
.dot {
  width: 6px;
  height: 6px;
  flex: none;
  background: var(--accent);
}

.dot.is-live {
  animation: pulse 1.1s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.82);
  }
}

.rule {
  height: 1px;
  background: var(--line);
}

.source {
  margin-top: var(--sp-400);
  color: var(--fg-3);
}

.photo {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The app's bordered panel. */
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
}

/* ---------- Buttons and links ---------- */

/* The app's primary action: the accent fill with its own dark foreground. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-75);
  padding: var(--sp-75) var(--sp-100);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  white-space: nowrap;
  transition:
    background-color var(--dur-hover) var(--ease),
    border-color var(--dur-hover) var(--ease),
    transform var(--dur-hover) var(--ease);
}

.button:hover {
  border-color: color-mix(in oklab, var(--accent) 80%, var(--fg));
  background: color-mix(in oklab, var(--accent) 80%, var(--fg));
}

.button:active {
  transform: scale(0.98);
}

.button .icon,
.link-arrow .icon {
  transition: transform var(--dur-medium) var(--ease);
}

/* "Learn more hover": the arrow leans out of the label on hover. */
.button:hover .icon,
.link-arrow:hover .icon {
  transform: translate(2px, -2px) rotate(8deg);
}

/* The app's link: the accent, lighter and underlined on hover. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-75);
  color: var(--accent);
  transition: color var(--dur-hover) var(--ease);
}

.link-arrow:hover {
  color: color-mix(in oklab, var(--accent) 74%, var(--fg));
  text-decoration: underline;
}

/* ---------- Navigation ---------- */

/* At the top of the page there is no bar: the logo, the links and the button
   sit straight on the hero, as wide as the page's content. Once the page
   scrolls the row draws in to a compact bar on the app's translucent panel.
   The script sets data-scrolled. */
.nav {
  --nav-pad: var(--sp-200);
  position: fixed;
  top: var(--sp-200);
  /* The row is padded on the inside, so it starts that much outside the
     gutter and the logo lines up with the content below it. */
  right: calc(var(--gutter) - var(--nav-pad));
  left: calc(var(--gutter) - var(--nav-pad));
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-600);
  max-width: calc(var(--container) + 2 * var(--nav-pad));
  margin-inline: auto;
  padding: var(--sp-100) var(--nav-pad);
  border: 1px solid transparent;
  animation: nav-drop var(--dur-reveal) var(--ease) both;
  transition:
    max-width var(--dur-slow) var(--ease),
    background-color var(--dur-hover) var(--ease),
    border-color var(--dur-hover) var(--ease);
}

.nav[data-scrolled="true"] {
  max-width: 880px;
  border-color: var(--line-2);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}

@keyframes nav-drop {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
}

.nav-logo {
  flex: none;
}

/* At the top of the page the row is bare on the hero and drawn larger; once
   the page scrolls it shrinks into the bar. With no bar behind them, the logo
   and the links also carry a soft dark glow: the video under them runs from
   dark forest to pale mist, and the glow holds them against the pale frames. */
.nav-logo img {
  height: 36px;
  width: auto;
  filter: drop-shadow(0 0 18px rgba(11, 12, 13, 0.5)) drop-shadow(0 1px 3px rgba(11, 12, 13, 0.4));
  transition:
    height var(--dur-slow) var(--ease),
    filter var(--dur-hover) var(--ease);
}

@media (min-width: 1024px) {
  .nav-logo img {
    height: 44px;
  }
}

.nav[data-scrolled="true"] .nav-logo img {
  height: 28px;
  filter: none;
}

.nav-links {
  position: relative;
  display: none;
  align-items: center;
}

.nav-links a {
  display: block;
  padding: var(--sp-75) var(--sp-200);
  color: var(--fg-3);
  white-space: nowrap;
  transition:
    color var(--dur-hover) var(--ease),
    font-size var(--dur-slow) var(--ease);
}

.nav-links a:hover {
  color: var(--fg-2);
}

.nav-links a[aria-current="true"] {
  color: var(--fg);
}

/* With no bar behind them the links sit on moving video: one step larger,
   brighter, and with the same glow as the logo. */
.nav[data-scrolled="false"] .nav-links a {
  font-size: 1.125rem;
  line-height: 1.75rem;
  color: rgba(233, 237, 236, 0.92);
  text-shadow:
    0 0 18px rgba(11, 12, 13, 0.55),
    0 1px 3px rgba(11, 12, 13, 0.45);
}

.nav[data-scrolled="false"] .nav-links a:hover {
  color: var(--fg);
}

/* "Tabs sliding", in the app's tab vocabulary: one accent underline that
   travels to the section being read. */
.nav-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition:
    transform var(--dur-fast) var(--ease),
    width var(--dur-fast) var(--ease),
    opacity var(--dur-fast) var(--ease);
}

.nav-cta {
  display: none;
}

.nav-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-inline-start: auto;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  font-size: 1.25rem;
  transition:
    background-color var(--dur-hover) var(--ease),
    transform var(--dur-hover) var(--ease);
}

.nav-toggle:hover {
  background: var(--panel-3);
}

.nav-toggle:active {
  transform: scale(0.98);
}

/* "Icon swap": the two icons share a slot and trade places. */
.swap {
  display: grid;
  place-items: center;
}

.swap > * {
  grid-area: 1 / 1;
  transition:
    opacity var(--dur-fast) ease-in-out,
    transform var(--dur-fast) ease-in-out,
    filter var(--dur-fast) ease-in-out;
}

.swap > :last-child,
[aria-expanded="true"] > .swap > :first-child,
[aria-pressed="true"] > .swap > :first-child {
  opacity: 0;
  transform: scale(0.25);
  filter: blur(var(--blur-small));
}

[aria-expanded="true"] > .swap > :last-child,
[aria-pressed="true"] > .swap > :last-child {
  opacity: 1;
  transform: none;
  filter: none;
}

@media (min-width: 1024px) {
  .nav-links,
  .nav-cta {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--sp-400);
  padding: var(--sp-900) var(--sp-300) var(--sp-400);
  background: rgba(11, 12, 13, 0.94);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--dur-fast) var(--ease),
    visibility 0s linear var(--dur-fast);
}

.menu[data-open="true"] {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.menu-links {
  display: grid;
  gap: var(--sp-50);
}

.menu-links a {
  display: block;
  padding-block: var(--sp-100);
}

/* Links arrive one after another, 60 ms apart, the whole run under 400 ms. */
.menu-item {
  opacity: 0;
  transform: translateY(var(--sp-300));
  transition:
    opacity var(--dur-slow) var(--ease),
    transform var(--dur-slow) var(--ease);
}

.menu[data-open="true"] .menu-item {
  opacity: 1;
  transform: none;
  transition-delay: min(calc(var(--i) * 60ms), 400ms);
}

@media (min-width: 1024px) {
  .menu {
    display: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100svh;
  overflow: hidden;
  background: var(--bg);
}

.hero-media,
.hero-media video,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* The capybara sits in the right half of the frame, her nose at 89% of
     its width. The narrower the screen is for its height, the more of the
     frame is cut at the sides, and the further right the cut has to lean to
     keep her head in what is left. */
  object-position: 85% 50%;
}

@media (min-aspect-ratio: 4/3) {
  .hero-media video,
  .hero-media img {
    object-position: 70% 50%;
  }
}

/* Near 16:10 and wider little is cut, and most of it can go from the right,
   which moves her away from the copy on the left. The line is drawn a little
   under 16:10 so that a 1280 by 800 screen is not sitting on it. */
@media (min-aspect-ratio: 31/20) {
  .hero-media video,
  .hero-media img {
    object-position: 30% 50%;
  }
}

.hero-still {
  display: none;
}

/* A flat veil in the page colour, so the copy stays readable over bright grass. */
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11, 12, 13, 0.52);
}

.hero-inner {
  position: relative;
  padding-block: var(--sp-900) var(--sp-800);
}

/* As wide as the heading may be: at 72 px its second line needs 660 px. */
.hero-copy {
  max-width: 680px;
}

.hero h1 {
  max-width: 680px;
}

.hero h1 span {
  display: block;
}

.hero-sub {
  /* Narrower than the 680 px the heading is allowed: at this width the lines
     end before the capybara's back begins. */
  max-width: 440px;
  margin-top: var(--sp-300);
  color: rgba(233, 237, 236, 0.86);
}

.hero-actions {
  margin-top: var(--sp-400);
}

.hero-proof {
  display: flex;
  align-items: baseline;
  gap: var(--sp-100);
  /* The lowest lines of the copy sit beside the widest part of the capybara:
     narrower than the paragraph above, so they end before she begins. */
  max-width: 360px;
  margin-top: var(--sp-400);
  color: rgba(233, 237, 236, 0.86);
}

.hero-proof .dot {
  transform: translateY(-2px);
}

.hero-foot {
  position: absolute;
  right: var(--gutter);
  bottom: var(--sp-300);
  left: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-200);
  color: rgba(233, 237, 236, 0.7);
}

.film-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-2);
  background: rgba(11, 12, 13, 0.6);
  font-size: 1rem;
  transition:
    background-color var(--dur-hover) var(--ease),
    transform var(--dur-hover) var(--ease);
}

.film-toggle:hover {
  background: var(--panel-3);
}

.film-toggle:active {
  transform: scale(0.98);
}

@media (max-width: 767px) {
  .hero {
    align-items: flex-end;
  }
  .hero-inner {
    padding-block: var(--sp-900);
  }
}

/* On a desktop the copy hangs from the top instead of sitting in the middle.
   The capybara's back rises to the right: 38% of the way down the frame her
   outline is still at 56% of its width, by 45% it has come in to 46%. With
   the heading's last line ending above that 38% the larger type clears her.
   176 px is what sits above that line: the eyebrow (32 px with its gap) and
   two 72 px lines. */
@media (min-width: 1024px) {
  .hero {
    align-items: flex-start;
  }
  .hero-inner {
    padding-top: max(var(--sp-900), calc(38svh - 176px));
  }
}

/* ---------- Problem ---------- */

.problem-grid {
  display: grid;
  gap: var(--sp-600);
}

.problem-photo {
  aspect-ratio: 4 / 5;
}

.leaks > li:not(.rule) {
  display: grid;
  grid-template-columns: var(--sp-500) minmax(0, 1fr);
  gap: var(--sp-200);
  padding-block: var(--sp-300);
}

.leaks .number {
  padding-top: var(--sp-50);
  color: var(--accent);
}

.leaks p {
  margin-top: var(--sp-50);
  color: var(--fg-2);
}

.facts {
  display: grid;
  gap: var(--sp-200);
  margin-top: var(--sp-400);
}

/* The app's KPI card: mono label, mono figure, a note under it. */
.kpi {
  display: grid;
  align-content: start;
  gap: var(--sp-75);
  padding: var(--sp-200);
  border: 1px solid var(--line);
  background: var(--panel);
}

.kpi .label {
  display: flex;
  align-items: center;
  gap: var(--sp-75);
  color: var(--fg-3);
}

.kpi .figure {
  color: var(--accent);
  white-space: nowrap;
}

.kpi.is-warn .figure {
  color: var(--warn);
}

.kpi.is-warn .dot {
  background: var(--warn);
}

.kpi .note {
  color: var(--fg-2);
}

@media (min-width: 640px) {
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .problem-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--sp-800);
    align-items: start;
  }
  .problem-photo {
    position: sticky;
    top: var(--sp-900);
  }
}

/* ---------- Tagline ---------- */

.tagline {
  padding-block: var(--sp-900);
}

.tagline p {
  max-width: 680px;
}

/* Each word waits in a muted tone and lights up as the page scrolls past. */
.tagline .word {
  color: rgba(233, 237, 236, 0.3);
  transition: color var(--dur-slow) var(--ease);
}

.tagline .word.is-lit {
  color: var(--fg);
}

/* ---------- Solution ---------- */

.pillars {
  display: grid;
  gap: var(--sp-300);
}

.pillar-tabs {
  position: relative;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.pillar-tabs::-webkit-scrollbar {
  display: none;
}

.pillar-tab {
  position: relative;
  z-index: 1;
  display: flex;
  flex: none;
  align-items: baseline;
  gap: var(--sp-100);
  padding: var(--sp-100) var(--sp-200);
  color: var(--fg-3);
  text-align: start;
  transition: color var(--dur-fast) var(--ease);
}

.pillar-tab:hover {
  color: var(--fg-2);
}

.pillar-tab[aria-selected="true"] {
  color: var(--fg);
}

.pillar-tab .number {
  color: var(--accent);
}

/* "Tabs sliding" on the app's nav row: the lit row (panel fill, accent bar)
   slides to the tab that was picked. The bar runs under the row while the
   tabs sit side by side and down its left edge once they stack. */
.pillar-marker {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--panel-2);
  box-shadow: inset 0 -2px 0 var(--accent);
  transition:
    transform var(--dur-fast) var(--ease),
    width var(--dur-fast) var(--ease),
    height var(--dur-fast) var(--ease);
}

/* Panels share one grid cell, so the block keeps the height of the tallest
   and the page below does not jump when the panel changes. */
.pillar-panels {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}

/* "Page side by side": the old panel slips out one way while the new one
   slips in from the other, both through a short blur. */
.pillar-panel {
  grid-area: 1 / 1;
  display: grid;
  align-content: start;
  opacity: 0;
  visibility: hidden;
  transform: translateX(calc(var(--from, 1) * 8px));
  filter: blur(var(--blur-medium));
  transition:
    opacity var(--dur-quick) var(--ease),
    transform var(--dur-quick) var(--ease),
    filter var(--dur-quick) var(--ease),
    visibility 0s linear var(--dur-quick);
}

.pillar-panel[data-active="true"] {
  opacity: 1;
  visibility: visible;
  transform: none;
  filter: none;
  transition:
    opacity var(--dur-fast) var(--ease) var(--dur-quick),
    transform var(--dur-fast) var(--ease) var(--dur-quick),
    filter var(--dur-fast) var(--ease) var(--dur-quick),
    visibility 0s;
}

.pillar-copy {
  padding: var(--sp-300);
}

.pillar-copy .number {
  color: var(--accent);
}

.pillar-copy h3 {
  margin-top: var(--sp-100);
}

.pillar-copy .summary {
  max-width: 440px;
  margin-top: var(--sp-200);
  color: var(--fg-2);
}

.pillar-list {
  display: grid;
  gap: var(--sp-100);
  margin-top: var(--sp-300);
}

.pillar-list li {
  display: flex;
  gap: var(--sp-100);
}

.pillar-list .icon {
  margin-top: var(--sp-50);
  color: var(--accent);
}

.pillar-note {
  margin-top: var(--sp-300);
  color: var(--fg-3);
}

.pillar-figure {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--panel-2);
}

.pillar-figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flow {
  display: grid;
  align-content: center;
  gap: var(--sp-75);
  padding: var(--sp-300);
  background: var(--panel-2);
}

.flow li {
  padding: var(--sp-200);
  border: 1px solid var(--line);
  background: var(--panel);
}

.flow .label {
  color: var(--fg-3);
}

.flow h4 {
  margin-top: var(--sp-75);
}

.flow p {
  margin-top: var(--sp-50);
  color: var(--fg-2);
}

/* Stacked in one cell, every panel is as tall as the tallest. On a narrow
   screen that leaves a blank block under the short ones, so there only the
   picked panel is laid out, and it arrives with the same slide and blur. */
@media (max-width: 899px) {
  .pillar-panel {
    display: none;
  }
  .pillar-panel[data-active="true"] {
    display: grid;
    animation: panel-in var(--dur-fast) var(--ease) both;
  }
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateX(calc(var(--from, 1) * 8px));
    filter: blur(var(--blur-medium));
  }
}

@media (min-width: 900px) {
  .pillars {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: var(--sp-600);
    align-items: start;
  }
  .pillar-tabs {
    flex-direction: column;
    overflow: visible;
  }
  .pillar-marker {
    box-shadow: inset 2px 0 0 var(--accent);
  }
  .pillar-panel {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-content: stretch;
  }
  .pillar-copy {
    padding: var(--sp-500);
  }
  .pillar-figure {
    aspect-ratio: auto;
    min-height: 480px;
  }
  .flow {
    padding: var(--sp-500);
  }
}

/* ---------- Solution: pinned while the page scrolls through its items ----------
 * The script turns this on (data-pinned) where the block fits the window, and
 * sets the three lengths: how tall the pinned block is, how much scroll its
 * items take, and how far from the top it sticks. Without the script, or on a
 * narrow screen, the track is as tall as the block and nothing sticks.
 */

.pin {
  /* What the script measures the tabs' block against. */
  position: relative;
}

[data-pin-track][data-pinned="true"] {
  min-height: calc(var(--pin-height) + var(--pin-scroll));
}

[data-pin-track][data-pinned="true"] > .pin {
  position: sticky;
  top: var(--pin-top);
}

/* On a window too short for the heading and the block together, only the
   block is held, and the heading stops just above it: its last line would
   show cut off behind the floating bar. It fades out as the block sticks and
   comes back when the page scrolls up out of the section. */
[data-pin-track][data-pinned="true"][data-heading="passes"][data-stuck="true"] .section-head {
  opacity: 0;
}

/* ---------- Why now ---------- */

.reasons {
  display: grid;
  gap: var(--sp-200);
}

.reasons > li {
  display: grid;
}

.reason {
  display: flex;
  flex-direction: column;
  gap: var(--sp-600);
  padding: var(--sp-300);
  border: 1px solid var(--line);
  background: var(--panel);
  /* "Card tilt": the script leans the card toward the pointer. */
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition:
    transform var(--dur-slow) var(--ease),
    border-color var(--dur-hover) var(--ease);
}

.reason:hover {
  border-color: var(--line-2);
}

.reason .number {
  color: var(--accent);
}

.reason p {
  margin-top: var(--sp-100);
  color: var(--fg-2);
}

.reason strong {
  color: var(--fg);
  font-weight: 600;
}

@media (min-width: 640px) {
  .reasons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .reasons {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- How it works ---------- */

.steps-grid {
  display: grid;
  gap: var(--sp-600);
}

.steps > li:not(.rule) {
  display: grid;
  grid-template-columns: var(--sp-600) minmax(0, 1fr);
  gap: var(--sp-300);
  padding-block: var(--sp-400);
}

.step-badge {
  display: grid;
  place-items: center;
  width: var(--sp-600);
  height: var(--sp-600);
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--accent);
  font-size: 1.5rem;
}

.steps .label {
  color: var(--fg-3);
}

.steps h3 {
  margin-top: var(--sp-75);
}

.steps p {
  margin-top: var(--sp-75);
  color: var(--fg-2);
}

.steps-photo {
  aspect-ratio: 16 / 10;
}

@media (min-width: 900px) {
  .steps-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--sp-800);
    align-items: start;
  }
  .steps-photo {
    position: sticky;
    top: var(--sp-900);
    aspect-ratio: 4 / 5;
  }
}

/* ---------- Product ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-200);
}

@media (min-width: 900px) {
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* "Number pop-in": each character rises into place through a blur, the
   digits a beat apart. The script splits the figure into .ch spans. */
.pop .ch {
  display: inline-block;
  white-space: pre;
}

.js .pop .ch {
  opacity: 0;
}

.js .pop.is-in .ch {
  animation: pop-in 600ms var(--ease) both;
  animation-delay: calc(var(--i) * var(--stagger));
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(0.52em) scale(0.7);
    filter: blur(0.12em);
  }
  60% {
    opacity: 1;
    transform: translateY(-0.03em) scale(1.03);
    filter: blur(0);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

.product-grid {
  display: grid;
  gap: var(--sp-200);
  margin-top: var(--sp-200);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-200);
  padding: var(--sp-200) var(--sp-300);
}

.panel-head .count {
  color: var(--fg-3);
}

.panel-body {
  padding: var(--sp-300);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-75);
}

/* The app's chip: a mono label in a hairline box. */
.chip {
  padding: var(--sp-50) var(--sp-100);
  border: 1px solid var(--line);
  color: var(--fg-2);
}

.chip.is-on {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  color: var(--fg);
}

/* The app's row: a hairline under it, the panel fill on hover. */
.row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-200);
  padding: var(--sp-100) var(--sp-300);
  transition: background-color var(--dur-hover) var(--ease);
}

.row:hover {
  background: var(--panel-2);
}

.row .value {
  font-family: var(--font-mono);
  color: var(--accent);
}

.row-head {
  color: var(--fg-3);
}

.row-head:hover {
  background: none;
}

.pilot {
  display: grid;
  grid-template-rows: minmax(160px, 1fr) auto;
}

.pilot-figure {
  min-height: 160px;
  background: var(--panel-2);
}

.pilot-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pilot p {
  margin-top: var(--sp-75);
  color: var(--fg-2);
}

.pilot .chip {
  display: inline-block;
  margin-bottom: var(--sp-200);
}

@media (min-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- SBV case ---------- */

.case-grid {
  display: grid;
  gap: var(--sp-600);
}

.case-photo {
  position: relative;
  aspect-ratio: 4 / 5;
}

.case-photo blockquote {
  position: absolute;
  right: var(--sp-200);
  bottom: var(--sp-200);
  left: var(--sp-200);
  padding: var(--sp-300);
  border: 1px solid var(--line-2);
  background: rgba(11, 12, 13, 0.86);
}

.case-chips {
  margin-bottom: var(--sp-400);
}

.pains {
  display: grid;
  gap: var(--sp-200);
}

.milestones {
  margin-top: var(--sp-600);
}

.milestones > li:not(.rule) {
  display: grid;
  grid-template-columns: var(--sp-500) minmax(0, 1fr);
  gap: var(--sp-200);
  padding-block: var(--sp-300);
}

.milestones .number {
  display: grid;
  place-items: center;
  width: var(--sp-500);
  height: var(--sp-500);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-mono);
}

.milestones .is-next .number {
  border-color: var(--line-2);
  background: var(--panel-2);
  color: var(--warn);
}

.milestones p {
  margin-top: var(--sp-50);
  color: var(--fg-2);
}

@media (min-width: 640px) {
  .pains {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .case-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--sp-800);
    align-items: start;
  }
  .case-photo {
    position: sticky;
    top: var(--sp-900);
  }
}

/* ---------- Comparison ---------- */

.compare-head,
.compare-row {
  display: grid;
  gap: var(--sp-75);
  padding: var(--sp-300);
}

.compare-head {
  display: none;
  padding-block: var(--sp-200);
  color: var(--fg-3);
}

.compare-row {
  transition: background-color var(--dur-hover) var(--ease);
}

.compare-row:hover {
  background: var(--panel-2);
}

.compare-row .label {
  display: block;
  margin-block: var(--sp-75) var(--sp-50);
  color: var(--fg-3);
}

.compare-row .cell {
  color: var(--fg-2);
}

/* CAPI's own row is the lit one: the app's active chip, row sized. */
.compare-row.is-capi,
.compare-row.is-capi:hover {
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.compare-row.is-capi .name {
  color: var(--accent);
}

.compare-row.is-capi .cell {
  color: var(--fg);
}

@media (min-width: 900px) {
  .compare-head,
  .compare-row {
    grid-template-columns: minmax(0, 3fr) minmax(0, 4fr) minmax(0, 5fr);
    gap: var(--sp-400);
    align-items: baseline;
  }
  .compare-head {
    display: grid;
  }
  .compare-row .label {
    display: none;
  }
  .compare-row.is-capi .wide {
    grid-column: 2 / 4;
  }
}

/* ---------- FAQ ---------- */

.faq-grid {
  display: grid;
  gap: var(--sp-600);
}

.faq-intro p {
  max-width: 440px;
  margin-top: var(--sp-300);
  color: var(--fg-2);
}

.faq-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-300);
  width: 100%;
  padding: var(--sp-300) var(--sp-200);
  text-align: start;
  transition: background-color var(--dur-hover) var(--ease);
}

.faq-button:hover {
  background: var(--panel-2);
}

/* The app's expand square: a plus that becomes a minus. */
.expand {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--fg-2);
  font-size: 0.75rem;
}

.faq-button[aria-expanded="true"] .expand {
  border-color: var(--accent);
  color: var(--accent);
}

/* "Accordion expand": the answer's row grows from nothing to its own height. */
.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition:
    grid-template-rows var(--dur-fast) var(--ease),
    visibility 0s linear var(--dur-fast);
}

.faq-panel[data-open="true"] {
  grid-template-rows: 1fr;
  visibility: visible;
  transition-delay: 0s;
}

.faq-panel > div {
  overflow: hidden;
}

.faq-panel p {
  max-width: 680px;
  padding: 0 var(--sp-200) var(--sp-300);
  color: var(--fg-2);
}

@media (min-width: 900px) {
  .faq-grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: var(--sp-800);
    align-items: start;
  }
  .faq-intro {
    position: sticky;
    top: var(--sp-900);
  }
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  gap: var(--sp-600);
}

.contact-copy h2 {
  max-width: 680px;
}

.contact-copy > p {
  max-width: 440px;
  margin-top: var(--sp-300);
  color: var(--fg-2);
}

.assurances {
  display: grid;
  gap: var(--sp-100);
  margin-top: var(--sp-400);
}

.assurances li {
  display: flex;
  gap: var(--sp-100);
}

.assurances .icon {
  margin-top: var(--sp-50);
  color: var(--accent);
}

/* The form floats on the closing film: the app's panel, let through a little. */
.form {
  display: grid;
  gap: var(--sp-300);
  padding: var(--sp-300);
  border: 1px solid var(--line-2);
  background: rgba(15, 17, 18, 0.8);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.field {
  display: grid;
  gap: var(--sp-75);
}

.field label {
  color: var(--fg-3);
}

/* The app's field: the panel fill in a hairline box, the accent on focus. */
.field input,
.field textarea {
  width: 100%;
  padding: var(--sp-100) var(--sp-200);
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel-2);
  transition:
    border-color var(--dur-hover) var(--ease),
    box-shadow var(--dur-hover) var(--ease);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field input:hover,
.field textarea:hover {
  border-color: var(--line-2);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.field [aria-invalid="true"] {
  border-color: var(--err);
  box-shadow: 0 0 0 1px var(--err);
}

.field-error {
  display: none;
  color: var(--err);
}

.field [aria-invalid="true"] ~ .field-error {
  display: block;
}

/* "Error state shake": a field that failed the check nudges sideways. */
.is-shaking {
  animation: shake 320ms var(--ease);
}

@keyframes shake {
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

.form .button {
  justify-self: start;
}

/* "Text states swap": the button label changes through a short blur. */
.swap-text {
  display: inline-block;
  transition:
    opacity var(--dur-quick) ease-in-out,
    transform var(--dur-quick) ease-in-out,
    filter var(--dur-quick) ease-in-out;
}

.swap-text.is-leaving {
  opacity: 0;
  transform: translateY(-4px);
  filter: blur(var(--blur-small));
}

.form-status {
  display: none;
  align-items: flex-start;
  gap: var(--sp-100);
  padding: var(--sp-200);
  border: 1px solid var(--line-2);
  background: var(--panel-2);
}

.form-status[data-state] {
  display: flex;
  animation: rise-in var(--dur-slow) var(--ease) both;
}

.form-status .icon {
  margin-top: var(--sp-25);
  font-size: 1.25rem;
  color: var(--accent);
}

.form-status[data-state="error"] {
  border-color: var(--err);
}

.form-status[data-state="error"] .icon {
  color: var(--err);
}

.form-status .icon-error,
.form-status[data-state="error"] .icon-ready {
  display: none;
}

.form-status[data-state="error"] .icon-error {
  display: block;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(var(--blur-medium));
  }
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--sp-800);
    align-items: start;
  }
  .form {
    padding: var(--sp-500);
  }
}

/* ---------- Closing: the contact section and the footer over one film ----------
 * As on the Horda landing: the block is at least a window tall, the film
 * covers it from behind, and the footer is a panel floating at its foot, with
 * the film showing around it.
 */

.closing {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding-bottom: var(--sp-300);
  background: var(--bg-side);
}

.closing-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.closing-backdrop img,
.closing-backdrop video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* The capybaras graze in the left fifth of the frame. The block is taller
     than the frame is for its width, so the frame is cut at the sides: all of
     the cut comes off the right, and they stay. */
  object-position: 0% 50%;
}

/* The still is what shows first; the video fades in over it once it plays. */
.closing-backdrop video {
  opacity: 0;
  transition: opacity 600ms var(--ease);
}

.closing-backdrop video[data-playing="true"] {
  opacity: 1;
}

/* A flat veil in the page colour: the film is dusk, the copy is pale. */
.closing-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11, 12, 13, 0.55);
}

.section.closing-scene {
  flex: 1;
  background: none;
}

/* ---------- Footer: a panel floating on the closing film ---------- */

.footer {
  width: calc(100% - 2 * var(--gutter));
  max-width: var(--container);
  margin-inline: auto;
  padding: var(--sp-300);
  border: 1px solid var(--line-2);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}

@media (min-width: 768px) {
  .footer {
    padding: var(--sp-600) var(--sp-600) var(--sp-300);
  }
}

.footer-grid {
  display: grid;
  gap: var(--sp-600);
}

.footer-brand img {
  height: 56px;
  width: auto;
}

.footer-brand p {
  max-width: 440px;
  margin-top: var(--sp-300);
  color: var(--fg-2);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-400);
}

.footer-cols h2 {
  margin-bottom: var(--sp-200);
  color: var(--fg-3);
}

.footer-cols ul {
  display: grid;
  gap: var(--sp-100);
}

.footer-cols a {
  color: var(--fg-2);
  transition: color var(--dur-hover) var(--ease);
}

.footer-cols a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-200);
  margin-top: var(--sp-300);
  color: var(--fg-3);
}

.footer .rule {
  margin-top: var(--sp-600);
}

@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
    gap: var(--sp-800);
  }
}

/* ---------- Simple pages: legal texts and the 404 ---------- */

.page {
  display: grid;
  align-content: center;
  min-height: 100svh;
  padding-block: var(--sp-900);
  background-image: var(--grid);
}

.page-inner {
  max-width: 680px;
}

.page-inner > a > img {
  height: 32px;
  width: auto;
  margin-bottom: var(--sp-600);
}

.page-inner > p {
  margin-top: var(--sp-300);
  color: var(--fg-2);
}

.page-inner .link-arrow {
  margin-top: var(--sp-400);
}

/* The 404: everything on the centre line, the capybara first. */
.page.is-centered .page-inner {
  display: grid;
  justify-items: center;
  margin-inline: auto;
  text-align: center;
}

.page.is-centered .eyebrow {
  justify-content: center;
}

.lost {
  display: block;
  width: min(320px, 72vw);
  margin-bottom: var(--sp-300);
}

.lost img {
  width: 100%;
  height: auto;
}

.placeholder {
  margin-top: var(--sp-400);
  padding: var(--sp-300);
  border: 1px dashed var(--warn);
  background: var(--panel);
}

.placeholder .label {
  color: var(--warn);
}

.placeholder p {
  margin-top: var(--sp-100);
  color: var(--fg-2);
}

/* ---------- Scroll reveals ----------
 * "Texts reveal": a block rises 32 px out of a 3 px blur, once. Children
 * marked with --i follow 40 ms apart. Hidden states apply only when the
 * script is running (html.js), so the page reads without it.
 */

.js .reveal {
  opacity: 0;
  transform: translateY(var(--sp-400));
  filter: blur(var(--blur-medium));
  transition:
    opacity var(--dur-reveal) var(--ease),
    transform var(--dur-reveal) var(--ease),
    filter var(--dur-reveal) var(--ease);
  transition-delay: calc(var(--i, 0) * var(--stagger));
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
  filter: none;
}

/* The hero copy uses the shorter recipe: 12 px, 500 ms, 80 ms apart. */
.js .hero .reveal {
  transform: translateY(12px);
  transition-duration: var(--dur-slow);
  transition-delay: calc(var(--i, 0) * 80ms + 120ms);
}

.js .hero .reveal.is-in {
  transform: none;
}

/* ---------- Reduced motion ----------
 * Movement and blur go; a plain fade stays. The hero shows a still frame.
 */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-property: opacity, color, background-color, border-color, visibility !important;
  }

  .js .reveal,
  .js .hero .reveal,
  .menu-item,
  .pillar-panel,
  .swap > *,
  .swap-text.is-leaving {
    transform: none !important;
    filter: none !important;
  }

  .reason {
    transform: none;
  }

  .tagline .word {
    color: var(--fg);
  }

  .hero-media video {
    display: none;
  }

  .hero-still {
    display: block;
  }

  .film-toggle {
    display: none;
  }

  .closing-backdrop video {
    display: none;
  }
}
