/* Topkey Brand Studio. Tokens match brand.json; motion matches topkey.io (reveal 1000ms outQuart). */

:root {
  --navy: #11163d; --text: #11163da3; --text-solid: #676a83;
  --neon: #e1fb45; --neon-hover: #cce444; --ice: #c1eae7; --teal: #329e96; --orange: #f27d4b;
  --light: #f8f8f9; --stroke: #11163d1a;
  --mint: linear-gradient(243deg, #e0f3f3, #f4f8f5);
  --out-quart: cubic-bezier(.25, 1, .5, 1);
  --reveal-ms: 1000ms;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--navy); font: 16px/1.5 Figtree, Arial, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--navy); }
img { max-width: 100%; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.1; }
h3 { font-size: 1.125rem; line-height: 1.3; }
p { color: var(--text); }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.eyebrow { font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: 12px; }
.section { padding-top: 112px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.section-head p { max-width: 52ch; margin: 12px 0 0; font-size: 1.0625rem; }

/* Scroll reveals (only when JS runs, so the page never hides content without it) */
.js [data-reveal] { opacity: 0; transform: translateY(100px); transition: opacity var(--reveal-ms) var(--out-quart), transform var(--reveal-ms) var(--out-quart); transition-delay: var(--d, 0ms); }
.js [data-reveal="shrink"] { transform: scale(1.25); }
.js [data-reveal="grow"] { transform: scale(.75); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 12px; padding: 12px 18px; font: inherit; font-weight: 500; line-height: 1.2; text-decoration: none; border: 1px solid var(--neon); background: var(--neon); color: var(--navy); cursor: pointer; transition: background .2s, border-color .2s, transform .2s var(--out-quart); }
.btn:hover { background: var(--neon-hover); border-color: var(--neon-hover); }
.btn:active { transform: scale(.97); }
.btn.secondary { background: transparent; border-color: var(--navy); }
.btn.secondary:hover { background: var(--light); }
.btn.on-dark.secondary { color: #fff; border-color: #ffffff80; }
.btn.on-dark.secondary:hover { background: #ffffff1a; }
.chip { all: unset; cursor: pointer; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--stroke); font-weight: 500; font-size: .9375rem; transition: background .2s, border-color .2s; }
.chip:hover { border-color: var(--navy); }
.chip[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* Header + hero */
.top { position: sticky; top: 0; z-index: 20; background: #ffffffd9; backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.top.scrolled { border-color: var(--stroke); }
.top .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 64px; }
.top ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.top ul a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; font-weight: 500; font-size: .9375rem; transition: background .2s; }
.top ul a:hover, .top ul a.active { background: var(--light); }
@media (max-width: 860px) { .top ul { display: none; } }

.hero { background: var(--mint); padding: 72px 0 96px; position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 920px) { .hero .wrap { grid-template-columns: 1fr; gap: 40px; } }
.hero h1 { font-size: clamp(2.75rem, 6.5vw, 4.5rem); line-height: 1; }
.hero h1 .word { display: inline-block; }
.js .hero h1 .word { opacity: 0; transform: translateY(.6em); animation: rise .9s var(--out-quart) forwards; animation-delay: calc(var(--i) * 70ms + 100ms); }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero .lead { font-size: 1.1875rem; max-width: 46ch; margin: 24px 0 32px; }
.hero .row { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-deck { position: relative; aspect-ratio: 16 / 9; }
.hero-deck .stage { position: absolute; inset: 0; opacity: 0; transform: translateY(24px) scale(.98); transition: opacity .8s var(--out-quart), transform .8s var(--out-quart); box-shadow: 0 30px 60px -20px #11163d40; }
.hero-deck .stage.on { opacity: 1; transform: none; }
.hero-deck .stage.was { opacity: 0; transform: translateY(-24px) scale(.98); }
.hero-dots { display: flex; gap: 6px; justify-content: center; margin-top: 20px; }
.hero-dots button { all: unset; cursor: pointer; width: 8px; height: 8px; border-radius: 99px; background: #11163d33; transition: width .4s var(--out-quart), background .3s; }
.hero-dots button[aria-current="true"] { width: 28px; background: var(--navy); }

/* Agent box */
.agent { background: var(--navy); color: #fff; border-radius: 20px; padding: clamp(24px, 4vw, 48px); display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .agent { grid-template-columns: 1fr; } }
.agent h2 { color: #fff; }
.agent p { color: #ffffffb3; }
.agent pre { white-space: pre-wrap; background: #ffffff0d; border: 1px solid #ffffff26; border-radius: 12px; padding: 20px; margin: 0 0 16px; font: .875rem/1.65 ui-monospace, "SF Mono", Menlo, monospace; color: #fff; }
.agent .row { display: flex; gap: 10px; flex-wrap: wrap; }
.typed::after { content: "▍"; color: var(--neon); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Marquee */
.marquee { overflow: hidden; padding: 40px 0; border-bottom: 1px solid var(--stroke); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee .track { display: flex; gap: 72px; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.marquee img { height: 28px; width: auto; filter: grayscale(1); opacity: .7; transition: filter .3s, opacity .3s; }
.marquee img:hover { filter: none; opacity: 1; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Cards */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card { border: 1px solid var(--stroke); border-radius: 20px; overflow: hidden; background: #fff; transition: transform .4s var(--out-quart), box-shadow .4s var(--out-quart); }
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -18px #11163d33; }
.card .body { padding: 16px 18px 18px; }
.card .body p { margin: 4px 0 0; font-size: .875rem; }

/* Logo tester */
.tester { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
@media (max-width: 860px) { .tester { grid-template-columns: 1fr; } }
.tester-stage { border-radius: 20px; min-height: 320px; display: grid; place-items: center; position: relative; transition: background .5s var(--out-quart); border: 1px solid var(--stroke); }
.tester-stage img { width: min(55%, 320px); transition: opacity .3s; }
.tester-stage .verdict { position: absolute; left: 16px; bottom: 16px; background: #fff; border-radius: 10px; padding: 8px 12px; font-size: .875rem; font-weight: 500; box-shadow: 0 4px 16px -6px #11163d40; }
.tester-panel { border: 1px solid var(--stroke); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.bg-picks { display: flex; flex-wrap: wrap; gap: 10px; }
.bg-picks button { all: unset; cursor: pointer; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--stroke); transition: transform .2s var(--out-quart); position: relative; }
.bg-picks button:hover { transform: scale(1.08); }
.bg-picks button[aria-pressed="true"]::after { content: ""; position: absolute; inset: -5px; border: 2px solid var(--navy); border-radius: 15px; }
.bg-picks button:focus-visible { outline: 2px solid var(--navy); outline-offset: 6px; }
.dl-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.dl-list a { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 10px; background: var(--light); text-decoration: none; font-weight: 500; font-size: .9375rem; transition: background .2s; }
.dl-list a:hover { background: #11163d0f; }
.dl-list span { color: var(--text); font-weight: 400; font-size: .8125rem; }
.rules-list { margin: 0; padding-left: 18px; color: var(--text); font-size: .9375rem; }
.rules-list li { margin: 4px 0; }

/* Colors */
.swatch-card { all: unset; cursor: pointer; display: block; border: 1px solid var(--stroke); border-radius: 20px; overflow: hidden; background: #fff; transition: transform .4s var(--out-quart), box-shadow .4s var(--out-quart); }
.swatch-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -18px #11163d33; }
.swatch-card:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.swatch-card .chipcolor { height: 120px; position: relative; }
.swatch-card .chipcolor .copied { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 600; opacity: 0; transition: opacity .2s; }
.swatch-card.flash .copied { opacity: 1; }
.swatch-card .body { padding: 14px 18px 18px; }
.swatch-card .body p { margin: 4px 0 0; font-size: .875rem; }
.hex { font: 500 .875rem ui-monospace, "SF Mono", Menlo, monospace; }
.ratio { display: flex; height: 14px; border-radius: 99px; overflow: hidden; margin: 24px 0 8px; }
.ratio div { transition: flex .8s var(--out-quart); }
.contrast { display: grid; grid-template-columns: 1fr 1.3fr; gap: 16px; margin-top: 16px; }
@media (max-width: 860px) { .contrast { grid-template-columns: 1fr; } }
.contrast-panel { border: 1px solid var(--stroke); border-radius: 20px; padding: 24px; display: grid; gap: 14px; align-content: start; }
.contrast-panel .field { font-weight: 500; font-size: .875rem; display: block; margin-bottom: 8px; }
.contrast-sample { border-radius: 20px; padding: 32px; display: flex; flex-direction: column; justify-content: space-between; min-height: 240px; transition: background .4s, color .4s; }
.contrast-sample .big { font-size: clamp(1.75rem, 3.5vw, 2.5rem); line-height: 1.1; font-weight: 500; letter-spacing: -0.02em; }
.score { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.score b { font-size: 1.75rem; font-weight: 500; }
.badge { font-size: .75rem; font-weight: 600; padding: 4px 8px; border-radius: 6px; background: #ffffffd9; color: var(--navy); }
.badge.fail { background: #fde8e1; color: #9a3412; }

/* Type + playground */
.type-specimen { border: 1px solid var(--stroke); border-radius: 20px; padding: clamp(24px, 4vw, 48px); display: grid; gap: 28px; }
.type-row { display: grid; grid-template-columns: 140px 1fr; gap: 24px; align-items: baseline; border-bottom: 1px solid var(--stroke); padding-bottom: 24px; }
.type-row:last-child { border: 0; padding: 0; }
.type-row .meta { font-size: .8125rem; color: var(--text); }
@media (max-width: 640px) { .type-row { grid-template-columns: 1fr; gap: 6px; } }
.playground { display: grid; grid-template-columns: 1fr 1.25fr; gap: 16px; margin-top: 16px; }
@media (max-width: 860px) { .playground { grid-template-columns: 1fr; } }
.playground textarea { width: 100%; min-height: 96px; resize: vertical; border: 1px solid var(--stroke); border-radius: 12px; padding: 14px; font: inherit; font-size: 1.0625rem; color: var(--navy); }
.playground textarea:focus { outline: 2px solid var(--navy); outline-offset: 1px; }
.checks { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 10px; align-items: start; font-size: .9375rem; padding: 10px 12px; border-radius: 10px; background: var(--light); transition: background .3s; }
.checks li::before { content: "✓"; font-weight: 700; color: var(--teal); width: 1em; flex: none; }
.checks li.bad { background: #fff4ef; }
.checks li.bad::before { content: "!"; color: var(--orange); }

/* Stages (slides, video frames, social) — sized with container units so they scale anywhere */
.stage { position: relative; overflow: hidden; container-type: inline-size; border-radius: 12px; background: #fff; color: var(--navy); aspect-ratio: 16 / 9; font-family: Figtree, Arial, sans-serif; }
.stage.r-1x1 { aspect-ratio: 1; }
.stage.r-9x16 { aspect-ratio: 9 / 16; }
.stage.r-og { aspect-ratio: 1200 / 630; }
.stage.bordered { box-shadow: inset 0 0 0 1px var(--stroke); }
.stage.mint { background: var(--mint); }
.stage.navy { background: var(--navy); color: #fff; }
.stage.light { background: var(--light); }
.stage .pad { position: absolute; inset: 6.5cqw 7cqw 9cqw; display: flex; flex-direction: column; }
.stage .center { justify-content: center; }
.stage .end { justify-content: flex-end; }
.stage .wm { height: 2.6cqw; width: auto; align-self: flex-start; }
.stage .icon { height: 2.2cqw; width: auto; align-self: flex-start; }
.stage .corner { position: absolute; left: 0; bottom: -5.6cqw; }
.stage .pg { position: absolute; right: 0; bottom: -5.4cqw; font-size: 1.3cqw; color: var(--text); }
.stage.navy .pg { color: #ffffff80; }
.stage .k { font-size: 1.5cqw; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
.stage.navy .k { color: var(--neon); }
.stage .t1 { font-size: 6cqw; line-height: 1.02; font-weight: 500; letter-spacing: -0.025em; }
.stage .t2 { font-size: 4cqw; line-height: 1.08; font-weight: 500; letter-spacing: -0.02em; }
.stage .t3 { font-size: 2.2cqw; line-height: 1.2; font-weight: 500; }
.stage .sub { font-size: 2cqw; color: var(--text); line-height: 1.4; }
.stage.navy .sub { color: #ffffffb3; }
.stage .src { font-size: 1.2cqw; color: var(--text); }
.stage.navy .src { color: #ffffff80; }
.stage .gap1 { height: 1.5cqw; } .stage .gap2 { height: 3cqw; } .stage .grow { flex: 1; }
.stage .bar { width: 9cqw; height: .7cqw; border-radius: 1cqw; background: var(--neon); }
.stage .pill { align-self: flex-start; background: var(--neon); color: var(--navy); border-radius: 1.2cqw; padding: 1.3cqw 2.2cqw; font-size: 2cqw; font-weight: 500; }
.stage .cols { display: grid; gap: 2cqw; }
.stage .box { border-radius: 2cqw; padding: 2.6cqw; }
.stage .box.ice { background: var(--ice); } .stage .box.lite { background: var(--light); } .stage .box.line { box-shadow: inset 0 0 0 .12cqw var(--stroke); }
.stage .num { font-size: 13cqw; line-height: .9; font-weight: 500; letter-spacing: -0.04em; }
.stage .hl { background: var(--neon); padding: 0 .6cqw; border-radius: .6cqw; }
.stage .strike { text-decoration: line-through; text-decoration-thickness: .3cqw; color: var(--text); }
.stage .list { display: grid; gap: 1.6cqw; margin: 0; padding: 0; list-style: none; }
.stage .list li { display: grid; grid-template-columns: 6cqw 1fr; align-items: baseline; font-size: 2.6cqw; font-weight: 500; padding-bottom: 1.6cqw; box-shadow: 0 .12cqw 0 var(--stroke); }
.stage .list li span { font-size: 1.6cqw; color: var(--teal); font-weight: 600; }
.stage .q { font-size: 3.6cqw; line-height: 1.2; font-weight: 500; letter-spacing: -0.015em; }
.stage .qmark { font-size: 10cqw; line-height: .6; color: var(--teal); font-weight: 600; height: 5cqw; }
.stage .logos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6cqw; }
.stage .logos div { background: #fff; border-radius: 1.4cqw; height: 8cqw; display: grid; place-items: center; box-shadow: inset 0 0 0 .12cqw var(--stroke); }
.stage .logos img { max-height: 3.2cqw; max-width: 70%; }
.stage .chart { display: grid; gap: 1.3cqw; }
.stage .chart .r { display: grid; grid-template-columns: 22cqw 1fr; align-items: center; gap: 1.6cqw; font-size: 1.5cqw; }
.stage .chart .b { height: 3cqw; background: var(--navy); border-radius: .5cqw; display: flex; align-items: center; justify-content: flex-end; padding-right: 1cqw; color: #fff; font-size: 1.4cqw; font-weight: 600; transform-origin: left; }
.stage .steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2cqw; position: relative; }
.stage .steps::before { content: ""; position: absolute; left: 1.5cqw; right: 1.5cqw; top: 1.5cqw; height: .25cqw; background: var(--ice); }
.stage .steps div { position: relative; }
.stage .steps i { display: block; width: 3cqw; height: 3cqw; border-radius: 99px; background: var(--navy); box-shadow: 0 0 0 .8cqw #fff; margin-bottom: 2cqw; }
.stage .steps div:last-child i { background: var(--neon); box-shadow: 0 0 0 .8cqw #fff, inset 0 0 0 .3cqw var(--navy); }
.stage .steps b { display: block; font-size: 2.1cqw; font-weight: 500; }
.stage .steps small { display: block; font-size: 1.4cqw; color: var(--text); margin-top: .6cqw; }
/* Product-UI placeholder: a wireframe, deliberately not a fake screenshot */
.stage .ui { background: #fff; border-radius: 1.6cqw; box-shadow: 0 2cqw 5cqw -2cqw #11163d40, inset 0 0 0 .12cqw var(--stroke); display: grid; grid-template-columns: 20% 1fr; overflow: hidden; position: relative; }
.stage .ui .side { background: var(--light); padding: 2cqw 1.6cqw; display: grid; gap: 1.2cqw; align-content: start; }
.stage .ui .side i, .stage .ui .main i { display: block; height: 1cqw; border-radius: 1cqw; background: #11163d14; }
.stage .ui .side i:first-child { background: var(--navy); width: 60%; height: 1.4cqw; }
.stage .ui .main { padding: 2cqw; display: grid; gap: 1.3cqw; align-content: start; }
.stage .ui .main .rowi { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1.6cqw; padding-bottom: 1.2cqw; box-shadow: 0 .12cqw 0 var(--stroke); }
.stage .ui .main .rowi.hit { background: #c1eae766; border-radius: .8cqw; box-shadow: none; padding: .8cqw; margin: -.8cqw; }
.stage .ui .tag { position: absolute; right: 1.6cqw; top: 1.4cqw; font-size: 1.1cqw; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.stage .ring { position: absolute; border: .35cqw solid var(--neon); border-radius: 1.2cqw; box-shadow: 0 0 0 .8cqw #e1fb4540; }
.stage .callout { position: absolute; background: var(--navy); color: #fff; font-size: 1.6cqw; font-weight: 500; padding: 1cqw 1.6cqw; border-radius: 1cqw; }
.stage .lower { position: absolute; left: 5cqw; bottom: 5cqw; background: #fff; color: var(--navy); border-radius: 1.4cqw; padding: 1.6cqw 2.4cqw; box-shadow: 0 1.5cqw 4cqw -1.5cqw #11163d59; display: flex; gap: 1.6cqw; align-items: center; }
.stage .lower .accent { width: .5cqw; align-self: stretch; background: var(--neon); border-radius: 1cqw; }
.stage .lower b { display: block; font-size: 2.2cqw; font-weight: 500; }
.stage .lower small { font-size: 1.5cqw; color: var(--text); }
/* Square and vertical frames use their own scale */
.stage.r-1x1 .pad, .stage.r-9x16 .pad { inset: 8cqw; }
.stage.r-1x1 .wm, .stage.r-9x16 .wm { height: 5cqw; }
.stage.r-1x1 .num { font-size: 26cqw; } .stage.r-9x16 .num { font-size: 30cqw; }
.stage.r-1x1 .t3, .stage.r-9x16 .t3 { font-size: 5.4cqw; }
.stage.r-1x1 .src, .stage.r-9x16 .src { font-size: 3cqw; }
.stage.r-9x16 .t2 { font-size: 9cqw; }
.stage.r-9x16 .pill { font-size: 4.6cqw; padding: 3cqw 5cqw; border-radius: 3cqw; }
.stage.r-og .wm { height: 3.4cqw; }
.stage.r-og .t1 { font-size: 6.4cqw; }

/* Slide reveals inside the presenter: the topkey.io rise, scaled to the frame */
.presenting [data-in] { opacity: 0; transform: translateY(4cqw); animation: rise 1s var(--out-quart) forwards; animation-delay: calc(var(--n, 0) * 120ms + 150ms); }
.presenting .chart .b { transform: scaleX(0); animation: grow-x 1.1s var(--out-quart) forwards; animation-delay: calc(var(--n, 0) * 90ms + 400ms); }
@keyframes grow-x { to { transform: none; } }

/* Gallery */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery { display: grid; gap: 28px 20px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); align-items: start; }
@media (max-width: 400px) { .gallery { grid-template-columns: 1fr; } }
.shot { all: unset; cursor: zoom-in; display: block; width: 100%; }
.shot .frame { border-radius: 14px; transition: transform .5s var(--out-quart), box-shadow .5s var(--out-quart); box-shadow: 0 1px 2px #11163d14; }
.shot:hover .frame, .shot:focus-visible .frame { transform: translateY(-6px); box-shadow: 0 24px 48px -20px #11163d4d; }
.shot:focus-visible { outline: none; }
.shot:focus-visible .frame { outline: 2px solid var(--navy); outline-offset: 4px; }
.shot .cap { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; }
.shot .cap b { font-weight: 500; }
.shot .cap span { color: var(--text); font-size: .875rem; }
.shot .letterbox { aspect-ratio: 16 / 9; background: var(--light); display: grid; place-items: center; padding: 5%; }
.shot .letterbox .stage { height: 100%; width: auto; box-shadow: 0 10px 30px -12px #11163d40; }
.gallery figure { margin: 0; transition: opacity .35s, transform .35s var(--out-quart); }
.gallery figure.hide { display: none; }

/* Presenter */
dialog.presenter { border: 0; padding: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: #0b0e26; color: #fff; }
dialog.presenter::backdrop { background: transparent; }
.presenter .shell { height: 100%; display: grid; grid-template-rows: auto 1fr auto; padding: 16px clamp(16px, 4vw, 48px) 24px; gap: 16px; }
.presenter .bar-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.presenter .bar-top b { font-weight: 500; }
.presenter .bar-top span { color: #ffffff99; font-size: .875rem; margin-left: 8px; }
.presenter .view { display: grid; place-items: center; min-height: 0; }
.presenter .view .stage { width: min(100%, calc((100vh - 240px) * 16 / 9)); box-shadow: 0 40px 80px -30px #000; }
.presenter .view .stage.r-1x1 { width: min(100%, calc(100vh - 240px)); }
.presenter .view .stage.r-9x16 { width: min(100%, calc((100vh - 240px) * 9 / 16)); }
.presenter .view .stage.r-og { width: min(100%, calc((100vh - 240px) * 1200 / 630)); }
.presenter .note { max-width: 760px; margin: 0 auto; text-align: center; color: #ffffffcc; font-size: .9375rem; min-height: 3em; }
.presenter .note b { color: var(--neon); font-weight: 600; }
.presenter .nav { display: flex; gap: 8px; }
.icon-btn { all: unset; cursor: pointer; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #ffffff14; color: #fff; transition: background .2s; font-size: 18px; }
.icon-btn:hover { background: #ffffff29; }
.icon-btn:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; }

/* Motion demos */
.motion-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.motion-tile { border: 1px solid var(--stroke); border-radius: 20px; overflow: hidden; }
.motion-tile .demo { height: 180px; background: var(--mint); display: grid; place-items: center; overflow: hidden; }
.motion-tile .demo div { width: 96px; height: 64px; border-radius: 12px; background: var(--navy); }
.motion-tile .demo div.neon { background: var(--neon); }
.motion-tile .demo.play div { animation: var(--anim) 1s var(--out-quart) both; }
@keyframes m-up { from { opacity: 0; transform: translateY(100px); } }
@keyframes m-down { from { opacity: 0; transform: translateY(-100px); } }
@keyframes m-shrink { from { opacity: 0; transform: scale(1.25); } }
@keyframes m-grow { from { opacity: 0; transform: scale(.75); } }
.motion-tile .body { padding: 16px 18px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.motion-tile .body p { margin: 2px 0 0; font-size: .8125rem; }
.motion-tile button { all: unset; cursor: pointer; font-weight: 500; font-size: .875rem; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--stroke); }
.motion-tile button:hover { border-color: var(--navy); }
.motion-tile button:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.spec { display: grid; gap: 0; border: 1px solid var(--stroke); border-radius: 20px; overflow: hidden; margin-top: 16px; }
.spec div { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--stroke); font-size: .9375rem; }
.spec div:last-child { border: 0; }
.spec dt { font-weight: 500; } .spec dd { margin: 0; color: var(--text); }
@media (max-width: 640px) { .spec div { grid-template-columns: 1fr; gap: 2px; } }

/* Voice */
.voice { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.swap { border: 1px solid var(--stroke); border-radius: 20px; padding: 22px; cursor: pointer; position: relative; min-height: 150px; transition: background .3s; }
.swap:hover { background: var(--light); }
.swap .lbl { display: inline-block; width: 100%; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.swap .before, .swap .after { font-size: 1.125rem; font-weight: 500; line-height: 1.35; margin-top: 10px; transition: opacity .35s, transform .35s var(--out-quart); }
.swap .before { color: var(--text); text-decoration: line-through; text-decoration-color: var(--orange); }
.swap .after { position: absolute; left: 22px; right: 22px; top: 22px; opacity: 0; transform: translateY(10px); }
.swap.flip .before { opacity: 0; transform: translateY(-10px); }
.swap.flip .after { opacity: 1; transform: none; }
.swap .after .lbl { color: var(--teal); }
.swap .before-lbl { color: var(--orange); }
.swap .hint { position: absolute; right: 18px; bottom: 14px; font-size: .75rem; color: var(--text); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 12px; opacity: 0; transition: opacity .25s, transform .4s var(--out-quart); pointer-events: none; z-index: 50; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
footer { margin-top: 128px; background: var(--navy); color: #ffffffb3; padding: 56px 0; }
footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
footer a { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .marquee .track { animation: none; }
}

/* Video frames shared by the gallery and /frames.html */
.stage .cap-box { position: absolute; left: 50%; bottom: 5cqw; transform: translateX(-50%); max-width: 70cqw; text-align: center; background: #11163dd9; color: #fff; font-weight: 500; font-size: 2.3cqw; line-height: 1.3; padding: .9cqw 1.6cqw; border-radius: .8cqw; }
.presenting .cap-box[data-in] { transform: translate(-50%, 4cqw); animation-name: rise-cap; }
@keyframes rise-cap { to { opacity: 1; transform: translate(-50%, 0); } }
.stage .dots { display: flex; gap: 1cqw; }
.stage .dots i { width: 4cqw; height: .6cqw; border-radius: 1cqw; background: #11163d26; }
.stage .dots i.on { background: var(--navy); }
.dl-list .png-row { font-size: .8125rem; color: var(--text); padding: 4px 2px 0; }
.dl-list .png-row a { display: inline; padding: 0; background: none; font-weight: 500; font-size: .8125rem; text-decoration: underline; }
.presenter .note a { color: #fff; margin-left: 8px; }

/* Video section */
.sub-head { margin: 56px 0 16px; font-size: 1.375rem; }
.vtypes { display: grid; gap: 16px; }
.vtype-card { border: 1px solid var(--stroke); border-radius: 20px; padding: clamp(20px, 3vw, 32px); }
.vtype-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.vtype-meta h3 { font-size: 1.5rem; }
.vtype-meta span { color: var(--text); font-weight: 500; }
.timeline { display: flex; gap: 4px; margin: 24px 0 8px; min-height: 76px; }
.timeline .seg { border-radius: 10px; padding: 10px 12px; font-size: .8125rem; font-weight: 500; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; transform-origin: left; animation: grow-x .7s var(--out-quart) both; animation-delay: calc(var(--i) * 80ms); }
.timeline .seg small { font-weight: 400; opacity: .75; }
.timeline .seg.navy { background: var(--navy); color: #fff; }
.timeline .seg.ice { background: var(--ice); }
.timeline .seg.neon { background: var(--neon); }
.timeline .seg.light { background: var(--light); box-shadow: inset 0 0 0 1px var(--stroke); }
@media (max-width: 640px) { .timeline { flex-direction: column; } .timeline .seg { flex: none !important; transform-origin: top; } }
.formats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); align-items: end; }
.format { display: grid; gap: 4px; }
.format .fbox { background: var(--mint); border: 1px solid var(--stroke); border-radius: 10px; margin-bottom: 8px; max-height: 220px; position: relative; overflow: hidden; transition: transform .4s var(--out-quart); }
.format:hover .fbox { transform: translateY(-4px); }
.format:has(.fbox[style*="9/16"]) .fbox { width: 56%; }
.format:has(.fbox[style*="4/5"]) .fbox { width: 80%; }
.format .fbox .safe-top, .format .fbox .safe-bot { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(45deg, #11163d14 0 4px, transparent 4px 8px); }
.format .fbox .safe-top { top: 0; height: 13%; } .format .fbox .safe-bot { bottom: 0; height: 21%; }
.format .fbox .cam { position: absolute; right: 6%; bottom: 8%; width: 18%; aspect-ratio: 1; border-radius: 99px; background: var(--navy); }
.format b { font-weight: 500; font-size: .9375rem; }
.format span { color: var(--text); font-size: .8125rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ticks label { display: flex; gap: 10px; align-items: start; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-size: .9375rem; transition: background .2s, color .2s; }
.ticks label:hover { background: var(--light); }
.ticks input { accent-color: var(--navy); width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.ticks label:has(input:checked) { color: var(--text); text-decoration: line-through; text-decoration-color: var(--teal); }
.ticks code, .tools-note code { font: .8125rem ui-monospace, "SF Mono", Menlo, monospace; background: var(--light); padding: 1px 5px; border-radius: 5px; }
.agent.brief { grid-template-columns: 1fr; padding: 24px; }
.agent.brief pre { margin: 12px 0 16px; font-size: .8125rem; }
.tools-note { font-size: .875rem; margin-top: 20px; }
.stage .chapter-num { font-size: 12cqw; line-height: .9; font-weight: 500; letter-spacing: -0.04em; color: var(--teal); }
