/* Visualizer Studio site. Theme tokens are copied from the app (../style.css, section 1): keep them in step. */
:root {
    --bg-body: linear-gradient(180deg, #ffffff 0%, #f4f5f7 35%, #eceef2 100%);
    --bg-window: rgba(255, 255, 255, 0.94);
    --bg-solid: #ffffff;
    --bg-card: #f8f9fb;
    --bg-input: #ffffff;
    --bg-seg: #eceef2;
    --bg-seg-active: #111216;
    --seg-active-text: #ffffff;
    --border-main: rgba(17, 18, 22, 0.10);
    --border-highlight: rgba(17, 18, 22, 0.24);
    --panel-shadow: 0 14px 34px rgba(17, 18, 22, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    --backdrop: blur(28px) saturate(160%);
    --text-primary: #111216;
    --text-secondary: #525663;
    --logo-tile-bg: linear-gradient(180deg, #ffffff 0%, #e8ebf0 100%);
    --logo-tile-fg: #111216;
    --logo-tile-border: rgba(17, 18, 22, 0.28);
    --btn-primary-bg: #111216;
    --btn-primary-text: #ffffff;
    --ok: #0f7a55;
    --pro-text: #a15c00;
    --focus: #111216;
    --spring: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    color-scheme: light;
}
/* .night = the dark stage (hero, closing) while the page is on the White theme */
:root[data-theme="dark"], :root[data-theme="white"] .night {
    --bg-body: #08090b;
    --bg-window: rgba(26, 27, 31, 0.80);
    --bg-solid: #1a1b1f;
    --bg-card: rgba(42, 43, 49, 0.65);
    --bg-input: rgba(0, 0, 0, 0.38);
    --bg-seg: rgba(0, 0, 0, 0.42);
    --bg-seg-active: rgba(255, 255, 255, 0.16);
    --seg-active-text: #f5f5f7;
    --border-main: rgba(255, 255, 255, 0.09);
    --border-highlight: rgba(255, 255, 255, 0.22);
    --panel-shadow: 0 16px 40px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    --backdrop: blur(30px) saturate(160%);
    --text-primary: #f5f5f7;
    --text-secondary: #9e9ea6;
    --logo-tile-bg: #f5f5f7;
    --logo-tile-fg: #090a0d;
    --logo-tile-border: transparent;
    --btn-primary-bg: #f5f5f7;
    --btn-primary-text: #090a0d;
    --ok: #2ee59d;
    --pro-text: #f59e0b;
    --focus: #38b6ff;
    color-scheme: dark;
}
:root[data-theme="glass"] {
    --bg-body: radial-gradient(circle at 18% 18%, rgba(185, 190, 202, 0.26) 0%, transparent 48%),
               radial-gradient(circle at 82% 24%, rgba(135, 140, 152, 0.22) 0%, transparent 50%),
               radial-gradient(circle at 50% 88%, rgba(95, 100, 112, 0.28) 0%, transparent 58%),
               linear-gradient(135deg, #2c2f36 0%, #1c1e24 52%, #121317 100%);
    --bg-window: linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.05) 100%);
    --bg-solid: #25272e;
    --bg-card: linear-gradient(135deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.03) 100%);
    --bg-input: rgba(0, 0, 0, 0.26);
    --bg-seg: rgba(255, 255, 255, 0.08);
    --bg-seg-active: rgba(255, 255, 255, 0.24);
    --seg-active-text: #ffffff;
    --border-main: rgba(255, 255, 255, 0.20);
    --border-highlight: rgba(255, 255, 255, 0.42);
    --panel-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), inset 0 1.5px 1px rgba(255, 255, 255, 0.42), inset 0 -1px 1px rgba(255, 255, 255, 0.08);
    --backdrop: blur(42px) saturate(180%);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.74);
    --logo-tile-bg: #ffffff;
    --logo-tile-fg: #121317;
    --logo-tile-border: transparent;
    --btn-primary-bg: #ffffff;
    --btn-primary-text: #121317;
    --ok: #2ee59d;
    --pro-text: #fbbf24;
    --focus: #7dd3fc;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
section[id] { scroll-margin-top: 96px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; interpolate-size: allow-keywords; } }
body {
    font: 400 1.0625rem/1.55 -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}
/* fixed layer instead of background-attachment: fixed (which repaints on scroll and is ignored on iOS) */
body::before { content: ''; position: fixed; inset: 0; z-index: -1; background: var(--bg-body); }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
@media (min-width: 700px) { .wrap { width: min(1160px, 100% - 64px); } }
.skip { position: absolute; left: 16px; top: -60px; z-index: 30; background: var(--bg-solid); padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 8px; }

/* ---------- type ---------- */
h1, h2 { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; text-wrap: balance; }
h1 { font-size: clamp(3.4rem, 8.4vw, 6.6rem); line-height: 0.94; letter-spacing: -0.015em; }
h2 { font-size: clamp(2.5rem, 5vw, 3.9rem); line-height: 1; letter-spacing: -0.01em; }
h3 { font-size: 1.125rem; font-weight: 650; letter-spacing: -0.005em; line-height: 1.3; }
.lead { color: var(--text-secondary); font-size: clamp(1.0625rem, 1.5vw, 1.25rem); max-width: 34em; text-wrap: pretty; }
.mono { font-family: 'JetBrains Mono', Consolas, monospace; font-size: 0.75rem; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.muted { color: var(--text-secondary); }

/* ---------- logo + toolbar (same chrome as the app) ---------- */
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none;
    background: var(--logo-tile-bg); color: var(--logo-tile-fg); border: 1px solid var(--logo-tile-border); }
.brand-name { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 0.844rem; letter-spacing: 0.6px; display: flex; gap: 5px; white-space: nowrap; }
.brand-name span { font-weight: 500; color: var(--text-secondary); }

.surface { background: var(--bg-window); border: 1px solid var(--border-main); box-shadow: var(--panel-shadow); }
.topbar { position: sticky; top: 12px; z-index: 20; margin-top: 12px; }
.topbar .bar { height: 58px; border-radius: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 10px 0 14px;
    backdrop-filter: var(--backdrop); -webkit-backdrop-filter: var(--backdrop); }
.topbar nav { display: none; gap: 4px; font-size: 0.875rem; font-weight: 550; }
.topbar nav a { text-decoration: none; padding: 8px 12px; border-radius: 9px; color: var(--text-secondary); transition: color 160ms ease, background-color 160ms ease; }
.topbar .tools { display: flex; align-items: center; gap: 10px; }
.topbar .seg { display: none; }
@media (min-width: 820px) { .topbar nav { display: flex; } }
@media (min-width: 1040px) { .topbar .seg { display: flex; } }

/* ---------- buttons + segmented control ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px;
    border: 1px solid transparent; font-size: 0.9375rem; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: transform 160ms var(--ease-out), box-shadow 200ms var(--ease-out), background-color 160ms ease; }
.btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); }
.btn-quiet { border-color: var(--border-highlight); background: transparent; }
/* the one coloured button: the app's amber PRO gate */
.btn-pro { background: linear-gradient(135deg, #f59e0b, #d97706); color: #0d0f14; }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 0.8125rem; }
.btn:active { transform: scale(0.97); }
.btn:disabled { cursor: not-allowed; opacity: 0.6; transform: none; box-shadow: none; }

.seg { display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--bg-seg); border: 1px solid var(--border-main); width: fit-content; max-width: 100%; }
.seg button { border: 0; background: transparent; cursor: pointer; border-radius: 8px; min-height: 32px; padding: 0 12px; white-space: nowrap;
    font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); transition: background-color 180ms var(--spring), color 180ms var(--spring), transform 140ms var(--ease-out); }
.seg button:active { transform: scale(0.97); }
.seg button[aria-pressed="true"] { background: var(--bg-seg-active); color: var(--seg-active-text); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14); }
.seg .count { font-size: 0.625rem; margin-left: 4px; padding: 1px 5px; border-radius: 4px; background: rgba(128, 128, 128, 0.22); }

@media (hover: hover) and (pointer: fine) {
    .btn-primary:not(:disabled):hover { box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24); }
    .btn-pro:not(:disabled):hover { box-shadow: 0 10px 30px rgba(245, 158, 11, 0.42); }
    .btn-quiet:hover { background: var(--bg-seg); }
    .topbar nav a:hover { color: var(--text-primary); background: var(--bg-seg); }
    .seg button:hover:not([aria-pressed="true"]) { color: var(--text-primary); }
}

/* ---------- the dark stage ---------- */
:root[data-theme="white"] .night { background-color: #08090b; color: var(--text-primary); }

/* ---------- the pinned stage: scrolling swaps the style, its name stands behind the screen ---------- */
@property --glow { syntax: '<color>'; inherits: true; initial-value: #ff4d00; }
.runway { position: relative; margin-top: -72px; transition: --glow 600ms ease; }
/* under two screens of scrolling: four style swaps, then the finale */
.js .runway { height: calc(100svh + 175svh); }
/* --intro runs 0 -> 1 as the poster headline leaves (set by site.js) */
.pin { --intro: 0; --end: 0; --h: clamp(300px, 100svh - 184px, 780px); --w: calc(var(--h) * 9 / 16); position: sticky; top: 0; height: 100svh; min-height: 540px; overflow: hidden; isolation: isolate; }
.glow { position: absolute; inset: 0; z-index: -1; opacity: 0.34; pointer-events: none; background: radial-gradient(46vw 62% at 50% 52%, var(--glow), transparent 72%); }
.word { position: absolute; left: 0; right: 0; top: 50%; z-index: 1; text-align: center; white-space: nowrap; pointer-events: none;
    font: italic 400 min(30vw, calc(236vw / var(--len, 8)))/0.8 'Instrument Serif', Georgia, serif; letter-spacing: -0.04em;
    translate: 0 calc(-50% + (1 - var(--intro)) * 60px); opacity: calc(var(--intro) * 0.92); }
.word.swap { animation: word-in 520ms var(--spring) backwards; }
@keyframes word-in { from { filter: blur(14px); transform: translateY(0.14em); opacity: 0; } }
/* the middle term keeps a line inside the space beside the screen (tall, narrow desktop windows) */
.poster { font-size: clamp(3.5rem, min(7.4vw, (47vw - var(--w) / 2 - 16px) / 3.5), 8.5rem); line-height: 0.9; letter-spacing: -0.03em; }
.poster .line { position: absolute; z-index: 2; white-space: nowrap; opacity: calc(1 - var(--intro)); }
.poster .l { right: calc(50% + var(--w) / 2 + 3vw); top: 31%; translate: calc(var(--intro) * -30vw) 0; }
.poster .r { left: calc(50% + var(--w) / 2 + 3vw); top: 45%; translate: calc(var(--intro) * 30vw) 0; }
.phone { position: absolute; z-index: 3; left: calc(50% - var(--w) / 2); top: 88px; width: var(--w); height: var(--h); border-radius: 30px; overflow: hidden; background: #08090c;
    box-shadow: 0 40px 110px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.2); scale: calc(0.95 + var(--intro) * 0.05); }
.phone video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: blur(2px); transition: opacity 0s 240ms, filter 0s 240ms; }
.phone video.on { opacity: 1; filter: none; z-index: 1; transition: opacity 240ms var(--ease-out), filter 240ms var(--ease-out); }
.play-toggle { position: absolute; right: 12px; bottom: 12px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
    background: rgba(17, 18, 22, 0.78); color: #fff; transition: transform 140ms var(--ease-out); }
.play-toggle:active { transform: scale(0.95); }
.play-toggle .i-play, .play-toggle[data-state="paused"] .i-pause { display: none; }
.play-toggle[data-state="paused"] .i-play { display: block; }
.corner { position: absolute; z-index: 4; bottom: 40px; width: min(360px, calc(50% - var(--w) / 2 - 5vw)); }
.corner.left { left: max(24px, 3.4vw); display: flex; flex-direction: column; gap: 18px; }
.corner.right { right: max(24px, 3.4vw); text-align: right; display: grid; justify-items: end; }
.corner.right > * { grid-area: 1 / 1; align-self: end; }
.corner .lead { font-size: 1.0625rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.facts { list-style: none; display: flex; flex-direction: column; gap: 6px; color: var(--text-secondary); font-size: 0.875rem; opacity: calc(1 - var(--intro) * 1.6); }
.facts li::after { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #f59e0b; margin-left: 9px; vertical-align: middle; }
.caption { opacity: calc(var(--intro) * 1.6 - 0.6); display: flex; flex-direction: column; gap: 4px; }
.caption .mono { color: var(--text-secondary); letter-spacing: 0.18em; }
.cap-title { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.01em; }
.cap-desc { color: var(--text-secondary); font-size: 0.875rem; }
.ticks { position: absolute; z-index: 4; left: 50%; translate: -50% 0; top: calc(88px + var(--h) + 13px); display: flex; gap: 6px; }
.ticks button { width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 0; display: grid; place-items: center; }
.ticks button::before { content: ''; width: calc(100% - 6px); height: 3px; border-radius: 2px; background: var(--border-highlight); transition: background-color 220ms ease, transform 220ms var(--spring); }
.ticks button[aria-pressed="true"]::before { background: #f59e0b; transform: scaleY(2); }
/* finale: the stage clears and every other style stands behind '+23 more' (--end set by site.js) */
.glow, .word, .phone, .corner, .ticks { filter: opacity(max(0, 1 - var(--end) * 2)); }
.finale { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; opacity: calc(var(--end) * 2 - 1); }
.finale[inert] { pointer-events: none; }
.wall { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 10px; scale: calc(1.14 - var(--end) * 0.14); }
.wall img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; border-radius: 12px; background: #f4f6fa; opacity: 0.8; }
.wall img:not([src]) { visibility: hidden; }
.finale::after { content: ''; position: absolute; inset: 0; background: radial-gradient(54% 56% at 50% 50%, rgba(8, 9, 11, 0.96) 34%, rgba(8, 9, 11, 0.66) 66%, rgba(8, 9, 11, 0.06)); }
.finale-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; padding: 0 20px; color: #f5f5f7; translate: 0 calc((1 - var(--end)) * 40px); }
.finale-copy .lead { color: #c9c9d0; }
.finale-copy .actions { justify-content: center; }
.finale .glass { color: #f5f5f7; }
.more { font: italic 400 clamp(4.5rem, 14vw, 13rem)/0.9 'Instrument Serif', Georgia, serif; letter-spacing: -0.04em; white-space: nowrap; }

/* liquid glass: a hairline rim lit from above and below */
.glass { position: relative; background: rgba(255, 255, 255, 0.03); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12); }
.glass::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.4px; pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0.14) 22%, rgba(255,255,255,0.04) 45%, rgba(255,255,255,0.04) 55%, rgba(255,255,255,0.14) 78%, rgba(255,255,255,0.42));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude; }
/* film grain over everything */
body::after { content: ''; position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* phones and narrow windows: headline on top, screen in the middle, actions below */
@media (max-width: 899px) {
    .pin { --h: clamp(300px, 100svh - 392px, 640px); min-height: 640px; }
    .poster { position: absolute; z-index: 2; top: 86px; left: 0; right: 0; text-align: center; font-size: clamp(3.2rem, 15vw, 6rem); }
    .poster .line { position: static; display: block; }
    .poster .l { translate: 0 calc(var(--intro) * -60px); }
    .poster .r { translate: 0 calc(var(--intro) * -60px); }
    .word { top: 138px; font-size: min(34vw, calc(220vw / var(--len, 8))); }
    .phone { top: 200px; }
    .ticks { top: calc(200px + var(--h) + 1px); }
    .ticks { gap: 2px; }
    .corner.left { left: 16px; right: 16px; width: auto; bottom: 20px; align-items: center; text-align: center; }
    .corner.left .lead { font-size: 0.875rem; line-height: 1.45; max-width: 30em; opacity: calc(1 - var(--intro) * 1.6); }
    .actions { justify-content: center; }
    .actions .btn { padding: 0 18px; }
    .corner.right { left: 16px; right: 16px; width: auto; bottom: 80px; justify-items: center; text-align: center; }
    .facts, .cap-desc, .caption .mono { display: none; }
    .wall { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(6, minmax(0, 1fr)); gap: 6px; padding: 6px; }
    .cap-title { font-size: 0.9375rem; }
}

/* short phones have no room for the sentence under the screen */
@media (max-width: 899px) and (max-height: 760px) { .corner.left .lead { display: none; } }

/* short portrait phones: a tighter stage that still fits the screen */
@media (max-width: 899px) and (min-height: 540px) and (max-height: 700px) {
    .pin { --h: calc(100svh - 300px); min-height: 0; }
    .poster { top: 76px; font-size: 2.75rem; }
    .phone { top: 172px; }
    .word { top: 122px; }
    .ticks { top: calc(172px + var(--h) + 1px); }
    .corner.left { bottom: 10px; }
    .corner.right { display: none; }
}
/* the narrowest phones: the mark and the name fit the bar, both hero buttons fit one row */
@media (max-width: 359px) {
    .topbar .brand-name span { display: none; }
    .actions { gap: 8px; }
    .actions .btn { padding: 0 12px; font-size: 0.8125rem; }
}
/* phones held sideways and other very short windows: no pinning, an ordinary first screen */
@media (max-height: 539px) {
    .js .runway { height: auto; }
    .pin { position: relative; height: auto; min-height: 640px; }
    .poster { font-size: clamp(2.75rem, 6vw, 6rem); }
}

/* one entrance, first paint only */
@keyframes rise { from { opacity: 0; translate: 0 22px; filter: blur(10px); } }
@keyframes fade { from { opacity: 0; } }
.poster .line, .corner > *, .ticks button { animation: rise 900ms var(--spring) backwards; }
.phone { animation: fade 700ms var(--ease-out) backwards; }
.poster .r { animation-delay: 140ms; }
.corner > * { animation-delay: 300ms; }
.ticks button { animation-delay: 420ms; }

/* sections rise once as they enter (only when JS runs, so nothing can stay hidden) */
.reveals [data-reveal] { opacity: 0; translate: 0 34px; transition: opacity 700ms cubic-bezier(.25,.1,.25,1) var(--d, 0ms), translate 700ms cubic-bezier(.25,.1,.25,1) var(--d, 0ms); }
.reveals [data-reveal].is-in { opacity: 1; translate: 0 0; }
.steps > :nth-child(2), .plans > :nth-child(2) { --d: 110ms; }
.steps > :nth-child(3) { --d: 220ms; }

/* ---------- sections ---------- */
section.block { padding-block: clamp(64px, 9vw, 120px); display: flex; flex-direction: column; gap: 40px; }
.head { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.label { font: 500 0.75rem/1 'JetBrains Mono', Consolas, monospace; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-secondary); padding-top: 18px; border-top: 1px solid var(--border-highlight); align-self: stretch; }
.head h2 { font-size: clamp(2.9rem, 7.4vw, 6.75rem); line-height: 0.92; letter-spacing: -0.03em; max-width: 11em; }
.split .head h2 { font-size: clamp(2.9rem, 5.4vw, 5rem); }

.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); list-style: none; counter-reset: step; }
.step { border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 10px; counter-increment: step; }
.step::before { content: "0" counter(step); font: italic 400 4.5rem/0.9 'Instrument Serif', Georgia, serif; color: var(--text-secondary); }
.step p { color: var(--text-secondary); font-size: 0.9375rem; }
.ui { margin-top: auto; padding-top: 14px; }
.ui-card { background: var(--bg-card); border: 1px solid var(--border-main); border-radius: 13px; padding: 12px; display: flex; flex-direction: column; gap: 9px; min-height: 118px; justify-content: center; font-size: 0.75rem; font-weight: 600; text-align: center; }
.ui-btn { background: var(--btn-primary-bg); color: var(--btn-primary-text); border-radius: 9px; padding: 10px; }
.ui-drop { border: 1px dashed var(--border-highlight); border-radius: 9px; padding: 10px; color: var(--text-secondary); }
.ui-row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; background: var(--bg-seg); border-radius: 10px; padding: 3px; }
.ui-row span { padding: 8px 4px; border-radius: 7px; color: var(--text-secondary); white-space: nowrap; }
.ui-row .sel { background: var(--bg-seg-active); color: var(--seg-active-text); }

.shot-frame { border-radius: 18px; padding: 8px; }
.shot-frame img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border-main); }
/* on a phone the window stays readable and is swiped sideways */
@media (max-width: 699px) { .shot-frame { overflow-x: auto; } .shot-frame img { width: 820px; max-width: none; } }

/* ---------- style gallery ---------- */
.styles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 700px) { .styles-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1000px) { .styles-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.style-card { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 0 0 8px; border: 0; background: none; cursor: pointer; text-align: left; }
.style-card .shot { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: #f4f6fa; margin-bottom: 8px;
    box-shadow: 0 0 0 1px var(--border-main), 0 10px 26px rgba(0, 0, 0, 0.10); transition: transform 260ms var(--spring), box-shadow 220ms ease; }
.style-card:active .shot { transform: scale(0.98); }
.style-card[aria-pressed="true"] .shot { box-shadow: 0 0 0 2px #f59e0b, 0 18px 44px rgba(245, 158, 11, 0.28); }
/* 50% 22% keeps the title and the drawing of every preset inside the 4:5 crop */
.style-card img, .style-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.style-card video { opacity: 0; transition: opacity 180ms var(--ease-out); }
.style-card video.on { opacity: 1; }
.style-card .name { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; font-size: 0.8125rem; font-weight: 650; line-height: 1.3; padding-inline: 2px; }
.style-card .desc { font-size: 0.71875rem; color: var(--text-secondary); line-height: 1.35; padding-inline: 2px; }
.badge { flex: none; font-size: 0.5625rem; font-weight: 800; letter-spacing: 0.04em; line-height: 1.3; padding: 2px 6px; border-radius: 4px; }
.badge-free { background: #2ee59d; color: #07110d; }
.badge-pro { background: linear-gradient(135deg, #f59e0b, #d97706); color: #0d0f14; }
@media (hover: hover) and (pointer: fine) {
    .style-card:hover .shot { transform: translateY(-5px); box-shadow: 0 0 0 1px var(--border-highlight), 0 22px 44px rgba(0, 0, 0, 0.20); }
    .style-card[aria-pressed="true"]:hover .shot { box-shadow: 0 0 0 2px #f59e0b, 0 22px 48px rgba(245, 158, 11, 0.32); }
}
@media (max-width: 699px) {
    .style-card .shot { border-radius: 10px; }
    .style-card .name { flex-direction: column; gap: 4px; font-size: 0.6875rem; padding-inline: 2px; }
    .style-card .desc { display: none; }
}

/* ---------- DAW ---------- */
.split { display: grid; gap: 40px; align-items: center; }
.split > * { min-width: 0; }
@media (min-width: 880px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; } }
.daw { border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.daw-head { display: flex; align-items: center; gap: 9px; font-size: 0.8125rem; font-weight: 650; }
.daw-head .dot { width: 8px; height: 8px; border-radius: 50%; background: #2ee59d; box-shadow: 0 0 8px #2ee59d; }
.daw dl { display: grid; grid-template-columns: auto 1fr; gap: 9px 22px; background: var(--bg-card); border: 1px solid var(--border-main); border-radius: 13px; padding: 14px; font-size: 0.75rem; }
.daw dt { color: var(--text-secondary); font-weight: 600; }
.daw ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.daw li { display: flex; justify-content: space-between; gap: 12px; background: var(--bg-card); border: 1px solid var(--border-main); border-radius: 10px; padding: 10px 14px; font-size: 0.8125rem; font-weight: 600; }
.daw li span { color: var(--text-secondary); }

/* ---------- pricing ---------- */
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: stretch; }
.plan { border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.plan.featured { border-color: #f59e0b; box-shadow: 0 0 0 1px #f59e0b, 0 30px 80px rgba(245, 158, 11, 0.20); }
.plan-name { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.price { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-size: 4.5rem; line-height: 1; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price small { font: 500 0.9375rem 'Inter', sans-serif; color: var(--text-secondary); }
.plan dl { display: flex; flex-direction: column; }
.plan dl div { display: flex; justify-content: space-between; gap: 16px; padding-block: 11px; border-top: 1px solid var(--border-main); font-size: 0.9375rem; }
.plan dt { color: var(--text-secondary); }
.plan dd { text-align: right; font-weight: 600; }
.plan .btn { margin-top: auto; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; width: 100%; }
.faq details { border-top: 1px solid var(--border-main); }
.faq details:last-child { border-bottom: 1px solid var(--border-main); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 18px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.4rem; font-weight: 400; line-height: 1; color: var(--text-secondary); transition: transform 200ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-secondary); padding-bottom: 20px; max-width: 40em; }
.faq details::details-content { height: 0; overflow: clip; transition: height 220ms var(--ease-out), content-visibility 220ms allow-discrete; }
.faq details[open]::details-content { height: auto; }

.closing { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; margin-block: 32px 64px; padding: clamp(64px, 9vw, 120px) 24px; border-radius: 32px; border: 1px solid var(--border-main); background: radial-gradient(70% 90% at 50% 115%, rgba(245, 158, 11, 0.30), transparent 70%); }
:root[data-theme="white"] .closing.night { background-image: radial-gradient(70% 90% at 50% 115%, rgba(245, 158, 11, 0.34), transparent 70%); }
.closing h2 { font-size: clamp(3.25rem, 9vw, 8.5rem); line-height: 0.9; letter-spacing: -0.035em; max-width: 9em; }

/* ---------- text pages (terms, privacy, refunds, contact) ---------- */
.doc { padding-block: 64px 96px; max-width: 760px; display: flex; flex-direction: column; gap: 14px; }
.doc-wrap { display: flex; justify-content: center; }
.doc h1 { font-size: clamp(2.75rem, 6vw, 4.25rem); margin-bottom: 8px; }
.doc h2 { font: 650 1.1875rem/1.35 'Inter', sans-serif; letter-spacing: -0.005em; margin-top: 22px; }
.doc p, .doc li { color: var(--text-secondary); }
.doc ul, .doc ol { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.doc a, .doc strong { color: var(--text-primary); }

.buy { display: grid; gap: 48px; padding-block: 56px 96px; align-items: start; }
.buy > * { min-width: 0; }
@media (min-width: 900px) { .buy { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 64px; } }
.buy ol { padding-left: 20px; display: flex; flex-direction: column; gap: 12px; color: var(--text-secondary); }
.status { font-size: 0.875rem; color: var(--text-secondary); min-height: 1.4em; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--border-main); padding-block: 40px 48px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; align-items: flex-start; }
.foot > div { display: flex; flex-direction: column; gap: 12px; font-size: 0.875rem; color: var(--text-secondary); }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.875rem; font-weight: 550; }
.foot a:not(.brand) { display: inline-block; padding-block: 8px; }
.foot .brand { color: var(--text-primary); }

/* ---------- accessibility preferences ---------- */
@media (prefers-reduced-motion: reduce) {
    .poster .line, .corner > *, .ticks button, .phone { animation-name: fade; }
    .word.swap { animation: none; }
    .wall { scale: 1; }
    .finale-copy { translate: 0 0; }
    .phone { scale: 1; }
    .poster .line, .word { translate: 0 0; }
    .word { translate: 0 -50%; }
    .reveals [data-reveal] { opacity: 1; translate: 0 0; transition: none; }
    .runway, .btn, .btn:active, .seg button:active, .ticks button::before, .style-card .shot, .play-toggle:active, .faq summary::after { transition: none; }
    .btn:active, .seg button:active, .style-card:hover .shot, .style-card:active .shot, .play-toggle:active { transform: none; }
    .phone video, .phone video.on { filter: none; }
}
@media (prefers-reduced-transparency: reduce) {
    .surface, .topbar .bar { background: var(--bg-solid); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast: more) { .surface { border-color: var(--text-primary); background: var(--bg-solid); } }
