/* Smash the City: product page.
   One typeface, one accent, generous space. Frames follow the visionOS window look. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  color-scheme: dark;
  --bg:      #0a0a0b;
  --ink:     #f5f5f7;
  --copy:    #a1a1a6;
  --faint:   #6e6e73;
  --line:    rgba(255, 255, 255, 0.1);
  --glass:   rgba(255, 255, 255, 0.04);
  --accent:  #ff8a4c;
  --radius:  28px;
  --max:     1120px;
  --pad:     clamp(20px, 5vw, 56px);
  --font:    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}

html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: 72px; overflow-x: hidden; }
body { background: var(--bg); color: var(--copy); font: 400 18px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { color: var(--ink); font-weight: 600; letter-spacing: -0.03em; line-height: 1.06; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 300; background: var(--ink); color: #000; padding: 10px 16px; border-radius: 10px; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* Bar */
.bar { position: sticky; top: 0; z-index: 50; height: 64px; background: rgba(10, 10, 11, 0.72); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.bar .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mark { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.mark img { width: 28px; height: 28px; border-radius: 7px; }
.bar nav { display: flex; align-items: center; gap: 26px; font-size: 14px; }
.bar nav a:not(.pill) { color: var(--copy); transition: color .2s; }
.bar nav a:not(.pill):hover { color: var(--ink); }

.pill { display: inline-flex; align-items: center; justify-content: center; font: 600 15px/1 var(--font); color: #0a0a0b; background: var(--ink); padding: 13px 22px; border-radius: 100px; transition: opacity .2s, transform .2s; white-space: nowrap; }
.pill svg { margin-right: 8px; flex: none; }
.pill.sm svg { margin-right: 6px; }
.pill:hover { opacity: .88; }
.pill.sm { padding: 9px 16px; font-size: 14px; }
.link { color: var(--ink); font-size: 16px; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Hero */
.hero { padding: clamp(56px, 9vw, 112px) 0 0; text-align: center; }
.hero h1 { font-size: clamp(48px, 9vw, 104px); letter-spacing: -0.045em; line-height: 1; }
.hero p.sub { max-width: 30ch; margin: 24px auto 0; font-size: clamp(19px, 2.2vw, 26px); line-height: 1.35; color: var(--copy); }
.cta { display: flex; justify-content: center; align-items: center; gap: 26px; margin-top: 34px; flex-wrap: wrap; }

/* Window frame, in the visionOS idiom: soft glass, large radius, thin edge */
.window { position: relative; margin: clamp(48px, 7vw, 88px) auto 0; border-radius: var(--radius); border: 1px solid var(--line); background: radial-gradient(90% 80% at 50% 0%, #1b1c21, #0f1013 70%); overflow: hidden; box-shadow: 0 40px 120px rgba(0, 0, 0, .55); }
.window.hero-window { aspect-ratio: 16 / 9; display: grid; place-items: center; }
.window.hero-window .media { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; display: block; user-select: none; -webkit-user-drag: none; transition: transform .12s ease-out; }


/* Sections */
section { padding: clamp(72px, 11vw, 144px) 0 0; }
.label { font-size: 14px; font-weight: 600; color: var(--faint); margin-bottom: 14px; }
.h2 { font-size: clamp(32px, 5vw, 56px); max-width: 18ch; }
.lead { margin-top: 20px; max-width: 46ch; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--glass); padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column; min-height: 420px; }
.panel h3 { font-size: 26px; letter-spacing: -0.02em; }
.panel p { margin-top: 8px; font-size: 16px; max-width: 34ch; }
.panel img { margin: auto auto 0; padding-top: 24px; max-height: 270px; width: auto; }

/* Powers: a plain ruled list */
.rows { margin-top: 44px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 6vw, 96px); }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.row b { color: var(--ink); font-weight: 500; }
.row span { font-size: 16px; text-align: right; }
.note { margin-top: 24px; font-size: 16px; max-width: 62ch; color: var(--faint); }

/* Cities */
.seg { display: inline-flex; padding: 4px; margin-top: 36px; border: 1px solid var(--line); border-radius: 100px; background: var(--glass); max-width: 100%; overflow-x: auto; }
.seg button { font: 500 15px/1 var(--font); color: var(--copy); background: none; border: 0; padding: 11px 20px; border-radius: 100px; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.seg button[aria-selected="true"] { background: var(--ink); color: #0a0a0b; }
.city { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; margin-top: 28px; }
.city .window { margin: 0; aspect-ratio: 16 / 9; }
.city .window video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
.city .window video.on { opacity: 1; }
.city h3 { font-size: 30px; }
.city .txt > div { display: none; }
.city .txt > div.on { display: block; animation: fade .4s ease both; }
.city p { margin-top: 12px; font-size: 17px; }
.city small { display: block; margin-top: 14px; font-size: 14px; color: var(--faint); }
@keyframes fade { from { opacity: 0; } }

/* Modes + spatial */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); margin-top: 44px; }
.cols > div { border-top: 1px solid var(--line); padding-top: 22px; }
.cols h3 { font-size: 24px; letter-spacing: -0.02em; }
.cols p { margin-top: 10px; font-size: 16px; max-width: 40ch; }
.cols.four { grid-template-columns: repeat(4, 1fr); gap: 32px; }

/* Close */
.close { text-align: center; padding-bottom: clamp(72px, 11vw, 144px); }
.close h2 { max-width: none; font-size: clamp(34px, 6vw, 68px); }
.close .cta { margin-top: 32px; }

footer { border-top: 1px solid var(--line); padding: 36px 0 44px; font-size: 13px; color: var(--faint); }
footer .top { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer a:hover { color: var(--ink); }
footer p { margin-top: 24px; max-width: 100ch; line-height: 1.6; }

.fade { opacity: 0; transition: opacity .8s ease; }
.fade.in { opacity: 1; }

@media (max-width: 860px) {
  .duo, .cols, .rows, .city { grid-template-columns: 1fr; }
  .cols.four { grid-template-columns: 1fr 1fr; }
  .window.hero-window { aspect-ratio: 4 / 3; }
  .window.hero-window .media { object-position: 45% 60%; }
  .bar nav a:not(.pill) { display: none; }
  .panel { min-height: 360px; }
}
@media (max-width: 520px) {
  body { font-size: 17px; }
  .cols.four { grid-template-columns: 1fr; }
  .row { flex-direction: column; gap: 2px; }
  .row span { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade { opacity: 1; transition: none; }
  .city .window video { transition: none; }
}

.window.clip { aspect-ratio: 16 / 9; margin: 32px 0 8px; }
.window.clip video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.panel .clip-v { max-height: none; margin: auto 0 0; padding: 0; margin-top: 24px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: calc(var(--radius) - 12px); }
button.row { font: inherit; color: var(--copy); background: none; border: 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; cursor: pointer; transition: color .2s; }
button.row b { transition: color .2s; }
button.row[aria-pressed="false"] b { color: var(--copy); }
button.row[aria-pressed="true"] b { color: var(--ink); }
button.row[aria-pressed="true"] b::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); margin-right: 10px; vertical-align: middle; }
button.row:hover b { color: var(--ink); }
button.row:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---- 2026-11-06 redesign: in-video decks, matching the game's ink + cream bar ---- */
:root { --cream: #f7f0e1; --deck: rgba(20, 20, 20, 0.62); }

/* Hero: the video is the poster; copy sits on it */
.hero { padding-top: clamp(20px, 3vw, 36px); text-align: left; }
.hero-stage { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 9; min-height: 520px; box-shadow: 0 40px 120px rgba(0,0,0,.55); background: #111; }
.hero-stage .media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.hero-stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,8,9,.88) 0%, rgba(8,8,9,.55) 38%, rgba(8,8,9,0) 68%), linear-gradient(0deg, rgba(8,8,9,.5), rgba(8,8,9,0) 40%); pointer-events: none; }
.hero-copy { position: absolute; z-index: 1; left: clamp(24px, 4.5vw, 64px); bottom: clamp(28px, 5vw, 64px); max-width: 560px; }
.kicker { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--cream); opacity: .85; }
.kicker img { border-radius: 6px; }
.hero h1 { margin-top: 16px; font-size: clamp(40px, 6.2vw, 80px); letter-spacing: -0.045em; line-height: .98; color: var(--cream); }
.hero h1 span { color: var(--accent); }
.hero p.sub { margin: 20px 0 0; max-width: 40ch; font-size: clamp(17px, 1.7vw, 21px); color: rgba(247,240,225,.78); }
.hero .cta { justify-content: flex-start; margin-top: 28px; }
.hero .pill { background: var(--cream); }
.facts { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 20px; border: 1px solid var(--line); border-radius: 22px; background: var(--glass); }
.facts li { padding: 18px 12px; text-align: center; font-size: 14px; color: var(--faint); }
.facts li + li { border-left: 1px solid var(--line); }
.facts b { display: block; font-size: clamp(24px, 3vw, 34px); font-weight: 600; color: var(--ink); letter-spacing: -0.03em; line-height: 1.1; }

/* Stage: one screen, the deck floats inside it, caption underneath */
.stage { margin-top: 40px; }
.screen { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #111; box-shadow: 0 30px 90px rgba(0,0,0,.5); }
.screen > video, .screen > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease; max-width: none; }
.screen > .on { opacity: 1; }
.deck { position: absolute; z-index: 2; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; padding: 6px; max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none; border-radius: 100px; background: var(--deck); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); }
.deck::-webkit-scrollbar { display: none; }
.deck.top { top: 16px; } .deck.bottom { bottom: 16px; }
.deck button { flex: none; font: 600 15px/1 var(--font); color: rgba(247,240,225,.75); background: none; border: 0; padding: 12px 18px; border-radius: 100px; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.deck button:hover { color: var(--cream); background: rgba(255,255,255,.08); }
.deck button[aria-selected="true"] { background: var(--cream); color: #141414; }
.deck button:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }
.cap { margin-top: 22px; min-height: 64px; }
.cap > div { display: none; }
.cap > div.on { display: flex; align-items: baseline; gap: 8px 28px; flex-wrap: wrap; animation: fade .35s ease both; }
.cap h3 { font-size: 24px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.cap h3 em { font-style: normal; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: #1a1205; background: #f3c450; padding: 5px 10px; border-radius: 100px; }
.cap p { font-size: 17px; max-width: 60ch; }

@media (max-width: 860px) {
  .hero-stage { aspect-ratio: auto; min-height: 0; height: min(78svh, 640px); }
  .hero-stage .media { object-position: 42% 88%; }
  .hero-stage::after { background: linear-gradient(0deg, rgba(8,8,9,.92) 0%, rgba(8,8,9,.7) 42%, rgba(8,8,9,0) 72%); }
  .hero-copy { right: 24px; bottom: 28px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts li:nth-child(3) { border-left: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .cap > div.on { display: block; }
  .cap p { margin-top: 6px; }
}
@media (max-width: 520px) {
  .screen { aspect-ratio: 4 / 3; border-radius: 22px; }
  .deck { left: 10px; right: 10px; transform: none; max-width: none; }
  .deck.top { top: 10px; } .deck.bottom { bottom: 10px; }
  .deck button { font-size: 14px; padding: 10px 14px; }
  .hero .cta { gap: 18px; }
}
@media (prefers-reduced-motion: reduce) { .screen > video, .screen > img { transition: none; } }

/* Footer notices: tucked away, opened on demand */
.notices { margin-top: 18px; }
.notices summary { display: inline-block; cursor: pointer; list-style: none; color: var(--faint); }
.notices summary::-webkit-details-marker { display: none; }
.notices summary::after { content: " +"; }
.notices[open] summary::after { content: " –"; }
.notices summary:hover { color: var(--ink); }
.notices p { margin-top: 10px; max-width: 90ch; line-height: 1.6; }

/* City Defense: one bold block, no cards */
.fight .h2 { max-width: 14ch; font-size: clamp(36px, 6vw, 68px); }
.fight .aside { margin-top: 18px; font-size: 16px; color: var(--faint); }
.close .made { margin-top: 14px; font-size: 15px; color: var(--faint); }


/* Tighter rhythm between sections */
section { padding-top: clamp(48px, 6vw, 88px); }
.close { padding-bottom: clamp(56px, 7vw, 96px); }
.h2 { max-width: 24ch; }
.cap { min-height: 0; }

/* Trailer placeholder */
.trailer { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #111; }
.trailer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; filter: blur(6px) brightness(.45); transform: scale(1.06); }
.trailer .soon { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--cream); }
.trailer .play { width: 72px; height: 72px; border-radius: 50%; background: rgba(247,240,225,.14); border: 1px solid rgba(247,240,225,.35); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); position: relative; margin-bottom: 10px; }
.trailer .play::after { content: ""; position: absolute; left: 29px; top: 24px; border-style: solid; border-width: 12px 0 12px 19px; border-color: transparent transparent transparent var(--cream); }
.trailer b { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.trailer small { font-size: 14px; opacity: .7; }

/* Light mode: the page chrome flips; anything sitting on video (hero copy, decks, trailer) stays dark-on-glass */
@media (prefers-color-scheme: light) {
  :root { color-scheme: light; --bg: #f5f3ee; --ink: #141414; --copy: #55534f; --faint: #8a8781; --line: rgba(0,0,0,0.1); --glass: rgba(0,0,0,0.03); --accent: #e2672a; }
  .bar { background: rgba(245,243,238,0.78); }
  .pill { color: #f5f3ee; background: #141414; }
  .hero .pill { color: #141414; background: var(--cream); }
  .hero h1 span { color: #ff8a4c; }
  .hero-stage, .screen, .trailer { box-shadow: 0 24px 70px rgba(0,0,0,.18); }
  .cap h3 em { color: #1a1205; }
  .close .pill { color: #f5f3ee; }
}
.trailer video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }

/* Cities: the city's enemy flies behind the heading */
.flyby-head { position: relative; }
.flyby-head > *:not(canvas) { position: relative; z-index: 1; }
#flyby { position: absolute; z-index: 0; left: calc(-1 * var(--pad)); right: calc(-1 * var(--pad)); top: -40px; width: calc(100% + 2 * var(--pad)); height: calc(100% + 80px); pointer-events: none; }
.foe { margin-top: 14px; font-size: 18px; font-weight: 600; color: var(--accent); }
.foe.pop { animation: fade .35s ease both; }

/* Modes: two cards, Defense lists what each city throws at you */
.modes { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; margin-top: 32px; }
.mode { border: 1px solid var(--line); border-radius: var(--radius); background: var(--glass); padding: clamp(22px, 3vw, 32px); }
.mode h3 { font-size: 26px; letter-spacing: -0.02em; }
.mode p { margin-top: 8px; font-size: 17px; }
.mode ul { list-style: none; margin-top: 16px; display: grid; gap: 10px; }
.mode li { font-size: 16px; padding-left: 14px; border-left: 2px solid var(--accent); }
.mode li b { display: block; color: var(--ink); font-weight: 600; }
.mode .small { font-size: 15px; color: var(--faint); margin-top: 16px; }
@media (max-width: 860px) { .modes { grid-template-columns: 1fr; } }

/* Hero: the words above, the film below with nothing on it */
.hero-copy { position: static; max-width: none; text-align: center; padding: clamp(16px, 3vw, 40px) 0 clamp(24px, 3.5vw, 44px); }
.kicker { justify-content: center; color: var(--ink); }
.hero h1 { color: var(--ink); font-size: clamp(42px, 7vw, 92px); }
.hero h1 span { color: var(--accent); }
.hero p.sub { margin: 20px auto 0; max-width: 46ch; color: var(--copy); }
.hero .cta { justify-content: center; }
.hero .pill { background: var(--ink); color: var(--bg); }
.hero .link { color: var(--ink); }
.hero-stage { aspect-ratio: 16 / 9; min-height: 0; height: auto; }
.hero-stage::after { display: none; }
.hero-stage .media { object-position: 50% 50%; }

/* Modes: a picture on each card */
.modes { grid-template-columns: 1fr 1fr; }
.mode { padding: 0 0 clamp(20px, 3vw, 28px); overflow: hidden; }
.mode img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 20px; }
.mode h3, .mode p { margin-left: clamp(20px, 3vw, 28px); margin-right: clamp(20px, 3vw, 28px); }

/* Text rises gently as it comes into view */
.rise { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.rise.up { opacity: 1; transform: none; }
.hero-copy > .rise:nth-child(2) { transition-delay: .08s; } .hero-copy > .rise:nth-child(3) { transition-delay: .16s; } .hero-copy > .rise:nth-child(4) { transition-delay: .24s; }
@media (max-width: 860px) { .modes { grid-template-columns: 1fr; } }
.fight .h2 { max-width: none; }

/* Headline: "tiny" shrinks, then the second line slams in */
.hero h1 .plain { color: var(--ink); }
.hero h1 .tiny { font-weight: inherit; }
.hero h1 .boom i { display: inline-block; font-style: normal; }
@media (prefers-reduced-motion: no-preference) {
  .hero h1 .tiny { animation: shrink .8s cubic-bezier(.3,.9,.3,1) .7s both; }
  .hero h1 .boom i { animation: slam .34s cubic-bezier(.2,1.5,.4,1) both; }
  .hero h1 .boom i:nth-child(1) { animation-delay: 1.55s; } .hero h1 .boom i:nth-child(2) { animation-delay: 1.67s; }
  .hero h1 .boom i:nth-child(3) { animation-delay: 1.79s; } .hero h1 .boom i:nth-child(4) { animation-delay: 1.91s; }
  .hero h1 { animation: thud .32s ease-out 2.2s both; }
}
@keyframes shrink { from { font-size: 1em; } to { font-size: .5em; } }
@keyframes slam { from { opacity: 0; transform: translateY(-.5em) scale(1.5); } to { opacity: 1; transform: none; } }
@keyframes thud { 0%, 100% { translate: 0 0; } 25% { translate: 0 5px; } 50% { translate: -3px -2px; } 75% { translate: 2px 1px; } }
@media (prefers-reduced-motion: no-preference) { .hero h1 .tiny { animation-fill-mode: both; } }
@media (prefers-reduced-motion: reduce) { .hero h1 .tiny { font-size: .5em; } }

/* "Your hands are the weapon." fills in with the scroll */
.h2.scrub span { display: inline-block; will-change: opacity, transform; }

/* Mode cards: clips, and the Defense card flickers between them */
.mode > video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; margin-bottom: 20px; background: #111; }
.flick { position: relative; aspect-ratio: 16 / 9; margin-bottom: 20px; background: #111; overflow: hidden; }
.flick video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.flick video.on { opacity: 1; }
.flick.flicker { animation: flicker .26s steps(1) both; }
@keyframes flicker { 0%, 40%, 80% { filter: brightness(1.7) contrast(1.1); } 20%, 60%, 100% { filter: none; } }

/* ---- 2026-11-07: trailer popup and heading entrances ---- */
.watch { display: inline-flex; align-items: center; gap: 10px; font: 600 15px/1 var(--font); color: var(--ink); background: var(--glass); border: 1px solid var(--line); padding: 12px 20px 12px 14px; border-radius: 100px; cursor: pointer; transition: background .2s, transform .2s; }
.watch:hover { background: rgba(127,127,127,.14); }
.watch:active { transform: scale(.97); }
.watch .tri { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); position: relative; flex: none; }
.watch .tri::after { content: ""; position: absolute; left: 8px; top: 6px; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent #fff; }
.tv { margin: auto; padding: 0; border: 0; background: #000; border-radius: 22px; overflow: visible; width: min(1100px, calc(100vw - 32px)); max-height: calc(100svh - 32px); aspect-ratio: 16 / 9; box-shadow: 0 40px 140px rgba(0,0,0,.7); }
.tv::backdrop { background: rgba(5,5,6,.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tv[open] { animation: tvIn .35s cubic-bezier(.2,.9,.3,1.1) both; }
.tv video { display: block; width: 100%; height: 100%; border-radius: 22px; background: #000; }
.tv-x { position: absolute; z-index: 2; top: -14px; right: -14px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: #1c1c1e; color: #f5f5f7; font: 400 26px/1 var(--font); cursor: pointer; }
@keyframes tvIn { from { opacity: 0; transform: scale(.94); } }
@media (max-width: 520px) { .tv { border-radius: 14px; } .tv video { border-radius: 14px; } .tv-x { top: -48px; right: 0; } }

[data-fx] > span, [data-fx] .ch { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  /* Pick your disaster: words fall and hit, "disaster" catches fire */
  [data-fx="drop"] > span { opacity: 0; transform: translateY(-1.2em) scale(1.3); }
  [data-fx="drop"].go > span { animation: slam .36s cubic-bezier(.2,1.5,.4,1) both; }
  [data-fx="drop"].go > span:nth-child(2) { animation-delay: .14s; }
  [data-fx="drop"].go > .hot { animation: slam .4s cubic-bezier(.2,1.5,.4,1) .34s both, burn 2.4s ease-in-out 1s infinite; }
  [data-fx="drop"].go { animation: thud .3s ease-out .7s both; }
  /* Three ways to fall: the last word falls over */
  [data-fx="fall"] > span { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
  [data-fx="fall"].go > span { opacity: 1; transform: none; }
  [data-fx="fall"].go > span:nth-child(2) { transition-delay: .15s; }
  [data-fx="fall"] > .drop { transform-origin: 0 100%; }
  [data-fx="fall"].go > .drop { transition: opacity .3s ease .35s; animation: topple 1.3s cubic-bezier(.5,0,.4,1.4) .8s both; }
  /* Keeps score: the punchline types itself */
  [data-fx="type"] .lead-in { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
  [data-fx="type"].go .lead-in { opacity: 1; transform: none; }
  /* It fights back: letters come out of smoke */
  [data-fx="smoke"] { position: relative; }
  [data-fx="smoke"] .ch { opacity: 0; filter: blur(14px); transform: translate(.4em, .1em) scale(1.4); }
  [data-fx="smoke"].go .ch { animation: unsmoke 1.1s cubic-bezier(.2,.7,.2,1) calc(var(--i) * 55ms) both; }
  .smoke { position: absolute; left: -4%; top: -30%; width: 108%; height: 160%; pointer-events: none; z-index: -1; }
  .smoke i { position: absolute; left: calc(var(--k) * 11%); top: 40%; width: 1.4em; height: 1.4em; border-radius: 50%; background: radial-gradient(circle, rgba(150,145,140,.55), rgba(150,145,140,0) 68%); opacity: 0; }
  [data-fx="smoke"].go .smoke i { animation: puff 2.6s ease-out calc(var(--k) * 90ms) both; }
  /* Destroy it. Or survive it. */
  [data-fx="split"] .a { opacity: 0; transform: scale(1.35); }
  [data-fx="split"].go .a { animation: slam .4s cubic-bezier(.2,1.5,.4,1) both, shake .45s steps(2) .4s both; }
  [data-fx="split"] .b { opacity: 0; transform: translateX(-24px); filter: blur(6px); transition: opacity .7s ease .85s, transform .7s cubic-bezier(.2,.7,.2,1) .85s, filter .7s ease .85s; }
  [data-fx="split"].go .b { opacity: 1; transform: none; filter: none; }
  /* Coming soon: letters rise in a wave */
  [data-fx="letters"] .ch { opacity: 0; transform: translateY(.5em); }
  [data-fx="letters"].go .ch { animation: wave .6s cubic-bezier(.2,.8,.2,1.2) calc(var(--i) * 28ms) both; }
}
[data-fx] .w { display: inline-block; white-space: nowrap; }
.hot { color: var(--accent); }
.caret { display: inline-block; width: .08em; height: .9em; margin-left: .06em; vertical-align: -.08em; background: var(--accent); animation: blink 1s steps(1) infinite; }
[data-fx="type"].done .caret { animation: blink 1s steps(1) 3, out .01s 3s forwards; }
@keyframes burn { 0%, 100% { text-shadow: 0 0 0 rgba(255,120,40,0); } 50% { text-shadow: 0 0 .35em rgba(255,110,30,.55), 0 -.05em .12em rgba(255,200,80,.5); } }
@keyframes topple { 0% { transform: none; } 45% { transform: rotate(14deg); } 70% { transform: rotate(10deg); } 100% { transform: rotate(12deg); } }
@keyframes unsmoke { to { opacity: 1; filter: none; transform: none; } }
@keyframes puff { 0% { opacity: 0; transform: translate(0, 0) scale(.4); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(.6em, -1.6em) scale(3.2); } }
@keyframes shake { 0% { translate: -3px 1px; } 50% { translate: 3px -1px; } 100% { translate: 0 0; } }
@keyframes wave { to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret { display: none; } }
