/* Reform Assistant marketing site — "Kitchen Table" design language.
   Spec: docs/design/design-language.md. Tokens and base layer are pasted verbatim from §2–§3. */

:root {
  color-scheme: light;

  /* ── Surfaces ───────────────────────────────────────────── */
  --ra-bg: #fbf8f4;            /* page canvas */
  --ra-sunken: #f3eee6;        /* recessed panels, disabled fill, table stripes */
  --ra-card: #ffffff;          /* cards, inputs, popovers */
  --ra-ink: #1b1814;           /* headings, on-accent text, dark bands */

  /* ── Text (contrast on --ra-card / --ra-bg / --ra-sunken) ─ */
  --ra-text: #1b1814;          /* body            17.7 / 16.7 / 15.3 */
  --ra-text-2: #4f483f;        /* secondary body   9.0 /  8.5 /  7.8 */
  --ra-muted: #6b6358;         /* hints, captions  5.9 /  5.6 /  5.1 (AA min) */

  /* ── Lines ──────────────────────────────────────────────── */
  --ra-line: #e6dfd4;          /* decorative dividers, card borders (not for controls) */
  --ra-line-strong: #857c70;   /* control borders: 4.1 on white, 3.9 on --ra-bg (needs ≥ 3) */

  /* ── Brand accent: orange ───────────────────────────────── */
  --ra-orange: #ff6b1a;        /* FILL only. ink text on it = 6.21 */
  --ra-orange-hover: #ff8238;  /* ink text = 7.16 */
  --ra-orange-press: #e85a0c;  /* ink text = 4.97 */
  --ra-orange-edge: #d9540a;   /* borders/progress on light: 4.02 on white, 3.04 on --ra-line */
  --ra-orange-text: #a63f04;   /* orange as TEXT/links: 6.30 white, 5.95 --ra-bg, 5.53 on tint */
  --ra-orange-tint: #ffede0;   /* selected/info tint; ink text = 15.5 */
  --ra-orange-tint-2: #ffd8bf; /* avatar / marker highlight; ink text = 13.3 */

  /* ── Support colours (text colour / background / border) ── */
  --ra-ok: #1f6f5c;            /* sage: verified, paid, done. 6.02 on white, white on it 6.02 */
  --ra-ok-bg: #e4f2ee;         /* 5.23 */
  --ra-ok-line: #a9d2c6;
  --ra-info: #1d5a9e;          /* 6.98 white, 6.12 on bg */
  --ra-info-bg: #e8f1fb;
  --ra-info-line: #b5cfeb;
  --ra-warn: #7a4b00;          /* 6.76 on bg */
  --ra-warn-bg: #fff4d6;
  --ra-warn-line: #ebcf8c;
  --ra-err: #b3261e;           /* 6.54 white, 5.72 on bg; white on it 6.54 */
  --ra-err-bg: #fdecea;
  --ra-err-line: #f1b5b0;

  /* ── On dark (ink) bands ────────────────────────────────── */
  --ra-on-dark: #ffffff;       /* 17.7 on ink */
  --ra-on-dark-2: #c9c2b8;     /* 10.0 */
  --ra-on-dark-3: #a39b90;     /* 6.4  */
  --ra-line-dark: #3a342d;

  /* ── Disabled (exempt from contrast, still readable) ───── */
  --ra-disabled-bg: #eae4da;
  --ra-disabled-text: #6b6358; /* 4.68 on --ra-disabled-bg */

  /* ── Focus ──────────────────────────────────────────────── */
  --ra-focus: #1b1814;         /* 3px outline, 2px offset; 17.7 on white, 6.2 on orange */
  --ra-focus-on-dark: #ffffff;

  /* ── Typography: system fonts only ──────────────────────── */
  --ra-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --ra-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --ra-fs-display: clamp(2.125rem, 1.55rem + 2.4vw, 3.25rem);  /* 34 → 52 */
  --ra-fs-h2: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);        /* 26 → 36 */
  --ra-fs-h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.375rem);        /* 20 → 22 */
  --ra-fs-lead: clamp(1.1875rem, 1.1rem + 0.35vw, 1.3125rem);  /* 19 → 21 */
  --ra-fs-body: clamp(1.0625rem, 1rem + 0.25vw, 1.125rem);     /* 17 → 18 */
  --ra-fs-label: 1rem;          /* 16, labels, small body, nav */
  --ra-fs-small: 0.875rem;      /* 14, hints, captions, badges: THE MINIMUM */
  --ra-fs-input: 1.125rem;      /* 18, form controls (never < 16 or iOS zooms) */
  --ra-fs-btn: 1.0625rem;       /* 17 */
  --ra-fs-price: clamp(2.5rem, 2rem + 2vw, 3.5rem);            /* 40 → 56 */

  --ra-lh-tight: 1.12;          /* display, price */
  --ra-lh-heading: 1.25;        /* h2, h3 */
  --ra-lh-body: 1.55;
  --ra-measure: 65ch;           /* max line length for paragraphs */

  /* ── Spacing: 4px base ──────────────────────────────────── */
  --ra-s-1: 4px;
  --ra-s-2: 8px;
  --ra-s-3: 12px;
  --ra-s-4: 16px;
  --ra-s-5: 20px;
  --ra-s-6: 24px;
  --ra-s-7: 32px;
  --ra-s-8: 40px;
  --ra-s-9: 48px;
  --ra-s-10: 64px;
  --ra-s-11: 80px;
  --ra-s-12: 96px;
  --ra-section-y: clamp(3.5rem, 2.5rem + 4vw, 6rem);           /* 56 → 96 */

  /* ── Layout ─────────────────────────────────────────────── */
  --ra-gutter: 20px;            /* 24 at ≥ 720, 32 at ≥ 1024 (see base layer) */
  --ra-container: 1120px;
  --ra-container-narrow: 560px; /* auth + single-column forms */
  --ra-header-h: 64px;          /* 72 at ≥ 1024 */
  --ra-tabbar-h: 64px;          /* console mobile tab bar (+ safe area) */
  --ra-bar-h: 80px;             /* checkout sticky pay bar (+ safe area) */
  --ra-sidebar-w: 264px;

  /* ── Controls ───────────────────────────────────────────── */
  --ra-hit: 44px;               /* minimum touch target, both axes */
  --ra-btn-h: 48px;
  --ra-btn-h-lg: 56px;
  --ra-control-h: 52px;         /* input, select */

  /* ── Radius ─────────────────────────────────────────────── */
  --ra-radius-sm: 8px;          /* small chips, code, table cells */
  --ra-radius-input: 12px;      /* buttons, inputs, selects, banners */
  --ra-radius: 16px;            /* cards, panels */
  --ra-radius-xl: 24px;         /* hero panels, sheets */
  --ra-radius-pill: 999px;      /* badges, avatars, state pills */

  /* ── Elevation: borders first, shadow second ───────────── */
  --ra-shadow-sm: 0 1px 2px rgba(27, 24, 20, 0.06);
  --ra-shadow: 0 2px 4px rgba(27, 24, 20, 0.05), 0 8px 24px rgba(27, 24, 20, 0.08);
  --ra-shadow-lg: 0 8px 16px rgba(27, 24, 20, 0.08), 0 24px 56px rgba(27, 24, 20, 0.16);

  /* ── Motion ─────────────────────────────────────────────── */
  --ra-dur-1: 120ms;            /* hover, press, focus */
  --ra-dur-2: 200ms;            /* state change, tab, accordion chevron */
  --ra-dur-3: 320ms;            /* panel enter, sheet, toast */
  --ra-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ra-ease-io: cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Stacking ───────────────────────────────────────────── */
  --ra-z-header: 50;
  --ra-z-bar: 60;
  --ra-z-overlay: 100;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--ra-header-h) + var(--ra-s-4));
  scroll-padding-bottom: calc(var(--ra-bar-h) + var(--ra-s-4)); /* focus never hides under sticky bars (WCAG 2.4.11) */
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--ra-bg);
  color: var(--ra-text);
  font-family: var(--ra-font);
  font-size: var(--ra-fs-body);
  line-height: var(--ra-lh-body);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;     /* prices and IDs line up */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }

h1, h2, h3 { margin: 0; color: var(--ra-ink); text-wrap: balance; }
h1 { font-size: var(--ra-fs-display); line-height: var(--ra-lh-tight); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: var(--ra-fs-h2); line-height: var(--ra-lh-heading); font-weight: 700; letter-spacing: -0.015em; }
h3 { font-size: var(--ra-fs-h3); line-height: var(--ra-lh-heading); font-weight: 700; }
p { margin: 0; max-width: var(--ra-measure); text-wrap: pretty; }
a { color: var(--ra-orange-text); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-thickness: 2.5px; }
img, svg { max-width: 100%; }

:focus-visible { outline: 3px solid var(--ra-focus); outline-offset: 2px; }
.on-dark :focus-visible { outline-color: var(--ra-focus-on-dark); }

.container { width: 100%; max-width: var(--ra-container); margin-inline: auto; padding-inline: var(--ra-gutter); }
@media (min-width: 720px)  { :root { --ra-gutter: 24px; } }
@media (min-width: 1024px) { :root { --ra-gutter: 32px; --ra-header-h: 72px; } }

.skip-link {
  position: absolute; left: var(--ra-s-3); top: -80px; z-index: var(--ra-z-overlay);
  min-height: var(--ra-hit); display: inline-flex; align-items: center; padding: 0 var(--ra-s-5);
  background: var(--ra-ink); color: var(--ra-on-dark); border-radius: var(--ra-radius-input); font-weight: 600;
}
.skip-link:focus { top: var(--ra-s-3); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
@media (forced-colors: active) {
  .btn, .input, .select, .card { border: 1px solid CanvasText; }
}

/* ── Icons ────────────────────────────────────────────────── */
.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2px; stroke-linecap: round; stroke-linejoin: round; }
.icon * { vector-effect: non-scaling-stroke; }
.icon-lg { width: 32px; height: 32px; stroke-width: 2.5px; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--ra-s-2);
  min-height: var(--ra-btn-h); padding: 0 var(--ra-s-6);
  background: var(--ra-card); color: var(--ra-ink);
  border: 1.5px solid var(--ra-line-strong); border-radius: var(--ra-radius-input);
  font: 600 var(--ra-fs-btn)/1.2 var(--ra-font); text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color var(--ra-dur-1) var(--ra-ease), border-color var(--ra-dur-1) var(--ra-ease), transform var(--ra-dur-1) var(--ra-ease);
}
.btn:hover { background: var(--ra-sunken); border-color: var(--ra-ink); }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--ra-orange); border-color: var(--ra-orange-edge); box-shadow: 0 2px 0 var(--ra-orange-edge); }
.btn-accent:hover { background: var(--ra-orange-hover); border-color: var(--ra-orange-edge); }
.btn-accent:active { background: var(--ra-orange-press); box-shadow: 0 1px 0 var(--ra-orange-edge); }
.btn-lg { min-height: var(--ra-btn-h-lg); font-size: 1.125rem; }
.btn-sm { min-height: var(--ra-hit); padding: 0 var(--ra-s-4); font-size: var(--ra-fs-label); }
.btn-block { display: flex; width: 100%; }
.btn-link {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--ra-s-2);
  min-height: var(--ra-hit); padding: 0 var(--ra-s-2);
  background: none; border: 0; color: var(--ra-orange-text);
  font: 600 var(--ra-fs-btn)/1.2 var(--ra-font); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; cursor: pointer;
}
.btn-link:hover { text-decoration-thickness: 2.5px; }

/* ── Badges and notices ───────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 12px;
  border: 1px solid var(--ra-line); border-radius: var(--ra-radius-pill);
  background: var(--ra-sunken); color: var(--ra-text-2);
  font-size: var(--ra-fs-small); font-weight: 600; line-height: 1.2; white-space: nowrap;
}
.badge-accent { background: var(--ra-orange-tint); color: var(--ra-orange-text); border-color: var(--ra-orange-tint-2); }
.badge-ok { background: var(--ra-ok-bg); color: var(--ra-ok); border-color: var(--ra-ok-line); }
.badge-warn { background: var(--ra-warn-bg); color: var(--ra-warn); border-color: var(--ra-warn-line); }

.notice {
  display: grid; grid-template-columns: 24px 1fr; gap: var(--ra-s-3);
  padding: var(--ra-s-4); border: 1px solid var(--ra-line); border-radius: var(--ra-radius-input);
  background: var(--ra-sunken); color: var(--ra-text);
}
.notice-title { font-weight: 700; }
.notice p { max-width: none; }
.notice-warn { background: var(--ra-warn-bg); border-color: var(--ra-warn-line); }
.notice-warn .icon, .notice-warn .notice-title { color: var(--ra-warn); }

/* ── Header ───────────────────────────────────────────────── */
/* Sticky bar. Once scrolled (site.js adds .is-scrolled) the inner row becomes a floating blurred pill.
   The header's total height never changes: the pill trades min-height for margin. */
.site-header {
  position: sticky; top: 0; z-index: var(--ra-z-header); display: flow-root;
  background: var(--ra-bg); border-bottom: 1px solid var(--ra-line);
  transition: background-color var(--ra-dur-3) var(--ra-ease), border-color var(--ra-dur-3) var(--ra-ease);
}
.js .site-header, .site-header.is-scrolled { background: transparent; border-bottom-color: transparent; }
.header-inner {
  --nav-inset: var(--ra-gutter);
  position: relative; display: flex; align-items: center; gap: var(--ra-s-2); min-height: var(--ra-header-h);
  border: 1px solid transparent; border-radius: var(--ra-radius-pill);
  transition: background-color var(--ra-dur-3) var(--ra-ease), border-color var(--ra-dur-3) var(--ra-ease),
    box-shadow var(--ra-dur-3) var(--ra-ease), max-width var(--ra-dur-3) var(--ra-ease),
    min-height var(--ra-dur-3) var(--ra-ease), margin var(--ra-dur-3) var(--ra-ease);
}
.site-header.is-scrolled .header-inner {
  --nav-inset: 0px;
  min-height: calc(var(--ra-header-h) - 16px); margin: var(--ra-s-2) auto; padding-inline: var(--ra-s-3);
  max-width: min(1100px, calc(100% - 2 * var(--ra-s-3)));
  background: rgba(251, 248, 244, 0.96); border-color: rgba(27, 24, 20, 0.09);
  box-shadow: 0 1px 2px rgba(27, 24, 20, 0.05), 0 12px 32px -10px rgba(27, 24, 20, 0.22);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header.is-scrolled .header-inner {
    background: rgba(251, 248, 244, 0.84);
    -webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px);
  }
}

.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: var(--ra-hit);
  color: var(--ra-ink); text-decoration: none; font-size: var(--ra-fs-btn); font-weight: 700; letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: block; flex: none; width: 36px; height: 36px; color: var(--ra-orange); line-height: 0;
}
.brand-mark svg { display: block; width: 100%; height: 100%; }
/* Narrow phones: mark only, so Get started and Menu always fit. The link keeps its aria-label. */
.brand-word { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: var(--ra-s-2); }
.header-login { display: none; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: var(--ra-s-2); min-height: var(--ra-hit); padding: 0 var(--ra-s-3);
  background: var(--ra-card); color: var(--ra-ink); border: 1.5px solid var(--ra-line-strong); border-radius: var(--ra-radius-input);
  font: 600 var(--ra-fs-label)/1.2 var(--ra-font); cursor: pointer;
  transition: background-color var(--ra-dur-1) var(--ra-ease), border-color var(--ra-dur-1) var(--ra-ease);
}
.nav-toggle:hover { background: var(--ra-sunken); border-color: var(--ra-ink); }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.site-nav {
  display: none; position: absolute; left: var(--nav-inset); right: var(--nav-inset); top: calc(100% + var(--ra-s-2));
  background: var(--ra-bg); border: 1px solid var(--ra-line); border-radius: var(--ra-radius-xl);
  box-shadow: var(--ra-shadow);
  padding: var(--ra-s-1) var(--ra-s-4) var(--ra-s-2);
}
.site-nav.is-open { display: block; }
.nav-links { list-style: none; margin: 0 auto; padding: 0; max-width: var(--ra-container); }
.nav-links a {
  display: flex; align-items: center; min-height: 52px; padding: 0 var(--ra-s-1);
  border-bottom: 1px solid var(--ra-line); color: var(--ra-ink); font-size: var(--ra-fs-label); font-weight: 600; text-decoration: none;
}
.nav-links a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.nav-links a[aria-current="page"] { text-decoration: underline; }
.nav-links .nav-login a { border-bottom: 0; }

@media (min-width: 480px) {
  .brand-word { position: static !important; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
}
@media (min-width: 720px) {
  .header-login { display: inline-flex; }
  .nav-links .nav-login { display: none; }
  .site-header.is-scrolled .header-inner { padding-inline: var(--ra-s-4); }
}
@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: block; position: static; background: none; border: 0; border-radius: 0; box-shadow: none; padding: 0;
    margin-left: var(--ra-s-6);
  }
  .nav-links { display: flex; gap: var(--ra-s-1); max-width: none; }
  .nav-links a { border: 0; padding: 0 var(--ra-s-3); min-height: var(--ra-hit); }
}
@media (forced-colors: active) {
  .site-header.is-scrolled .header-inner { border-color: CanvasText; }
}

/* ── Sections ─────────────────────────────────────────────── */
.section { padding-block: var(--ra-section-y); }
.section-sunken { background: var(--ra-sunken); border-block: 1px solid var(--ra-line); }
.section-compact { padding-block: var(--ra-s-8); }
.section-flush-top { padding-top: 0; }
.section-head { display: grid; gap: var(--ra-s-3); margin-bottom: var(--ra-s-6); }
.section-sub { color: var(--ra-text-2); font-size: var(--ra-fs-lead); line-height: 1.5; }
.fineprint { color: var(--ra-muted); font-size: var(--ra-fs-small); line-height: 1.4; }

/* Scroll reveal: only hidden when site.js can reveal it (the .js class is set in <head>). */
.js .reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity 600ms var(--ra-ease), transform 600ms var(--ra-ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero { position: relative; padding-block: var(--ra-s-6) var(--ra-s-9); }
.hero-bg { position: absolute; inset: calc(-1 * var(--ra-header-h)) 0 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; width: 300px; height: 300px; border-radius: 50%; filter: blur(36px); }
.blob-a {
  left: -170px; top: 90px; opacity: 0.2;
  background: radial-gradient(circle, #ff6b1a 0%, rgba(255, 107, 26, 0) 68%);
}
.blob-b {
  right: -190px; top: 420px; opacity: 0.3;
  background: radial-gradient(circle, #ffb27d 0%, rgba(255, 178, 125, 0) 68%);
}
.hero-inner { position: relative; z-index: 1; display: grid; justify-items: center; gap: var(--ra-s-7); }
.hero-copy { display: grid; justify-items: center; gap: var(--ra-s-4); max-width: 880px; text-align: center; }
.stat-pill {
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--ra-s-1) var(--ra-s-2);
  padding: 7px 16px; background: rgba(255, 255, 255, 0.78); border: 1px solid var(--ra-orange-tint-2);
  border-radius: var(--ra-radius-pill); box-shadow: var(--ra-shadow-sm);
  color: var(--ra-ink); font-size: 0.9375rem; font-weight: 600; line-height: 1.3;
}
.stat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ra-orange); }
.stat-sep { display: none; color: var(--ra-muted); }
.hero h1 { font-size: clamp(2.375rem, 1.6rem + 3.8vw, 4.5rem); letter-spacing: -0.03em; }
.h1-accent { display: block; color: var(--ra-orange-text); }
.lead { font-size: var(--ra-fs-lead); line-height: 1.5; color: var(--ra-text-2); max-width: 40em; }
.hero-cta { display: grid; gap: var(--ra-s-3); width: 100%; max-width: 360px; margin-top: var(--ra-s-2); }
.trust-row {
  list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center;
  gap: var(--ra-s-1) var(--ra-s-5);
}
.trust-row li {
  display: flex; align-items: center; gap: var(--ra-s-2); font-size: var(--ra-fs-label); font-weight: 600;
  color: var(--ra-ink);
}
.trust-row .icon { color: var(--ra-ok); width: 20px; height: 20px; }
.hero-note { color: var(--ra-muted); font-size: var(--ra-fs-small); line-height: 1.4; max-width: 52ch; }

/* Product film: large white frame around a 16:10 loop. */
.hero-film {
  width: 100%; max-width: 1040px; margin: 0; padding: var(--ra-s-2);
  background: var(--ra-card); border: 1px solid var(--ra-line); border-radius: 20px;
  box-shadow: 0 1px 2px rgba(27, 24, 20, 0.06), 0 12px 24px -8px rgba(27, 24, 20, 0.12),
    0 40px 80px -24px rgba(166, 63, 4, 0.28);
}
.hero-film .media-frame { border-radius: 12px; }

/* Looping clips: the box holds its aspect ratio so a missing poster or file never shifts the layout. */
.media-frame {
  position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--ra-radius);
  background: linear-gradient(135deg, var(--ra-sunken) 0%, var(--ra-orange-tint) 100%);
}
.media-16x10 { aspect-ratio: 16 / 10; }
.loop-video {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  object-fit: cover; background: transparent;
}
.video-toggle {
  position: absolute; right: var(--ra-s-3); bottom: var(--ra-s-3); z-index: 2;
  display: grid; place-items: center; width: var(--ra-hit); height: var(--ra-hit); padding: 0;
  background: rgba(255, 255, 255, 0.92); color: var(--ra-ink);
  border: 1.5px solid var(--ra-line-strong); border-radius: 50%; cursor: pointer;
  box-shadow: 0 1px 3px rgba(27, 24, 20, 0.16);
  transition: background-color var(--ra-dur-1) var(--ra-ease), border-color var(--ra-dur-1) var(--ra-ease);
}
.video-toggle:hover { background: var(--ra-card); border-color: var(--ra-ink); }
.video-toggle .icon-play, .video-toggle[data-state="paused"] .icon-pause { display: none; }
.video-toggle[data-state="paused"] .icon-play { display: block; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes ra-rise { from { opacity: 0; transform: translateY(14px); } }
  .hero-copy > * { animation: ra-rise 700ms var(--ra-ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: 70ms; }
  .hero-copy > :nth-child(3) { animation-delay: 140ms; }
  .hero-copy > :nth-child(4) { animation-delay: 210ms; }
  .hero-copy > :nth-child(n+5) { animation-delay: 280ms; }
  .hero-film { animation: ra-rise 900ms var(--ra-ease) 320ms both; }
}

@media (min-width: 480px) {
  .hero-cta { display: flex; flex-wrap: wrap; justify-content: center; max-width: none; }
  .stat-sep { display: inline; }
}
@media (min-width: 720px) {
  .hero { padding-block: var(--ra-s-9) var(--ra-s-11); }
  .hero-inner { gap: var(--ra-s-9); }
  .blob { width: 520px; height: 520px; filter: blur(48px); }
  .blob-a { left: -200px; top: 60px; opacity: 0.3; }
  .blob-b { right: -220px; top: 360px; opacity: 0.5; }
  .hero-film { padding: var(--ra-s-3); border-radius: 28px; }
  .hero-film .media-frame { border-radius: 16px; }
}

/* ── How it works ─────────────────────────────────────────── */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ra-s-3); }
.step {
  display: grid; grid-template-columns: auto 1fr; gap: 2px var(--ra-s-4); align-items: start;
  padding: var(--ra-s-4) var(--ra-s-5); background: var(--ra-card); border: 1px solid var(--ra-line); border-radius: var(--ra-radius);
}
.step-num {
  grid-row: 1 / span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--ra-radius-pill);
  background: var(--ra-orange); color: var(--ra-ink); font-size: var(--ra-fs-btn); font-weight: 800;
}
.step h3 { font-size: 1.125rem; align-self: end; }
.step p { color: var(--ra-text-2); font-size: var(--ra-fs-label); }
.after-steps {
  display: grid; grid-template-columns: 24px 1fr; gap: var(--ra-s-3); align-items: start; margin-top: var(--ra-s-4);
  padding: var(--ra-s-4); background: var(--ra-ok-bg); border: 1px solid var(--ra-ok-line); border-radius: var(--ra-radius-input);
  color: var(--ra-text); font-weight: 600; font-size: var(--ra-fs-label);
}
.after-steps .icon { color: var(--ra-ok); }

@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ra-s-6); }
  .step { grid-template-columns: 1fr; gap: var(--ra-s-3); padding: var(--ra-s-6); }
  .step-num { grid-row: auto; }
  .step h3 { align-self: auto; font-size: var(--ra-fs-h3); }
}

/* ── What they get: bento grid ────────────────────────────── */
.bento { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ra-s-4); }
.bento-card {
  display: flex; flex-direction: column; gap: var(--ra-s-3); padding: var(--ra-s-5);
  background: linear-gradient(160deg, var(--ra-card) 42%, var(--ra-orange-tint) 190%);
  border: 1px solid var(--ra-line); border-radius: var(--ra-radius-xl);
  transition: transform var(--ra-dur-3) var(--ra-ease), box-shadow var(--ra-dur-3) var(--ra-ease),
    border-color var(--ra-dur-3) var(--ra-ease);
}
.bento-text { display: grid; gap: var(--ra-s-3); align-content: start; }
.bento-card p { color: var(--ra-text-2); font-size: var(--ra-fs-label); line-height: 1.45; }
.bento-lg .media-frame { margin-top: auto; border: 1px solid var(--ra-line); }
.feature-icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--ra-radius-input);
  background: var(--ra-orange-tint); color: var(--ra-orange-text);
}
.chips {
  list-style: none; margin: auto 0 0; padding: var(--ra-s-1) 0 0; display: flex; flex-wrap: wrap; gap: var(--ra-s-2);
}
.chip {
  padding: 6px 12px; background: var(--ra-card); border: 1px solid var(--ra-line); border-radius: 16px;
  box-shadow: var(--ra-shadow-sm); color: var(--ra-text-2); font-size: var(--ra-fs-small); font-weight: 600;
  line-height: 1.3;
}
.chip-accent { background: var(--ra-orange-tint); border-color: var(--ra-orange-tint-2); color: var(--ra-orange-text); }
.section-note { margin-top: var(--ra-s-5); }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .bento-card:hover {
    transform: translateY(-4px); border-color: var(--ra-orange-tint-2);
    box-shadow: 0 2px 4px rgba(27, 24, 20, 0.05), 0 20px 40px -14px rgba(166, 63, 4, 0.25);
  }
}
@media (min-width: 720px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ra-s-6); }
  .bento-card { padding: var(--ra-s-6); }
}
@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bento-lg { grid-column: span 2; }
}

/* ── Example message ──────────────────────────────────────── */
.example-panel { margin-top: var(--ra-s-7); padding: var(--ra-s-5); background: var(--ra-sunken); border: 1px solid var(--ra-line); border-radius: var(--ra-radius-xl); display: grid; gap: var(--ra-s-3); }
.example-panel .fineprint { max-width: none; }
.thread { display: grid; gap: var(--ra-s-3); max-width: 720px; }
.msg { padding: var(--ra-s-4) var(--ra-s-5); border: 1px solid var(--ra-line); border-radius: var(--ra-radius); background: var(--ra-card); display: grid; gap: var(--ra-s-1); }
.msg-in { background: var(--ra-orange-tint); border-color: var(--ra-orange-tint-2); }
.msg-from { font-size: var(--ra-fs-small); font-weight: 700; color: var(--ra-text-2); }
.msg p:not(.msg-from) { font-size: var(--ra-fs-label); max-width: none; }
.msg-end { font-weight: 600; }
.example-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ra-s-2) var(--ra-s-3); }
.example-head h2 { font-size: var(--ra-fs-h3); letter-spacing: 0; }

@media (min-width: 720px) {
  .msg-in { justify-self: end; width: min(100%, 520px); }
  .msg-out { width: min(100%, 620px); }
}

/* ── Pricing ──────────────────────────────────────────────── */
.includes { list-style: none; margin: 0 0 var(--ra-s-5); padding: 0; display: flex; flex-wrap: wrap; gap: var(--ra-s-1) var(--ra-s-5); }
.includes li { display: inline-flex; align-items: center; gap: var(--ra-s-2); min-height: 32px; font-size: var(--ra-fs-label); font-weight: 600; color: var(--ra-ink); }
.includes .icon { color: var(--ra-ok); width: 20px; height: 20px; }

.pricing-card { max-width: 720px; display: grid; gap: var(--ra-s-4); }
.pricing-picker { display: grid; gap: var(--ra-s-2); }
.pricing-picker-label { font-size: var(--ra-fs-label); font-weight: 700; color: var(--ra-ink); }
.pricing-picker-select {
  height: var(--ra-hit); font-family: inherit; font-size: var(--ra-fs-label); color: var(--ra-ink);
  background: var(--ra-card); border: 1px solid var(--ra-line); border-radius: var(--ra-radius);
  padding: 0 var(--ra-s-3); max-width: 360px; width: 100%;
}
.pricing-picker-select:focus-visible { outline: 2px solid var(--ra-accent); outline-offset: 2px; }

.plan {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--ra-s-1) var(--ra-s-4); align-items: center;
  padding: var(--ra-s-5); background: var(--ra-card); border: 1px solid var(--ra-line);
  border-radius: var(--ra-radius);
}
.plan-featured {
  border: 2px solid var(--ra-orange-edge); background: var(--ra-orange-tint);
  padding: calc(var(--ra-s-5) - 1px);
}
.plan-info { display: grid; gap: 2px; align-content: start; }
.plan-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ra-s-2) var(--ra-s-3); }
.plan-name {
  font-size: var(--ra-fs-h3); line-height: var(--ra-lh-heading); font-weight: 700; color: var(--ra-ink); margin: 0;
}
.plan-price {
  max-width: none; font-size: var(--ra-fs-price); line-height: 1.05; font-weight: 800;
  letter-spacing: -0.02em; color: var(--ra-ink); margin-top: var(--ra-s-1); white-space: nowrap;
}
.plan-stamps { font-size: var(--ra-fs-label); font-weight: 700; color: var(--ra-ink); margin-top: var(--ra-s-1); }
.plan-breakdown { font-size: var(--ra-fs-small); color: var(--ra-text-2); line-height: 1.4; margin-top: 2px; }
.plan-fees {
  max-width: none; font-size: var(--ra-fs-small); line-height: 1.4; color: var(--ra-text-2); margin-top: var(--ra-s-1);
}
.plan-extra-info {
  font-size: var(--ra-fs-small); line-height: 1.4; color: var(--ra-text-2); margin-top: var(--ra-s-2);
}
.pricing-other {
  list-style: none; margin: var(--ra-s-3) 0 0; padding: var(--ra-s-3) 0 0;
  border-top: 1px solid var(--ra-line); display: grid; gap: var(--ra-s-2);
}
.pricing-other li { font-size: var(--ra-fs-label); color: var(--ra-text-2); }
.pricing-unavailable {
  padding: var(--ra-s-5); background: var(--ra-card); border: 1px solid var(--ra-line);
  border-radius: var(--ra-radius); display: grid; gap: var(--ra-s-3); align-items: start; max-width: 720px;
}
.pricing-unavailable[hidden], .plan[hidden], [hidden] { display: none !important; }
.pricing-unavailable-text { font-size: var(--ra-fs-body); color: var(--ra-ink); margin: 0; }
.plan .btn { grid-column: 2; grid-row: 1; min-width: 112px; }

@media (max-width: 540px) {
  .plan { grid-template-columns: 1fr; }
  .plan .btn { grid-column: 1; grid-row: auto; width: 100%; margin-top: var(--ra-s-3); }
}

/* ── Trust strip ──────────────────────────────────────────── */
.trust-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--ra-s-5); }
.trust-item { display: grid; grid-template-columns: 24px 1fr; gap: var(--ra-s-3); align-items: start; }
.trust-item .icon { color: var(--ra-ok); margin-top: 2px; }
.trust-item strong { display: block; color: var(--ra-ink); font-size: var(--ra-fs-label); line-height: 1.35; }
.trust-item span { display: block; color: var(--ra-text-2); font-size: var(--ra-fs-label); line-height: 1.45; }
.trust-item a { display: inline-flex; align-items: center; min-height: var(--ra-hit); overflow-wrap: anywhere; }
@media (min-width: 720px) {
  .trust-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ra-s-6); }
}

/* ── FAQ ──────────────────────────────────────────────────── */
.faq-list { background: var(--ra-card); border: 1px solid var(--ra-line); border-radius: var(--ra-radius); overflow: hidden; max-width: 820px; }
.faq-item + .faq-item { border-top: 1px solid var(--ra-line); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--ra-s-4);
  min-height: 56px; padding: var(--ra-s-4) var(--ra-s-5); cursor: pointer; list-style: none;
  color: var(--ra-ink); font-size: var(--ra-fs-btn); font-weight: 700; line-height: 1.3;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--ra-bg); }
.faq-item summary:focus-visible { outline-offset: -3px; }
.faq-item .chev { transition: transform var(--ra-dur-2) var(--ra-ease); color: var(--ra-orange-text); }
.faq-item[open] .chev { transform: rotate(180deg); }
.faq-body { display: grid; gap: var(--ra-s-3); padding: 0 var(--ra-s-5) var(--ra-s-5); color: var(--ra-text-2); font-size: var(--ra-fs-label); line-height: 1.55; }
.faq-body p { max-width: var(--ra-measure); }

/* ── Final call to action ─────────────────────────────────── */
.cta-section { padding-block: 0 var(--ra-section-y); }
.cta-card {
  display: grid; justify-items: center; gap: var(--ra-s-3); text-align: center;
  padding: var(--ra-s-8) var(--ra-s-5); background: var(--ra-orange-tint); border: 1px solid var(--ra-orange-tint-2); border-radius: var(--ra-radius-xl);
}
.cta-card p { color: var(--ra-text-2); font-size: var(--ra-fs-lead); }
.cta-card .btn { margin-top: var(--ra-s-3); }
@media (min-width: 720px) { .cta-card { padding: var(--ra-s-10) var(--ra-s-8); } }

/* ── Footer (the page's one dark band) ────────────────────── */
.site-footer { background: var(--ra-ink); color: var(--ra-on-dark-2); padding-block: var(--ra-s-9) var(--ra-s-6); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ra-s-5) var(--ra-s-5); }
.footer-about, .footer-help { grid-column: 1 / -1; }
.footer-about { display: grid; gap: var(--ra-s-3); align-content: start; }
.site-footer .brand { color: var(--ra-on-dark); }
.site-footer .brand-word { position: static !important; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
.footer-about p { font-size: var(--ra-fs-label); color: var(--ra-on-dark-2); }
.footer-title { color: var(--ra-on-dark); font-size: var(--ra-fs-label); font-weight: 700; letter-spacing: 0; line-height: 1.3; margin-bottom: var(--ra-s-1); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links a {
  display: inline-flex; align-items: center; min-height: var(--ra-hit); padding-block: var(--ra-s-1);
  color: var(--ra-on-dark); font-size: var(--ra-fs-label); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere;
}
.footer-legal { margin-top: var(--ra-s-7); padding-top: var(--ra-s-5); border-top: 1px solid var(--ra-line-dark); color: var(--ra-on-dark-3); font-size: var(--ra-fs-small); line-height: 1.4; max-width: none; }
.footer-disclaimer {
  margin-top: var(--ra-s-2); color: var(--ra-on-dark-3); font-size: var(--ra-fs-small); line-height: 1.4;
  max-width: none;
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--ra-s-8); }
  .footer-about, .footer-help { grid-column: auto; }
}

/* ── Legal pages ──────────────────────────────────────────── */
.page-main { padding-block: var(--ra-s-8) var(--ra-section-y); }
.prose { max-width: 720px; display: grid; gap: var(--ra-s-5); }
.prose .notice { margin-top: var(--ra-s-1); }
.prose h1 { font-size: clamp(1.875rem, 1.5rem + 1.6vw, 2.5rem); }
.legal-section { display: grid; gap: var(--ra-s-3); padding-top: var(--ra-s-6); border-top: 1px solid var(--ra-line); }
.legal-section h2 { font-size: var(--ra-fs-h3); line-height: var(--ra-lh-heading); letter-spacing: 0; }
.legal-section .badge { justify-self: start; }
.legal-section ul { margin: 0; padding-left: var(--ra-s-6); display: grid; gap: var(--ra-s-2); max-width: var(--ra-measure); }
.prose a { overflow-wrap: anywhere; }

/* ── 404 ──────────────────────────────────────────────────── */
.notfound { display: grid; justify-items: start; gap: var(--ra-s-4); padding-block: var(--ra-s-10); }
.notfound-icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: var(--ra-radius-pill); background: var(--ra-orange-tint); color: var(--ra-orange-text); }
.notfound-icon .icon { width: 40px; height: 40px; }
.notfound-cta { display: flex; flex-wrap: wrap; gap: var(--ra-s-3); margin-top: var(--ra-s-2); }
@media (min-width: 720px) {
  .notfound { justify-items: center; text-align: center; }
  .notfound p { margin-inline: auto; }
  .notfound-cta { justify-content: center; }
}
@media (max-width: 479px) {
  .notfound-cta { width: 100%; }
  .notfound-cta .btn { width: 100%; }
}
@media (max-width: 540px) {
  .plan-price { font-size: 2.25rem; white-space: normal; }
}
