/* Copyright (c) 2026 Ordo contributors. SPDX-License-Identifier: GPL-3.0-or-later */
/* Geologica: SIL Open Font License 1.1, see fonts/OFL.txt */
@font-face {
  font-family: "Geologica";
  src: url("fonts/geologica-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  /* Ordo's own night palette (app/src/main/res/values/ordo_m3_colors.xml, ai_colors.xml) */
  --black: #000;
  --surface: #0b1018;
  --surface-2: #121a26;
  --surface-3: #1a2230;
  --line: #1e293b;
  --text: #e6edf5;
  --muted: #9aa8ba;
  --cyan: #67e8f9;
  --cyan-deep: #155e75;
  --cyan-ink: #083344;
  --glow-1: #22d3ee;
  --glow-2: #3b82f6;
  --glow-3: #34d399;
  --danger: #f87171;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-in: cubic-bezier(0.05, 0.7, 0.1, 1);
  --ease-out: cubic-bezier(0.3, 0, 1, 1);
  --slow: 1;
  --gutter: 16px;
  --max: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font: 400 1.0625rem/1.6 "Geologica", system-ui, sans-serif;
  font-synthesis: none;
  overflow-x: clip;
}
::selection { background: var(--cyan); color: var(--cyan-ink); }
a { color: var(--cyan); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
img, video, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--cyan); color: var(--cyan-ink); padding: 10px 16px; border-radius: 999px; }
.skip:focus { left: 16px; }
.ico { width: 1em; height: 1em; fill: currentColor; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Header: the app's glass bar, one row ---------- */
.bar {
  position: sticky; top: 10px; z-index: 20;
  margin: 10px auto 0; width: min(var(--max), calc(100% - 2 * var(--gutter)));
  display: flex; align-items: center; gap: 4px;
  padding: 6px 6px 6px 14px;
  border-radius: 999px;
  background: rgb(11 16 24 / 0.72);
  border: 1px solid rgb(230 237 245 / 0.08);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 1.125rem; margin-right: auto; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.bar nav { display: none; gap: 2px; }
.bar nav a, .lang { color: var(--muted); text-decoration: none; padding: 10px 14px; border-radius: 999px; font-size: 0.9375rem; transition: color 120ms, background-color 120ms; }
.bar nav a:hover, .lang:hover { color: var(--text); background: rgb(230 237 245 / 0.06); }
.lang { font-weight: 500; }
.bar .btn { padding: 10px 18px; min-height: 44px; }
@media (min-width: 860px) { .bar nav { display: flex; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 24px; border-radius: 999px;
  font: inherit; font-weight: 500; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn .ico { width: 20px; height: 20px; }
.btn-primary { background: var(--cyan); color: var(--cyan-ink); }
.btn-primary:hover { background: #a5f3fc; text-decoration: none; }
.btn-ghost { color: var(--text); border-color: rgb(230 237 245 / 0.18); background: transparent; }
.btn-ghost:hover { border-color: rgb(230 237 245 / 0.4); text-decoration: none; }
.btn small { display: block; font-size: 0.75rem; font-weight: 400; opacity: 0.8; }
.btn-stack { flex-direction: row; text-align: left; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 32px; }
.hero .wrap { display: grid; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.75rem, 11vw, 5.75rem); line-height: 0.98; letter-spacing: -0.035em; }
.hero .lede { margin-top: 24px; font-size: clamp(1.125rem, 2.2vw, 1.3125rem); color: var(--muted); max-width: 34ch; }
.hero .lede strong { color: var(--text); font-weight: 500; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 28px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.9375rem; }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts .ico { color: var(--cyan); width: 18px; height: 18px; }
@media (min-width: 960px) {
  .hero { padding: 40px 0 56px; }
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; column-gap: 64px; row-gap: 0; }
  .hero .stage { display: contents; }
  .hero .phone { grid-column: 2; grid-row: 1 / span 2; justify-self: center; }
  .hero .ruler { grid-column: 1; grid-row: 2; align-self: start; margin-top: 56px; width: min(100%, 440px); }
  .hero .wrap > div:first-child { align-self: end; }
}

/* ---------- Phone object ---------- */
.stage { display: grid; justify-items: center; gap: 22px; }
.phone {
  --pw: clamp(260px, min(72vw, (100svh - 190px) * 0.4615), 330px);
  container-type: inline-size;
  width: var(--pw); aspect-ratio: 9 / 19.5;
  padding: 9px; border-radius: calc(var(--pw) * 0.15);
  background: linear-gradient(160deg, #2a313c, #0e1116 40%, #1b2028);
  box-shadow: 0 40px 80px -20px rgb(0 0 0 / 0.9), inset 0 0 0 1px rgb(255 255 255 / 0.06);
  position: relative; flex: none;
}
.phone::before { /* punch-hole camera */
  content: ""; position: absolute; z-index: 3; top: calc(9px + var(--pw) * 0.03); left: 50%;
  width: calc(var(--pw) * 0.034); aspect-ratio: 1; border-radius: 50%; transform: translateX(-50%);
  background: #05070a; box-shadow: inset 0 0 0 1.5px #1c222b;
}
.screen {
  height: 100%; border-radius: calc(var(--pw) * 0.125); overflow: hidden;
  background: var(--black); color: var(--text); position: relative;
  font-size: 3.6cqw; line-height: 1.3;
}
.screen > img.real { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.sb { display: flex; justify-content: space-between; align-items: center; padding: 3.2cqw 6cqw 0; font-size: 3.4cqw; color: var(--muted); height: 9cqw; }
.sb i { display: inline-block; width: 4cqw; height: 2.6cqw; border-radius: 0.6cqw; background: var(--muted); margin-left: 1.2cqw; opacity: 0.8; }
.sb i:first-child { width: 3.4cqw; border-radius: 50% 50% 0.4cqw 0.4cqw; }

/* home screen pieces */
.screen::after { content: ""; position: absolute; left: 50%; bottom: 2.4cqw; width: 30cqw; height: 1.1cqw; border-radius: 9cqw; background: rgb(230 237 245 / 0.55); transform: translateX(-50%); z-index: 5; }
.gbar { display: flex; align-items: center; gap: 3.4cqw; margin: 1.6cqw 3.4cqw 2.4cqw; padding: 0 3.6cqw; height: 11.5cqw; border-radius: 99cqw; background: rgb(26 34 48 / 0.85); color: var(--muted); }
.gbar .ico { width: 5cqw; height: 5cqw; color: var(--text); }
.gbar span { margin-right: auto; }
.gbar .wand { color: var(--cyan); }
.lbl { padding: 2cqw 5cqw 1.6cqw; font-size: 3.7cqw; font-weight: 500; }
.recents { display: flex; gap: 2cqw; padding: 0 4cqw 1cqw; }
.recents div { flex: 1; min-width: 0; border-radius: 2.6cqw; background: var(--surface-2); padding: 2cqw; display: grid; gap: 1.4cqw; font-size: 2.7cqw; color: var(--muted); }
.recents div > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recents .thumb { height: 9cqw; border-radius: 1.6cqw; display: grid; place-items: center; }
.recents .thumb .ico { width: 5cqw; height: 5cqw; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2cqw; padding: 0 4cqw; }
.tile { position: relative; border-radius: 3.4cqw; background: var(--surface-2); padding: 7cqw 2.6cqw 2.2cqw; font-size: 3.2cqw; font-weight: 500; }
.tile small { display: block; font-size: 2.5cqw; font-weight: 400; color: var(--muted); margin-top: 0.4cqw; white-space: nowrap; }
.tile .dot { position: absolute; top: 2.2cqw; right: 2.2cqw; width: 6.4cqw; height: 6.4cqw; border-radius: 1.8cqw; margin: 0; }
.row .dot { width: 8cqw; height: 8cqw; border-radius: 50%; display: grid; place-items: center; margin-bottom: 1.8cqw; }
.tile .dot .ico, .row .dot .ico, .storage .dot .ico { width: 4.4cqw; height: 4.4cqw; }
.rows { display: grid; gap: 2cqw; padding: 2cqw 4cqw 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 2cqw; padding: 2cqw 4cqw 0; }
.pair .row { padding: 2.2cqw 2.4cqw; gap: 2.2cqw; }
.row { display: flex; align-items: center; gap: 3cqw; border-radius: 3.4cqw; background: var(--surface-2); padding: 2.2cqw 3cqw; font-size: 3.3cqw; font-weight: 500; }
.row .dot { margin: 0; }
.row small { display: block; font-weight: 400; color: var(--muted); font-size: 2.7cqw; }
.storage { margin: 0 4cqw; border-radius: 3.4cqw; background: var(--surface-2); padding: 3cqw 3.4cqw; font-size: 3.3cqw; }
.storage header { display: flex; align-items: center; gap: 2.6cqw; font-weight: 500; }
.storage header small { display: block; font-weight: 400; color: var(--muted); font-size: 2.7cqw; }
.storage header b { margin-left: auto; color: var(--cyan); font-size: 5cqw; font-weight: 600; }
.storage .dot { width: 8cqw; height: 8cqw; border-radius: 2.2cqw; display: grid; place-items: center; }
.sbtn { display: grid; grid-template-columns: 1fr 1fr; gap: 2cqw; margin-top: 3cqw; }
.sbtn span { display: flex; align-items: center; justify-content: center; gap: 1.4cqw; height: 8.6cqw; border-radius: 99cqw; border: 0.3cqw solid var(--line); color: var(--cyan); font-weight: 500; font-size: 3cqw; }
.sbtn span.on { background: var(--cyan-deep); border-color: transparent; color: #cffafe; }
.sbtn .ico { width: 3.8cqw; height: 3.8cqw; }
.meter { height: 2.2cqw; border-radius: 9cqw; background: var(--surface-3); margin-top: 2.4cqw; overflow: hidden; }
.meter i { display: block; height: 100%; width: 62%; border-radius: inherit; background: var(--cyan); transform-origin: left; }

/* category tint pairs: app colours (home_colors.xml) on dark */
.c-img { background: rgb(124 58 237 / 0.22); color: #c4b5fd; }
.c-vid { background: rgb(220 38 38 / 0.22); color: #fca5a5; }
.c-aud { background: rgb(217 119 6 / 0.22); color: #fcd34d; }
.c-doc { background: rgb(37 99 235 / 0.22); color: #93c5fd; }
.c-dl { background: rgb(101 163 13 / 0.22); color: #bef264; }
.c-apk { background: rgb(22 163 74 / 0.22); color: #86efac; }
.c-arc { background: rgb(180 83 9 / 0.24); color: #fdba74; }
.c-app { background: rgb(79 70 229 / 0.24); color: #a5b4fc; }
.c-del { background: rgb(113 113 122 / 0.28); color: #d4d4d8; }
.c-vault { background: rgb(15 118 110 / 0.3); color: #5eead4; }
.c-bak { background: rgb(2 132 199 / 0.26); color: #7dd3fc; }

/* ---------- The build: one authored sequence ---------- */
/* Times are real: app frame by ~200 ms, storage card at 550 ms (Galaxy Tab S9 Ultra). --slow stretches them. */
@media (prefers-reduced-motion: no-preference) {
  .armed:not(.run) .b { opacity: 0; }
  .armed:not(.run) .meter i { transform: scaleX(0); }
  .run .b { animation: rise calc(var(--slow) * 220ms) var(--ease-in) both; animation-delay: calc(var(--slow) * var(--t, 0ms)); }
  .run .meter i { animation: grow calc(var(--slow) * 600ms) var(--ease) both; animation-delay: calc(var(--slow) * 560ms); }
}
@keyframes rise { from { opacity: 0; transform: translateY(3cqw) scale(0.985); filter: blur(4px); } }
@keyframes grow { from { transform: scaleX(0); } }

/* time ruler under the phone */
.ruler { width: min(100%, 360px); font-size: 0.875rem; color: var(--muted); }
.ruler .track { position: relative; height: 34px; margin: 0 6px; }
.ruler .track::before { content: ""; position: absolute; left: 0; right: 0; top: 16px; height: 1px; background: var(--line); }
.ruler .fill { position: absolute; left: 0; top: 15px; height: 3px; width: 100%; border-radius: 2px; background: var(--cyan); transform-origin: left; transform: scaleX(var(--p, 1)); }
.ruler .mark { position: absolute; top: 8px; width: 1px; height: 17px; background: var(--muted); }
.ruler .mark span { position: absolute; top: 20px; transform: translateX(-50%); white-space: nowrap; font-size: 0.75rem; }
.ruler .mark.end { background: var(--cyan); }
.ruler .mark.end span { color: var(--cyan); }
.ruler .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.ruler output { color: var(--text); font-size: 1.125rem; font-weight: 500; }
.ruler .foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.ruler button { white-space: nowrap; font: inherit; font-size: 0.875rem; color: var(--cyan); background: none; border: 1px solid rgb(103 232 249 / 0.35); border-radius: 999px; padding: 8px 14px; min-height: 40px; cursor: pointer; }
.ruler button:hover { border-color: var(--cyan); }

/* ---------- Chapters ---------- */
.chapter { padding: 72px 0; }
.chapter .wrap { display: grid; gap: 40px; }
.chapter h2 { font-size: clamp(2rem, 6.4vw, 3.75rem); line-height: 1.04; letter-spacing: -0.03em; }
.chapter .copy > p { margin-top: 20px; color: var(--muted); font-size: 1.125rem; max-width: 38ch; }
.chapter .copy > p strong { color: var(--text); font-weight: 500; }
.points { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; max-width: 46ch; }
.points li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; color: var(--muted); }
.points li .ico { width: 22px; height: 22px; color: var(--cyan); margin-top: 1px; }
.points b { color: var(--text); font-weight: 500; }
@media (max-width: 959px) {
  /* phone: heading and intro, then the phone, then the details */
  .chapter .wrap { gap: 0; }
  .chapter .copy { display: contents; }
  .chapter .copy > * { order: 2; }
  .chapter .copy > h2, .chapter .copy > h2 + p { order: 0; }
  .chapter .stage { order: 1; margin: 44px 0 8px; }
}
.note { font-size: 0.8125rem; color: var(--muted); text-align: center; max-width: 30ch; }
@media (min-width: 960px) {
  .chapter { padding: 120px 0; }
  .chapter .wrap { grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
  .chapter .stage { position: sticky; top: calc(50vh - 340px); }
  .chapter.flip .stage { order: -1; }
  .chapter .copy { align-self: center; }
}

/* analysis screen */
.ana { padding: 0 5cqw; }
.ana h3 { font-size: 6cqw; font-weight: 500; padding: 3cqw 0 1cqw; }
.ana .sub { color: var(--muted); font-size: 3cqw; }
.ana .card { border-radius: 4cqw; background: var(--surface-2); padding: 3.4cqw 3.6cqw; margin-top: 2.6cqw; }
.ana .card > .sub:first-child { color: var(--text); font-weight: 500; font-size: 3.4cqw; }
.ana .big { font-size: 3.6cqw; color: var(--muted); margin-top: 1cqw; }
.ana .big b { font-size: 10cqw; font-weight: 600; color: var(--text); letter-spacing: -0.02em; }
.ring { position: relative; width: 50cqw; margin: 2.6cqw auto 3cqw; }
.ring svg { width: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .seg { stroke-dasharray: var(--len) 1000; stroke-dashoffset: var(--off); }
.ring .total { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .total b { font-size: 7cqw; font-weight: 600; letter-spacing: -0.02em; }
.ring .total span { color: var(--muted); font-size: 3cqw; }
.legend { display: grid; gap: 1.6cqw; font-size: 3cqw; }
.legend span { display: flex; align-items: center; gap: 1.6cqw; color: var(--muted); }
.legend span::before { content: ""; width: 2.4cqw; height: 2.4cqw; border-radius: 50%; background: var(--c); }
.legend em { font-style: normal; color: var(--text); margin-left: auto; }
.split { display: flex; height: 2.6cqw; border-radius: 9cqw; overflow: hidden; gap: 0.6cqw; margin: 3cqw 0 1.6cqw; }
.split i { display: block; height: 100%; border-radius: 9cqw; }
.splitkey { display: flex; justify-content: space-between; color: var(--muted); font-size: 2.7cqw; }
.ana .rows { padding: 2.6cqw 0 0; }
.ana .row { justify-content: space-between; font-weight: 400; }
.ana .row span:last-child { color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .armed:not(.run) .seg { stroke-dasharray: 0 1000; }
  .run .seg { transition: stroke-dasharray calc(var(--slow) * 700ms) var(--ease); transition-delay: var(--t); }
  .armed:not(.run) .split i { transform: scaleX(0); }
  .split i { transform-origin: left; }
  .run .split i { transition: transform 700ms var(--ease) 900ms; }
}

/* AI screen */
.ai-screen { display: flex; flex-direction: column; }
.ai-screen .behind { filter: blur(3px) brightness(0.45); pointer-events: none; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--surface); border-radius: 6cqw 6cqw 0 0; padding: 2.4cqw 5cqw 6cqw;
  box-shadow: 0 -2cqw 8cqw rgb(0 0 0 / 0.6);
}
.sheet .grip { width: 9cqw; height: 1.2cqw; border-radius: 9cqw; background: var(--line); margin: 0 auto 4cqw; }
.sheet .ask { display: flex; align-items: center; gap: 3cqw; font-size: 4.4cqw; font-weight: 500; }
.orb { width: 7cqw; height: 7cqw; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, #e0fbff 0 8%, var(--glow-1) 30%, var(--glow-2) 64%, #0b2a4a 100%); box-shadow: 0 0.6cqw 3cqw rgb(34 211 238 / 0.35); }
.field { margin-top: 4cqw; border: 0.4cqw solid var(--line); border-radius: 3.4cqw; padding: 2.6cqw 3.4cqw; min-height: 15cqw; display: flex; align-items: flex-start; gap: 2cqw; font-size: 3.6cqw; }
.field.focus { border-color: var(--cyan); }
.field .txt { flex: 1; min-height: 1.3em; }
.field .txt:empty::before { content: attr(data-ph); color: var(--muted); }
.field .ico { width: 5cqw; height: 5cqw; color: var(--cyan); margin-top: 0.4cqw; }
.caret { display: inline-block; width: 0.4cqw; height: 1.1em; background: var(--cyan); vertical-align: -0.2em; margin-left: 0.3cqw; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.thinking { display: none; justify-items: center; gap: 3cqw; padding: 8cqw 0 4cqw; color: var(--muted); font-size: 3.3cqw; }
.thinking .orb { width: 20cqw; height: 20cqw; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.08); box-shadow: 0 1cqw 8cqw rgb(34 211 238 / 0.5); } }
.plan { display: none; margin-top: 4cqw; border-radius: 4cqw; background: var(--surface-2); padding: 3.6cqw; }
.plan .ph { display: flex; gap: 3cqw; align-items: center; }
.plan .ph .dot { width: 9cqw; height: 9cqw; border-radius: 2.6cqw; display: grid; place-items: center; background: rgb(103 232 249 / 0.14); color: var(--cyan); flex: none; }
.plan .ph .dot .ico { width: 5cqw; height: 5cqw; }
.plan b { display: block; font-weight: 500; font-size: 4cqw; }
.plan .ph span { color: var(--muted); font-size: 3cqw; }
.plan .meta { margin-top: 3cqw; font-size: 3.2cqw; color: var(--text); }
.plan .go { margin-top: 4cqw; height: 10.5cqw; border-radius: 99cqw; display: grid; place-items: center; background: var(--cyan); color: var(--cyan-ink); font-weight: 500; font-size: 3.6cqw; }
.plan .alt { margin-top: 2cqw; text-align: center; color: var(--cyan); font-size: 3.3cqw; }
.plan.stop .ph .dot { background: rgb(248 113 113 / 0.14); color: var(--danger); }
.plan.stop .go, .plan.stop .alt { display: none; }
.plan.trash .ph .dot { background: rgb(248 113 113 / 0.14); color: var(--danger); }
.plan.trash .go { background: #fca5a5; color: #450a0a; }
.toast { position: absolute; left: 4cqw; right: 4cqw; bottom: 5cqw; display: flex; justify-content: space-between; align-items: center; gap: 2cqw; padding: 3.4cqw 4cqw; border-radius: 3cqw; background: #e6edf5; color: #0f172a; font-size: 3.3cqw; opacity: 0; transform: translateY(4cqw); transition: opacity 240ms var(--ease), transform 360ms var(--ease-in); }
.toast b { color: var(--cyan-deep); font-weight: 600; }
.ai[data-s="type"] .field, .ai[data-s="think"] .field, .ai[data-s="plan"] .field { border-color: var(--cyan); }
.ai[data-s="think"] .thinking { display: grid; }
.ai[data-s="plan"] .plan, .ai[data-s="done"] .plan { display: block; animation: rise 360ms var(--ease-in) both; }
.ai[data-s="done"] .toast { opacity: 1; transform: none; }
.ai[data-s="done"] .sheet { transform: translateY(110%); transition: transform 420ms var(--ease-out); }
.sheet { transition: transform 480ms var(--ease-in); }

.cmds { margin: 32px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.cmds button {
  font: inherit; font-size: 0.9375rem; text-align: left; color: var(--text); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; min-height: 44px;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}
.cmds button:hover { border-color: rgb(103 232 249 / 0.5); }
.cmds button[aria-pressed="true"] { border-color: var(--cyan); background: rgb(103 232 249 / 0.08); }
.chapter .copy > p.cmds-hint { margin-top: 14px; font-size: 0.875rem; max-width: 52ch; }
.spec { margin: 36px 0 0; display: grid; gap: 0; max-width: 52ch; border-top: 1px solid var(--line); }
.spec div { display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; }
@media (max-width: 480px) { .spec div { grid-template-columns: 1fr; gap: 2px; } }

/* vault screen */
.vault { padding: 0 5cqw 9cqw; display: flex; flex-direction: column; height: calc(100% - 9cqw); }
.vault h3 { display: flex; align-items: center; gap: 2.6cqw; font-size: 6cqw; font-weight: 500; padding: 3cqw 0 1cqw; }
.vault h3 svg { width: 7cqw; height: 7cqw; color: #5eead4; }
.vault .sub { color: var(--muted); font-size: 3.1cqw; }
.vault .rows { padding: 4cqw 0 0; }
.vault .row { font-weight: 400; }
.vault .row .dot { width: 9cqw; height: 9cqw; border-radius: 2.4cqw; }
.vault .row .lk { margin-left: auto; width: 4.4cqw; height: 4.4cqw; color: #5eead4; }
.shackle { transition: transform 420ms var(--ease-in); transform-box: fill-box; transform-origin: bottom; }
.bak { margin-top: auto; border-radius: 3.4cqw; background: var(--surface-2); padding: 3.4cqw; font-size: 3.2cqw; }
.bak header { display: flex; align-items: center; gap: 2.6cqw; font-weight: 500; }
.bak header .ico { width: 5cqw; height: 5cqw; color: #7dd3fc; }
.bak p { color: var(--muted); font-size: 2.9cqw; margin-top: 1cqw; }
.bak .meter i { width: 100%; background: #7dd3fc; }
.bak .state { display: flex; justify-content: space-between; margin-top: 1.6cqw; font-size: 2.9cqw; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .armed:not(.run) .shackle { transform: translateY(-22%); }
  .run .shackle { transition-delay: 900ms; }
  .armed:not(.run) .lk { opacity: 0; transform: scale(0.6); }
  .run .lk { transition: opacity 200ms, transform 320ms var(--ease-in); transition-delay: var(--t); }
  .armed:not(.run) .bak .meter i { transform: scaleX(0); }
  .run .bak .meter i { animation: grow 1600ms var(--ease) 1300ms both; }
}

/* ---------- Privacy: quiet ---------- */
.quiet { padding: 120px 0; background: var(--black); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.quiet h2 { font-size: clamp(2.5rem, 9vw, 6rem); line-height: 1; letter-spacing: -0.035em; max-width: 12ch; }
.quiet .lede { margin-top: 28px; font-size: clamp(1.125rem, 2.2vw, 1.375rem); color: var(--muted); max-width: 44ch; }
.nots { margin: 56px 0 0; padding: 0; list-style: none; display: grid; gap: 0; border-top: 1px solid var(--line); }
.nots li { display: grid; gap: 6px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.nots b { font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 500; letter-spacing: -0.015em; }
.nots span { color: var(--muted); max-width: 60ch; }
@media (min-width: 860px) {
  .nots li { grid-template-columns: 0.8fr 1.2fr; align-items: baseline; gap: 40px; }
}
.quiet .more { margin-top: 32px; }

/* ---------- Real captures ---------- */
.real { padding: 96px 0 72px; }
.real h2 { font-size: clamp(2rem, 6.4vw, 3.75rem); line-height: 1.04; letter-spacing: -0.03em; }
.real .wrap > p { margin-top: 16px; color: var(--muted); max-width: 52ch; font-size: 1.125rem; }
.strip {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 40px max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))) 24px;
  scrollbar-width: thin; scrollbar-color: var(--cyan-deep) transparent;
}
.strip figure { margin: 0; flex: none; width: 236px; scroll-snap-align: center; }
.strip .shot { border-radius: 26px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); aspect-ratio: 9 / 20; }
.strip .shot img, .strip .shot video { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.strip figure.wide { width: min(560px, 86vw); }
.strip .wide .shot { aspect-ratio: 16 / 10; }
.strip figcaption { margin-top: 12px; font-size: 0.875rem; color: var(--muted); }
@media (min-width: 960px) { .strip figure { width: 264px; } }

/* ---------- Pro + open source ---------- */
.pro { padding: 72px 0; }
.pro h2, .open h2 { font-size: clamp(2rem, 6.4vw, 3.75rem); line-height: 1.04; letter-spacing: -0.03em; }
.grid2 { margin-top: 40px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.grid2 > div { padding: 22px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 28px 1fr; gap: 14px; }
.grid2 .ico { width: 24px; height: 24px; color: var(--cyan); margin-top: 2px; }
.grid2 h3 { font-size: 1.125rem; font-weight: 500; }
.grid2 p { color: var(--muted); margin-top: 4px; }
@media (min-width: 760px) { .grid2 { grid-template-columns: 1fr 1fr; column-gap: 48px; } }
@media (min-width: 1100px) { .grid2 { grid-template-columns: repeat(3, 1fr); } }
.open { padding: 72px 0 96px; }
.open .wrap { display: grid; gap: 32px; }
.open p { color: var(--muted); font-size: 1.125rem; max-width: 56ch; }
.open p + p { margin-top: 16px; }
.open p strong { color: var(--text); font-weight: 500; }
@media (min-width: 960px) { .open .wrap { grid-template-columns: 1fr 1.2fr; gap: 80px; } }

/* ---------- Close: the page commits to cyan ---------- */
.get { background: var(--cyan); color: var(--cyan-ink); padding: 96px 0; }
.get h2 { font-size: clamp(2.75rem, 10vw, 6rem); line-height: 0.98; letter-spacing: -0.035em; }
.get p { margin-top: 20px; font-size: 1.1875rem; max-width: 46ch; }
.get .ctas { margin-top: 36px; }
.get .btn-primary { background: var(--cyan-ink); color: #ecfeff; }
.get .btn-primary:hover { background: #0c4a5e; }
.get .btn-ghost { color: var(--cyan-ink); border-color: rgb(8 51 68 / 0.35); }
.get .btn-ghost:hover { border-color: var(--cyan-ink); }
.get a:not(.btn) { color: var(--cyan-ink); }
.get :focus-visible { outline-color: var(--cyan-ink); }
.get .fine { margin-top: 28px; font-size: 0.9375rem; opacity: 0.85; }

footer.foot { padding: 40px 0 48px; color: var(--muted); font-size: 0.875rem; }
footer.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
footer.foot nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
footer.foot nav a { color: var(--muted); padding: 10px 0; display: inline-block; }
footer.foot nav a:hover { color: var(--text); }
footer.foot p { padding: 10px 0; }
.vault .trashrow { margin-top: 2cqw; }
