/* FileSway marketing site — shared token system
   Visual thesis: every file sways along one blue ribbon from what you have
   to what the upload box asks for, landing on real FileSway screens. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-var.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand */
  --blue: #3866d6;
  --blue-press: #2d56bd;
  --r1: #274cc4;
  --r2: #487dee;
  --r3: #77a5ff;
  --r4: #9ec5ff;
  --r5: #bdd7ff;
  --ribbon: linear-gradient(100deg, var(--r1) 0%, var(--r2) 38%, var(--r3) 72%, var(--r4) 100%);

  /* Light surfaces */
  --bg: #f4f6fa;
  --bg-2: #edf1f7;
  --track: #e4eaf2;
  --card: #ffffff;
  --ink: #17223b;
  --muted: #65748a;
  --muted-text: #56657c; /* body-size muted, keeps 4.5:1 on --bg */
  --rule: #d9e1ec;
  --rule-strong: #c4cfdf;

  /* Dark (matches FileSway dark mode) */
  --d-bg: #101722;
  --d-card: #192334;
  --d-inner: #222f43;
  --d-ink: #f0f4fc;
  --d-muted: #a6b3c7;
  --d-accent: #9bb7ff;
  --d-rule: #2c3a51;

  /* Splash field */
  --s1: #071532;
  --s2: #123477;
  --s3: #285ec0;

  /* Type */
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-display: clamp(3rem, 1.4rem + 6.4vw, 7.4rem);
  --fs-h2: clamp(2.1rem, 1.25rem + 3.1vw, 4.1rem);
  --fs-h3: clamp(1.25rem, 1.05rem + .6vw, 1.6rem);
  --fs-lead: clamp(1.06rem, 1rem + .35vw, 1.3rem);
  --fs-body: 1rem;
  --fs-small: .875rem;
  --fs-micro: .78rem;

  /* Layout */
  --max: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --section: clamp(84px, 9vw, 150px);

  /* Radii by role */
  --r-device: 15% / 7%;
  --r-panel: 24px;
  --r-tile: 16px;
  --r-pill: 999px;

  /* Motion: one vocabulary — the "sway" */
  --sway-ease: cubic-bezier(.2, .8, .2, 1);
  --sway-dur: 620ms;
  --tap-dur: 160ms;

  --shadow-device: 0 40px 80px -30px rgba(23, 34, 59, .45), 0 18px 36px -18px rgba(39, 76, 196, .35);
  --shadow-soft: 0 1px 0 rgba(255,255,255,.8) inset, 0 12px 30px -18px rgba(23, 34, 59, .28);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.02;
  text-wrap: balance;
}
ul, ol { margin: 0; padding: 0; }
button, input { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}
.on-dark :focus-visible, .final :focus-visible { outline-color: var(--d-accent); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* ---------- Shared bits ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--fs-micro); font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--blue);
}
.eyebrow::before {
  content: ""; width: 26px; height: 10px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 10'%3E%3Cpath d='M1 7c4 0 6-5 11-5s7 6 13 4' fill='none' stroke='%233866D6' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.on-dark .eyebrow { color: var(--d-accent); }
.on-dark .eyebrow::before { filter: brightness(1.7) saturate(.7); }

.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--muted-text); max-width: 34em; }
.on-dark .lead { color: var(--d-muted); }

.btn {
  --h: 54px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--h); padding: 0 26px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 1rem; text-decoration: none; border: 0; cursor: pointer;
  transition: transform var(--tap-dur) ease, background-color var(--tap-dur) ease, box-shadow var(--tap-dur) ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 10px 24px -12px rgba(56, 102, 214, .9); }
.btn-primary:hover { background: var(--blue-press); }
.btn-primary svg { transition: transform var(--sway-dur) var(--sway-ease); }
.btn-primary:hover svg { transform: translateY(2px); }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule-strong); }
.btn-quiet:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }

/* App Store badge (coming soon until js/config.js has a URL) */
.store {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 54px; padding: 0 20px 0 16px; border-radius: var(--r-pill);
  background: var(--ink); color: #fff; text-decoration: none; line-height: 1.15;
}
.store .store-glyph { width: 22px; height: 22px; flex: none; opacity: .95; }
.store small { display: block; font-size: .7rem; font-weight: 500; letter-spacing: .02em; color: #c9d3e6; }
.store strong { display: block; font-weight: 600; font-size: .98rem; letter-spacing: -.01em; }
.store[aria-disabled="true"] { cursor: default; background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule-strong); }
.store[aria-disabled="true"] small { color: var(--muted-text); }
.store.is-live:hover { background: #0c1324; }
.store-sm { min-height: 42px; padding: 0 16px 0 12px; }
.store-sm strong { font-size: .86rem; }
.store-sm small { font-size: .64rem; }
.store-sm .store-glyph { width: 18px; height: 18px; }
.on-dark .store[aria-disabled="true"], .final .store[aria-disabled="true"] { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(240,244,252,.35); }
.on-dark .store[aria-disabled="true"] small, .final .store[aria-disabled="true"] small { color: #c7d3ea; }

.pro-tag {
  display: inline-flex; align-items: center; gap: 5px; vertical-align: middle;
  padding: 2px 9px 2px 7px; border-radius: var(--r-pill);
  font: 700 .68rem/1.5 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
  color: var(--r1); background: #fff; box-shadow: inset 0 0 0 1.5px var(--r3);
  white-space: nowrap;
}
.pro-tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ribbon); }
.on-dark .pro-tag { background: transparent; color: var(--d-accent); box-shadow: inset 0 0 0 1.5px #4a69b8; }

/* Device frame around real simulator captures */
.device {
  position: relative; margin: 0;
  aspect-ratio: 402 / 874;
  border-radius: var(--r-device);
  padding: 2.6%;
  background: linear-gradient(150deg, #2a3446, #0d1320 40%, #1c2433);
  box-shadow: var(--shadow-device);
}
.device::after { /* hairline highlight */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.device img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 13% / 6%;
  background: var(--bg-2);
}
.device-caption { margin-top: 14px; font-size: var(--fs-micro); color: var(--muted); text-align: center; }
.on-dark .device-caption { color: var(--d-muted); }

.sheet-frame {
  margin: 0; border-radius: 26px; overflow: hidden; background: #f3f5f9;
  box-shadow: var(--shadow-device); aspect-ratio: 402 / 778;
}
.sheet-frame img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  transition: background-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.site-header.is-scrolled {
  background: rgba(244, 246, 250, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--rule);
}
.nav { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.32rem; letter-spacing: -.03em; }
.brand-mark { width: 34px; height: 34px; }
.nav-links { display: flex; gap: 4px; list-style: none; margin-left: auto; }
.nav-links a {
  display: inline-block; padding: 8px 12px; border-radius: var(--r-pill);
  text-decoration: none; font-size: .92rem; font-weight: 500; color: var(--muted-text);
  transition: color var(--tap-dur) ease, background-color var(--tap-dur) ease;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); background: rgba(56,102,214,.08); }
.nav-cta { margin-left: 8px; }
.menu-toggle {
  display: none; margin-left: auto; width: 46px; height: 46px; border-radius: 50%;
  border: 0; background: #fff; box-shadow: inset 0 0 0 1.5px var(--rule); cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); position: relative;
  transition: transform .25s var(--sway-ease), background-color .2s;
}
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
.mobile-panel { display: none; }

@media (max-width: 1080px) {
  .nav-links, .nav-cta { display: none; }
  .menu-toggle { display: inline-flex; }
  .mobile-panel {
    display: block; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); box-shadow: 0 1px 0 var(--rule), 0 30px 40px -30px rgba(23,34,59,.35);
    padding: 8px var(--gutter) 24px;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .25s ease, transform .3s var(--sway-ease), visibility 0s linear .3s;
  }
  .mobile-panel.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .mobile-panel ul { list-style: none; }
  .mobile-panel li a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 2px; border-bottom: 1px solid var(--rule);
    text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; letter-spacing: -.02em;
  }
  .mobile-panel .store { margin-top: 20px; }
  .site-header.menu-open { background: var(--bg); }
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; padding-top: clamp(24px, 4vw, 56px); }
.hero-field { position: absolute; inset: -76px 0 -220px 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hero-field svg { position: absolute; width: 100%; height: 100%; }
.hero-field .field-mobile { display: none; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(24px, 4vw, 64px); align-items: start;
}
.hero-copy { padding-top: clamp(24px, 4.2vw, 72px); padding-bottom: clamp(40px, 6vw, 96px); }
.hero h1 { font-size: var(--fs-display); line-height: .92; letter-spacing: -.045em; margin: 22px 0 28px; }
.hero h1 .line { display: block; }
.hero h1 .ribbon-word {
  background: var(--ribbon); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: .06em; /* descender room for background clip */
}
.hero .lead { max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-note { display: flex; align-items: center; gap: 10px; margin-top: 26px; font-size: var(--fs-small); color: var(--muted-text); }
.hero-note svg { width: 18px; height: 18px; flex: none; color: var(--blue); }















@keyframes sway-in {
  0% { opacity: 0; transform: translate(-14px, 8px) rotate(-4deg); }
  100% { opacity: 1; transform: none; }
}

.hero-stage { position: relative; height: 100%; min-height: 640px; }
.hero-device {
  position: relative; width: min(100%, 352px); margin-left: auto; margin-right: clamp(0px, 3vw, 40px);
  margin-top: 8px; margin-bottom: -200px; z-index: 2;
  transform: rotate(2.2deg);
}
.file-chip {
  position: absolute; z-index: 4;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px 10px 10px; border-radius: 18px; background: #fff;
  box-shadow: 0 18px 40px -18px rgba(23,34,59,.45), inset 0 0 0 1px rgba(196,207,223,.7);
  font-size: var(--fs-small); line-height: 1.3; white-space: nowrap;
}
.file-chip strong { display: block; font-weight: 650; }
.file-chip span { color: var(--muted-text); font-size: var(--fs-micro); }
.file-chip img { width: 46px; height: 46px; border-radius: 11px; object-fit: cover; }
.chip-in { left: -6%; top: 22%; }
.chip-out { right: -2%; bottom: 13%; }
.chip-badge {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--ribbon); color: #fff; font: 700 .72rem/1 var(--font-body); letter-spacing: .03em;
}
.drift { animation: drift 14s ease-in-out infinite alternate; transform-origin: 50% 50%; }
.drift-2 { animation-duration: 18s; animation-delay: -6s; }
@keyframes drift { from { transform: translate3d(0,0,0); } to { transform: translate3d(-18px, 12px, 0) rotate(-.6deg); } }

/* ---------- Section scaffolding ---------- */
section { position: relative; }
.section { padding-block: var(--section); }
.section-head { display: grid; gap: 18px; max-width: 760px; }
.section-head h2 { font-size: var(--fs-h2); }
.split-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 24px 64px; align-items: end; max-width: none; }
.split-head .lead { justify-self: end; }

/* How it works — quiet passage */
.how { padding-top: clamp(240px, 22vw, 300px); padding-bottom: clamp(70px, 7vw, 110px); }
.how-row { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 40px; margin-top: 56px; list-style: none; counter-reset: step; }
.how-line { position: absolute; left: 0; right: 0; top: 18px; height: 40px; width: 100%; pointer-events: none; }
.how-row li { position: relative; padding-top: 74px; }
.how-row li::before {
  counter-increment: step; content: "0" counter(step);
  position: absolute; top: 0; left: 0; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--rule-strong);
  font: 700 1rem/1 var(--font-display); color: var(--blue);
}
.how-row h3 { font-size: var(--fs-h3); margin-bottom: 10px; }
.how-row p { color: var(--muted-text); max-width: 26em; }

/* Formats — ruled 3 x 3 index */
.formats { background: var(--card); }
.format-index {
  margin-top: 64px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  border-top: 1px solid var(--rule); border-left: 1px solid var(--rule);
}
.format-index > div {
  position: relative; padding: 30px 30px 34px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  transition: background-color .3s ease;
}
.format-index > div:hover { background: #f7f9fc; }
.format-index dt { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 1.6rem + 2vw, 3.4rem); letter-spacing: -.04em; line-height: 1; }
.format-index dd { margin: 0; }
.format-index .use { margin-top: 14px; font-weight: 600; }
.format-index .limit { margin-top: 6px; font-size: var(--fs-small); color: var(--muted-text); max-width: 30em; }
.format-index .qual { position: absolute; top: 30px; right: 26px; font-size: var(--fs-micro); color: var(--muted-text); font-weight: 600; }
.format-index > div:nth-child(1) dt { background: var(--ribbon); -webkit-background-clip: text; background-clip: text; color: transparent; }
.formats-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; margin-top: 28px; font-size: var(--fs-small); color: var(--muted-text); }
.formats-foot p { max-width: 52em; }

/* Limits — destination instrument */
.limits { background: var(--bg-2); overflow: hidden; }
.limits-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: clamp(28px, 4vw, 64px); margin-top: 64px; align-items: start; }
.instrument { background: var(--card); border-radius: var(--r-panel); box-shadow: var(--shadow-soft), inset 0 0 0 1px rgba(196,207,223,.55); overflow: hidden; }
.instrument-top { padding: 28px 30px 26px; border-bottom: 1px solid var(--rule); }
.instrument-top .k { font-size: var(--fs-micro); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-text); }
.readout { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-top: 8px; }
.readout output { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.4rem, 1.8rem + 2.2vw, 3.6rem); letter-spacing: -.04em; line-height: 1; color: var(--ink); }
.readout .src { color: var(--muted-text); font-size: var(--fs-small); }
.rail { position: relative; margin-top: 30px; height: 64px; }
.rail-track { position: absolute; left: 0; right: 0; top: 22px; height: 10px; border-radius: 10px; background: var(--track); overflow: hidden; }
.rail-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: var(--ribbon); transition: width var(--sway-dur) var(--sway-ease); }
.rail-tick { position: absolute; top: 40px; transform: translateX(-50%); font-size: .7rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rail-tick::before { content: ""; position: absolute; left: 50%; top: -10px; width: 1px; height: 6px; background: var(--rule-strong); }
.rail-tick:first-child { transform: none; }
.rail-tick:first-child::before { left: 0; }
.rail-tick:last-child { transform: translateX(-100%); }
.rail-tick:last-child::before { left: auto; right: 0; }
.rail-marker {
  position: absolute; top: 14px; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%;
  background: #fff; box-shadow: inset 0 0 0 2px var(--r3);
  transition: left var(--sway-dur) var(--sway-ease), transform var(--sway-dur) var(--sway-ease), box-shadow .2s;
}
.rail-marker.is-active { box-shadow: inset 0 0 0 7px var(--blue), 0 6px 16px -4px rgba(56,102,214,.7); transform: scale(1.08); z-index: 2; }
.rail-marker.is-custom { border-radius: 8px; }
.dest-list { list-style: none; }
.dest-list li + li { border-top: 1px solid var(--rule); }
.dest-list label { display: grid; grid-template-columns: 26px 1fr auto; gap: 4px 16px; padding: 18px 30px; cursor: pointer; align-items: start; transition: background-color .2s; }
.dest-list label:hover { background: #f7f9fc; }
.dest-list input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; margin: 2px 0 0; width: 22px; height: 22px; border-radius: 7px;
  box-shadow: inset 0 0 0 2px var(--rule-strong); background: #fff; cursor: pointer; display: grid; place-items: center;
  transition: background-color var(--tap-dur), box-shadow var(--tap-dur);
}
.dest-list input[type="checkbox"]::after {
  content: ""; width: 11px; height: 6px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px) scale(0);
  transition: transform var(--tap-dur) var(--sway-ease);
}
.dest-list input[type="checkbox"]:checked { background: var(--blue); box-shadow: none; }
.dest-list input[type="checkbox"]:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.dest-name { font-weight: 600; }
.dest-px { grid-column: 2; font-size: var(--fs-small); color: var(--muted-text); }
.dest-limit { grid-row: 1; grid-column: 3; font-size: var(--fs-small); font-weight: 650; color: var(--blue); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dest-group { padding: 14px 30px 0; font-size: var(--fs-micro); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-text); }
.custom-limit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 18px 30px 24px; border-top: 1px solid var(--rule); background: #fafbfd; }
.custom-limit .lab { font-weight: 600; margin-right: auto; }
.custom-limit .lab small { display: block; font-weight: 400; color: var(--muted-text); font-size: var(--fs-small); }
.num-input { width: 104px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 0; background: #fff; box-shadow: inset 0 0 0 1.5px var(--rule-strong); font-variant-numeric: tabular-nums; }
.num-input:focus-visible { outline-offset: 2px; }
.seg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--track); }
.seg button { min-height: 38px; min-width: 52px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: transparent; font-weight: 600; font-size: .86rem; cursor: pointer; color: var(--muted-text); transition: background-color var(--tap-dur), color var(--tap-dur); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(23,34,59,.12); }
.instrument-note { padding: 16px 30px 22px; font-size: var(--fs-micro); color: var(--muted-text); border-top: 1px solid var(--rule); }
.limits-proof { position: sticky; top: 110px; }
.limits-proof .sheet-frame { max-width: 320px; margin-inline: auto; }
.limits-quote { margin: 30px auto 0; max-width: 320px; font-family: var(--font-display); font-weight: 600; font-size: 1.28rem; line-height: 1.3; letter-spacing: -.02em; }
.limits-quote::before { content: ""; display: block; width: 40px; height: 14px; margin-bottom: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 14'%3E%3Cpath d='M1 10c6 0 9-8 17-8s11 9 21 6' fill='none' stroke='%233866D6' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat; }
.limits-quote footer { margin-top: 10px; font: 500 var(--fs-micro)/1.4 var(--font-body); color: var(--muted-text); letter-spacing: 0; }

/* Fine-tune — ruled rows beside a real screen */
.tune-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .62fr); gap: clamp(32px, 6vw, 110px); align-items: center; margin-top: 56px; }
.rows { list-style: none; border-top: 1px solid var(--rule); }
.rows li { display: grid; grid-template-columns: 64px 1fr; gap: 6px 20px; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.rows .n { font: 700 .86rem/1.9 var(--font-display); color: var(--blue); letter-spacing: .02em; }
.rows h3 { font-size: var(--fs-h3); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rows p { grid-column: 2; color: var(--muted-text); max-width: 36em; }
.rows code { font-family: var(--font-body); font-weight: 600; color: var(--ink); background: var(--bg-2); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.tune-device { width: min(100%, 320px); margin-inline: auto; transform: rotate(-1.6deg); }

/* PDF tools — the dark island */
.on-dark { background: var(--d-bg); color: var(--d-ink); }
.pdf { border-radius: clamp(28px, 4vw, 48px); margin-inline: clamp(8px, 1.4vw, 20px); overflow: hidden; isolation: isolate; }
.pdf-field { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .9; }
.pdf-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 90px); margin-top: 60px; align-items: start; }
.pdf-devices { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.pdf-devices .device:nth-child(2) { margin-top: 80px; }
.page-demo { background: var(--d-card); border-radius: var(--r-panel); padding: 26px; box-shadow: inset 0 0 0 1px var(--d-rule); }
.page-demo label { display: block; font-weight: 600; margin-bottom: 10px; }
.page-demo .hint { font-size: var(--fs-small); color: var(--d-muted); margin-bottom: 14px; }
.page-demo .row { display: flex; gap: 10px; }
.page-demo input {
  flex: 1; min-width: 0; min-height: 50px; padding: 0 16px; border-radius: 14px; border: 0;
  background: var(--d-inner); color: var(--d-ink); box-shadow: inset 0 0 0 1.5px var(--d-rule); font-size: 1.05rem;
}
.page-demo input:focus-visible { outline-color: var(--d-accent); }
.page-demo .status { margin-top: 14px; font-size: var(--fs-small); color: var(--d-muted); min-height: 1.5em; }
.page-demo .status strong { color: var(--d-ink); }
.page-demo .status.is-error { color: #ffb4c0; }
.page-strip { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 10px; margin-top: 18px; }
.page-strip li {
  position: relative; aspect-ratio: 3 / 4; border-radius: 8px; background: #f4f6fa; color: var(--ink);
  display: grid; place-items: center; font: 700 1.05rem/1 var(--font-display);
  box-shadow: 0 6px 14px -8px rgba(0,0,0,.6);
  animation: sway-in var(--sway-dur) var(--sway-ease) both;
}
.page-strip li::before { content: ""; position: absolute; left: 18%; right: 18%; top: 16%; height: 3px; border-radius: 2px; background: #c9d5e8; box-shadow: 0 6px 0 #dbe3ef, 0 12px 0 #dbe3ef; }
.page-strip li span { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font: 500 .62rem/1 var(--font-body); color: var(--d-muted); }
.page-strip { padding-bottom: 18px; }
.pdf-rows { list-style: none; margin-top: 36px; border-top: 1px solid var(--d-rule); }
.pdf-rows li { padding: 20px 0; border-bottom: 1px solid var(--d-rule); display: grid; gap: 6px; }
.pdf-rows strong { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; letter-spacing: -.02em; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pdf-rows p { color: var(--d-muted); font-size: .96rem; }
.pdf-fine { margin-top: 40px; font-size: var(--fs-micro); color: var(--d-muted); max-width: 70em; }

/* Privacy — type only */
.privacy-block { padding-block: clamp(100px, 11vw, 170px); }
.privacy-statement { font-size: clamp(2rem, 1.1rem + 3.3vw, 4.3rem); line-height: 1.04; letter-spacing: -.04em; max-width: 16.5em; margin-top: 26px; }
.privacy-statement em { font-style: normal; background: var(--ribbon); -webkit-background-clip: text; background-clip: text; color: transparent; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0 40px; margin-top: 64px; list-style: none; }
.facts li { padding-top: 22px; border-top: 2px solid var(--ink); }
.facts li:nth-child(3) { border-top-color: var(--rule-strong); }
.facts h3 { font-size: 1.2rem; margin-bottom: 8px; letter-spacing: -.02em; }
.facts p { color: var(--muted-text); font-size: .96rem; }
.text-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 36px; font-weight: 600; color: var(--blue); text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }
.text-link:hover { color: var(--blue-press); }

/* Appearance strip */
.looks { background: var(--bg-2); }
.looks-row { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: clamp(20px, 4vw, 64px); margin-top: 60px; align-items: end; }
.looks-row figure { margin: 0; }
.looks-row .device { width: min(100%, 280px); margin-inline: auto; }
.looks-row figcaption { margin-top: 22px; text-align: center; }
.looks-row figcaption strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: -.02em; }
.looks-row figcaption span { font-size: var(--fs-small); color: var(--muted-text); }

/* Free vs Pro */
.pro-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 4vw, 64px); margin-top: 60px; align-items: start; }
.pro-card {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--r-panel); padding: 34px; color: #fff;
  background: linear-gradient(150deg, var(--s2), var(--s3) 70%, #3a72d8);
  box-shadow: 0 30px 60px -30px rgba(18, 52, 119, .8);
}
.pro-card svg.pro-ribbon { position: absolute; right: -60px; bottom: -40px; width: 340px; z-index: -1; opacity: .9; }
.pro-card .kicker { font-size: var(--fs-micro); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #cfe0ff; }
.pro-card h3 { font-size: 2rem; margin-top: 10px; }
.price { display: flex; align-items: baseline; gap: 10px; margin-top: 18px; }
.price b { font-family: var(--font-display); font-size: 3.6rem; letter-spacing: -.05em; line-height: 1; }
.price span { color: #dce7ff; font-size: var(--fs-small); }
.pro-card .official { margin-top: 20px; color: #e8efff; max-width: 30em; }
.pro-card ul { list-style: none; margin-top: 24px; display: grid; gap: 10px; }
.pro-card li { display: flex; gap: 10px; align-items: flex-start; }
.pro-card li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.6 2.5L13 6.5' fill='none' stroke='%23274CC4' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; }
.pro-card .small { margin-top: 24px; font-size: var(--fs-micro); color: #cfdcf6; }
.compare { width: 100%; border-collapse: collapse; font-size: .96rem; }
.compare caption { text-align: left; font-size: var(--fs-small); color: var(--muted-text); padding-bottom: 14px; caption-side: bottom; padding-top: 16px; }
.compare th, .compare td { padding: 18px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.compare thead th { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: -.02em; border-bottom: 2px solid var(--ink); padding-top: 0; }
.compare thead th:not(:first-child), .compare td { width: 22%; text-align: center; }
.compare tbody th { font-weight: 500; }
.compare tbody th small { display: block; color: var(--muted-text); font-size: var(--fs-micro); font-weight: 400; margin-top: 2px; }
.yes, .no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.yes { background: var(--blue); }
.yes::after { content: ""; width: 10px; height: 5px; border: solid #fff; border-width: 0 0 2.2px 2.2px; transform: rotate(-45deg) translate(1px, -1px); }
.no { box-shadow: inset 0 0 0 1.5px var(--rule-strong); }
.no::after { content: ""; width: 9px; height: 1.6px; background: var(--muted); }
.compare .txt { font-weight: 600; font-size: .92rem; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: clamp(28px, 5vw, 90px); align-items: start; }
.faq-aside { position: sticky; top: 110px; }
.faq-aside p { margin-top: 18px; color: var(--muted-text); }
.faq-list { border-top: 1px solid var(--rule); }
.faq-list details { border-bottom: 1px solid var(--rule); }
.faq-list summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 24px 2px; font-family: var(--font-display); font-weight: 600; font-size: 1.22rem; letter-spacing: -.02em; line-height: 1.25;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; flex: none; width: 34px; height: 34px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--rule-strong);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Cpath d='M11 17h12M17 11v12' stroke='%2317223B' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center no-repeat;
  transition: transform var(--sway-dur) var(--sway-ease), background-color .2s;
}
.faq-list details[open] summary::after { transform: rotate(135deg); background-color: #fff; }
.faq-list summary:hover::after { box-shadow: inset 0 0 0 1.5px var(--ink); }
.faq-list .answer { padding: 0 60px 26px 2px; color: var(--muted-text); }
.faq-list .answer p + p { margin-top: 10px; }
.faq-list .answer a { color: var(--blue); font-weight: 600; }

/* Final CTA — the app's splash field */
.final {
  position: relative; overflow: hidden; isolation: isolate; color: #fff;
  margin: 0 clamp(8px, 1.4vw, 20px); border-radius: clamp(28px, 4vw, 48px);
  background: linear-gradient(135deg, var(--s1), var(--s2) 52%, var(--s3));
  padding-block: clamp(90px, 10vw, 160px);
}
.final-field { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.final-field svg { width: 100%; height: 100%; }
.final-inner { display: grid; justify-items: center; text-align: center; gap: 26px; }
.final-icon { width: 104px; height: 104px; border-radius: 23%; box-shadow: 0 24px 50px -16px rgba(0,0,0,.55); }
.final h2 { font-size: clamp(2.6rem, 1.4rem + 5vw, 6.2rem); letter-spacing: -.045em; line-height: .95; }
.final p { color: #d6e2fb; max-width: 34em; font-size: var(--fs-lead); }
.final .btn-quiet { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4); }
.final .btn-quiet:hover { box-shadow: inset 0 0 0 1.5px #fff; }
.final-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Footer */
.site-footer { padding: 72px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(2, minmax(0, .8fr)); gap: 40px; padding-bottom: 48px; border-bottom: 1px solid var(--rule); }
.footer-grid p { margin-top: 14px; color: var(--muted-text); max-width: 26em; font-size: .95rem; }
.footer-grid h2 { font-family: var(--font-body); font-size: var(--fs-micro); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-text); margin-bottom: 14px; }
.footer-grid ul { list-style: none; display: grid; gap: 10px; }
.footer-grid a { text-decoration: none; font-weight: 500; }
.footer-grid a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; font-size: var(--fs-small); color: var(--muted-text); }

/* ---------- Secondary pages ---------- */
.page-hero { position: relative; isolation: isolate; padding: clamp(56px, 8vw, 120px) 0 clamp(40px, 5vw, 72px); overflow: hidden; }
.page-hero svg.page-ribbon { position: absolute; right: -6%; top: -30%; width: min(62vw, 820px); z-index: -1; pointer-events: none; }
.page-hero h1 { font-size: clamp(2.8rem, 1.6rem + 5vw, 6rem); letter-spacing: -.045em; line-height: .95; margin-top: 20px; max-width: 11em; }
.page-hero .lead { margin-top: 24px; }
.prose-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(28px, 6vw, 100px); padding-bottom: var(--section); }
.toc { position: sticky; top: 110px; align-self: start; list-style: none; border-left: 2px solid var(--rule); }
.toc a { display: block; padding: 7px 0 7px 16px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--muted-text); font-size: .92rem; font-weight: 500; }
.toc a:hover { color: var(--ink); border-left-color: var(--blue); }
.prose { max-width: 44em; }
.prose h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); margin: 56px 0 14px; scroll-margin-top: 100px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #3c4a62; font-size: 1.04rem; line-height: 1.7; }
.prose p + p { margin-top: 14px; }
.prose ul { padding-left: 1.2em; margin-top: 12px; display: grid; gap: 8px; }
.prose a { color: var(--blue); font-weight: 600; }
.prose .callout { margin: 22px 0; padding: 20px 22px; border-radius: var(--r-tile); background: var(--card); box-shadow: inset 0 0 0 1px var(--rule); }
.prose .callout p { color: var(--ink); font-weight: 500; }
.contact-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
  padding: clamp(26px, 3vw, 40px); border-radius: var(--r-panel); background: var(--card);
  box-shadow: var(--shadow-soft), inset 0 0 0 1px rgba(196,207,223,.55); margin-bottom: 64px;
}
.contact-card h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); }
.contact-card p { margin-top: 10px; color: var(--muted-text); }
.contact-card .mail { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.1rem, 1rem + .6vw, 1.5rem); color: var(--blue); }
.help-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 40px; border-top: 1px solid var(--rule); margin-bottom: 72px; }
.help-list li { padding: 18px 0; border-bottom: 1px solid var(--rule); font-weight: 500; display: flex; gap: 14px; }
.help-list li::before { content: ""; flex: none; width: 22px; height: 10px; margin-top: 8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 10'%3E%3Cpath d='M1 7c4 0 6-5 11-5s7 6 13 4' fill='none' stroke='%233866D6' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain; }
.notfound { min-height: 72vh; display: grid; align-items: center; }
.notfound .code { font-family: var(--font-display); font-weight: 700; font-size: clamp(6rem, 3rem + 14vw, 15rem); line-height: .85; letter-spacing: -.06em; background: var(--ribbon); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Reveal (sway) ---------- */
.js .reveal { opacity: 0; transform: translate(-10px, 22px) rotate(-.6deg); transition: opacity var(--sway-dur) ease, transform calc(var(--sway-dur) * 1.4) var(--sway-ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); }


  .chip-in { left: -14%; }
  .limits-grid { grid-template-columns: minmax(0, 1fr) minmax(0, .7fr); }
  .pdf-grid { grid-template-columns: 1fr; }
  .pdf-devices { max-width: 640px; }
  .pro-grid { grid-template-columns: 1fr; }
  .pro-card { max-width: 640px; }
}

@media (max-width: 820px) {
  .hero-field .field-desktop { display: none; }
  .hero-field .field-mobile { display: block; }
  .hero-field { inset: 0 0 -120px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 0; }
  .hero-copy { padding-bottom: 8px; padding-top: 18px; }
  .hero h1 { margin: 18px 0 20px; }
  .hero-actions { margin-top: 26px; }
  .hero-actions .btn, .hero-actions .store { flex: 1 1 200px; }
  .hero-stage { min-height: 0; padding: 40px 0 0; }
  .hero-device { width: min(70vw, 300px); margin: 0 auto -150px; transform: rotate(1.5deg); }
  .chip-in { left: max(-12vw, -54px); top: 16%; }
  .chip-out { right: max(-10vw, -46px); bottom: 20%; }



  .how { padding-top: 210px; }
  .how-row { grid-template-columns: 1fr; gap: 0; margin-top: 40px; }
  .how-line { display: none; }
  .how-row li { padding: 22px 0 22px 80px; border-top: 1px solid var(--rule); }
  .how-row li::before { top: 22px; }
  .split-head { grid-template-columns: 1fr; }
  .split-head .lead { justify-self: start; }
  .format-index { grid-template-columns: 1fr 1fr; margin-top: 44px; }
  .format-index > div { padding: 22px 18px 24px; }
  .format-index .qual { position: static; display: block; margin-top: 6px; }
  .limits-grid { grid-template-columns: 1fr; margin-top: 44px; }
  .limits-proof { position: static; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 22px; align-items: center; }
  .limits-proof .sheet-frame { max-width: none; }
  .limits-quote { margin: 0; font-size: 1.12rem; }
  .tune-grid { grid-template-columns: 1fr; margin-top: 36px; }
  .tune-device { width: min(72vw, 290px); grid-row: 1; }
  .pdf-devices { grid-template-columns: 1fr 1fr; gap: 14px; }
  .pdf-devices .device:nth-child(2) { margin-top: 48px; }
  .facts { grid-template-columns: 1fr; gap: 28px; margin-top: 44px; }
  .looks-row { grid-template-columns: repeat(3, minmax(64%, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--gutter) 24px; margin-inline: calc(-1 * var(--gutter)); gap: 18px; scrollbar-width: none; }
  .looks-row::-webkit-scrollbar { display: none; }
  .looks-row figure { scroll-snap-align: center; }
  .faq-grid { grid-template-columns: 1fr; }
  .faq-aside { position: static; }
  .faq-list .answer { padding-right: 8px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .prose-grid { grid-template-columns: 1fr; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 6px; border-left: 0; }
  .toc a { border: 1px solid var(--rule); border-radius: var(--r-pill); padding: 6px 12px; margin: 0; background: #fff; }
  .contact-card { grid-template-columns: 1fr; }
  .help-list { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  :root { --section: 76px; }
  .dest-list label { grid-template-columns: 24px 1fr; padding: 16px 20px; }
  .dest-limit { grid-column: 2; grid-row: auto; }
  .dest-group, .instrument-top, .custom-limit, .instrument-note { padding-left: 20px; padding-right: 20px; }
  .rail-tick:nth-child(even) { display: none; }
  .limits-proof { grid-template-columns: 1fr; }
  .limits-proof .sheet-frame { max-width: 280px; }
  .file-chip { padding: 8px 12px 8px 8px; gap: 10px; border-radius: 15px; }
  .file-chip img, .chip-badge { width: 38px; height: 38px; }
  .chip-in { left: -8px; top: 8%; }
  .chip-out { right: -8px; bottom: 22%; }
  .format-index { grid-template-columns: 1fr; }
  .format-index > div { display: grid; grid-template-columns: 96px 1fr; gap: 2px 16px; }
  .format-index dt { grid-row: span 3; font-size: 2rem; }
  .format-index .use { margin-top: 2px; }
  .compare th, .compare td { padding: 14px 6px; }
  .compare thead th { font-size: 1.05rem; }
  .compare { font-size: .9rem; }
  .pro-card { padding: 26px; }
  .price b { font-size: 3rem; }
  .pdf-rows strong { font-size: 1.08rem; }
  .page-demo { padding: 20px; }
  .final-actions .btn, .final-actions .store { flex: 1 1 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .drift { animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero-device, .tune-device { transform: none; }
}

/* --- additions --- */
.how-track { position: relative; margin-top: 56px; }
.how-track .how-row { margin-top: 0; }
.stage-field { display: none; }
@media (max-width: 820px) {
  .stage-field { display: block; position: absolute; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); top: 0; width: calc(100% + 2 * var(--gutter)); height: 100%; z-index: 0; }
  .hero-field { display: none; }
}

/* --- hero layout v3: copy left, centred on the phone; stage right; mobile: copy then stage --- */
.hero-grid { grid-template-areas: "copy stage"; grid-template-rows: auto; }
.hero-copy { grid-area: copy; padding-top: clamp(12px, 2.4vw, 40px); padding-bottom: 0; }
.hero h1 { margin: 18px 0 24px; }
.hero-actions { margin-top: 30px; }
.hero-note { margin-top: 22px; }
.hero-stage { grid-area: stage; }

.chip-in { left: -24%; top: 25%; }
.chip-out { right: -14%; bottom: 2%; }
@media (max-width: 1080px) {
  .chip-in { left: -18%; }
  .chip-out { right: -6%; }
}
@media (max-width: 820px) {
  .hero-grid { grid-template-areas: "copy" "stage"; grid-template-rows: auto; }
  .hero-copy { padding-top: 12px; }
  .hero h1 { margin: 14px 0 16px; }
  .hero .lead { font-size: 1.04rem; }
  .hero-actions { margin-top: 22px; gap: 10px; }
  .hero-actions .btn, .hero-actions .store { min-height: 50px; }
  .hero-note { margin-top: 16px; font-size: .82rem; }
  .hero-stage { padding-top: 34px; }
  .hero-device { margin-bottom: 0; }

  .how { padding-top: 96px; }
  .chip-in { left: -12%; top: 24%; }
  .chip-out { right: -10%; bottom: 4%; }
}
@media (max-width: 520px) {
  .chip-in { left: -18px; top: 22%; }
  .chip-out { right: -18px; bottom: 5%; }
}

/* transit ribbon: carries the file from the input chip, behind the phone, to the output chip */
.transit { position: absolute; z-index: 0; left: -62%; top: -6%; width: 224%; height: 116%; pointer-events: none; overflow: visible; }
.hero-device .device { z-index: 1; }
.chip-badge { background: linear-gradient(135deg, var(--r1), var(--r2)); }
.transit { left: -62%; top: -6%; width: 224%; height: auto; aspect-ratio: 224 / 252; }
.transit { max-width: none; }
.file-chip .chip-badge { color: #fff; font-size: .72rem; }
.hero { overflow-x: clip; } .pdf, .final, .limits { overflow: clip; }
@media (max-width: 520px) {
  .limits-proof { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 18px; align-items: center; }
  .limits-proof .sheet-frame { border-radius: 18px; }
  .limits-quote { font-size: 1rem; }
  .pdf-devices { grid-template-columns: 1.2fr .8fr; gap: 12px; }
  .pdf-devices .device:nth-child(2) { margin-top: 90px; }
}
@media (max-width: 400px) { .eyebrow-extra { display: none; } }
/* text-safe ribbon gradient: ends at #4F84EC so large display text keeps >= 3:1 on --bg */
:root { --ribbon-text: linear-gradient(100deg, #274CC4 0%, #3866D6 45%, #4F84EC 100%); }
.hero h1 .ribbon-word, .privacy-statement em, .format-index > div:nth-child(1) dt, .notfound .code { background-image: var(--ribbon-text); }
.eyebrow-extra { margin-left: -10px; }

/* keep hero copy above the transit ribbon where the columns get close (around 1024px) */
.hero-copy { position: relative; z-index: 3; }
/* --- hero v3 balance: the row is exactly the phone's height, so the copy centres on the phone;
       the phone still overhangs into "How it works" via the grid's negative margin --- */
@media (min-width: 821px) {
  .hero-grid { align-items: center; margin-bottom: -40px; }
  .hero-stage { min-height: 0; height: auto; align-self: start; }
  .hero-device { margin-bottom: 0; }
  .hero-copy { align-self: center; padding-top: 0; padding-bottom: 0; }
}
/* shorter screens crop the phone at the fold: centre on the visible part instead */
@media (min-width: 821px) and (max-height: 860px) {
  .hero-copy { margin-top: -80px; }
}
@media (min-width: 821px) { .hero .lead { max-width: 34em; } }
.hero .lead { text-wrap: pretty; }
.stage-field { max-width: none; } /* full-bleed on mobile: escape the global svg max-width cap */

@media (min-width: 821px) and (max-width: 1080px) { .how { padding-top: 290px; } }

/* ---------- Hero demo video (real screen recording) ---------- */
/* The frame takes the recording's own aspect (588 x 1280), so nothing is cropped or letterboxed. */
.device.device-video { aspect-ratio: auto; }
.device-video .demo-video {
  display: block; width: 100%; height: auto; aspect-ratio: 588 / 1280;
  border-radius: 13% / 6%; background: #101722; object-fit: cover;
}
.video-toggle {
  position: absolute; z-index: 5; left: -58px; bottom: 7%;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--ink);
  background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px -14px rgba(23, 34, 59, .55), inset 0 0 0 1px rgba(196, 207, 223, .8);
  transition: transform var(--tap-dur) ease, background-color var(--tap-dur) ease;
}
.video-toggle:hover { background: #fff; }
.video-toggle:active { transform: scale(.94); }
.video-toggle svg { width: 16px; height: 16px; fill: currentColor; }
.video-toggle .i-play { display: none; margin-left: 2px; }
.video-toggle[aria-pressed="true"] .i-pause { display: none; }
.video-toggle[aria-pressed="true"] .i-play { display: block; }
.chip-badge-in { background: var(--bg-2) !important; color: var(--blue) !important; box-shadow: inset 0 0 0 1px var(--rule); }
.chip-badge-in svg { width: 24px; height: 24px; }
@media (max-width: 520px) {
  .video-toggle { left: -46px; width: 36px; height: 36px; }
  .chip-badge-in svg { width: 20px; height: 20px; }
}
/* video hero: keep the input chip mostly off the screen so it doesn't hide app UI */
@media (min-width: 1081px) { .chip-in { left: -33%; } }
/* chips: floating on the phone on desktop; a calm pair under the phone on small screens */
.chip-pair { display: contents; }
@media (max-width: 820px) {
  .hero-stage { padding-bottom: 86px; }
  .chip-pair {
    position: absolute; z-index: 4; left: 50%; top: calc(100% + 18px);
    display: flex; align-items: center; gap: 10px; width: max-content;
    transform: translateX(-50%) rotate(-1.5deg);
  }
  .chip-pair .file-chip { position: static; padding: 8px 14px 8px 8px; gap: 10px; border-radius: 15px; }
  .chip-pair .file-chip .chip-badge { width: 38px; height: 38px; border-radius: 10px; }
  .chip-pair::before { content: ""; order: 1; width: 14px; height: 2px; border-radius: 2px; background: var(--r3); }
  .chip-pair .chip-in { order: 0; }
  .chip-pair .chip-out { order: 2; }
}
@media (max-width: 520px) {
  .chip-pair { gap: 6px; }
  .chip-pair::before { width: 8px; }
  .chip-pair .file-chip { padding: 7px 10px 7px 7px; gap: 8px; }
  .chip-pair .file-chip .chip-badge { width: 34px; height: 34px; }
  .chip-pair .file-chip span { font-size: .72rem; }
}
@media (max-width: 374px) {
  .chip-pair .file-chip strong { font-size: .8rem; }
  .chip-pair .file-chip span { font-size: .68rem; }
  .chip-pair .file-chip .chip-badge { width: 30px; height: 30px; font-size: .62rem; }
  .chip-pair .chip-badge-in svg { width: 17px; height: 17px; }
}
@media (max-width: 820px) { .video-toggle { left: -20px; bottom: 9%; } }
@media (max-width: 340px) { .chip-pair { left: calc(50% + 6px); } }
