/* askaboutgta: tokens from design/sayo.pen (AskAboutGTA frames, gta-* variables). */
@font-face { font-family: "Anton"; src: url("fonts/anton.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --night: #0a0612;
  --panel: #160b26;
  --line: rgba(255, 255, 255, 0.12);
  --ink: #fff4e8;
  --dim: #d2c3e2;
  --mute: #a091b8;
  --pink: #ff2e88;
  --orange: #ff7a3d;
  --gold: #ffc24b;
  --cyan: #2de2e6;
  --sun: linear-gradient(90deg, var(--pink), var(--orange) 60%, var(--gold));
  --display: "Anton", "Impact", sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --gutter: 56px;
  --dock: 150px;
  color-scheme: dark;
}
@media (max-width: 760px) { :root { --gutter: 16px; --dock: 156px; } }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--night); color: var(--ink); font: 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 30; background: var(--ink); color: var(--night); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.sun-text { background: var(--sun); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (forced-colors: active) { .sun-text { background: none; color: CanvasText; } }

/* ---------- top bar ---------- */
.top { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 22px var(--gutter); background: linear-gradient(var(--night), rgba(10, 6, 18, 0.85) 60%, transparent); }
.top::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(10, 6, 18, 0.72); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); opacity: 0; pointer-events: none; }
.brand { display: flex; align-items: center; gap: 14px; }
.wordmark { font: 30px/1 var(--display); letter-spacing: 0.5px; }
.pill-unofficial { font: 600 11px/1 var(--mono); letter-spacing: 1.5px; color: var(--cyan); border: 1px solid var(--cyan); border-radius: 999px; padding: 6px 10px; }
.top-right { display: flex; align-items: center; gap: 16px; }
.powered { font-size: 13px; color: var(--dim); }
.powered b { color: var(--ink); }
.ghost { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, 0.08); border: 0; border-radius: 999px; padding: 9px 14px; font-size: 13px; font-weight: 600; }
@media (max-width: 760px) {
  .top { padding: 14px var(--gutter); }
  .wordmark { font-size: 22px; }
  .brand { flex-direction: column; align-items: flex-start; gap: 4px; }
  .pill-unofficial { border: 0; padding: 0; font-size: 9px; }
  .powered { display: none; }
}

/* ---------- welcome ---------- */
.welcome { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 120px var(--gutter) calc(var(--dock) + 24px); overflow: hidden; }
.welcome-art { position: absolute; inset: 0; background: url("art/hero.jpg") center / cover no-repeat; }
.welcome-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 6, 18, 0.95), rgba(10, 6, 18, 0.75) 42%, rgba(10, 6, 18, 0) 75%), linear-gradient(transparent 50%, var(--night)); }
.welcome-copy { position: relative; max-width: 900px; }
.eyebrow-mono { font: 600 13px/1 var(--mono); letter-spacing: 2.5px; color: var(--gold); margin: 0 0 22px; }
.welcome-title { font: 112px/0.92 var(--display); margin: 0; font-weight: 400; }
.welcome-title span { display: block; }
.welcome-deck { font-size: 20px; line-height: 1.45; color: var(--dim); max-width: 560px; margin: 22px 0 32px; }
.starters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.starters button { width: 100%; height: 100%; text-align: left; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: rgba(22, 11, 38, 0.8); backdrop-filter: blur(16px); font-size: 15px; line-height: 1.4; position: relative; isolation: isolate; }
/* A sunset glow that follows the cursor (app.js sets --mx and --my; desktop only). */
.starters button::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 46, 136, 0.22), rgba(255, 122, 61, 0.08) 45%, transparent 70%); opacity: 0; transition: opacity 200ms ease; pointer-events: none; }
.tag { font: 600 11px/1 var(--mono); letter-spacing: 1.5px; color: var(--cyan); }
@media (max-width: 1000px) { .welcome-title { font-size: 76px; } .starters { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .welcome { align-items: flex-end; padding-top: 96px; }
  .welcome-art { background-position: 70% center; }
  .welcome-title { font-size: 52px; }
  .welcome-deck { font-size: 16px; margin: 16px 0 20px; }
  .eyebrow-mono { font-size: 10px; letter-spacing: 1.5px; }
  .starters { grid-template-columns: 1fr; gap: 8px; }
  .starters li:nth-child(n + 4) { display: none; }
  .starters button { padding: 12px 14px; font-size: 14px; }
}

/* ---------- scenes ---------- */
#scenes { padding: 0 var(--gutter); }
.scene { min-height: calc(100svh - var(--dock)); padding: 104px 0 calc(var(--dock) + 24px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 516px); gap: 60px; align-items: start; border-bottom: 1px solid var(--line); animation: rise 320ms var(--ease-out) backwards; }
.scene:last-child { border-bottom: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.scene-text { display: flex; flex-direction: column; gap: 20px; max-width: 752px; }
.eyebrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ask { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 15px; }
.rule { width: 28px; height: 2px; background: var(--pink); flex: none; }
.share { animation: pop 300ms var(--ease-out) backwards; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 16px; background: var(--sun); color: #1a0612; font-size: 14px; font-weight: 700; flex: none; }
.headline { font: 76px/0.98 var(--display); font-weight: 400; margin: 0; text-transform: uppercase; overflow-wrap: anywhere; }
.headline.thinking .s1 { font-size: 0.6em; background: linear-gradient(90deg, var(--mute) 20%, var(--ink) 50%, var(--mute) 80%) 0 / 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
/* Headline words blur and rise in as they stream (app.js adds only new ones). Each word in the second sentence carries
   the sunset itself, anchored to the viewport so the sweep stays continuous: a parent's background-clip: text doesn't
   paint into animated children. */
.headline .w { display: inline-block; margin-right: 0.22em; animation: word 420ms var(--ease-out) backwards; }
.headline .w:last-child { margin-right: 0; }
.headline .s2.sun-text { background: none; }
.headline .s2 .w { background: var(--sun) fixed; -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes word { from { opacity: 0; filter: blur(8px); transform: translateY(0.18em); } }
@keyframes pop { from { opacity: 0; filter: blur(4px); transform: translateY(6px); } }
.md { font-size: 18px; line-height: 1.55; color: var(--dim); max-width: 68ch; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 12px; }
.md strong, .md h3, .md h4, .md th { color: var(--ink); }
.md h3, .md h4 { font: 400 26px/1.1 var(--display); text-transform: uppercase; letter-spacing: 0.3px; margin: 20px 0 8px; }
.md ul, .md ol { padding-left: 20px; margin: 0 0 12px; }
.md li { margin: 4px 0; }
.md li::marker { color: var(--pink); }
.md a { color: var(--cyan); }
.md code { font: 0.9em var(--mono); color: var(--gold); }
.md blockquote { margin: 0 0 12px; padding: 12px 16px; border-left: 3px solid var(--pink); background: rgba(255, 46, 136, 0.08); border-radius: 0 12px 12px 0; }
.md table { width: 100%; border-collapse: collapse; margin: 4px 0 12px; font-size: 15px; display: block; overflow-x: auto; }
.md th { font: 600 11px/1.2 var(--mono); letter-spacing: 1.2px; text-transform: uppercase; color: var(--mute); text-align: left; }
.md th, .md td { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.md td { color: var(--ink); font-weight: 500; }
.intel { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bad { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--mute); font-size: 13px; padding: 6px 4px; }
.bad:disabled { cursor: default; }
.followups { display: flex; flex-wrap: wrap; gap: 10px; }
.followups:empty { display: none; }
.chip { animation: pop 280ms var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 40ms); border: 1px solid rgba(45, 226, 230, 0.4); background: none; color: var(--cyan); border-radius: 999px; padding: 10px 16px; font-size: 14px; text-align: left; }
.error { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.error p { font: 44px/1 var(--display); text-transform: uppercase; margin: 0; animation: static 260ms steps(1) backwards; }
/* Lost the signal: one burst of radio static, then still. */
@keyframes static {
  0% { opacity: 0; transform: translateX(-6px); clip-path: inset(0 0 60% 0); text-shadow: 3px 0 var(--cyan), -3px 0 var(--pink); }
  20% { opacity: 1; transform: translateX(5px); clip-path: inset(45% 0 0 0); }
  40% { transform: translateX(-3px); clip-path: inset(10% 0 35% 0); text-shadow: -2px 0 var(--cyan), 2px 0 var(--pink); }
  60% { transform: translateX(2px); clip-path: inset(0 0 15% 0); }
  80% { transform: none; clip-path: none; text-shadow: 1px 0 var(--cyan), -1px 0 var(--pink); }
}
.art-card { --r: 22px; animation: art-in 700ms var(--ease-out) backwards; position: relative; margin: 0; border-radius: var(--r); overflow: hidden; border: 1px solid rgba(255, 46, 136, 0.4); box-shadow: 0 20px 60px rgba(255, 46, 136, 0.2); aspect-ratio: 516 / 600; position: sticky; top: 104px; }
.art-card img { width: 100%; height: 100%; object-fit: cover; display: block; animation: settle 1100ms var(--ease-out) backwards; }
@keyframes art-in { from { clip-path: inset(100% 0 0 0 round var(--r)); } to { clip-path: inset(0 round var(--r)); } }
@keyframes settle { from { transform: scale(1.12); } }
.art-card::after { content: ""; position: absolute; inset: 70% 0 0; background: linear-gradient(transparent, rgba(10, 6, 18, 0.85)); }
.cap { position: absolute; left: 20px; bottom: 20px; z-index: 1; font: 600 11px/1 var(--mono); letter-spacing: 1.5px; color: var(--cyan); background: rgba(10, 6, 18, 0.7); border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; animation: pop 300ms var(--ease-out) 380ms backwards; }
.fanart { position: absolute; right: 20px; bottom: 24px; z-index: 1; font-size: 11px; color: var(--mute); animation: pop 300ms var(--ease-out) 460ms backwards; }
@media (max-width: 1000px) {
  .scene { grid-template-columns: 1fr; gap: 16px; padding-top: 88px; }
  .art-card { --r: 16px; grid-row: 1; aspect-ratio: auto; height: 180px; position: relative; top: 0; }
  .headline { font-size: 52px; }
}
@media (max-width: 760px) {
  .scene { padding-top: 84px; }
  .art-card { height: 160px; }
  .headline { font-size: 40px; line-height: 1; }
  .md { font-size: 16px; }
  .ask { font-size: 14px; }
  .error p { font-size: 32px; }
}

/* ---------- dock ---------- */
.dock { position: fixed; inset: auto 0 0; z-index: 20; padding: 48px var(--gutter) 14px; background: linear-gradient(transparent, rgba(10, 6, 18, 0.95) 45%); pointer-events: none; }
.dock > * { pointer-events: auto; max-width: 900px; }
.composer { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 8px 0 22px; border-radius: 999px; border: 1.5px solid transparent; background: linear-gradient(#120a20, #120a20) padding-box, linear-gradient(90deg, var(--pink), var(--orange) 50%, var(--cyan)) border-box; box-shadow: 0 0 40px rgba(255, 46, 136, 0.25); transition: box-shadow 240ms ease; }
.composer:focus-within { box-shadow: 0 0 56px rgba(255, 46, 136, 0.42); }
.composer .phone { color: var(--pink); width: 20px; height: 20px; }
.composer input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: 17px var(--body); }
.composer input::placeholder { color: var(--mute); transition: color 160ms ease; }
.composer.flying input::placeholder { color: transparent; } /* the question is taking off from here */
.send { position: relative; width: 48px; height: 48px; border: 0; border-radius: 999px; background: var(--sun); color: #1a0612; display: grid; place-items: center; }
.send:disabled { cursor: progress; }
/* On a call: Send rings while the answer streams, and the phone icon wiggles. */
.composer.calling .send::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--pink); animation: ring 1.1s var(--ease-out) infinite; pointer-events: none; }
@keyframes ring { from { opacity: 0.9; transform: scale(1); } to { opacity: 0; transform: scale(1.6); } }
.composer.calling .phone { animation: wiggle 1.2s ease-in-out infinite; }
@keyframes wiggle { 0%, 40%, 100% { transform: rotate(0); } 8%, 24% { transform: rotate(-14deg); } 16%, 32% { transform: rotate(14deg); } }
.flight { position: fixed; z-index: 25; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform-origin: 0 0; pointer-events: none; color: var(--ink); }
.send svg { width: 22px; height: 22px; stroke-width: 2.5; }
.privacy { margin: 10px 0 0 24px; font-size: 12px; color: var(--mute); }
.link { border: 0; background: none; padding: 0; color: var(--dim); text-decoration: underline; font-size: 12px; }
@media (max-width: 760px) {
  .dock { padding-top: 36px; }
  .composer { height: 54px; padding-left: 16px; }
  .composer input { font-size: 16px; }
  .send { width: 42px; height: 42px; }
  .privacy { margin-left: 8px; font-size: 10px; }
}

/* ---------- footer, privacy ---------- */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding: 20px var(--gutter) calc(var(--dock) + 8px); border-top: 1px solid var(--line); font-size: 12px; color: var(--mute); }
.foot p { margin: 0; max-width: 900px; }
.foot a { color: var(--dim); }
.sayo-link { font-weight: 600; text-decoration: none; }
dialog { max-width: 480px; background: var(--panel); color: var(--dim); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
dialog[open] { transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); @starting-style { opacity: 0; transform: scale(0.96); } }
dialog::backdrop { background: rgba(10, 6, 18, 0.7); }
dialog[open]::backdrop { transition: opacity 200ms ease; @starting-style { opacity: 0; } }
dialog h2 { font: 32px/1 var(--display); text-transform: uppercase; color: var(--ink); margin: 0 0 12px; font-weight: 400; }

/* ---------- interaction ---------- */
/* Press feedback on everything tappable; `scale` composes with the entrance animations, which use `transform`. */
:is(.starters button, .chip, .send, .share, .ghost, .bad, .sayo-link) { transition: scale 140ms var(--ease-out), translate 200ms var(--ease-out), background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
:is(.starters button, .chip, .send, .share, .ghost, .bad):active:not(:disabled) { scale: 0.97; }
.send:active:not(:disabled) { scale: 0.93; }
.sayo-link { display: inline-block; }
@media (hover: hover) and (pointer: fine) {
  .ghost:hover { background: rgba(255, 255, 255, 0.14); }
  .starters button:hover { border-color: rgba(255, 46, 136, 0.55); translate: 0 -2px; }
  .starters button:hover::before { opacity: 1; }
  .bad:hover:not(:disabled) { color: var(--dim); }
  .chip:hover { background: rgba(45, 226, 230, 0.1); }
  .sayo-link:hover { translate: 3px 0; color: var(--ink); }
}

/* Welcome, on page load only (index.html sets .intro, app.js removes it): it doesn't replay on "New question". */
.welcome-art { scale: 1.04; }
.intro .welcome-art { animation: art-settle 1600ms var(--ease-out) backwards; }
.intro .eyebrow-mono { animation: rise-in 600ms var(--ease-out) 80ms backwards; }
.intro .welcome-title span { animation: line-up 800ms var(--ease-out) 160ms backwards; }
.intro .welcome-title span + span { animation-delay: 260ms; }
.intro .welcome-deck { animation: rise-in 600ms var(--ease-out) 420ms backwards; }
.intro .starters li { animation: rise-in 500ms var(--ease-out) backwards; animation-delay: calc(520ms + var(--i) * 50ms); }
.starters li:nth-child(1) { --i: 0; } .starters li:nth-child(2) { --i: 1; } .starters li:nth-child(3) { --i: 2; }
.starters li:nth-child(4) { --i: 3; } .starters li:nth-child(5) { --i: 4; } .starters li:nth-child(6) { --i: 5; }
@keyframes art-settle { from { opacity: 0; transform: scale(1.08); } }
@keyframes rise-in { from { opacity: 0; filter: blur(6px); transform: translateY(14px); } }
/* The line rises behind a fixed edge: the clip shrinks as fast as the line moves up. */
@keyframes line-up { from { transform: translateY(110%); clip-path: inset(-20% -5% 110% -5%); } to { transform: none; clip-path: inset(-20% -5% -20% -5%); } }

/* Scroll: older scenes recede, the top bar firms up. Browsers without scroll-driven animations show neither. */
@supports (animation-timeline: view()) {
  .scene-text { transform-origin: 50% 0; animation: recede linear both; animation-timeline: view(); animation-range: exit 5% exit 85%; }
  .top::before { animation: firm linear both; animation-timeline: scroll(root); animation-range: 0 140px; }
}
@keyframes recede { to { opacity: 0.25; transform: scale(0.97); } }
@keyframes firm { to { opacity: 1; } }

/* Reduced motion: no movement, but fades stay. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-property: opacity, color, background-color, border-color, box-shadow !important; }
  :is(.scene, .headline .w, .art-card, .art-card img, .cap, .fanart, .chip, .share, .error p, dialog[open]) { animation: fade 200ms ease-out backwards !important; }
  .intro :is(.welcome-art, .eyebrow-mono, .welcome-title span, .welcome-deck, .starters li) { animation: fade 300ms ease-out backwards !important; }
  .scene-text, .composer.calling .phone, .starters button::before { animation: none !important; }
  .starters button::before { display: none; }
  .composer.calling .send::after { animation: pulse 1.2s ease-in-out infinite !important; }
  .headline.thinking .s1 { animation: none; color: var(--mute); background: none; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes pulse { 50% { opacity: 0.2; } }
