/*
  Frame Flipper website
  Colours from the approved Figma file (the same values as the app's FlipperTheme).
  System fonts only. Every animation is CSS and stops for Reduce Motion.
*/

:root {
  color-scheme: dark;
  --bg: #060e1b;
  --bg-2: #0a1728;
  --card: #102438;
  --card-2: #17344e;
  --line: #1f364c;
  --line-2: #2b4a64;
  --ink: #f0f5fa;
  --muted: #a5b7c9;
  --dim: #6f8599;
  --cyan: #49d8f5;
  --deep: #187da3;
  --outline: #28abc9;
  --arrow: #ffbf56;
  --paper: #eeeae0;
  --paper-2: #f7f4ec;
  --pencil: #1e2329;
  --radius: 22px;
  --ease: cubic-bezier(.22, .8, .2, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--cyan); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--arrow); outline-offset: 4px; border-radius: 6px; }
p { margin: 0 0 1.1em; }
h1, h2, h3 { font-family: var(--display); line-height: 1.06; letter-spacing: -.03em; margin: 0 0 .5em; font-weight: 700; }
h2 { font-size: clamp(34px, 5.4vw, 64px); }
h3 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -.02em; }
.wrap { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; top: -100px; left: 16px; z-index: 50; padding: 10px 14px; border-radius: 8px; background: var(--ink); color: var(--bg); font-weight: 600; }
.skip:focus { top: 12px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(6, 14, 27, .72); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.site-header.scrolled, .doc-page .site-header { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; }
.brand img { width: 30px; height: 30px; }
.site-header nav { display: flex; gap: 4px; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 10px 12px; border-radius: 8px; }
.site-header nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.site-header nav a[aria-current] { color: var(--cyan); }

/* ---------- Shared bits ---------- */
.eyebrow { display: inline-block; color: var(--cyan); font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 18px; }
.lead { font-size: clamp(18px, 2vw, 22px); color: var(--muted); line-height: 1.55; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 26px; border-radius: 12px; background: var(--cyan); color: var(--bg); font-weight: 700; text-decoration: none; transition: transform .25s var(--ease), box-shadow .25s, background .2s; box-shadow: 0 10px 30px -10px rgba(73, 216, 245, .6); }
.button:hover { color: var(--bg); background: #7be4f9; transform: translateY(-1px); box-shadow: 0 14px 38px -10px rgba(73, 216, 245, .75); }
.button svg { width: 16px; height: 16px; }
.pill-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0; margin: 0; list-style: none; }
.pill-row li { padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 99px; font-size: 14px; color: var(--muted); background: rgba(16, 36, 56, .5); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(100svh, 980px); display: grid; place-items: center; padding: 40px 0 110px; overflow: hidden; isolation: isolate; margin-top: -64px; padding-top: 104px; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto; height: 120%; z-index: -2; background:
  radial-gradient(42% 38% at 50% 40%, rgba(24, 125, 163, .42), transparent 70%),
  radial-gradient(30% 30% at 18% 70%, rgba(73, 216, 245, .10), transparent 70%),
  radial-gradient(28% 26% at 84% 22%, rgba(255, 191, 86, .07), transparent 70%); }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 200px; z-index: -1; background: linear-gradient(transparent, var(--bg)); }
.hero-inner { text-align: center; position: relative; z-index: 2; transform: translate3d(0, calc(var(--hero-p, 0) * 90px), 0); opacity: calc(1 - var(--hero-p, 0) * 1.15); }
.hero h1 { margin: 0 auto 34px; }
.lockup { display: inline-flex; align-items: center; gap: calc(var(--tile) * .13); --tile: clamp(104px, 15vw, 172px); }
.tile { position: relative; width: var(--tile); height: var(--tile); flex: none; border-radius: calc(var(--tile) * .213); filter: drop-shadow(0 26px 50px rgba(24, 125, 163, .45)); }
.tile img { width: 100%; height: 100%; }
.tile .glint { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.tile .glint::before { content: ""; position: absolute; top: -60%; left: -80%; width: 50%; height: 220%; transform: rotate(24deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent); animation: glint 1.2s .95s var(--ease) both; }
.words { display: flex; flex-direction: column; align-items: flex-start; font-family: var(--display); font-weight: 700; font-size: calc(var(--tile) * .354); line-height: 1.12; letter-spacing: -.005em; text-align: left; }
.words span { display: block; background-repeat: no-repeat; -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 300% 100%; background-position: 100% 0; animation: sheen 1.3s 1.15s var(--ease) both; }
.words .w1 { background-image: linear-gradient(100deg, var(--ink) 0 38%, #c8f5ff 47%, #fff 50%, var(--ink) 62% 100%); }
.words .w2 { background-image: linear-gradient(100deg, var(--cyan) 0 38%, #e9fbff 47%, #fff 50%, var(--cyan) 62% 100%); }
.lockup .tile { animation: rise .9s .1s var(--ease) both; }
.lockup .words { animation: slide-in .9s .3s var(--ease) both; }
.tagline { font-size: clamp(34px, 6.2vw, 76px); font-weight: 700; letter-spacing: -.04em; line-height: 1.02; margin: 0 0 22px; animation: rise .9s .5s var(--ease) both; }
.tagline span { color: var(--cyan); }
.tagline span + span { color: var(--arrow); }
.hero .lead { max-width: 640px; margin: 0 auto 30px; animation: rise .9s .62s var(--ease) both; }
.hero .actions { display: flex; flex-direction: column; align-items: center; gap: 22px; animation: rise .9s .74s var(--ease) both; }
.scroll-cue { position: absolute; left: 50%; bottom: 34px; width: 26px; height: 42px; margin-left: -13px; border: 2px solid var(--line-2); border-radius: 14px; z-index: 2; }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--cyan); animation: cue 2s 1.6s ease-in-out infinite; }

/* Floating storyboard pages behind the hero (parallax layers) */
.float { position: absolute; z-index: -1; pointer-events: none; will-change: transform; }
.float .sheet { box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8); }
.f1 { width: clamp(180px, 22vw, 330px); left: -3%; top: 16%; }
.f1 .sheet { transform: rotate(-9deg); opacity: .5; }
.f2 { width: clamp(150px, 17vw, 260px); right: -2%; top: 10%; }
.f2 .sheet { transform: rotate(8deg); opacity: .42; }
.f3 { width: clamp(130px, 14vw, 220px); right: 7%; bottom: 8%; }
.f3 .sheet { transform: rotate(-5deg); opacity: .3; filter: blur(1.5px); }
.f4 { width: clamp(110px, 12vw, 190px); left: 9%; bottom: 4%; }
.f4 .sheet { transform: rotate(6deg); opacity: .22; filter: blur(2.5px); }
.float .sheet .box { opacity: 1; }

/* ---------- Strip ---------- */
.strip { border-block: 1px solid var(--line); background: linear-gradient(90deg, transparent, rgba(16, 36, 56, .6), transparent); }
.strip ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px; margin: 0 auto; padding: 22px 20px; list-style: none; font-size: 15px; color: var(--muted); }
.strip li { display: flex; align-items: center; gap: 10px; }
.strip li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(80px, 12vw, 150px); position: relative; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto clamp(50px, 8vw, 96px); }
.section-head .lead { margin-inline: auto; }

/* Steps: alternating rows, each with an animated cell */
.steps { display: grid; gap: clamp(80px, 11vw, 150px); }
.step { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: clamp(40px, 6vw, 90px); }
.step:nth-child(even) { grid-template-columns: 1fr 1.15fr; }
.step:nth-child(even) .stage-wrap { order: 2; }
.step-num { display: inline-flex; align-items: center; gap: 12px; color: var(--cyan); font-weight: 700; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px; }
.step-num b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(73, 216, 245, .12); border: 1px solid rgba(73, 216, 245, .35); letter-spacing: 0; }
.step h3 { font-size: clamp(30px, 3.6vw, 46px); letter-spacing: -.035em; }
.step p { color: var(--muted); font-size: 18px; max-width: 480px; }
.step p strong { color: var(--ink); font-weight: 600; }
.stage-wrap { position: relative; will-change: transform; }
.stage-wrap::before { content: ""; position: absolute; inset: 8% 6% -6%; background: radial-gradient(closest-side, rgba(24, 125, 163, .45), transparent); filter: blur(30px); z-index: -1; }

/* ---------- Animated cells ---------- */
.stage { position: relative; aspect-ratio: 4 / 3; container-type: inline-size; overflow: hidden; border-radius: var(--radius); background: radial-gradient(120% 90% at 30% 10%, #12304a 0%, #0a1a2c 45%, #07111f 100%); border: 1px solid var(--line-2); box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .06); }
.stage > * { position: absolute; }
.stage-caption { left: 0; right: 0; bottom: 4.2cqw; text-align: center; font-size: 3cqw; color: var(--muted); letter-spacing: .02em; }

/* A storyboard page: a container, so everything inside is sized from its own width */
.sheet { position: relative; width: 100%; aspect-ratio: 1.414; container-type: inline-size; background: var(--paper); border-radius: 1.2%/1.7%; box-shadow: 0 10px 24px -6px rgba(0, 0, 0, .55); }
.sheet > .g { position: absolute; inset: 0; padding: 10cqw 6cqw 0; display: grid; grid-template-columns: repeat(3, 1fr); align-content: start; column-gap: 4cqw; row-gap: 11cqw; }
.sheet::before { content: ""; position: absolute; left: 6cqw; top: 4cqw; width: 22cqw; height: 1.4cqw; border-radius: 1cqw; background: #8f8a7e; }
.sheet::after { content: ""; position: absolute; right: 6cqw; top: 4cqw; width: 9cqw; height: 1.4cqw; border-radius: 1cqw; background: #c3bdb0; }
.pf { position: relative; aspect-ratio: 16 / 9; background: var(--paper-2); outline: .7cqw solid var(--pencil); }
.pf > svg { width: 100%; height: 100%; }
.pf::after { content: ""; position: absolute; left: 0; top: calc(100% + 2.6cqw); width: 75%; height: 1.1cqw; border-radius: 1cqw; background: #bdb7aa; box-shadow: 0 2.4cqw 0 #d2ccc0; }
.box { position: absolute; inset: -1.4cqw; border: .9cqw solid var(--cyan); border-radius: .8cqw; background: rgba(73, 216, 245, .13); box-shadow: 0 0 3cqw rgba(73, 216, 245, .45); opacity: 0; }
.box i { position: absolute; left: -.9cqw; top: -5.6cqw; padding: .3cqw 1.3cqw; border-radius: .8cqw; background: var(--cyan); color: var(--bg); font: 700 3.4cqw/1.2 var(--font); font-style: normal; }

/* Cell 1: Import */
.chips { left: 5cqw; top: 5cqw; display: flex; gap: 1.6cqw; }
.chip { position: relative; padding: 1.1cqw 2.2cqw; border-radius: 9cqw; border: .25cqw solid var(--line-2); background: rgba(16, 36, 56, .9); color: var(--muted); font-size: 2.7cqw; font-weight: 600; white-space: nowrap; }
.chip.on { border-color: var(--cyan); color: var(--cyan); }
.chip.on::after { content: ""; position: absolute; inset: -.3cqw; border-radius: inherit; border: .4cqw solid var(--cyan); opacity: 0; }
.phone { left: 60cqw; top: 5cqw; width: 32cqw; height: 66cqw; border-radius: 5cqw; background: linear-gradient(#0d1d31, #081322); border: .5cqw solid #2b4a64; box-shadow: 0 3cqw 8cqw -2cqw rgba(0, 0, 0, .7); }
.phone::before { content: ""; position: absolute; left: 50%; top: 1.6cqw; width: 8cqw; height: 1.6cqw; margin-left: -4cqw; border-radius: 2cqw; background: #04090f; }
.phone-title { left: 60cqw; width: 32cqw; top: 6.4cqw; text-align: center; font-size: 2.3cqw; font-weight: 700; color: var(--ink); }
.phone-tag { left: 60cqw; width: 32cqw; top: 61.6cqw; text-align: center; font-size: 2.5cqw; font-weight: 700; color: var(--cyan); }
.imp { width: 44cqw; left: 54cqw; transform-origin: 50% 50%; transform: scale(.4545); }
.imp .sheet { box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
.imp.p1 { top: 2.5cqw; --dx: -50cqw; --dy: 24cqw; --r: -7deg; z-index: 3; }
.imp.p2 { top: 18.5cqw; --dx: -48cqw; --dy: 8cqw; --r: 1deg; z-index: 2; }
.imp.p3 { top: 34.5cqw; --dx: -46cqw; --dy: -8cqw; --r: 8deg; z-index: 1; }
.stage-import .stage-caption { left: 4cqw; right: auto; width: 52cqw; bottom: 8cqw; text-align: left; }

/* Cell 2: Detect */
.det { left: 11cqw; top: 7cqw; width: 78cqw; }
.det .sheet { overflow: visible; }
.scan { position: absolute; left: -2cqw; right: -2cqw; top: 0; height: 12cqw; background: linear-gradient(rgba(73, 216, 245, 0), rgba(73, 216, 245, .28)); border-bottom: .7cqw solid var(--cyan); box-shadow: 0 1cqw 4cqw rgba(73, 216, 245, .6); opacity: 0; pointer-events: none; z-index: 3; }
.det .box { opacity: 1; }
.finger { position: absolute; left: 50%; top: 50%; width: 9cqw; height: 9cqw; margin: -4.5cqw 0 0 -4.5cqw; border-radius: 50%; background: rgba(255, 255, 255, .55); border: .6cqw solid #fff; box-shadow: 0 1cqw 3cqw rgba(0, 0, 0, .35); opacity: 0; z-index: 4; }
.found { left: 0; right: 0; top: 65cqw; display: flex; justify-content: center; }
.found span { padding: 1.2cqw 3cqw; border-radius: 9cqw; background: rgba(73, 216, 245, .14); border: .25cqw solid rgba(73, 216, 245, .5); color: var(--cyan); font-size: 2.9cqw; font-weight: 700; }

/* Cell 3: Flip */
.src { left: 4cqw; top: 25cqw; width: 36cqw; }
.src .box { opacity: 1; }
.flick { left: 42.5cqw; top: 29cqw; width: 14cqw; height: 14cqw; }
.flick svg { width: 100%; height: 100%; filter: drop-shadow(0 0 2.5cqw rgba(255, 191, 86, .55)); }
.out { left: 60cqw; width: 34cqw; transform-origin: 0 50%; }
.out-tag { position: absolute; left: -1.4cqw; top: -2.2cqw; z-index: 2; padding: .5cqw 1.6cqw; border-radius: 1cqw; background: var(--bg); border: .25cqw solid var(--cyan); color: var(--cyan); font-size: 2.3cqw; font-weight: 800; letter-spacing: .04em; }
.slide, .pdfp { position: relative; width: 100%; container-type: inline-size; background: #fff; border-radius: 1.5%/2.4%; box-shadow: 0 8px 20px -4px rgba(0, 0, 0, .6); }
.slide > .g, .pdfp > .g { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); align-content: start; }
.slide { aspect-ratio: 16 / 9; }
.slide > .g { padding: 6cqw 14cqw 0; column-gap: 4cqw; row-gap: 3cqw; }
.pdfp { aspect-ratio: 1.414; }
.pdfp > .g { padding: 11cqw 6cqw 0; column-gap: 4cqw; row-gap: 3.5cqw; }
.pdfp::before { content: ""; position: absolute; left: 6cqw; top: 4.5cqw; width: 22cqw; height: 1.6cqw; border-radius: 1cqw; background: #7d8792; }
.pdfp::after { content: ""; position: absolute; right: 6cqw; top: 4.5cqw; width: 13cqw; height: 1.6cqw; border-radius: 1cqw; background: #b9c1c9; }
.cell .fr { aspect-ratio: 16 / 9; background: var(--paper-2); outline: .5cqw solid #c9ced4; }
.cell .fr svg { width: 100%; height: 100%; }
.cell b { display: block; font: 700 3.6cqw/1.5 var(--font); color: #1e2329; }
.slide .cell b { display: inline-block; width: 22%; }
.slide .cell s { display: inline-block; width: 70%; height: 4cqw; vertical-align: middle; border: .4cqw dashed #9aa6b2; text-decoration: none; }
.o1 { top: 5cqw; }
.o2 { top: 29cqw; }
.o3 { top: 58cqw; height: 13cqw; }
.jpg { position: absolute; width: 17cqw; aspect-ratio: 16 / 9; background: var(--paper-2); border-radius: .6cqw; outline: .3cqw solid #fff; box-shadow: 0 1.5cqw 3cqw -.5cqw rgba(0, 0, 0, .6); }
.jpg svg { width: 100%; height: 100%; }
.jpg em { position: absolute; right: .6cqw; bottom: .6cqw; padding: .1cqw .8cqw; border-radius: .5cqw; background: var(--bg); color: var(--ink); font: 700 1.8cqw/1.4 var(--font); font-style: normal; }
.jpg.j1 { left: 0; top: 1cqw; }
.jpg.j2 { left: 8.5cqw; top: 3cqw; }
.jpg.j3 { left: 17cqw; top: 5cqw; }
.ghost { left: 18cqw; top: 33cqw; width: 9cqw; aspect-ratio: 16 / 9; border-radius: .5cqw; background: var(--paper-2); border: .4cqw solid var(--cyan); box-shadow: 0 0 3cqw rgba(73, 216, 245, .6); opacity: 0; }
.g1 { --gx: 54.5cqw; --gy: -21cqw; }
.g2 { --gx: 54.5cqw; --gy: 5.5cqw; }
.g3 { --gx: 54.5cqw; --gy: 28.5cqw; }

/* Looping timelines (only when motion is welcome) */
@media (prefers-reduced-motion: no-preference) {
  .stage-import .chip.on::after { animation: tap 7s infinite; }
  .stage-import .imp.p1 { animation: imp1 7s var(--ease) infinite; }
  .stage-import .imp.p2 { animation: imp2 7s var(--ease) infinite; }
  .stage-import .imp.p3 { animation: imp3 7s var(--ease) infinite; }
  .stage-import .phone-tag { animation: tag-imp 7s infinite; }

  .stage-detect .scan { animation: scan 8s cubic-bezier(.45, 0, .55, 1) infinite; }
  .stage-detect .b1 { animation: b1 8s infinite; }
  .stage-detect .b2 { animation: b2 8s infinite; }
  .stage-detect .b3 { animation: b3 8s infinite; }
  .stage-detect .b4 { animation: b4 8s infinite; }
  .stage-detect .b5 { animation: b5 8s infinite; }
  .stage-detect .b6 { animation: b6 8s var(--ease) infinite; }
  .stage-detect .finger { animation: finger 8s var(--ease) infinite; }
  .stage-detect .found { animation: tag-det 8s infinite; }

  .stage-flip .flick { animation: flick 8s var(--ease) infinite; }
  .stage-flip .o1 { animation: o1 8s var(--ease) infinite; }
  .stage-flip .o2 { animation: o2 8s var(--ease) infinite; }
  .stage-flip .o3 { animation: o3 8s var(--ease) infinite; }
  .stage-flip .g1 { animation: g1 8s cubic-bezier(.5, 0, .3, 1) infinite; }
  .stage-flip .g2 { animation: g2 8s cubic-bezier(.5, 0, .3, 1) infinite; }
  .stage-flip .g3 { animation: g3 8s cubic-bezier(.5, 0, .3, 1) infinite; }

  /* Save the battery: cells only play while they're on screen */
  .js .stage:not(.playing) * { animation-play-state: paused !important; }

  /* Scroll reveals */
  .js .reveal { opacity: 0; transform: translate3d(0, 40px, 0); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .reveal.d1 { transition-delay: .08s; }
  .js .reveal.d2 { transition-delay: .16s; }
  .js .reveal.d3 { transition-delay: .24s; }
}

@keyframes tap { 0%, 3% { opacity: 0; transform: scale(1.3); } 6% { opacity: 1; transform: scale(1); } 12%, 100% { opacity: 0; transform: scale(1); } }
@keyframes imp1 { 0% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(1); } 4%, 10% { opacity: 1; transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(1); } 24%, 90% { opacity: 1; transform: scale(.4545); } 97%, 100% { opacity: 0; transform: scale(.4545); } }
@keyframes imp2 { 0% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(1); } 4%, 24% { opacity: 1; transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(1); } 38%, 90% { opacity: 1; transform: scale(.4545); } 97%, 100% { opacity: 0; transform: scale(.4545); } }
@keyframes imp3 { 0% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(1); } 4%, 38% { opacity: 1; transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(1); } 52%, 90% { opacity: 1; transform: scale(.4545); } 97%, 100% { opacity: 0; transform: scale(.4545); } }
@keyframes tag-imp { 0%, 54% { opacity: 0; transform: translateY(1.5cqw); } 60%, 90% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; } }

@keyframes scan { 0%, 3% { opacity: 0; transform: translateY(-12cqw); } 6% { opacity: 1; } 34% { opacity: 1; transform: translateY(64cqw); } 38%, 100% { opacity: 0; transform: translateY(64cqw); } }
@keyframes b1 { 0%, 11% { opacity: 0; transform: scale(1.25); } 14%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
@keyframes b2 { 0%, 12.5% { opacity: 0; transform: scale(1.25); } 15.5%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
@keyframes b3 { 0%, 14% { opacity: 0; transform: scale(1.25); } 17%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
@keyframes b4 { 0%, 23% { opacity: 0; transform: scale(1.25); } 26%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
@keyframes b5 { 0%, 24.5% { opacity: 0; transform: scale(1.25); } 27.5%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
@keyframes b6 { 0%, 26% { opacity: 0; transform: translate(5cqw, 4cqw) scale(1.25); } 29%, 44% { opacity: 1; transform: translate(5cqw, 4cqw); } 56%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: none; } }
@keyframes finger { 0%, 38% { opacity: 0; transform: translate(5cqw, 4cqw) scale(1.4); } 42%, 44% { opacity: 1; transform: translate(5cqw, 4cqw) scale(1); } 56% { opacity: 1; transform: none; } 61%, 100% { opacity: 0; transform: none; } }
@keyframes tag-det { 0%, 58% { opacity: 0; transform: translateY(1.5cqw); } 63%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }

@keyframes flick { 0%, 8% { opacity: 0; transform: scale(.5) rotate(-20deg); } 14% { opacity: 1; transform: scale(1.12) rotate(4deg); } 18% { transform: scale(1); } 34% { transform: scale(1); } 36% { transform: scale(1.12); } 39% { transform: scale(1); } 50% { transform: scale(1); } 52% { transform: scale(1.12); } 55%, 90% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(1); } }
@keyframes o1 { 0%, 22% { opacity: 0; transform: perspective(60cqw) rotateY(-88deg); } 30%, 90% { opacity: 1; transform: perspective(60cqw) rotateY(0); } 96%, 100% { opacity: 0; transform: none; } }
@keyframes o2 { 0%, 38% { opacity: 0; transform: perspective(60cqw) rotateY(-88deg); } 46%, 90% { opacity: 1; transform: perspective(60cqw) rotateY(0); } 96%, 100% { opacity: 0; transform: none; } }
@keyframes o3 { 0%, 54% { opacity: 0; transform: perspective(60cqw) rotateY(-88deg); } 62%, 90% { opacity: 1; transform: perspective(60cqw) rotateY(0); } 96%, 100% { opacity: 0; transform: none; } }
@keyframes g1 { 0%, 15% { opacity: 0; transform: none; } 17% { opacity: 1; } 24% { opacity: 0; transform: translate(var(--gx), var(--gy)) scale(1.6); } 100% { opacity: 0; transform: translate(var(--gx), var(--gy)); } }
@keyframes g2 { 0%, 31% { opacity: 0; transform: none; } 33% { opacity: 1; } 40% { opacity: 0; transform: translate(var(--gx), var(--gy)) scale(1.6); } 100% { opacity: 0; transform: translate(var(--gx), var(--gy)); } }
@keyframes g3 { 0%, 47% { opacity: 0; transform: none; } 49% { opacity: 1; } 56% { opacity: 0; transform: translate(var(--gx), var(--gy)) scale(1.6); } 100% { opacity: 0; transform: translate(var(--gx), var(--gy)); } }

@keyframes rise { from { opacity: 0; transform: translate3d(0, 26px, 0); } to { opacity: 1; transform: none; } }
@keyframes slide-in { from { opacity: 0; transform: translate3d(-18px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes glint { from { left: -80%; } to { left: 140%; } }
@keyframes sheen { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes cue { 0%, 100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(12px); opacity: 0; } }

/* ---------- The folder ---------- */
.folder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.tree { position: relative; padding: 28px; border-radius: var(--radius); background: linear-gradient(160deg, var(--card), #0b1a2b); border: 1px solid var(--line-2); box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .9); font-size: 15px; will-change: transform; }
.tree ul { list-style: none; margin: 0; padding: 0; }
.tree li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; overflow-wrap: anywhere; }
.tree li + li { margin-top: 4px; }
.tree .root { font-weight: 700; color: var(--ink); background: rgba(73, 216, 245, .08); }
.tree .in1 { margin-left: 22px; }
.tree .in2 { margin-left: 44px; color: var(--muted); }
.tree code { font: 600 14px/1.4 ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink); }
.tree .in2 code { color: var(--muted); font-weight: 500; }
.ft { flex: none; display: grid; place-items: center; min-width: 46px; height: 30px; padding: 0 6px; border-radius: 7px; font-size: 11px; font-weight: 800; letter-spacing: .04em; background: rgba(73, 216, 245, .12); color: var(--cyan); border: 1px solid rgba(73, 216, 245, .3); }
.ft.dir { background: rgba(255, 191, 86, .12); color: var(--arrow); border-color: rgba(255, 191, 86, .35); }
.tree-note { margin: 18px 4px 0; font-size: 13px; color: var(--dim); }
.outputs { display: grid; gap: 30px; }
.outputs article { padding-left: 22px; border-left: 2px solid var(--line-2); }
.outputs h3 { font-size: 24px; margin-bottom: 8px; }
.outputs p { color: var(--muted); margin: 0; }

/* ---------- Ratios ---------- */
.ratios { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 22px 26px; margin: 0; padding: 0; list-style: none; }
.ratios li { display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; color: var(--muted); }
.ratios i { display: block; height: 64px; border: 2px solid var(--outline); border-radius: 6px; background: rgba(40, 171, 201, .1); transition: background .3s, transform .4s var(--ease); }
.ratios li:hover i { background: rgba(73, 216, 245, .25); transform: translateY(-4px); }
.r169 { aspect-ratio: 16 / 9; } .r916 { aspect-ratio: 9 / 16; } .r43 { aspect-ratio: 4 / 3; } .r185 { aspect-ratio: 1.85; }
.r54 { aspect-ratio: 5 / 4; } .r53 { aspect-ratio: 5 / 3; } .r235 { aspect-ratio: 2.35; } .r219 { aspect-ratio: 21 / 9; }
.ratios .rc { aspect-ratio: 1.3; border-style: dashed; border-color: var(--arrow); background: rgba(255, 191, 86, .08); }
.ratio-note { text-align: center; color: var(--muted); max-width: 620px; margin: 44px auto 0; }

/* ---------- Privacy band ---------- */
.privacy-band { overflow: hidden; }
.privacy-card { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; padding: clamp(36px, 6vw, 80px); border-radius: 32px; background: radial-gradient(80% 120% at 0% 0%, rgba(24, 125, 163, .35), transparent 60%), linear-gradient(160deg, #0e2136, #08131f); border: 1px solid var(--line-2); overflow: hidden; }
.privacy-card h2 { margin-bottom: 0; }
.privacy-card p { color: var(--muted); }
.ticks { list-style: none; margin: 0 0 26px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.ticks li { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.ticks li::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; background: rgba(73, 216, 245, .16) url("assets/tick.svg") center / 12px no-repeat; border: 1px solid rgba(73, 216, 245, .4); }
.lock { position: absolute; right: -40px; bottom: -60px; width: 260px; opacity: .07; pointer-events: none; }

/* ---------- Closing ---------- */
.closing { text-align: center; padding-bottom: clamp(90px, 12vw, 150px); }
.closing .lockup { --tile: clamp(84px, 9vw, 110px); margin-bottom: 34px; }
.closing .words span { animation: none; background-position: 0 0; }
.closing h2 { font-size: clamp(30px, 4.4vw, 52px); }
.closing .lead { margin-inline: auto; max-width: 560px; }
.closing .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 28px; margin-top: 28px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 28px; padding-block: 28px 40px; color: var(--dim); font-size: 13px; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 22px; }
.site-footer a { color: var(--muted); }

/* ---------- Support and Privacy pages ---------- */
.doc-hero { position: relative; isolation: isolate; padding: clamp(64px, 10vw, 120px) 0 clamp(30px, 5vw, 50px); overflow: hidden; }
.doc-hero::before { content: ""; position: absolute; inset: -40% -20% 0; z-index: -1; background: radial-gradient(40% 50% at 30% 30%, rgba(24, 125, 163, .35), transparent 70%); }
.doc-hero .wrap, .doc .wrap { max-width: 780px; }
.doc-hero h1 { font-size: clamp(42px, 7vw, 76px); letter-spacing: -.045em; }
.doc-hero .lead { margin: 0; }
.updated { color: var(--dim); font-size: 14px; margin-top: 18px; }
.doc { padding-bottom: clamp(70px, 10vw, 120px); }
.doc h2 { font-size: clamp(24px, 3vw, 30px); letter-spacing: -.02em; margin: 52px 0 14px; }
.doc p, .doc li { color: var(--muted); }
.doc p strong, .doc li strong { color: var(--ink); font-weight: 600; }
.doc ul { padding-left: 22px; }
.contact { margin: 10px 0 20px; padding: clamp(24px, 4vw, 36px); border-radius: var(--radius); background: radial-gradient(90% 140% at 0% 0%, rgba(24, 125, 163, .35), transparent 60%), var(--card); border: 1px solid var(--line-2); }
.contact h2 { margin-top: 0; }
.contact .mail { display: inline-flex; align-items: center; gap: 10px; font-size: clamp(20px, 3vw, 26px); font-weight: 700; overflow-wrap: anywhere; text-decoration: none; margin-bottom: 16px; }
.contact .mail:hover { text-decoration: underline; }
.contact p:last-child { margin-bottom: 0; }
.faq { margin-top: 8px; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { position: relative; cursor: pointer; list-style: none; padding: 22px 44px 22px 0; font-size: 18px; font-weight: 600; color: var(--ink); line-height: 1.4; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 11px; height: 11px; margin-top: -8px; border-right: 2px solid var(--cyan); border-bottom: 2px solid var(--cyan); transform: rotate(45deg); transition: transform .3s var(--ease); }
details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
details p { margin: 0 0 22px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 7px 13px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); text-decoration: none; font-size: 14px; }
.toc a:hover { color: var(--ink); border-color: var(--cyan); }

/* ---------- Phone and tablet ---------- */
@media (max-width: 860px) {
  .step, .folder-grid, .privacy-card { grid-template-columns: 1fr; }
  .step:nth-child(even) { grid-template-columns: 1fr; }
  .step:nth-child(even) .stage-wrap { order: 0; }
  .step .copy { text-align: left; }
  .steps { gap: 90px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  .site-header .wrap { min-height: 56px; }
  .brand span { display: none; }
  .brand img { width: 32px; height: 32px; }
  .site-header nav { gap: 0; }
  .site-header nav a { font-size: 14px; padding: 10px 7px; white-space: nowrap; }
  .hero { margin-top: -56px; padding: 110px 0 90px; min-height: 92svh; }
  .hero h1 { margin-bottom: 30px; }
  .lockup { --tile: 92px; }
  .tagline { font-size: clamp(34px, 11vw, 46px); }
  .hero .lead { font-size: 18px; }
  .f1 { left: -18%; top: 8%; } .f2 { right: -20%; top: 4%; } .f3 { right: -10%; bottom: 6%; } .f4 { left: -12%; bottom: 3%; }
  .f1 .sheet { opacity: .28; } .f2 .sheet { opacity: .24; } .f3 .sheet, .f4 .sheet { opacity: .16; }
  .scroll-cue { display: none; }
  .strip ul { justify-content: flex-start; gap: 10px 24px; font-size: 14px; }
  .step p { font-size: 17px; }
  .stage { border-radius: 18px; }
  .tree { padding: 16px; }
  .tree li { padding: 10px; gap: 10px; }
  .tree .in1 { margin-left: 12px; } .tree .in2 { margin-left: 24px; }
  .tree code { font-size: 12.5px; }
  .ft { min-width: 40px; height: 26px; font-size: 10px; }
  .ratios { gap: 18px 18px; }
  .ratios i { height: 46px; }
  .ticks { grid-template-columns: 1fr; }
  .privacy-card { border-radius: 24px; }
  summary { font-size: 17px; }
}

/* ---------- Reduce Motion: everything rests in its final, readable state ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .words span { background-position: 0 0; }
  .hero-inner { transform: none; opacity: 1; }
  .scroll-cue { display: none; }
}

/* ---------- Print (Support and Privacy) ---------- */
@media print {
  html, body { background: #fff; color: #000; }
  .site-header, .skip, .site-footer nav, .toc { display: none; }
  .doc-hero::before { display: none; }
  .doc p, .doc li, .lead, summary { color: #222; }
  details > p { display: block; }
  a { color: inherit; }
  .contact { background: none; border-color: #999; }
}

/* About Me: SA’s headshot */
.headshot { display: block; width: 160px; height: 160px; border-radius: 50%; object-fit: cover; margin: 0 0 28px; }
