/* Ondesta — shared stylesheet. All colours live in the two token blocks below. */

/* Inter, self-hosted. Put the four .woff2 files in /assets/fonts/ (see README.txt). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/Inter-Medium.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/Inter-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/Inter-Bold.woff2") format("woff2"); }

/* ---------- Colour tokens: LIGHT ---------- */
:root {
  color-scheme: light dark;
  --bg: #F7F9F8;
  --surface: #FFFFFF;
  --surface-muted: #ECF1EE;
  --border-subtle: #D8E0DC;
  --border-strong: #6E7A75;
  --text: #17211D;
  --text-2: #5F6C66;
  --title: #056244;
  --primary: #087A55;
  --on-primary: #FFFFFF;
  --primary-pressed: #056244;
  --focus: #05402D;
  --info: #1D4ED8;
  --error: #B3261E;

  --ring-safe: #087A55;
  --ring-due: #64748B;
  --ring-aside: #8B8676;
  --ring-savings: #94800F;
  --ring-track: #EDF1EF;

  --cat-teal: #1E8A84;
  --cat-indigo: #5B5FC7;
  --cat-amber: #A8741A;
  --cat-sky: #2B7FB8;
  --cat-plum: #9A4FA3;
  --cat-sand: #8F6E4A;
  --cat-other: #64748B;
  --month-bar: #5F6C66;
  --key: #ECF1EE;
  --key-action: #DCEBE4;
  --on-key-action: #056244;

  /* Brand panel (section "on your phone") */
  --panel: #056244;
  --on-panel: #F7F9F8;
  --panel-accent: #F7F9F8;

  --shadow-card: 0 1px 2px rgba(23, 33, 29, .05), 0 30px 60px -30px rgba(23, 33, 29, .22);
  --glow: rgba(8, 122, 85, .07);
}

/* ---------- Colour tokens: DARK ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D1110;
    --surface: #171C1A;
    --surface-muted: #222927;
    --border-subtle: #303936;
    --border-strong: #7E8B86;
    --text: #F3F7F5;
    --text-2: #AAB5B0;
    --title: #73D7AE;
    --primary: #73D7AE;
    --on-primary: #082018;
    --primary-pressed: #98E5C5;
    --focus: #9BE8C6;
    --info: #60A5FA;
    --error: #FF9E97;

    --ring-safe: #73D7AE;
    --ring-due: #94A3B8;
    --ring-aside: #8E8A7D;
    --ring-savings: #D4B83A;
    --ring-track: #242B29;

    --cat-teal: #5CC4BE;
    --cat-indigo: #9295EC;
    --cat-amber: #E0A84F;
    --cat-sky: #62B3E6;
    --cat-plum: #C88BCF;
    --cat-sand: #C9A57F;
    --cat-other: #94A3B8;
    --month-bar: #8A9691;
    --key: #222927;
    --key-action: #1E3A30;
    --on-key-action: #73D7AE;

    --panel: #171C1A;
    --on-panel: #F3F7F5;
    --panel-accent: #73D7AE;

    --shadow-card: inset 0 1px 0 rgba(255, 255, 255, .04), 0 40px 80px -40px rgba(0, 0, 0, .8);
    --glow: rgba(115, 215, 174, .06);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 24px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-pressed); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, p, li, dd { text-wrap: pretty; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--surface); color: var(--text); padding: 10px 16px; border-radius: 10px;
  border: 1px solid var(--border-strong);
}
.skip:focus { top: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px); }
.section { padding-block: clamp(96px, 14vw, 180px); }

/* Type */
.eyebrow { font-size: 15px; line-height: 20px; font-weight: 500; color: var(--title); }
.h2 { font-size: clamp(34px, 5vw, 56px); line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; }
.h3 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }
.lead { font-size: clamp(19px, 1.8vw, 21px); line-height: 1.5; color: var(--text-2); max-width: 34em; }
.caption { font-size: 13px; line-height: 18px; color: var(--text-2); }
.stack > * + * { margin-top: var(--gap, 20px); }

.tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; line-height: 18px; font-weight: 500;
  color: var(--text-2); background: var(--surface-muted);
  border-radius: 999px; padding: 4px 10px;
}
.tag--example::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); }

.card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
}
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: currentColor; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; place-items: center;
  padding-block: 96px; isolation: isolate; overflow: clip;
}
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 90%; z-index: -2;
  background: radial-gradient(closest-side, var(--glow), transparent);
}
.hero-mark {
  position: absolute; z-index: -1; width: min(130vw, 1100px); aspect-ratio: 1;
  right: max(-45vw, -420px); top: 50%; translate: 0 -50%;
  fill: var(--surface-muted); opacity: .7;
}
.hero-inner { display: grid; justify-items: center; text-align: center; gap: 28px; }
.hero h1 { line-height: 0; }
.lockup { width: clamp(220px, 44vw, 420px); height: auto; }
.hero-line {
  font-size: clamp(34px, 6.4vw, 76px); line-height: 1.04; font-weight: 700; letter-spacing: -0.035em;
  max-width: 12em;
}
.hero-sub { font-size: clamp(18px, 1.8vw, 21px); line-height: 1.5; color: var(--text-2); max-width: 30em; margin-top: -8px; }
.status {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 15px; line-height: 20px; font-weight: 500; color: var(--text-2);
  border: 1px solid var(--border-subtle); background: var(--surface);
  border-radius: 999px; padding: 8px 16px 8px 12px; white-space: nowrap;
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.scroll-cue { position: absolute; bottom: 32px; left: 50%; translate: -50% 0; width: 1px; height: 48px; background: linear-gradient(var(--border-strong), transparent); }

/* ---------- Split (Home ring) ---------- */
.split-grid { display: grid; gap: 56px; align-items: center; }
.split-text { max-width: 30em; }
.ring-card { padding: clamp(20px, 3vw, 32px); max-width: 440px; width: 100%; justify-self: center; }
.ring-card__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ring-card__title { font-size: 20px; line-height: 25px; font-weight: 600; }
.ring { position: relative; width: min(100%, 300px); margin: 12px auto 16px; aspect-ratio: 1; }
.ring svg { width: 100%; height: 100%; }
.ring circle { fill: none; stroke-width: 9; }
.ring .track { stroke: var(--ring-track); }
/* Segment lengths are set on the SVG itself (r=84, circumference 527.79, 2-unit gaps). */
.ring .seg { stroke-linecap: butt; transform-box: view-box; transform-origin: 100px 100px; }
.ring .seg-safe { stroke: var(--ring-safe); }
.ring .seg-due { stroke: var(--ring-due); }
.ring .seg-savings { stroke: var(--ring-savings); }
.ring__center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 2px; }
.ring__label { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; line-height: 20px; color: var(--text-2); }
.ring__label .dot { color: var(--ring-safe); width: 9px; height: 9px; }
.ring__amount { font-size: clamp(26px, 3.4vw, 32px); line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
.ring-note { font-size: 13px; line-height: 18px; color: var(--text-2); margin-bottom: 8px; }
.legend li { display: flex; align-items: center; gap: 12px; padding-block: 14px; border-top: 1px solid var(--border-subtle); }
.legend li:first-child { border-top: 0; }
.legend .name { flex: 1; min-width: 0; }
.legend .name small { display: block; font-size: 13px; line-height: 18px; color: var(--text-2); }
.legend .amt { font-weight: 600; }
.legend .due .dot { color: var(--ring-due); }
.legend .savings .dot { color: var(--ring-savings); }
.figure-note { margin-top: 16px; font-size: 13px; line-height: 18px; color: var(--text-2); text-align: center; }

/* ---------- Features ---------- */
.features { display: grid; gap: clamp(96px, 14vw, 180px); }
.feature { display: grid; gap: 40px; align-items: center; }
.feature-text { max-width: 26em; }
.feature-text p { color: var(--text-2); font-size: 19px; line-height: 1.5; }
.visual { position: relative; display: grid; place-items: center; padding-block: 8px; }
.mini { width: 100%; max-width: 400px; padding: 22px; position: relative; z-index: 1; }
.mini__title { font-size: 15px; line-height: 20px; font-weight: 500; color: var(--title); }
.mini__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }

/* Quick add */
.seg { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.seg span { white-space: nowrap; font-size: 15px; line-height: 20px; font-weight: 500; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border-subtle); color: var(--text-2); }
.seg .on { border-color: var(--primary); color: var(--text); }
.field-label { font-size: 13px; line-height: 18px; color: var(--text-2); margin-bottom: 6px; }
.field { border: 1px solid var(--border-strong); border-radius: 12px; padding: 12px 14px; font-size: 20px; line-height: 28px; font-weight: 600; display: flex; align-items: center; min-height: 54px; }
.field .typed { display: inline-block; white-space: nowrap; overflow: hidden; vertical-align: bottom; }
.field .caret { width: 2px; height: 24px; background: var(--primary); margin-left: 2px; flex: none; }
.hint { font-size: 13px; line-height: 18px; color: var(--text-2); margin: 8px 0 16px; }
.keys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.keys span { display: grid; place-items: center; height: 44px; border-radius: 10px; background: var(--key); font-size: 17px; font-weight: 500; }
.keys .op { background: var(--key-action); color: var(--on-key-action); font-weight: 600; }

/* Where it went */
.cats li { padding-block: 12px; border-top: 1px solid var(--border-subtle); }
.cats li:first-child { border-top: 0; }
.cats .row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.cats .row b { font-weight: 600; }
.cats small { font-size: 13px; line-height: 18px; color: var(--text-2); }
.bar { height: 6px; border-radius: 3px; background: var(--surface-muted); margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; min-width: 4px; border-radius: 3px; background: currentColor; transform-origin: left center; }
.bar.c-teal i { background: var(--cat-teal); } .bar.c-amber i { background: var(--cat-amber); } .bar.c-indigo i { background: var(--cat-indigo); }
.bar.c-sky i { background: var(--cat-sky); } .bar.c-plum i { background: var(--cat-plum); } .bar.c-sand i { background: var(--cat-sand); }
.c-teal { color: var(--cat-teal); } .c-indigo { color: var(--cat-indigo); } .c-amber { color: var(--cat-amber); }
.c-sky { color: var(--cat-sky); } .c-plum { color: var(--cat-plum); } .c-sand { color: var(--cat-sand); }
.moved { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--border-subtle); display: flex; justify-content: space-between; gap: 16px; }
.moved small { display: block; font-size: 13px; line-height: 18px; color: var(--text-2); }
.pill {
  position: absolute; z-index: 0; display: none; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-card);
  border-radius: 999px; padding: 8px 14px; font-size: 15px; line-height: 20px; font-weight: 500;
}
.pill .dot { width: 8px; height: 8px; }

/* Plan */
.forecast { background: var(--surface-muted); border-radius: 14px; padding: 12px 14px; font-size: 13px; line-height: 18px; color: var(--text-2); margin-bottom: 8px; }
.plan li { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; padding-block: 12px; border-top: 1px solid var(--border-subtle); }
.plan li:first-child { border-top: 0; }
.plan .date { grid-column: 1 / -1; font-size: 13px; line-height: 18px; color: var(--text-2); }
.plan .ico { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-muted); display: grid; place-items: center; }
.plan .ico .dot { width: 8px; height: 8px; }
.plan .out { color: var(--text-2); font-weight: 600; }
.plan .in { font-weight: 600; }

/* ---------- On your phone (panel) ---------- */
.panel-wrap { padding-inline: clamp(8px, 2vw, 24px); }
.panel {
  background: var(--panel); color: var(--on-panel);
  border-radius: clamp(24px, 4vw, 40px);
  padding-block: clamp(80px, 12vw, 160px);
  position: relative; overflow: clip; isolation: isolate;
}
.panel .h2 { color: var(--panel-accent); max-width: 11em; }
.panel-mark { position: absolute; z-index: -1; width: min(90vw, 760px); aspect-ratio: 1; left: 50%; bottom: -40%; translate: -50% 0; fill: var(--on-panel); opacity: .05; }
.facts { margin-top: clamp(40px, 6vw, 72px); display: grid; gap: 0; max-width: 760px; }
.facts li { padding-block: 22px; border-top: 1px solid color-mix(in srgb, var(--on-panel) 22%, transparent); font-size: clamp(20px, 2.4vw, 26px); line-height: 1.35; font-weight: 500; letter-spacing: -0.01em; }
.facts li small { display: block; margin-top: 8px; font-size: 17px; line-height: 24px; font-weight: 400; letter-spacing: 0; }
.facts li:last-child { border-bottom: 1px solid color-mix(in srgb, var(--on-panel) 22%, transparent); }

/* ---------- Backup ---------- */
.backup-grid { display: grid; gap: 56px; align-items: center; }
.steps { counter-reset: s; display: grid; gap: 16px; margin-top: 32px; }
.steps li { counter-increment: s; display: flex; gap: 16px; align-items: baseline; font-size: 19px; line-height: 1.4; }
.steps li::before { content: counter(s); flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; font-weight: 600; background: var(--surface-muted); color: var(--title); translate: 0 6px; }
.transfer { position: relative; display: flex; justify-content: space-between; align-items: end; max-width: 460px; width: 100%; margin-inline: auto; padding-top: 72px; }
.phone { width: clamp(110px, 30vw, 156px); aspect-ratio: 9 / 19; border: 1.5px solid var(--border-strong); border-radius: 26px; background: var(--surface); display: grid; place-items: center; position: relative; box-shadow: var(--shadow-card); }
.phone::before { content: ""; position: absolute; top: 10px; left: 50%; translate: -50% 0; width: 34%; height: 9px; border-radius: 6px; background: var(--surface-muted); }
.phone svg { width: 36%; fill: var(--title); }
.phone--new svg { fill: var(--border-subtle); }
.phone-label { position: absolute; bottom: -32px; left: 0; right: 0; text-align: center; font-size: 13px; line-height: 18px; color: var(--text-2); }
.file {
  position: absolute; top: 0; left: calc(50% - 64px); width: 128px;
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--border-subtle); border-radius: 14px; box-shadow: var(--shadow-card);
  font-size: 13px; line-height: 18px; font-weight: 500;
}
.file::before { content: ""; width: 16px; height: 20px; border-radius: 3px; border: 1.5px solid var(--primary); flex: none; }
.transfer-path { position: absolute; top: 20px; left: 15%; right: 15%; border-top: 1.5px dashed var(--border-subtle); }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; gap: 48px; }
.faq { border-top: 1px solid var(--border-subtle); }
.faq details { border-bottom: 1px solid var(--border-subtle); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding-block: 22px; font-size: 19px; line-height: 1.35; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2);
  rotate: 45deg; translate: 0 -3px; transition: rotate .35s ease, translate .35s ease;
}
.faq details[open] summary::after { rotate: 225deg; translate: 0 3px; }
.faq summary:hover { color: var(--title); }
.faq .answer { padding-bottom: 24px; color: var(--text-2); max-width: 36em; }
.faq .answer p + p { margin-top: 10px; }

/* ---------- Header / footer (shared) ---------- */
.site-header { padding-block: 24px; }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.site-header .lockup { width: 140px; }
.nav { display: flex; gap: 24px; flex-wrap: wrap; }
.nav a { color: var(--text-2); text-decoration: none; font-size: 15px; line-height: 20px; font-weight: 500; padding-block: 12px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.site-footer { border-top: 1px solid var(--border-subtle); padding-block: 48px 56px; }
.site-footer .wrap { display: grid; gap: 28px; }
.site-footer .lockup { width: 120px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-links a { color: var(--text); text-decoration: none; font-size: 15px; line-height: 20px; font-weight: 500; padding-block: 12px; }
.footer-links a:hover { color: var(--title); text-decoration: underline; }

/* ---------- Inner pages ---------- */
.page { padding-block: clamp(48px, 8vw, 96px) clamp(96px, 12vw, 160px); }
.page-title { font-size: clamp(34px, 5vw, 52px); line-height: 1.08; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 32px; }
.prose { max-width: 680px; }
.prose h2 { font-size: 20px; line-height: 25px; font-weight: 600; margin: 40px 0 12px; }
.prose h3 { font-size: 17px; line-height: 24px; font-weight: 600; margin: 28px 0 6px; }
.prose p, .prose ul, .prose ol { margin-bottom: 16px; }
.prose li + li { margin-top: 8px; }
.prose > .caption:first-child { margin-bottom: 8px; }
.prose > h2:first-of-type { margin-top: 24px; }
.prose ul { list-style: disc; padding-left: 22px; }
.prose ol { list-style: decimal; padding-left: 22px; }
.contact-card { padding: 24px; margin-bottom: 48px; max-width: 680px; display: grid; gap: 6px; }
.contact-card a { font-size: 20px; line-height: 28px; font-weight: 600; word-break: break-all; }
/* Remove the "placeholder" class once real text is pasted in. */
.placeholder {
  border: 2px dashed var(--border-strong); border-radius: 16px; padding: 32px 24px;
  background: var(--surface-muted); color: var(--text-2);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 15px; line-height: 22px;
}
.placeholder strong { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }

/* ---------- Wide layouts ---------- */
@media (min-width: 900px) {
  .split-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 80px; }
  .feature { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 80px; }
  .feature:nth-child(even) .feature-text { order: 2; }
  .pill { display: inline-flex; }
  .backup-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 80px; }
  .faq-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 80px; }
}
.pill--1 { top: 4%; left: 0; rotate: -6deg; }
.pill--2 { top: 46%; right: 0; rotate: 5deg; }
.pill--3 { bottom: 6%; left: 2%; rotate: -3deg; }

/* =========================================================
   Motion. Everything below runs only when the visitor allows
   motion. Scroll effects run only where the browser supports
   scroll-driven animations; elsewhere the page is static.
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; }

  html { scroll-behavior: smooth; }

  /* Hero load */
  .hero h1 { animation: rise-blur 1.2s cubic-bezier(.2, .7, .1, 1) both; }
  .hero-line { animation: rise 1.1s .25s cubic-bezier(.2, .7, .1, 1) both; }
  .hero-sub { animation: rise 1s .4s cubic-bezier(.2, .7, .1, 1) both; }
  .status { animation: rise 1s .55s cubic-bezier(.2, .7, .1, 1) both; }
  .field .caret { animation: blink 1.1s steps(1) infinite; }

  /* Smooth FAQ open/close where supported */
  :root { interpolate-size: allow-keywords; }
  .faq details::details-content {
    block-size: 0; overflow: hidden;
    transition: block-size .45s cubic-bezier(.2, .7, .1, 1), content-visibility .45s allow-discrete;
  }
  .faq details[open]::details-content { block-size: auto; }

  @supports (animation-timeline: view()) {
    /* Hero recedes as you scroll away */
    .hero-inner { animation: hero-out linear both; animation-timeline: scroll(root); animation-range: 0 80vh; }
    .hero-mark { animation: turn linear both; animation-timeline: scroll(root); animation-range: 0 120vh; }
    .scroll-cue { animation: fade-out linear both; animation-timeline: scroll(root); animation-range: 0 20vh; }

    /* Generic reveal */
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }

    /* Home ring: parts draw round in order as the ring comes into view, finished once it is fully on screen.
       End lengths come from the SVG, so a part can never stop short. The centre value does not wait. */
    /* All three parts draw together, each from its own start, over a longer stretch of scroll.
       Complete when the ring reaches the middle of the screen. */
    .ring { view-timeline: --ring block; }
    .ring .seg { animation: draw cubic-bezier(.3, .6, .2, 1) both; animation-timeline: --ring; animation-range: entry 0% cover 50%; }
    .split-text { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 80%; }

    /* Features */
    .visual .mini { animation: lift linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
    .feature-text { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 80%; }
    /* Typing runs over the card's own scroll, so it is visible; caret follows the text. */
    .feature:first-child .visual { view-timeline: --qa block; }
    .field .typed { animation: type steps(21, end) both; animation-timeline: --qa; animation-range: entry 0% exit 0%; }
    .cats .bar i { animation: grow linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
    .plan li { animation: slide-in linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
    .pill { animation: drift linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    .pill--2 { --drift: -140px; }
    .pill--3 { --drift: -60px; }

    /* Panel opens out to full width */
    .panel { animation: open-up linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
    .panel-mark { animation: turn-slow linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    .facts li { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }

    /* Backup file travels from one phone to the other */
    .transfer { view-timeline: --move block; }
    .file { animation: travel linear both; animation-timeline: --move; animation-range: cover 30% cover 60%; }
    .phone--new svg { animation: light-up linear both; animation-timeline: --move; animation-range: cover 55% cover 65%; }
  }
}

@keyframes rise-blur { from { opacity: 0; filter: blur(14px); transform: translateY(14px) scale(.97); } }
@keyframes rise { from { opacity: 0; transform: translateY(32px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes hero-out { to { opacity: 0; transform: translateY(-60px) scale(.96); filter: blur(6px); } }
@keyframes turn { from { rotate: 0deg; } to { rotate: 40deg; } }
@keyframes turn-slow { from { rotate: -20deg; } to { rotate: 20deg; } }
/* Grows from zero; the end state is the length written on the SVG, so it always finishes correct. */
@keyframes draw { from { stroke-dasharray: 0 600; } }
@keyframes slide-in { from { opacity: 0; transform: translateX(-16px); } }
@keyframes lift { from { opacity: 0; transform: translateY(80px) scale(.94); } }
@keyframes type { from { max-width: 0; } to { max-width: 21ch; } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes drift { from { transform: translateY(60px); } to { transform: translateY(var(--drift, -100px)); } }
@keyframes open-up { from { clip-path: inset(0 6% round 40px); transform: translateY(40px); } to { clip-path: inset(0 0 round 40px); } }
@keyframes travel { from { left: 0; } to { left: calc(100% - 128px); } }
@keyframes light-up { from { fill: var(--border-subtle); } to { fill: var(--title); } }
@keyframes ring-settle { from { opacity: 0; transform: rotate(-6deg) scale(.98); } }
