/* Super Turtle website: page layout, responsive rules and motion.
   Loaded after tokens.css (palette, type, scales) and components.css (every .st-* part).
   Order: base · navigation · hero · app demo · ticker · sections · footer · effects · small screens · reduced motion. */

/* Registered so the hero rays can turn. Not inherited: only the element that animates it repaints. */
@property --st-ray-from { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-pop: cubic-bezier(0.3, 1.5, 0.5, 1);   /* the overshoot the shell dome uses */
  --ease-slam: cubic-bezier(0.6, 0, 0.9, 0.4);
  --gutter: var(--space-5);
  --hero-max: 1392px;
  --nav-height: 84px;
  /* how far the app window climbs into the hero; --fit is set by the script in <head> */
  --overlap: calc(150px * var(--fit, 1));
}

/* ---------- Base ---------- */
html { scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; }
/* the mascot and the ticker run past the edge on purpose; clipping here keeps the page from scrolling sideways */
main { overflow-x: clip; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--sun); color: var(--comic-ink); }

.wrap { max-width: var(--page-width); margin: 0 auto; padding: 0 var(--space-6); }
.section { padding-top: var(--space-9); }
.h2 { margin: var(--space-4) 0; font-size: clamp(38px, 5vw, 52px); line-height: 0.96; text-wrap: balance; }
.copy { font: 400 16px/24px var(--font-sans); color: var(--ink-muted); }
.copy b { color: var(--ink); font-weight: 700; }

.skip-link { position: fixed; left: var(--space-4); top: var(--space-4); z-index: 100; padding: 10px 16px 8px; border: var(--stroke-md) solid var(--comic-ink); border-radius: var(--radius-sm); background: var(--sun); color: var(--on-sun); box-shadow: 4px 4px 0 var(--st-line); font: 400 18px/1 var(--font-comic); letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none; translate: 0 -220%; }
.skip-link:focus { translate: 0 0; }

.scroll-progress { position: fixed; inset: 0 0 auto 0; z-index: 60; height: 6px; border-bottom: var(--stroke-sm) solid var(--comic-ink); background: var(--brand); transform: scaleX(var(--progress, 0)); transform-origin: 0 50%; pointer-events: none; }

/* ---------- Navigation ---------- */
.nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: var(--space-4); height: var(--nav-height); padding: 0 max(var(--space-7), calc((100% - var(--hero-max)) / 2 + var(--space-5))); border-bottom: var(--stroke-md) solid transparent; background: var(--ground); transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s; }
/* at the top of the page the bar is clear, so the mascot can fly out of his panel across it */
.nav:not(.is-stuck) { background: transparent; }
.nav.is-stuck { border-bottom-color: var(--st-line); box-shadow: 0 5px 0 var(--dot); }
.nav-logo { display: inline-flex; color: var(--ink); text-decoration: none; transform-origin: 20% 50%; transition: rotate 0.2s var(--ease-pop), scale 0.2s var(--ease-pop); }
.nav-logo:hover { rotate: -2deg; scale: 1.05; }
.nav-logo:hover .st-mascot-badge { animation: rays 1.2s linear infinite; }
.nav-logo:focus-visible, .nav-links a:focus-visible, .theme-toggle:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.nav-links { display: flex; align-items: center; gap: var(--space-3); margin-left: auto; }
.nav-links a { position: relative; isolation: isolate; padding: 8px 10px 5px; font: 400 20px/1 var(--font-comic); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink); text-decoration: none; white-space: nowrap; transition: color 0.12s; }
/* a marker swipe behind the word */
.nav-links a::before { content: ""; position: absolute; inset: 0; z-index: -1; border: var(--stroke-sm) solid var(--comic-ink); background: var(--sun); box-shadow: 2px 2px 0 var(--st-line); transform: skewX(-8deg) scaleX(0); transform-origin: 0 50%; opacity: 0; transition: transform 0.22s var(--ease-out), opacity 0.1s; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--on-sun); }
.nav-links a:hover::before, .nav-links a[aria-current]::before { transform: skewX(-8deg) scaleX(1); opacity: 1; }

.theme-toggle { appearance: none; display: grid; place-items: center; flex: none; width: 46px; height: 46px; margin-left: var(--space-2); padding: 0; border: var(--stroke-md) solid var(--st-line); border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: 3px 3px 0 var(--st-line); cursor: pointer; transition: transform 0.1s, box-shadow 0.1s, background-color 0.12s, color 0.12s; }
.theme-toggle:hover { transform: translate(-1px, -1px) rotate(14deg); box-shadow: 4px 4px 0 var(--st-line); background: var(--sun); color: var(--on-sun); }
.theme-toggle:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--st-line); }
.theme-toggle svg { grid-area: 1 / 1; transition: scale 0.35s var(--ease-pop), rotate 0.35s var(--ease-pop), opacity 0.15s; }
html[data-theme="day"] .theme-moon, html[data-theme="night"] .theme-sun { scale: 0; rotate: 120deg; opacity: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 1; width: calc(100% - 2 * var(--gutter)); max-width: var(--hero-max); min-height: 700px; margin: var(--space-7) auto 0; padding: var(--space-8) var(--space-8) calc(var(--overlap) + var(--space-5)); border-radius: var(--radius-xl); box-shadow: 8px 8px 0 var(--st-line); --st-ray-x: 74%; --st-ray-y: 40%; animation: rays 5s linear infinite; }
.hero.is-off { animation-play-state: paused; }

/* bigger halftone dots that only print under the pointer */
.hero-dots { position: absolute; inset: 0; border-radius: calc(var(--radius-xl) - var(--stroke-md)); pointer-events: none; opacity: 0; transition: opacity 0.35s;
  background-image: radial-gradient(circle, var(--dot-press) 3.2px, transparent 3.9px), radial-gradient(circle, var(--dot-press) 3.2px, transparent 3.9px);
  background-size: 16px 16px; background-position: 0 0, 8px 8px;
  -webkit-mask-image: radial-gradient(circle 280px at var(--mx, 50%) var(--my, 50%), #000 0%, rgba(0, 0, 0, 0.55) 40%, transparent 100%);
  mask-image: radial-gradient(circle 280px at var(--mx, 50%) var(--my, 50%), #000 0%, rgba(0, 0, 0, 0.55) 40%, transparent 100%); }
.hero.is-hot .hero-dots { opacity: 1; }

.hero-copy { position: relative; z-index: 1; width: min(600px, 54%); }
.hero-kicker { animation: stamp-in 0.45s var(--ease-out) 0.1s backwards; }
.hero h1 { margin: var(--space-4) 0 var(--space-5); font-size: clamp(54px, 6.4vw, 84px); line-height: 0.92; --st-pop-drop: var(--comic-ink);
  /* the drop leans away from the pointer */
  text-shadow: calc(0.07em - var(--px, 0) * 0.05em) calc(0.08em - var(--py, 0) * 0.04em) 0 var(--comic-ink); }
.hero h1 .word { display: inline-block; animation: word-slam 0.5s var(--ease-out) backwards; animation-delay: calc(0.25s + var(--i) * 0.09s); }
.lead-box { max-width: 540px; padding: var(--space-4) var(--space-5); border: var(--stroke-md) solid var(--comic-ink); border-radius: var(--radius-md); background: var(--paper); color: var(--comic-ink); font: 500 18px/27px var(--font-sans); animation: rise-in 0.5s var(--ease-out) 0.95s backwards; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); margin-top: var(--space-5); animation: pop-in 0.5s var(--ease-pop) 1.1s backwards; }
.hero-cta .st-btn { flex: none; }
.hero-note { max-width: 210px; font: 700 14px/20px var(--font-sans); }

.hero-mascot { --mw: clamp(380px, 50vw, 640px); position: absolute; z-index: 2; right: -30px; top: -62px; width: var(--mw); pointer-events: none;
  /* drifts with the pointer, flies on as the page scrolls */
  translate: calc(var(--px, 0) * 14px + var(--s, 0) * 150px) calc(var(--py, 0) * 10px - var(--s, 0) * 110px); transition: translate 0.25s var(--ease-out); }
.hero-mascot-in { position: relative; animation: fly-in 0.95s var(--ease-out) 0.35s backwards, float 5s ease-in-out 1.3s infinite; }
.hero.is-off .hero-mascot-in { animation-play-state: paused; }
.hero-mascot .st-mascot { width: 100%; height: auto; rotate: -3deg; }
.hero-balloon { position: absolute; z-index: 3; right: calc(var(--mw, 640px) * 0.234); top: calc(var(--mw, 640px) * 0.592 - 43px); max-width: min(420px, 34vw); font-size: clamp(17px, 1.72vw, 22px); transform-origin: 82% -30%; animation: pop-in 0.45s var(--ease-pop) 1.35s backwards; --mw: clamp(380px, 50vw, 640px); }

/* speed lines: drawn while he flies in, gone when he arrives */
.speed { position: absolute; right: 90%; top: 76%; width: 30%; rotate: -28deg; transform-origin: 100% 50%; pointer-events: none; }
.speed i { display: block; height: 8px; margin: 12px 0 12px auto; border: var(--stroke-sm) solid var(--comic-ink); border-radius: var(--radius-pill); background: var(--paper); transform-origin: 100% 50%; opacity: 0; animation: speed 0.95s var(--ease-out) 0.35s backwards; }
.speed i:nth-child(1) { width: 74%; }
.speed i:nth-child(2) { width: 100%; animation-delay: 0.41s; }
.speed i:nth-child(3) { width: 58%; animation-delay: 0.47s; }

/* the entrance waits for the comic lettering (main.js adds .is-ready; without scripts it just runs) */
html.js:not(.is-ready) .hero :is(.hero-kicker, .word, .lead-box, .hero-cta, .hero-mascot-in, .hero-balloon, .speed i) { animation-play-state: paused; }

/* ---------- The app, live ---------- */
.shot { position: relative; z-index: 3; display: flex; justify-content: center; margin-top: calc(var(--overlap) * -1); padding: 0 var(--gutter) var(--space-4); perspective: 1600px; }
.demo { position: relative; flex: none; width: calc(940px * var(--fit, 1)); height: calc(500px * var(--fit, 1)); transform: rotateX(calc(var(--tilt, 0) * 1deg)); transform-origin: 50% 100%; }
.demo-tilt { position: absolute; left: 0; top: 0; width: 940px; height: 500px; transform: scale(var(--fit, 1)); transform-origin: 0 0; }
.demo-hint { position: absolute; left: -16px; top: -24px; z-index: 4; animation: hint-wiggle 3.4s ease-in-out 2.6s infinite; }
.demo.is-used .demo-hint { animation: none; }

.demo-locked { position: absolute; inset: 0; clip-path: inset(-14px -14px 100% -14px); transition: clip-path 0.5s var(--ease-out); }
.demo[data-state="locked"] .demo-locked { clip-path: inset(-14px); transition: clip-path 0.4s var(--ease-slam); }
.demo[data-state="locked"] .demo-tilt { animation: demo-thud 0.34s 0.38s; }
.demo-burst { position: absolute; right: -58px; top: -58px; z-index: 4; scale: 0; opacity: 0; pointer-events: none; transition: scale 0.12s ease-in, opacity 0.12s; }
.demo[data-state="locked"] .demo-burst { scale: 1; opacity: 1; transition: scale 0.4s var(--ease-pop) 0.4s, opacity 0.1s 0.4s; }

.demo .st-doc { cursor: pointer; }
.demo .st-doc:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.demo .st-doc.is-new { animation: doc-in 0.5s var(--ease-pop); }
.demo .st-notice.is-new { animation: pop-in 0.35s var(--ease-pop); }
.demo .st-paper.is-new { animation: paper-in 0.35s var(--ease-pop); }
.demo .st-doc-path .st-icon { color: var(--ink-muted); }
.demo-none { margin: 0; padding: var(--space-3) var(--space-5); font: 400 13px/18px var(--font-app); color: var(--ink-muted); }

/* ---------- Ticker: two printed bands ---------- */
.ticker { position: relative; margin-top: var(--space-8); padding: var(--space-5) 0; overflow: clip visible; }
.band { width: 108%; margin-left: -4%; border-block: var(--stroke-md) solid var(--st-line); overflow: hidden; }
.band-sun { position: relative; z-index: 1; background: var(--sun); color: var(--on-sun); rotate: -2deg; }
.band-ink { margin-top: calc(var(--stroke-md) * -1); background: var(--comic-ink); color: var(--paper); rotate: -2deg; }
.band-track { display: flex; width: max-content; animation: marquee 44s linear infinite; }
.band-ink .band-track { animation-direction: reverse; animation-duration: 52s; }
.ticker:hover .band-track { animation-play-state: paused; }
.band-item { display: inline-flex; align-items: center; gap: var(--space-5); padding: 12px 0 8px var(--space-5); font: 400 26px/1 var(--font-comic); letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; }
.band-star { flex: none; width: 20px; height: 20px; fill: currentColor; }

/* ---------- One shell, one vault ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: center; }
.split .st-balloon { margin: 0 0 var(--space-8); transform-origin: 2.2em 118%; }
.cards { display: flex; gap: var(--space-5); justify-content: flex-end; padding-right: var(--space-2); }
.cards > :first-child { margin-top: var(--space-6); }
.js-shell:hover { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 var(--st-line); }
.js-shell:hover .st-shell-stage .st-shellicon { animation: hop 0.5s var(--ease-pop); }
.js-shell .st-lock.is-stamped { animation: stamp-in 0.35s var(--ease-out); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); margin-top: var(--space-9); }
.step { display: flex; flex-direction: column; gap: var(--space-2); min-height: 230px; padding: var(--space-8) var(--space-6) var(--space-6); border-radius: var(--radius-lg); --st-dot-angle: 200deg; }
.step .st-burst { position: absolute; left: -20px; top: -38px; }
.step:hover .st-burst { animation: wobble 0.55s var(--ease-pop); }
.step .copy { color: var(--ink); }

/* ---------- Quantum ---------- */
.quantum { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: center; padding: var(--space-8); border-radius: var(--radius-xl); --st-dot-angle: 20deg; }
.quantum .copy { color: var(--on-brand); font-weight: 500; }
.quantum .st-btn { margin-top: var(--space-5); }
.quantum .st-btn .st-icon { transition: translate 0.15s var(--ease-pop); }
.quantum .st-btn:hover .st-icon { translate: 5px 0; }
.quantum-badge { position: absolute; z-index: 2; right: 56px; top: -52px; transform: rotate(6deg); box-shadow: 4px 4px 0 var(--comic-ink); animation: rays 3s linear infinite; }
.facts { display: flex; flex-direction: column; gap: var(--space-5); padding-top: var(--space-6); }
.fact { display: flex; gap: var(--space-4); padding: var(--space-5); border-radius: var(--radius-lg); }
.fact-icon { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border: var(--stroke-sm) solid var(--comic-ink); border-radius: 50%; background: var(--sun); color: var(--on-sun); transition: rotate 0.2s var(--ease-pop), scale 0.2s var(--ease-pop); }
.fact:hover .fact-icon { rotate: -12deg; scale: 1.12; }
.fact .subhead { margin-bottom: var(--space-1); }
.fact [data-scramble] { font-variant-numeric: tabular-nums; }
.quantum .fact .copy { color: var(--ink-muted); font-weight: 400; }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); margin-top: var(--space-6); }
.plan { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); padding: var(--space-6); border-radius: var(--radius-lg); --st-dot-angle: 200deg; }
.plan .st-burst { position: absolute; right: -22px; top: -44px; }
.price { display: flex; align-items: baseline; gap: var(--space-3); font-size: clamp(92px, 11vw, 128px); line-height: 0.86; }
.price small { font-size: 34px; letter-spacing: 0.04em; }
.price .letter { display: inline-block; transition: translate 0.15s var(--ease-pop), rotate 0.15s var(--ease-pop); }
.price .letter:hover { translate: 0 -10px; rotate: -5deg; }
.plan-box { padding: var(--space-3) var(--space-4); border: var(--stroke-sm) solid var(--comic-ink); border-radius: var(--radius-sm); background: var(--paper); color: var(--comic-ink); font: 500 16px/24px var(--font-sans); }
.plan .plan-line { font: 500 16px/24px var(--font-sans); color: var(--ink); }
.promise { margin-top: var(--space-6); }
.plans-cta { display: flex; align-items: center; gap: var(--space-5); margin-top: var(--space-6); }
.plans-cta .st-btn, .nav-download { flex: none; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: start; }
.form { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); border-radius: var(--radius-lg); }
.form .st-btn { align-self: flex-start; }
.form .st-input { transition: box-shadow 0.12s, translate 0.12s; }
.form .st-input:focus { box-shadow: 4px 4px 0 var(--st-line); translate: -2px -2px; }
.form-status { padding: 10px var(--space-4); border: var(--stroke-sm) solid var(--st-line); border-radius: var(--radius-sm); background: var(--sun-soft); font: 500 15px/22px var(--font-sans); animation: pop-in 0.3s var(--ease-pop); }
.form-status:empty { display: none; }
.form-status[data-tone="positive"] { background: var(--positive-soft); }
.form-status[data-tone="danger"] { background: var(--danger-soft); }

/* ---------- Footer ---------- */
.footer-wrap { position: relative; margin-top: var(--space-7); padding-top: 170px; overflow: clip visible; }
.footer { display: flex; align-items: center; gap: var(--space-6); width: calc(100% - 2 * var(--gutter)); max-width: var(--hero-max); margin: 0 auto var(--space-6); padding: var(--space-7) var(--space-8); border-radius: var(--radius-xl); box-shadow: 8px 8px 0 var(--st-line); }
.footer p { margin-top: var(--space-3); font: 500 16px/24px var(--font-sans); color: var(--on-deep-muted); }
.footer .st-btn { flex: none; margin-left: auto; }
/* he arrives when the footer does, and lands on its edge */
.flyby { position: absolute; z-index: 2; top: 28px; right: max(var(--space-7), calc((100% - var(--hero-max)) / 2 + 150px)); width: 300px; pointer-events: none; }
.flyby .st-mascot { width: 100%; height: auto; rotate: -3deg; }
html.js .flyby { opacity: 0; }
html.js .footer-wrap.is-in .flyby { opacity: 1; animation: flyby 1.15s var(--ease-out) backwards; }
html.js .footer-wrap.is-in .flyby .st-mascot { animation: float 5s ease-in-out 1.2s infinite; }
html.js .footer-wrap.is-in .speed i { animation: speed 1.15s var(--ease-out) backwards; }

.toast { position: fixed; left: 50%; bottom: var(--space-5); z-index: 90; width: max-content; max-width: min(92vw, 520px); padding: var(--space-3) var(--space-4); border: var(--stroke-md) solid var(--comic-ink); border-radius: var(--radius-md); background: var(--paper); color: var(--comic-ink); box-shadow: 5px 5px 0 var(--st-line); font: 600 16px/22px var(--font-sans); translate: -50% 180%; opacity: 0; pointer-events: none; transition: translate 0.35s var(--ease-pop), opacity 0.2s; }
.toast.is-on { translate: -50% 0; opacity: 1; }

/* ---------- Effects ---------- */

/* Reveal on scroll. Only when scripts run; each uses translate / scale / rotate so it stacks with a part's own transform. */
html.js .rv { opacity: 0; }
html.js .rv.is-in { opacity: 1; animation: rv-rise 0.55s var(--ease-out) backwards; animation-delay: calc(var(--d, 0) * 90ms); }
html.js .rv-slam.is-in { animation-name: rv-slam; animation-duration: 0.6s; }
html.js .rv-pop.is-in { animation-name: rv-pop; animation-timing-function: var(--ease-pop); animation-duration: 0.5s; }
html.js .rv-stamp.is-in { animation-name: stamp-in; animation-duration: 0.45s; }
html.js .rv-wipe.is-in { animation-name: rv-wipe; animation-duration: 0.6s; }
html.js .rv-slide.is-in { animation-name: rv-slide; }
html.js .plan-free.is-in .letter { animation: letter-pop 0.55s var(--ease-pop) backwards; animation-delay: calc(0.3s + var(--d, 0) * 90ms + var(--i) * 0.08s); }

/* Halftone that prints under the pointer, behind the panel's content. */
[data-spot] { isolation: isolate; }
[data-spot]::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.35s;
  background-image: radial-gradient(circle, var(--ray) 3.2px, transparent 3.9px), radial-gradient(circle, var(--ray) 3.2px, transparent 3.9px);
  background-size: 16px 16px; background-position: 0 0, 8px 8px;
  -webkit-mask-image: radial-gradient(circle 240px at var(--mx, 50%) var(--my, 50%), #000 0%, transparent 100%);
  mask-image: radial-gradient(circle 240px at var(--mx, 50%) var(--my, 50%), #000 0%, transparent 100%); }
[data-spot].is-hot::after { opacity: 1; }

/* Panels lean toward the pointer. */
.js-tilt { transform: perspective(900px) rotateX(calc(var(--rx, 0) * 1deg)) rotateY(calc(var(--ry, 0) * 1deg)); transition: transform 0.2s var(--ease-out); }

/* Bursts boil on two frames, the way hand-inked ones do. */
main .st-burst-shape { animation: boil 0.9s steps(1) infinite; }

/* The download button catches the light. */
.st-btn-highlight { overflow: hidden; }
.st-btn-highlight::after { content: ""; position: absolute; top: -20%; bottom: -20%; left: -45%; width: 28%; background: rgba(255, 253, 247, 0.6); transform: skewX(-20deg); animation: shine 4.5s ease-in-out 2.2s infinite; pointer-events: none; }
.st-btn-highlight:hover { rotate: -1.5deg; }
.st-btn-highlight { transition: transform 0.08s, box-shadow 0.08s, background-color 0.12s, rotate 0.2s var(--ease-pop); }

/* Impact lines where a button is pressed (main.js adds them). */
.impact { position: fixed; z-index: 100; width: 0; height: 0; pointer-events: none; }
.impact i { position: absolute; left: -2px; top: -2px; width: 4px; height: 16px; border-radius: 2px; background: var(--ink); rotate: calc(var(--n) * 45deg); transform-origin: 2px 2px; animation: impact 0.42s var(--ease-out) forwards; }

/* Day and Night change in a circle that opens from the switch. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: theme-wipe 0.6s var(--ease-out); }

@keyframes rays { to { --st-ray-from: 18deg; } }
@keyframes stamp-in { 0% { opacity: 0; scale: 2.1; rotate: -11deg; } 60% { opacity: 1; scale: 0.94; rotate: 1.5deg; } 100% { opacity: 1; scale: 1; rotate: 0deg; } }
@keyframes word-slam { 0% { opacity: 0; scale: 2.4; rotate: -8deg; translate: 0 -24px; } 55% { opacity: 1; scale: 0.92; rotate: 2deg; translate: 0 0; } 78% { scale: 1.05; rotate: -1deg; } 100% { opacity: 1; scale: 1; rotate: 0deg; translate: 0 0; } }
@keyframes rise-in { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: 0 0; } }
@keyframes pop-in { from { opacity: 0; scale: 0.4; rotate: -5deg; } to { opacity: 1; scale: 1; rotate: 0deg; } }
@keyframes fly-in { 0% { opacity: 0; translate: -88% 68%; scale: 0.3; } 14% { opacity: 1; } 72% { translate: 3% -3%; scale: 1.04; } 100% { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes float { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 6px -12px; rotate: 1.2deg; } }
@keyframes speed { 0% { opacity: 0; transform: scaleX(0); } 30% { opacity: 1; transform: scaleX(1); } 100% { opacity: 0; transform: scaleX(0); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes hint-wiggle { 0%, 84%, 100% { rotate: 0deg; scale: 1; } 89% { rotate: -5deg; scale: 1.1; } 94% { rotate: 4deg; scale: 1.1; } }
@keyframes demo-thud { 0%, 100% { translate: 0 0; } 25% { translate: 0 8px; } 55% { translate: 0 -3px; } 80% { translate: 0 2px; } }
@keyframes doc-in { from { opacity: 0; translate: 0 -20px; scale: 1.06; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes paper-in { from { opacity: 0; translate: 0 16px; rotate: 5deg; } to { opacity: 1; translate: 0 0; rotate: 0deg; } }
@keyframes hop { 0%, 100% { translate: 0 0; } 40% { translate: 0 -9px; } }
@keyframes wobble { 0%, 100% { rotate: 0deg; scale: 1; } 30% { rotate: -16deg; scale: 1.16; } 65% { rotate: 9deg; scale: 1.08; } }
@keyframes boil { 0% { rotate: 0deg; scale: 1; } 50% { rotate: 3.5deg; scale: 1.03; } }
@keyframes shine { 0%, 72% { translate: 0 0; } 100% { translate: 620% 0; } }
@keyframes impact { from { opacity: 1; transform: translateY(-16px) scaleY(0.4); } to { opacity: 0; transform: translateY(-50px) scaleY(1); } }
@keyframes theme-wipe { from { clip-path: circle(0 at var(--tx, 90%) var(--ty, 42px)); } to { clip-path: circle(150vmax at var(--tx, 90%) var(--ty, 42px)); } }
@keyframes flyby { 0% { opacity: 0; translate: -70vw 150px; scale: 0.5; } 12% { opacity: 1; } 74% { translate: 14px -10px; scale: 1.04; } 100% { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes rv-rise { from { opacity: 0; translate: 0 28px; } to { opacity: 1; translate: 0 0; } }
@keyframes rv-slam { 0% { opacity: 0; scale: 1.22; rotate: -3deg; translate: 0 34px; } 58% { opacity: 1; scale: 0.975; rotate: 0.6deg; translate: 0 0; } 80% { scale: 1.012; rotate: -0.3deg; } 100% { opacity: 1; scale: 1; rotate: 0deg; translate: 0 0; } }
@keyframes rv-pop { 0% { opacity: 0; scale: 0; rotate: -7deg; } 100% { opacity: 1; scale: 1; rotate: 0deg; } }
@keyframes rv-wipe { from { opacity: 1; clip-path: inset(-12% 100% -12% -2%); translate: -18px 0; } to { opacity: 1; clip-path: inset(-12% -2% -12% -2%); translate: 0 0; } }
@keyframes rv-slide { from { opacity: 0; translate: 64px 0; rotate: 2deg; } to { opacity: 1; translate: 0 0; rotate: 0deg; } }
@keyframes letter-pop { from { opacity: 0; translate: 0 -0.5em; rotate: -14deg; scale: 0.4; } to { opacity: 1; translate: 0 0; rotate: 0deg; scale: 1; } }

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

/* ---------- Smaller screens ---------- */
@media (max-width: 1180px) {
  .nav { padding: 0 var(--space-5); }
  .nav-links { gap: var(--space-1); }
  .nav-links a { font-size: 18px; }
  .hero { padding-left: var(--space-7); }
  .demo-burst { right: -30px; }
  .split, .quantum, .contact { gap: var(--space-7); }
  .cards { gap: var(--space-4); }
}

@media (max-width: 1040px) {
  .nav-links a[href="#contact"] { display: none; }
  .cards .st-shell { width: 216px; }
}

@media (max-width: 900px) {
  :root { --gutter: var(--space-4); --nav-height: 72px; }
  html { scroll-padding-top: 84px; }
  .wrap { padding: 0 var(--space-5); }
  .section { padding-top: var(--space-8); }
  .nav { padding: 0 var(--space-4); gap: var(--space-3); }
  .nav-links { display: none; }
  .theme-toggle { margin-left: auto; }

  /* the hero stacks: mascot, balloon, then the words */
  .hero { display: flex; flex-direction: column; min-height: 0; margin-top: 84px; padding: 0 var(--space-5) calc(var(--overlap) + var(--space-6)); }
  .hero-mascot { position: relative; order: -2; right: auto; top: auto; align-self: flex-end; width: min(94%, 500px); margin: -66px -36px 0 0; }
  .hero-balloon { position: relative; order: -1; right: auto; top: auto; align-self: flex-end; max-width: min(84%, 360px); margin: var(--space-4) 7% var(--space-5) 0; font-size: 18px; }
  .hero-copy { width: auto; }
  .hero h1 { font-size: clamp(46px, 10.4vw, 76px); }

  .ticker { margin-top: var(--space-7); }
  .band-item { font-size: 22px; }
  .split, .quantum, .contact { grid-template-columns: 1fr; gap: var(--space-6); }
  .split .st-balloon { margin-bottom: var(--space-7); }
  .cards { justify-content: center; padding-right: 0; }
  .steps { grid-template-columns: 1fr; gap: var(--space-7); margin-top: var(--space-8); }
  .step { min-height: 0; padding-top: var(--space-7); }
  .step .st-burst { left: -10px; }
  .quantum { padding: var(--space-7) var(--space-5) var(--space-5); }
  .quantum-badge { right: var(--space-5); top: -62px; width: 104px !important; height: 104px !important; }
  .facts { padding-top: 0; }
  .footer { flex-direction: column; align-items: flex-start; padding: var(--space-6) var(--space-5); }
  .footer .st-btn { margin-left: 0; }
  .footer-wrap { padding-top: 150px; }
  .flyby { right: var(--space-5); width: 240px; }
  /* panels keep their outline and drop to the medium shadow */
  .hero, .footer { box-shadow: 4px 4px 0 var(--st-line); }
  .st-panel-shadow { box-shadow: 4px 4px 0 var(--st-panel-line, var(--st-line)); }
}

/* below this the app window stops scaling and reflows: list over preview, no sidebar */
@media (max-width: 720px) {
  :root { --overlap: 96px; }
  .shot { perspective: none; }
  .demo { width: 100%; height: auto; transform: none; }
  .demo-tilt { position: relative; width: 100%; height: 600px; transform: none; }
  .demo .st-window { width: 100% !important; height: 100% !important; box-shadow: 5px 5px 0 var(--st-line); }
  .demo .st-window-bar { gap: var(--space-2); padding: 0 var(--space-3); }
  .demo .st-window-tools { gap: var(--space-2); }
  .demo .st-window-lights { gap: 5px; margin-right: 0; }
  .demo .st-window-lights i { width: 11px; height: 11px; }
  .demo .st-window-title .st-shellicon { width: 30px; height: 23px; }
  .demo-open .st-window-side, .demo-open .st-search, .demo-open .demo-label { display: none; }
  .demo .st-vault-split { flex-direction: column; }
  .demo .st-vault-split > :first-child { flex: none; max-height: 48%; }
  .demo .st-vault-split .st-preview { flex: 1; width: auto; min-height: 0; margin: var(--space-2) var(--space-3) var(--space-3); }
  .demo .st-preview-stage { padding: var(--space-3); min-height: 0; }
  .demo .st-paper { width: auto; height: 100%; max-height: 220px; }
  .demo .st-doc { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .demo .st-doc-meta:last-child { display: none; }
  .demo-hint { left: -6px; }
  .demo-burst { right: -6px; top: auto; bottom: -34px; width: 130px !important; font-size: 26px !important; }
  .demo-locked .st-empty-art { scale: 0.8; margin-bottom: 0; }

  .plans { grid-template-columns: 1fr; gap: var(--space-7); }
  .plan .st-burst { right: -8px; }
  .plans-cta { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
}

@media (max-width: 600px) {
  .nav-download { width: var(--control-lg); padding: 0; }
  .nav-download-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .hero { padding-inline: var(--space-4); }
  .lead-box { padding: var(--space-3) var(--space-4); font-size: 16px; line-height: 24px; }
  .hero-cta { flex-direction: column; align-items: stretch; gap: var(--space-3); }
  .hero-cta .st-btn { width: 100%; padding-inline: var(--space-4); font-size: 26px; }
  .hero-note { max-width: none; }
  .cards { flex-direction: column; align-items: center; }
  .cards > :first-child { margin-top: 0; }
  .cards .st-shell { width: min(100%, 300px); }
  .split .st-balloon { font-size: 24px; }
  .fact { padding: var(--space-4); gap: var(--space-3); }
  .fact .subhead { font-size: 21px; }
  .fact-icon { width: 44px; height: 44px; }
  .plan { padding: var(--space-5); }
  .form { padding: var(--space-5); }
  .footer .st-btn { width: 100%; padding-inline: var(--space-4); font-size: 26px; }
  .footer .st-logo { font-size: 34px !important; }
  .flyby { width: 200px; top: 48px; }
  .footer-wrap { padding-top: 140px; }
  .band-item { font-size: 19px; gap: var(--space-4); padding-left: var(--space-4); }
  .band-star { width: 16px; height: 16px; }
}

/* ---------- Reduced motion: everything is simply there ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  html.js .rv, html.js .flyby { opacity: 1; }
  .hero-mascot { translate: none; }
  .demo { transform: none; }
  .js-tilt { transform: none; }
  .speed { display: none; }
}
