/* AndroidHarness site. Mobile first: base rules target a 360px screen. */

@font-face {
  font-family: "Harness Display";
  src: url("../assets/fonts/display.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Harness Mono";
  src: url("../assets/fonts/mono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --sage: #b4dba9;
  --sage-ink: #10210f;
  --blue: #8fb7e8;
  --amber: #e8b85c;
  --red: #ee8a7f;
  --gutter: clamp(16px, 4.5vw, 56px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.3, 1.5, .5, 1);
  --display: "Harness Display", "Arial Narrow", system-ui, sans-serif;
  --mono: "Harness Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
}

/* Dark palette: the default, and the flipped sections of the light theme. */
:root,
:root[data-theme="light"] .sec--flip {
  --bg: #0e0e10; --ink: #f4f1ea; --card: #1b1b1f; --mute: #a5a299;
  --line: rgba(244, 241, 234, .17); --acc: #b4dba9;
  --fill: #b4dba9; --on-fill: #10210f;
}
/* Light palette: the light theme, and the flipped sections of the dark theme. */
:root[data-theme="light"],
.sec--flip {
  --bg: #f2efe6; --ink: #1b1b1f; --card: #fffdf7; --mute: #5d5b53;
  --line: rgba(27, 27, 31, .2); --acc: #2a652d;
  --fill: #1b1b1f; --on-fill: #f2efe6;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f2efe6; --ink: #1b1b1f; --card: #fffdf7; --mute: #5d5b53;
    --line: rgba(27, 27, 31, .2); --acc: #2a652d;
    --fill: #1b1b1f; --on-fill: #f2efe6;
  }
  :root:not([data-theme="dark"]) .sec--flip {
    --bg: #0e0e10; --ink: #f4f1ea; --card: #1b1b1f; --mute: #a5a299;
    --line: rgba(244, 241, 234, .17); --acc: #b4dba9;
    --fill: #b4dba9; --on-fill: #10210f;
  }
}
/* Sage sections look the same in both themes. */
.sec--accent, .get, .band {
  --bg: #b4dba9; --ink: #10210f; --card: #c9e8c0; --mute: #2f4a2c;
  --line: rgba(16, 33, 15, .28); --acc: #10210f;
  --fill: #10210f; --on-fill: #b4dba9;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; overflow-x: clip; }
body {
  margin: 0; overflow-x: clip;
  background: var(--bg); color: var(--ink);
  font-family: var(--display); font-stretch: 100%; font-weight: 400;
  font-size: clamp(1rem, .96rem + .2vw, 1.125rem); line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, figure, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
code { font-family: var(--mono); font-size: .88em; padding: .1em .35em; border-radius: 6px; background: var(--line); overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 6px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.mono { font-family: var(--mono); font-stretch: 100%; }
.dim { color: var(--mute); }
.ok { color: var(--acc); font-weight: 700; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 100; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 900px; }
@media (min-width: 1920px) { .wrap { max-width: 1480px; } .wrap--narrow { max-width: 1000px; } }

/* ---------- Type ---------- */
.mega {
  font-weight: 800; font-stretch: 75%; line-height: .88; letter-spacing: -.035em;
  font-size: clamp(2.6rem, 15.4cqi, 9.5rem); text-wrap: balance; overflow-wrap: break-word;
}
.big {
  font-weight: 800; font-stretch: 75%; line-height: .94; letter-spacing: -.03em;
  font-size: clamp(2.15rem, 11.5cqi, 5.4rem); text-wrap: balance; overflow-wrap: break-word;
}
.mid { font-weight: 800; font-stretch: 75%; line-height: 1; letter-spacing: -.02em; font-size: clamp(1.6rem, 5vw, 2.4rem); }
.lede { max-width: 38em; color: var(--mute); font-size: 1.06em; }
.kicker { font-size: .78rem; letter-spacing: .02em; color: var(--acc); display: flex; flex-wrap: wrap; gap: 8px; }
.tag { border: 1px solid var(--line); border-radius: 99px; padding: 5px 11px; color: var(--ink); white-space: nowrap; }
.fine { font-size: .72rem; color: var(--mute); text-align: center; }
.block { display: inline-block; width: .5em; height: .13em; margin-left: .07em; background: var(--acc); animation: blink 1.1s steps(1) infinite; }
.caret { display: inline-block; width: .55em; height: 1.05em; margin-left: 2px; vertical-align: -.18em; background: var(--acc); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: 99px;
  border: 1.5px solid var(--ink); color: var(--ink); text-decoration: none;
  font-weight: 700; font-size: 1rem; white-space: nowrap;
  transition: transform .35s var(--spring);
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: scale(.95); }
.btn--fill { background: var(--fill); color: var(--on-fill); border-color: var(--fill); }
.btn--ink { background: var(--ink); color: var(--bg); }
.btn--ghost { border-color: var(--line); border-style: dashed; color: var(--acc); }
@media (prefers-reduced-motion: reduce) { [data-trailer] { display: none; } }
.btn--sm { min-height: 44px; padding: 0 16px; font-size: .9rem; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.mark { flex: none; background: var(--ink); color: var(--bg); border-radius: 26%; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 60px;
  display: flex; align-items: center; gap: 10px; padding-inline: var(--gutter);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav__brand { display: flex; align-items: center; gap: 10px; min-height: 44px; min-width: 44px; text-decoration: none; font-weight: 800; font-stretch: 85%; letter-spacing: -.01em; }
.nav__name { display: none; }
.nav__path { flex: 1; min-width: 0; font-size: .78rem; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav__path b { color: var(--ink); font-weight: 500; display: inline-block; }
.nav__path b.swap { animation: swap .45s var(--ease); }
.nav__path .caret { width: .5em; height: .95em; }
@keyframes swap { from { opacity: 0; transform: translateY(8px); } }
.nav__progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--acc); transform: scaleX(0); transform-origin: 0 50%; }
.theme { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; }
.theme__orb { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink); background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); transition: transform .6s var(--spring); }
:root[data-theme="light"] .theme__orb { transform: rotate(180deg); }
.theme:active .theme__orb { transform: scale(.8) rotate(90deg); }
@media (min-width: 480px) { .nav__name { display: inline; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; padding: 92px 0 56px; overflow: clip;
  background-image: radial-gradient(var(--line) 1px, transparent 1.2px); background-size: 22px 22px;
}
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 140px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.hero__grid { position: relative; z-index: 1; display: grid; gap: 40px; }
.hero__copy { container-type: inline-size; display: grid; gap: 22px; align-content: center; min-width: 0; }
.mega .line { display: block; overflow: hidden; padding-bottom: .09em; margin-bottom: -.09em; }
.mega .line > span { display: inline-block; }
.js .mega .line > span { transform: translateY(110%); }
.js:not(.intro-hold) .mega .line > span { animation: rise 1s var(--ease) forwards; }
.js:not(.intro-hold) .mega .line:nth-child(2) > span { animation-delay: .09s; }
.js:not(.intro-hold) .mega .line:nth-child(3) > span { animation-delay: .18s; }
@keyframes rise { to { transform: none; } }
.mega em { font-style: normal; color: var(--acc); }
.hero__stage { display: grid; gap: 14px; justify-items: center; min-width: 0; }

.device {
  width: 100%; max-width: 390px; height: 468px;
  display: flex; flex-direction: column;
  background: #121214; color: #f4f1ea;
  --ink: #f4f1ea; --mute: #a5a299; --line: rgba(244, 241, 234, .15); --acc: #b4dba9; --card: #1d1d21; --bg: #121214;
  border: 1px solid var(--line); border-radius: 34px; overflow: hidden;
  box-shadow: 0 0 0 6px color-mix(in srgb, #808080 18%, transparent);
}
.device__bar { display: flex; align-items: center; gap: 10px; padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.device__model { font-size: .8rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { font-size: .7rem; padding: 4px 10px; border-radius: 99px; background: var(--acc); color: #10210f; font-weight: 700; }
.stream { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 12px 14px; contain: layout paint; font-size: .88rem; line-height: 1.4; }
.stream > * { flex: none; animation: pop .45s var(--ease) backwards; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.device__status { display: flex; align-items: center; gap: 8px; padding: 6px 16px; font-size: .7rem; color: var(--mute); white-space: nowrap; overflow: hidden; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); flex: none; }
.is-busy .dot { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }
.composer { margin: 4px 12px 12px; min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 8px 0 16px; border: 1px solid var(--line); border-radius: 99px; color: var(--mute); font-size: .88rem; }
.composer span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer__send { width: 32px; height: 32px; border-radius: 50%; background: var(--acc); flex: none; transition: transform .4s var(--spring); }
.is-busy .composer__send { background: #f3b3b0; transform: scale(.86); border-radius: 30%; }

/* Stream pieces, built by main.js */
.bubble { align-self: flex-end; max-width: 86%; padding: 9px 14px; border-radius: 18px 18px 4px 18px; background: var(--card); border: 1px solid var(--line); overflow-wrap: anywhere; }
.m-think { font-family: var(--mono); font-size: .72rem; color: var(--mute); }
.m-tool { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); min-width: 0; }
.m-tool b { font-family: var(--mono); font-size: .76rem; font-weight: 600; white-space: nowrap; }
.m-tool span { flex: 1; min-width: 0; font-family: var(--mono); font-size: .72rem; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-tool i { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--acc); animation: spin .7s linear infinite; }
.m-tool.done i { border: 0; background: var(--acc); animation: none; position: relative; }
.m-tool.done i::after { content: ""; position: absolute; left: 5px; top: 2.5px; width: 4px; height: 8px; border: solid #10210f; border-width: 0 2px 2px 0; transform: rotate(45deg); }
@keyframes spin { to { transform: rotate(360deg); } }
.m-say { overflow-wrap: anywhere; }
.m-verify { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .74rem; padding: 8px 12px; border-radius: 14px; background: color-mix(in srgb, var(--acc) 16%, transparent); color: var(--acc); }
.m-approve { padding: 12px; border-radius: 18px; border: 1px solid var(--acc); background: var(--card); display: grid; gap: 8px; animation: popBig .55s var(--spring) backwards; }
.m-approve p { font-family: var(--mono); font-size: .72rem; color: var(--mute); }
.m-approve div { display: flex; gap: 8px; justify-content: flex-end; }
.m-approve button { min-height: 44px; padding: 0 18px; border-radius: 99px; font-weight: 700; font-size: .88rem; transition: transform .3s var(--spring); }
.m-approve button:active { transform: scale(.93); }
.m-approve .yes { background: var(--acc); color: #10210f; }
@keyframes popBig { from { opacity: 0; transform: translateY(24px) scale(.86); } }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 420px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 99px; border: 1.5px solid var(--line); font-size: .9rem; font-weight: 600; background: var(--card); transition: transform .35s var(--spring); }
.chip:hover { transform: translateY(-2px); }
.chip:active { transform: scale(.93); }
.chip.is-on { background: var(--fill); color: var(--on-fill); border-color: var(--fill); }

@media (min-width: 1024px) {
  .hero { padding: 120px 0 72px; min-height: 100svh; display: grid; align-items: center; }
  .hero__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 56px; align-items: center; }
  .device { height: 540px; }
}

/* ---------- Tool band ---------- */
.band { background: var(--bg); color: var(--ink); padding: 14px 0; transform: rotate(-1.4deg) scale(1.04); margin: 18px 0 8px; position: relative; z-index: 2; overflow: hidden; }
.band__row { overflow: hidden; }
.band__track { display: flex; width: max-content; font-weight: 700; font-size: clamp(1rem, 3.8vw, 1.7rem); line-height: 1.5; animation: slide 46s linear infinite; will-change: transform; }
.band__row--rev .band__track { animation-direction: reverse; animation-duration: 58s; font-weight: 300; }
.band__track span { padding-inline: .9em; position: relative; white-space: nowrap; }
.band__track span::after { content: "/"; position: absolute; right: -.25em; opacity: .4; }
@keyframes slide { to { transform: translateX(-50%); } }
[data-io]:not(.on) *, [data-scene]:not(.on) * { animation-play-state: paused !important; }

/* ---------- Sections ---------- */
.sec, .get { position: relative; background: var(--bg); color: var(--ink); padding: clamp(72px, 14vw, 150px) 0; overflow: clip; }
.sec__head { container-type: inline-size; display: grid; gap: 18px; margin-bottom: 36px; min-width: 0; }
.sec__no {
  display: block; width: max-content; font-weight: 800; font-stretch: 75%; line-height: .8; letter-spacing: -.04em;
  font-size: clamp(4.2rem, 24cqi, 9rem); color: transparent; -webkit-text-stroke: 1.5px var(--acc); opacity: .75;
}
.split { display: grid; gap: 8px; }
.split > * { min-width: 0; }
.aside { margin-top: 28px; color: var(--mute); max-width: 34em; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
  .split--rev > .sec__head { order: 2; }
  .sec__head { margin-bottom: 0; }
  .wrap > .sec__head:only-child, .sec > .wrap:not(.split) > .sec__head { margin-bottom: 48px; max-width: 900px; }
}

/* Reveal on scroll. Only applies when JS is running. */
.js [data-r] { opacity: 0; transform: translateY(34px); transition: opacity .7s ease, transform 1s var(--ease); }
.js [data-r].in { opacity: 1; transform: none; }
.js .tiles [data-r]:nth-child(3n+2) { transition-delay: .08s; }
.js .tiles [data-r]:nth-child(3n) { transition-delay: .16s; }

.card { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; min-width: 0; }
.card p { font-size: .84rem; }
.card > div { flex: 1; min-width: 0; }

/* ---------- 01 Rooms ---------- */
.rooms { display: grid; gap: 20px; max-width: 760px; }
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: min(100%, 300px); padding: 4px; border: 1.5px solid var(--ink); border-radius: 99px; }
.seg__btn { position: relative; z-index: 1; min-height: 44px; border-radius: 99px; font-weight: 800; font-stretch: 85%; font-size: 1.05rem; transition: color .3s; }
.seg__btn.is-on { color: var(--bg); }
.seg__thumb { position: absolute; left: 4px; top: 4px; bottom: 4px; width: calc(50% - 4px); border-radius: 99px; background: var(--ink); transition: transform .55s var(--spring); }
.seg:has([data-room="chat"].is-on) .seg__thumb { transform: translateX(100%); }
.rooms__stage { display: grid; }
.room { grid-area: 1 / 1; display: grid; gap: 10px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: 26px; background: color-mix(in srgb, var(--card) 55%, transparent); opacity: 0; visibility: hidden; transform: translateY(18px) scale(.98); transition: opacity .4s, transform .6s var(--ease), visibility 0s .4s; min-width: 0; }
.room.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.room__note { font-size: .84rem; color: var(--mute); }
.tool__ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--line); font-size: .7rem; flex: none; }
.card--tool b { font-family: var(--mono); font-size: .84rem; }
.card--tool .dim { flex: 1; min-width: 0; font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool__ok { width: 22px; height: 22px; border-radius: 50%; background: var(--acc); color: var(--bg); display: grid; place-items: center; flex: none; }
.diff { font-size: clamp(.68rem, 2.9vw, .84rem); line-height: 1.7; padding: 12px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; transition: opacity .4s; }
.diff__meta { color: var(--mute); }
.diff__del { display: block; background: color-mix(in srgb, var(--red) 22%, transparent); border-radius: 5px; padding-inline: 6px; }
.diff__add { display: block; background: color-mix(in srgb, var(--acc) 24%, transparent); border-radius: 5px; padding-inline: 6px; }
.is-undone .diff__add { opacity: .3; text-decoration: line-through; }
.is-undone .diff__del { background: none; }
.verify__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--acc); flex: none; }
.mini { min-height: 44px; padding: 0 16px; border-radius: 99px; border: 1.5px solid var(--line); font-weight: 700; font-size: .84rem; flex: none; transition: transform .3s var(--spring); }
.mini:active { transform: scale(.92); }
.room--chat .bubble { background: var(--ink); color: var(--bg); border: 0; }
.say { font-size: 1rem; }
.cite { min-width: 30px; height: 30px; margin: -4px 1px; border-radius: 99px; background: var(--line); font-size: .72rem; font-weight: 700; vertical-align: middle; position: relative; transition: transform .3s var(--spring); }
.cite::before { content: ""; position: absolute; inset: -8px; }
.cite:active { transform: scale(.85); }
.sources { display: flex; flex-wrap: wrap; gap: 8px; font-size: .74rem; }
.src { padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); transition: transform .45s var(--spring); }
.src.is-hit { background: var(--acc); color: var(--bg); border-color: var(--acc); transform: scale(1.08); }
.card--handoff { border-style: dashed; }
.card--handoff svg { flex: none; color: var(--acc); }

/* ---------- 02 Terminal ---------- */
.term { --tacc: #b4dba9; border-radius: 22px; overflow: hidden; background: #0b0b0d; color: #ebe8df; border: 1px solid rgba(128, 128, 128, .35); }
.term__bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; font-size: .72rem; color: #a5a299; border-bottom: 1px solid rgba(244, 241, 234, .12); }
.term__dots { display: flex; gap: 6px; }
.term__dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(244, 241, 234, .22); }
.term__dots i:first-child { background: var(--tacc); }
.term__screen { height: 16.6em; padding: 14px; overflow: hidden; font-size: clamp(.68rem, 3vw, .86rem); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; contain: strict; }
.term__screen .p { color: var(--tacc); }
.term__screen .a { color: #9fd89a; }
.term__screen .d { color: #ee8a7f; }
.term__screen .m { color: #8fb7e8; }
.term__screen .cur { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: var(--tacc); animation: blink 1s steps(1) infinite; }
.keys { display: flex; gap: 6px; padding: 10px; border-top: 1px solid rgba(244, 241, 234, .12); }
.key { flex: 1; min-width: 0; min-height: 44px; border-radius: 12px; background: rgba(244, 241, 234, .09); font-size: .74rem; color: #ebe8df; transition: transform .25s var(--spring); }
.key--wide { flex: 1.5; }
.key:active, .key.is-hit { transform: scale(.9); }
.key.is-lock { background: var(--tacc); color: #10210f; }

/* ---------- 03 Ladder ---------- */
.ladder { container-type: inline-size; border-bottom: 1px solid var(--line); }
.rung { width: 100%; min-height: 64px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 14px; padding: 16px 0; border-top: 1px solid var(--line); text-align: left; }
.rung__t { grid-column: 1; grid-row: 1; font-weight: 800; font-stretch: 75%; letter-spacing: -.02em; line-height: 1; font-size: clamp(1.6rem, 7.4cqi, 3.6rem); transition: transform .5s var(--ease); transform-origin: 0 50%; }
.rung__n { grid-column: 2; grid-row: 1; font-size: .7rem; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line); white-space: nowrap; }
.rung__d { grid-column: 1 / -1; display: none; color: var(--mute); max-width: 36em; }
.rung.is-open .rung__d { display: block; animation: pop .5s var(--ease) backwards; }
.rung.is-open .rung__t { color: var(--acc); transform: translateX(.5em); }
.rung.is-open .rung__n { background: var(--acc); color: var(--bg); border-color: var(--acc); }
@media (hover: hover) { .rung:hover .rung__t { transform: translateX(.5em); } }

/* ---------- 04 Subagent deck ---------- */
.deck { display: grid; justify-items: center; gap: 14px; }
.deck__cards { position: relative; width: 100%; max-width: 360px; height: 316px; }
.sub { position: absolute; left: 0; right: 0; bottom: 0; height: 92px; padding: 12px 16px; border-radius: 20px; background: var(--card); border: 1.5px solid var(--ink); display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-content: center; opacity: 0; transform: translateY(40px) scale(.5); transition: transform .7s var(--spring), opacity .35s; transition-delay: calc(var(--i) * 60ms); }
.sub b { grid-column: 1 / -1; font-size: 1.1rem; font-weight: 800; font-stretch: 85%; line-height: 1.15; }
.sub__k { grid-column: 1; font-size: .66rem; opacity: .75; }
.sub__state { grid-column: 2; grid-row: 1; font-size: .66rem; font-weight: 700; }
.sub__bar { grid-column: 1 / -1; height: 5px; border-radius: 9px; background: var(--line); overflow: hidden; margin-top: 4px; }
.sub__bar i { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; }
.deck.is-open .sub { opacity: 1; transform: translateY(calc((2 - var(--i)) * -108px)) rotate(calc((var(--i) - 1) * -1.6deg)); }
.deck.is-open .sub__bar i { transition: transform linear calc(2.6s + var(--i) * 1.1s) .5s; transform: scaleX(1); }
.bubble-btn { position: relative; min-height: 56px; padding: 0 26px; border-radius: 99px; background: var(--ink); color: var(--bg); font-size: .9rem; font-weight: 700; transition: transform .4s var(--spring); }
.bubble-btn:active { transform: scale(.92); }
.bubble-btn__ring { position: absolute; inset: 0; border-radius: 99px; border: 2px solid var(--ink); opacity: 0; animation: ring 1.8s var(--ease) infinite; }
@keyframes ring { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(1.28, 1.6); } }
.deck.is-done .bubble-btn__ring, .deck:not(.is-open) .bubble-btn__ring { animation: none; opacity: 0; }
@media (min-width: 960px) { .deck__cards { max-width: 400px; } }

/* ---------- 05 Context ---------- */
.ctx { display: grid; gap: 16px; padding: 20px; border-radius: 28px; border: 1px solid var(--line); background: var(--card); }
.ctx__top { display: flex; align-items: flex-end; gap: 14px; }
.ctx__pct { font-weight: 800; font-stretch: 75%; font-size: clamp(4rem, 20vw, 6.5rem); line-height: .8; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.ctx__pct span { font-size: .45em; }
.ctx.is-amber .ctx__pct { color: var(--amber); }
.ctx.is-red .ctx__pct { color: var(--red); }
.ctx__top .mono { font-size: .74rem; line-height: 1.5; }
.ctx__bar { position: relative; height: 30px; border-radius: 9px; overflow: hidden; background: var(--line); }
.cseg { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.1s var(--ease); }
.cseg--sys { background: var(--blue); } .cseg--tools { background: var(--amber); } .cseg--msg { background: var(--sage); }
.ctx__legend { display: flex; flex-wrap: wrap; gap: 8px; }
.lg { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); font-size: .84rem; font-weight: 600; text-align: left; line-height: 1.15; transition: transform .3s var(--spring); }
.lg:active { transform: scale(.95); }
.lg.is-on { border-color: var(--ink); background: var(--line); }
.sw { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.sw--sys { background: var(--blue); } .sw--tools { background: var(--amber); } .sw--msg { background: var(--sage); }
:root[data-theme="light"] .sw--msg, :root[data-theme="light"] .cseg--msg { background: #6fae66; }
.ctx__parts { min-height: 5.4em; font-size: .76rem; line-height: 1.5; color: var(--mute); }
.ctx__parts.swap { animation: swap .4s var(--ease); }
.ctx__hint { display: grid; gap: 12px; padding: 14px; border-radius: 16px; border: 1px dashed var(--line); font-size: .9rem; }
.ctx__hint .btn { justify-self: start; }
@media (min-width: 520px) { .ctx__hint { grid-template-columns: 1fr auto; align-items: center; } }

/* ---------- 06 Approvals ---------- */
.modes { display: flex; flex-wrap: wrap; gap: 8px; font-size: .74rem; }
.modes li { padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); }
.modes li span { display: block; color: var(--mute); font-size: .92em; }
.appr { display: grid; gap: 12px; }
.appr__slot { min-height: 268px; display: grid; align-items: center; }
.ask { padding: 18px; border-radius: 26px; background: var(--card); border: 1.5px solid var(--ink); display: grid; gap: 12px; animation: popBig .6s var(--spring) backwards; }
.ask.out { opacity: 0; transform: translateY(-18px) scale(.94); transition: opacity .3s, transform .35s; }
.ask h3 { font-weight: 800; font-stretch: 80%; font-size: 1.35rem; line-height: 1.1; }
.ask pre { font-family: var(--mono); font-size: .8rem; padding: 10px 12px; border-radius: 12px; background: var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.ask p { font-size: .84rem; color: var(--mute); }
.ask__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ask__btns button { flex: 1 1 auto; min-height: 46px; padding: 0 16px; border-radius: 99px; border: 1.5px solid var(--line); font-weight: 700; font-size: .9rem; white-space: nowrap; transition: transform .3s var(--spring); }
.ask__btns button:active { transform: scale(.93); }
.ask__btns .yes { background: var(--fill); color: var(--on-fill); border-color: var(--fill); }
.appr__log { font-size: .76rem; color: var(--mute); min-height: 3em; }
.appr__log.swap { animation: swap .4s var(--ease); }
.trio { display: grid; gap: 14px; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--mute); }
.trio b { display: block; color: var(--ink); font-weight: 800; font-stretch: 85%; font-size: 1.15rem; }
@media (min-width: 760px) { .trio { grid-template-columns: repeat(3, 1fr); gap: 32px; } }

/* ---------- 07 Models ---------- */
.models { padding: 16px; border-radius: 28px; border: 1px solid var(--line); background: var(--card); display: grid; gap: 12px; }
.models__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .76rem; }
.air { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-size: .76rem; }
.air input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.air__track { width: 46px; height: 28px; border-radius: 99px; background: var(--line); padding: 3px; flex: none; }
.air__track i { display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); transition: transform .45s var(--spring); }
.air input:checked + .air__track { background: var(--acc); }
.air input:checked + .air__track i { transform: translateX(18px); background: var(--bg); }
.air input:focus-visible + .air__track { outline: 2px solid var(--acc); outline-offset: 3px; }
.plist { display: grid; gap: 6px; }
.prov { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 16px; border: 1.5px solid transparent; text-align: left; transition: transform .3s var(--spring), opacity .4s; }
.prov:active { transform: scale(.97); }
.prov > span:last-child { min-width: 0; }
.prov b { display: block; line-height: 1.2; }
.prov small { display: block; color: var(--mute); font-size: .78rem; line-height: 1.3; }
.prov__av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--line); font-size: .78rem; flex: none; transition: transform .5s var(--spring); }
.prov.is-on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 12%, transparent); }
.prov.is-on .prov__av { background: var(--acc); color: var(--bg); transform: rotate(-8deg) scale(1.08); }
.models.is-air .prov[data-cloud] { opacity: .32; pointer-events: none; }
.models__line { font-size: .76rem; color: var(--acc); min-height: 2.6em; }
.models__line.swap { animation: swap .4s var(--ease); }

.chain { margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--line); display: grid; gap: 22px; }
.chain__copy { display: grid; gap: 8px; color: var(--mute); max-width: 30em; }
.chain__copy h3 { color: var(--ink); }
.chain__viz { display: grid; gap: 0; font-size: .78rem; }
.node { padding: 12px 14px; border-radius: 16px; border: 1.5px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 52px; transition: transform .5s var(--spring); }
.node em { font-style: normal; opacity: 0; transform: translateX(8px); transition: opacity .35s, transform .45s var(--ease); font-weight: 700; }
.node.is-fail { border-color: var(--red); transform: scale(.97); }
.node.is-fail em { opacity: 1; transform: none; color: var(--red); }
.node.is-live { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 14%, transparent); transform: scale(1.02); }
.node.is-live em { opacity: 1; transform: none; color: var(--acc); }
.link { width: 2px; height: 22px; margin-left: 26px; background: var(--line); }
.link i { display: block; width: 100%; height: 100%; background: var(--acc); transform: scaleY(0); transform-origin: 50% 0; transition: transform .5s var(--ease); }
.link.is-on i { transform: scaleY(1); }
@media (min-width: 860px) {
  .chain { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; gap: 48px; }
  .chain__viz { grid-template-columns: 1fr 40px 1fr 40px 1fr; align-items: center; }
  .link { width: 100%; height: 2px; margin: 0; }
  .link i { transform: scaleX(0); transform-origin: 0 50%; }
  .link.is-on i { transform: scaleX(1); }
  .node { flex-direction: column; align-items: flex-start; min-height: 76px; justify-content: center; }
}

/* ---------- 08 MCP ---------- */
.mcp { display: grid; gap: 12px; padding: 18px; border-radius: 28px; background: var(--card); border: 1.5px solid var(--ink); }
.mcp__label { font-size: .72rem; opacity: .75; }
.mcp__input { min-height: 4.9em; padding: 12px 14px; border-radius: 14px; background: var(--ink); color: var(--bg); font-size: clamp(.7rem, 3vw, .84rem); line-height: 1.5; overflow-wrap: anywhere; }
.mcp__input .caret { background: var(--bg); }
.mcp__list { display: grid; gap: 6px; }
.srv { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--line); opacity: 0; transform: translateY(12px) scale(.96); transition: opacity .4s, transform .6s var(--spring); min-width: 0; }
.srv.is-on { opacity: 1; transform: none; }
.srv b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.srv span { font-size: .68rem; padding: 3px 8px; border-radius: 99px; border: 1px solid var(--line); }
.srv em { font-style: normal; font-size: .68rem; font-weight: 700; }
.srv__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink); flex: none; animation: pulse 1.6s ease-in-out infinite; }
.skills { display: flex; flex-wrap: wrap; gap: 6px; font-size: .7rem; padding-top: 6px; }
.skills span { padding: 6px 10px; border-radius: 8px; background: var(--line); transition: transform .3s var(--spring); }
.skills span:hover { transform: translateY(-3px) rotate(-2deg); }

/* ---------- 09 Pipeline ---------- */
.pipe { display: grid; gap: 0; font-size: .82rem; }
.pipe__step { position: relative; display: grid; gap: 2px; padding: 0 0 26px 34px; opacity: .35; transition: opacity .5s; }
.pipe__step b { font-family: var(--display); font-weight: 800; font-stretch: 75%; font-size: clamp(1.7rem, 7vw, 2.6rem); line-height: 1; letter-spacing: -.02em; }
.pipe__step span { color: var(--mute); }
.pipe__step i { position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); background: var(--bg); transition: transform .5s var(--spring); z-index: 1; }
.pipe__step::before { content: ""; position: absolute; left: 7px; top: 14px; bottom: -8px; width: 2px; background: var(--line); }
.pipe__step:last-child::before { display: none; }
.pipe__step.is-on { opacity: 1; }
.pipe__step.is-on i { background: var(--acc); border-color: var(--acc); transform: scale(1.3); }
@media (min-width: 900px) {
  .pipe { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
  .pipe__step { padding: 34px 0 0; }
  .pipe__step i { top: 0; }
  .pipe__step::before { left: 14px; right: -18px; top: 7px; bottom: auto; width: auto; height: 2px; }
}

/* ---------- 10 Lock screen ---------- */
.ticks { display: grid; gap: 8px; color: var(--mute); font-size: .95em; }
.ticks li { padding-left: 1.6em; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .5em; width: .9em; height: .16em; background: var(--acc); }
.lock { display: grid; justify-items: center; }
.lock__screen { width: 100%; max-width: 380px; height: 400px; padding: 22px 14px; border-radius: 34px; background: #050506; color: #f4f1ea; --ink: #f4f1ea; --mute: #a5a299; --acc: #b4dba9; --line: rgba(244, 241, 234, .16); border: 1px solid rgba(128, 128, 128, .4); display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.lock__clock { text-align: center; font-size: .72rem; color: var(--mute); letter-spacing: .08em; }
.notif { display: flex; gap: 12px; padding: 14px; border-radius: 22px; background: #1d1d21; transform: translateY(-140%); opacity: 0; transition: transform .8s var(--spring), opacity .4s; }
.lock.on .notif { transform: none; opacity: 1; transition-delay: .5s; }
.notif.is-gone { transform: translateX(110%) !important; opacity: 0 !important; transition-delay: 0s !important; }
.notif > div { flex: 1; min-width: 0; }
.notif p { font-size: .82rem; overflow-wrap: anywhere; }
.notif__acts { display: flex; gap: 6px; margin: 6px 0 -8px -12px; font-size: .84rem; }
.notif__acts button { min-height: 44px; padding: 0 12px; color: var(--acc); font-weight: 700; border-radius: 10px; }
.notif__acts button:active { transform: scale(.92); }
.resume { margin-top: auto; padding: 14px; border-radius: 18px; border: 1px solid var(--line); display: grid; gap: 2px; }
.resume .mono { font-size: .72rem; }
.resume b.swap, .resume p.swap { animation: swap .4s var(--ease); }

/* ---------- 11 Tiles ---------- */
.tiles { display: grid; gap: 12px; }
.tile { padding: 22px; border-radius: 26px; border: 1px solid var(--line); display: grid; gap: 10px; align-content: start; background: color-mix(in srgb, var(--card) 60%, transparent); }
.tile h3 { font-weight: 800; font-stretch: 75%; font-size: 1.7rem; line-height: 1; letter-spacing: -.02em; }
.tile p { color: var(--mute); font-size: .95em; }
.tile .btn { justify-self: start; }
.tile__viz { margin-top: 4px; }
.sched { display: flex; flex-wrap: wrap; gap: 6px; font-size: .7rem; }
.sched span { padding: 6px 10px; border-radius: 99px; border: 1px solid var(--line); position: relative; overflow: hidden; }
.sched span::after { content: ""; position: absolute; inset: 0; background: var(--acc); opacity: 0; animation: tick 6s steps(1) infinite; }
.sched span:nth-child(2)::after { animation-delay: 1.5s; } .sched span:nth-child(3)::after { animation-delay: 3s; } .sched span:nth-child(4)::after { animation-delay: 4.5s; }
@keyframes tick { 0% { opacity: .5; } 25% { opacity: 0; } }
.wave { display: flex; align-items: center; gap: 5px; height: 36px; }
.wave i { width: 5px; height: 100%; border-radius: 9px; background: var(--acc); transform: scaleY(.2); animation: wave 1.1s ease-in-out infinite alternate; }
.wave i:nth-child(2n) { animation-delay: -.3s; } .wave i:nth-child(3n) { animation-delay: -.7s; } .wave i:nth-child(5n) { animation-delay: -.5s; }
@keyframes wave { to { transform: scaleY(1); } }
.tile.is-rumble { animation: rumble .5s linear; }
@keyframes rumble { 15% { transform: translateX(-5px) rotate(-.6deg); } 30% { transform: translateX(5px) rotate(.6deg); } 45% { transform: translateX(-4px); } 60% { transform: translateX(4px); } 80% { transform: translateX(-2px); } }
@media (hover: hover) { .tile { transition: transform .5s var(--spring); } .js .tile.in:hover { transform: translateY(-6px) rotate(-.5deg); transition-delay: 0s; } }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1440px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- 12 Screenshots ---------- */
.rail { display: flex; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 24px var(--gutter) 28px; scrollbar-width: none; justify-content: safe center; -webkit-overflow-scrolling: touch; }
.rail::-webkit-scrollbar { display: none; }
.shot { flex: none; width: min(64vw, 270px); scroll-snap-align: center; display: grid; gap: 10px; }
.shot img { width: 100%; border-radius: 26px; border: 1px solid var(--line); background: #0e0e10; transition: transform .6s var(--spring); }
.shot:nth-child(odd) img { transform: rotate(-1.4deg); } .shot:nth-child(even) img { transform: rotate(1.4deg) translateY(10px); }
@media (hover: hover) { .shot:hover img { transform: scale(1.03); } }
.shot figcaption { font-size: .72rem; color: var(--mute); text-align: center; }

/* ---------- 13 FAQ ---------- */
.faq { border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; cursor: pointer; list-style: none; font-weight: 800; font-stretch: 80%; font-size: clamp(1.2rem, 5vw, 1.7rem); line-height: 1.1; letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 16px; height: 16px; flex: none; background: linear-gradient(var(--acc), var(--acc)) center / 100% 3px no-repeat, linear-gradient(var(--acc), var(--acc)) center / 3px 100% no-repeat; transition: transform .5s var(--spring); }
.faq details[open] summary::after { transform: rotate(135deg); }
.faq details p { padding: 0 0 22px; color: var(--mute); max-width: 40em; animation: pop .45s var(--ease) backwards; }

/* ---------- Get ---------- */
.get { text-align: left; }
.get .wrap { container-type: inline-size; display: grid; gap: 22px; }
.mega--get { font-size: clamp(4rem, 27cqi, 17rem); line-height: .8; }
.mega--get .gt { margin-right: .08em; }
.get .lede { color: var(--mute); }
.btn--line { border-color: var(--ink); }

/* ---------- Footer ---------- */
.foot { background: var(--bg); color: var(--ink); padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.foot__grid { display: grid; gap: 22px; }
.foot__links { display: flex; flex-wrap: wrap; gap: 0 22px; }
.foot__links a { min-height: 44px; display: inline-flex; align-items: center; text-underline-offset: 4px; }
.foot__credit { font-size: .76rem; color: var(--mute); }
@media (min-width: 900px) { .foot__grid { grid-template-columns: auto 1fr auto; align-items: center; gap: 40px; } .foot__links { justify-content: center; } }

/* ---------- Scroll-driven extras, where the browser runs them off the main thread ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .nav__progress { animation: grow linear both; animation-timeline: scroll(root block); }
    .sec__no { animation: drift linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
    .mega--get { transform-origin: 0 100%; animation: swell linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
    .device { animation: sink linear both; animation-timeline: view(); animation-range: exit 10% exit 100%; }
  }
}
@keyframes grow { to { transform: scaleX(1); } }
@keyframes drift { from { transform: translateX(-8%); } to { transform: translateX(22%); } }
@keyframes swell { from { transform: scale(.7); } }
@keyframes sink { to { transform: scale(.9) rotate(-2.5deg); opacity: .35; } }

/* ---------- Calmer motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js [data-r] { transform: none; }
  .band__track { animation: none; }
  .block, .caret, .cur { animation: none !important; }
  .wave i { transform: scaleY(.6); }
}

/* ---------- Intro trailer ----------
   Fifteen seconds of cuts. Every scene is its own layer and only opacity and transform move.
   --u is one unit of type size, the smaller of 1vw and 1.75vh, so it fits portrait and landscape.
   Each scene sets --t (when it starts) and --d (how long it holds). */
.film { display: none; }
html.intro { overflow: hidden; }
html.intro .film {
  display: block; position: fixed; inset: 0; z-index: 200; overflow: hidden; contain: strict;
  --u: min(1vw, 1.75vh); --f-ink: #0e0e10; --f-paper: #f2efe6; --f-sage: #b4dba9; --f-dark: #10210f;
  background: var(--f-ink); color: var(--f-paper); touch-action: none; user-select: none; -webkit-user-select: none;
  animation: filmOut .6s cubic-bezier(.76, 0, .2, 1) 14.4s forwards;
}
@keyframes filmOut { to { transform: translateY(-101%); } }
.film.is-skip { animation: none !important; opacity: 0; transition: opacity .25s; }
.film__scenes { position: absolute; inset: 0; }
.fs { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; overflow: hidden; opacity: 0; animation: fsShow var(--d) steps(1, end) var(--t) forwards; }
@keyframes fsShow { from { opacity: 1; } to { opacity: 0; } }
.fs--ink { background: var(--f-ink); color: var(--f-paper); }
.fs--paper { background: var(--f-paper); color: var(--f-ink); }
.fs--sage { background: var(--f-sage); color: var(--f-dark); }

/* 0.0s boot */
.fs--boot { gap: calc(var(--u) * 3); }
.f-mark { width: calc(var(--u) * 24); height: calc(var(--u) * 24); animation: markPulse 1.6s var(--ease) both; }
@keyframes markPulse { from { transform: scale(.82); } to { transform: scale(1); } }
.f-chev { animation: chevIn .5s var(--ease) .12s backwards; }
.f-under { animation: blink .32s steps(1) .55s 2 backwards; }
@keyframes chevIn { from { transform: translateX(-34px); opacity: 0; } }
.f-type { position: relative; font-size: max(13px, calc(var(--u) * 3.6)); color: var(--f-sage); white-space: nowrap; }
.f-type::after { content: ""; position: absolute; inset: -2px; background: var(--f-ink); animation: typeOut .6s steps(17, end) .3s forwards; }
@keyframes typeOut { to { transform: translateX(101%); } }
.f-log { display: grid; gap: .35em; font-size: max(11px, calc(var(--u) * 2.7)); color: rgba(242, 239, 230, .6); min-width: 12em; }
.f-log li { display: flex; justify-content: space-between; gap: 2em; opacity: 0; animation: logIn .01s linear calc(.95s + var(--n) * .16s) forwards; }
.f-log b { color: var(--f-sage); font-weight: 700; }
@keyframes logIn { to { opacity: 1; } }

/* 1.6s three slams */
.f-slam { font-weight: 800; font-stretch: 75%; letter-spacing: -.04em; line-height: .85; white-space: nowrap; font-size: calc(var(--u) * var(--s)); animation: slam .6s cubic-bezier(.05, .9, .1, 1) var(--t) backwards; }
.f-slam--r { animation-name: slamR; }
@keyframes slam { from { transform: scale(2.6) rotate(-4deg); } 50% { transform: scale(1) rotate(0); } to { transform: scale(1.06); } }
@keyframes slamR { from { transform: scale(2.6) rotate(4deg); } 50% { transform: scale(1) rotate(0); } to { transform: scale(1.06); } }
.f-cap { margin-top: calc(var(--u) * 5); font-size: max(11px, calc(var(--u) * 2.6)); letter-spacing: .12em; opacity: .65; }

/* 3.4s the phone. --p sizes it so it stays tall in portrait and still fits in landscape. */
.fs--phone { --p: min(1.5vw, .92vh); gap: calc(var(--p) * 4); }
.f-phone { position: relative; width: calc(var(--p) * 30); height: calc(var(--p) * 58); padding: calc(var(--p) * 7) calc(var(--p) * 2.6) calc(var(--p) * 3); border-radius: calc(var(--p) * 5); border: max(2px, calc(var(--p) * .5)) solid var(--f-paper); background: #1b1b1f; display: flex; flex-direction: column; gap: calc(var(--p) * 1.7);
  animation: phoneIn .9s cubic-bezier(.16, 1, .3, 1) var(--t) backwards, phoneTilt 2s linear var(--t) both; animation-composition: add; }
@keyframes phoneIn { from { transform: scale(9); } to { transform: scale(1); } }
@keyframes phoneTilt { from { transform: rotate(-7deg); } to { transform: rotate(3deg); } }
.f-notch { position: absolute; top: calc(var(--p) * 2.2); left: 50%; width: calc(var(--p) * 7); height: calc(var(--p) * 1.5); margin-left: calc(var(--p) * -3.5); border-radius: 99px; background: rgba(242, 239, 230, .25); }
.f-row { display: block; height: calc(var(--p) * 5); border-radius: calc(var(--p) * 1.6); background: rgba(242, 239, 230, .16); transform-origin: 0 50%; animation: rowIn .4s var(--ease) calc(var(--t) + .55s + var(--n) * .14s) backwards; }
.f-row--me { width: 62%; align-self: flex-end; background: var(--f-paper); transform-origin: 100% 50%; }
.f-row--s { width: 74%; }
.f-row--ok { background: var(--f-sage); }
@keyframes rowIn { from { transform: scaleX(0); opacity: 0; } }
.f-dot { margin-top: auto; align-self: flex-end; width: calc(var(--p) * 5.5); height: calc(var(--p) * 5.5); border-radius: 50%; background: var(--f-sage); animation: popBig .4s var(--spring) calc(var(--t) + 1.25s) backwards; }
.f-just { font-weight: 800; font-stretch: 75%; letter-spacing: -.035em; line-height: .9; white-space: nowrap; font-size: calc(var(--u) * 11.5); animation: titleUp .6s var(--ease) calc(var(--t) + .5s) backwards, justFade .01s linear calc(var(--t) + .5s) backwards; }
.f-just em { font-style: normal; color: var(--f-sage); }
@keyframes justFade { from { opacity: 0; } }

/* 5.4s tool barrage */
.f-rows { position: absolute; inset: 0; display: grid; align-content: space-evenly; transform: rotate(-6deg) scale(1.15); opacity: .34; }
.f-rows p { width: max-content; white-space: nowrap; font-weight: 700; font-size: calc(var(--u) * 7.5); line-height: 1; animation: rowL 2s linear var(--t) both; }
.f-rows p.r { color: var(--f-sage); animation-name: rowR; }
@keyframes rowL { from { transform: translateX(0); } to { transform: translateX(-36%); } }
@keyframes rowR { from { transform: translateX(-40%); } to { transform: translateX(-4%); } }
.f-verbs { position: relative; display: grid; place-items: center; }
.f-verbs b { grid-area: 1 / 1; padding: .06em .3em .12em; background: var(--f-sage); color: var(--f-dark); font-weight: 800; font-stretch: 75%; letter-spacing: -.04em; line-height: .9; font-size: calc(var(--u) * 27); opacity: 0;
  animation: fsShow .5s steps(1, end) calc(var(--t) + var(--n) * .5s) forwards, verb .5s cubic-bezier(.05, .9, .1, 1) calc(var(--t) + var(--n) * .5s) backwards; }
.f-verbs b:nth-child(even) { background: var(--f-paper); color: var(--f-ink); }
@keyframes verb { from { transform: scale(1.7) rotate(-3deg); } 50% { transform: scale(1); } to { transform: scale(1.04) rotate(1deg); } }

/* 7.4s approval, then subagents */
.fs--cards { --u: min(1.3vw, 1.6vh); }
.f-ask, .f-sub { grid-area: 1 / 1; width: calc(var(--u) * 60); border-radius: calc(var(--u) * 4.5); border: 2px solid var(--f-ink); background: #fffdf7; }
.f-ask { display: grid; gap: calc(var(--u) * 2.4); padding: calc(var(--u) * 4.5); animation: popBig .5s var(--spring) var(--t) backwards, flyUp .34s cubic-bezier(.6, 0, .9, .4) calc(var(--t) + .85s) forwards; }
.f-ask b { font-weight: 800; font-stretch: 80%; font-size: calc(var(--u) * 5.4); line-height: 1.05; white-space: nowrap; }
.f-ask span { font-size: calc(var(--u) * 2.8); padding: .6em .8em; border-radius: .7em; background: rgba(27, 27, 31, .1); white-space: nowrap; overflow: hidden; }
.f-ask div { display: flex; gap: calc(var(--u) * 2); }
.f-ask i { flex: 1; position: relative; font-style: normal; font-weight: 700; text-align: center; font-size: calc(var(--u) * 3.3); padding: .75em 0; border-radius: 99px; border: 2px solid rgba(27, 27, 31, .2); }
.f-ask .yes { background: var(--f-ink); color: var(--f-paper); border-color: var(--f-ink); animation: press .3s ease calc(var(--t) + .52s) backwards; }
.f-tap { position: absolute; left: 50%; top: 50%; width: 3em; height: 3em; margin: -1.5em; border-radius: 50%; background: var(--f-sage); opacity: 0; animation: tap .45s ease-out calc(var(--t) + .52s) forwards; }
@keyframes press { 40% { transform: scale(.9); } }
@keyframes tap { from { opacity: .9; transform: scale(.2); } to { opacity: 0; transform: scale(3.4); } }
@keyframes flyUp { to { transform: translateY(-130vh) rotate(-8deg); } }
.f-sub { display: grid; gap: .25em; padding: calc(var(--u) * 2.6) calc(var(--u) * 4); opacity: 0;
  --y: calc((var(--i) - 1) * 109%); --r: calc((var(--i) - 1) * 2.2deg);
  animation: subIn .55s var(--spring) calc(var(--t) + .9s + var(--i) * .1s) forwards; }
.f-sub span { font-size: calc(var(--u) * 2.2); opacity: .7; }
.f-sub b { font-weight: 800; font-stretch: 80%; font-size: calc(var(--u) * 4.6); line-height: 1.05; white-space: nowrap; }
.f-sub i { height: max(4px, calc(var(--u) * 1.1)); border-radius: 9px; background: var(--f-ink); transform-origin: 0 50%; animation: fillBar .8s ease-out calc(var(--t) + 1.1s + var(--i) * .1s) backwards; }
@keyframes subIn { from { opacity: 1; transform: translateY(120vh) rotate(12deg); } to { opacity: 1; transform: translateY(var(--y)) rotate(var(--r)); } }
@keyframes fillBar { from { transform: scaleX(0); } }

/* 9.4s terminal, then the stamp */
.fs--term { background: #08080a; color: #ebe8df; }
.f-term { display: grid; gap: .5em; font-size: calc(var(--u) * 7.6); line-height: 1.15; font-weight: 500; min-width: 10.5em; }
.f-term p { position: relative; width: max-content; white-space: nowrap; }
.f-term span { color: var(--f-sage); }
.f-term .out { color: #9fd89a; opacity: 0; animation: logIn .01s linear calc(var(--t) + var(--n) * .26s + .12s) forwards; }
.f-term .ty { opacity: 0; animation: logIn .01s linear calc(var(--t) + var(--n) * .26s) forwards; }
.f-term .ty::after { content: ""; position: absolute; inset: -2px -2px -2px 3.6ch; background: #08080a; animation: typeOut .24s steps(8, end) calc(var(--t) + var(--n) * .26s + .02s) forwards; }
.f-stamp { position: absolute; padding: .04em .28em .1em; background: var(--f-sage); color: var(--f-dark); font-weight: 800; font-stretch: 75%; letter-spacing: -.04em; line-height: .9; font-size: calc(var(--u) * 24); opacity: 0;
  animation: stamp .5s cubic-bezier(.05, .9, .1, 1) calc(var(--t) + 1.02s) forwards; }
@keyframes stamp { from { opacity: 1; transform: scale(2.4) rotate(-14deg); } 55% { opacity: 1; transform: scale(1) rotate(-5deg); } to { opacity: 1; transform: scale(1.03) rotate(-5deg); } }

/* 11.0s title */
.f-title { font-weight: 800; font-stretch: 75%; letter-spacing: -.035em; line-height: .88; font-size: calc(var(--u) * 15.2); text-align: left; animation: creep 2.7s linear var(--t) both; }
.f-title span { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; white-space: nowrap; }
.f-title b { display: inline-block; font-weight: inherit; animation: titleUp .75s var(--ease) var(--t) backwards; }
.f-title span:nth-child(2) b { animation-delay: calc(var(--t) + .28s); }
.f-title span:nth-child(3) b { animation-delay: calc(var(--t) + .56s); }
.f-title em { font-style: normal; color: var(--f-sage); }
@keyframes titleUp { from { transform: translateY(112%); } }
@keyframes creep { from { transform: scale(.93); } to { transform: scale(1.05); } }

/* 13.6s lockup, then the whole film lifts */
.fs--end { opacity: 1; transform: translateY(101%); animation: endIn .42s cubic-bezier(.76, 0, .2, 1) 13.6s forwards; }
@keyframes endIn { to { transform: none; } }
.f-lock { display: grid; justify-items: center; gap: calc(var(--u) * 2.6); animation: popBig .55s var(--spring) 13.76s backwards; }
.f-logo { width: calc(var(--u) * 24); height: calc(var(--u) * 24); }
.f-name { font-weight: 800; font-stretch: 75%; letter-spacing: -.035em; line-height: 1; font-size: calc(var(--u) * 12.5); }
.f-sub2 { font-size: max(11px, calc(var(--u) * 2.6)); opacity: .8; white-space: nowrap; }

/* Two sage wipes cover the cuts at 5.4s and 9.4s. A soft flash marks the hard cuts. */
.f-wipe { position: absolute; inset: 0 -12%; background: var(--f-sage); transform: translateX(-112%) skewX(-10deg); pointer-events: none; animation: wipe 15s linear forwards; }
@keyframes wipe {
  0%, 34.4% { transform: translateX(-112%) skewX(-10deg); animation-timing-function: cubic-bezier(.5, 0, .5, 1); }
  37.6% { transform: translateX(112%) skewX(-10deg); animation-timing-function: steps(1, end); }
  61.06% { transform: translateX(-112%) skewX(-10deg); animation-timing-function: cubic-bezier(.5, 0, .5, 1); }
  64.26%, 100% { transform: translateX(112%) skewX(-10deg); }
}
.f-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; animation: flash 15s linear forwards; }
@keyframes flash { 0%, 10.6% { opacity: 0; } 10.67% { opacity: .3; } 12.2% { opacity: 0; } 22.6% { opacity: 0; } 22.67% { opacity: .3; } 24.2% { opacity: 0; } 73.26% { opacity: 0; } 73.33% { opacity: .3; } 75%, 100% { opacity: 0; } }

/* Chrome around the film */
.film__hud { position: absolute; top: calc(14px + env(safe-area-inset-top)); font-size: .68rem; letter-spacing: .08em; color: #fff; mix-blend-mode: difference; white-space: nowrap; line-height: 1.2; }
.film__hud--l { left: max(16px, env(safe-area-inset-left)); }
.film__hud--r { right: max(16px, env(safe-area-inset-right)); display: flex; }
.film__tc { display: inline-block; height: 1.2em; overflow: hidden; }
.film__tc > span { display: block; animation: tc 15s steps(15, end) forwards; }
@keyframes tc { to { transform: translateY(-93.75%); } }
.film__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #fff; mix-blend-mode: difference; transform: scaleX(0); transform-origin: 0 50%; animation: grow 14.4s linear forwards; }
.film__skip { position: absolute; right: max(14px, env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); min-height: 46px; padding: 0 18px; border-radius: 99px; background: #0e0e10; color: #f2efe6; border: 1.5px solid rgba(242, 239, 230, .55); font-size: .78rem; font-weight: 600; }
.film__skip:active { transform: scale(.94); }
