@font-face {
  font-family: 'Space Grotesk';
  src: url('../static/fonts/SpaceGrotesk-Variable.ttf') format('truetype');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --ink: #0a0a0b;
  --paper: #ededef;
  --muted: #9b9ba3;
  --accent: #38bdf8;
  --accent-bright: #7dd3fc;
  --time: 19.5s;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body {
  display: grid;
  place-items: center;
  min-height: 250px;
  overflow: hidden;
  background: var(--ink);
  font-family: 'Space Grotesk', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.banner {
  position: relative;
  isolation: isolate;
  width: min(100%, 1440px);
  height: min(100%, 400px);
  min-height: 250px;
  overflow: hidden;
  color: var(--paper);
  background:
    radial-gradient(ellipse at 70% 57%, #102331 0, transparent 40%),
    radial-gradient(ellipse at 20% 105%, #11131a 0, transparent 55%),
    var(--ink);
  border: 1px solid #252a31;
}

.grain, .grid, .ambient { position: absolute; pointer-events: none; }
.grain {
  z-index: 15;
  inset: 0;
  opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.27'/%3E%3C/svg%3E");
}
.grid {
  inset: 0;
  opacity: .34;
  background-image: linear-gradient(#fff1 1px, transparent 1px), linear-gradient(90deg, #fff1 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(90deg, transparent 10%, #000 100%);
}
.ambient { width: 46vw; height: 46vw; max-width: 700px; max-height: 700px; border-radius: 50%; filter: blur(80px); }
.ambient-one { right: -16%; top: -84%; background: #38bdf821; }
.ambient-two { left: -20%; bottom: -110%; background: #38bdf814; }

.frame {
  position: absolute;
  z-index: 16;
  left: 3.3%;
  right: 3.3%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font: 500 clamp(8px, .7vw, 10px)/1.2 'Space Grotesk', Arial, sans-serif;
  letter-spacing: .14em;
}
.frame-top { top: 7.5%; }
.frame-bottom { bottom: 7.5%; }
.frame-cross { color: var(--accent); font-size: 17px; vertical-align: -1px; }
.frame-top > span:nth-child(2) { margin-left: 12px; margin-right: auto; }

.intro, .core, .outro { position: absolute; inset: 0; }
.intro { display: flex; flex-direction: column; justify-content: center; padding: 2% 10%; text-align: center; pointer-events: none; }
.intro-kicker, .intro-line, .core-eyebrow, .outro-detail, .beat-index, .network-label {
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-weight: 500;
  letter-spacing: .2em;
}
.intro-kicker { margin: 0 0 9px; color: var(--accent); font-size: clamp(9px, .9vw, 13px); }
.wordmark {
  display: flex;
  justify-content: center;
  align-items: baseline;
  white-space: nowrap;
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: clamp(70px, 11vw, 170px);
  font-weight: 700;
  letter-spacing: -.1em;
  line-height: .95;
  text-shadow: 0 0 60px #38bdf81c;
}
.wordmark-number { color: var(--accent); }
.wordmark-rest { margin-left: .04em; }
.wordmark-cursor { color: var(--accent); font-weight: 400; letter-spacing: 0; }
.intro-rule { width: min(38%, 340px); height: 1px; margin: 22px auto 19px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.intro-line { margin: 0; color: #d8dce2; font-size: clamp(9px, 1vw, 15px); }
.accent-dot { color: var(--accent); }
.impact-ring { position: absolute; left: 50%; top: 50%; width: 50px; aspect-ratio: 1; border: 2px solid var(--accent); border-radius: 50%; box-shadow: 0 0 35px var(--accent); transform: translate(-50%, -50%) scale(.1); opacity: 0; }
.shards { position: absolute; inset: 0; }
.shard { position: absolute; left: 50%; top: 50%; width: clamp(12px, 2.5vw, 32px); height: clamp(30px, 6vw, 70px); background: linear-gradient(45deg, #8de4ff, #1686c8); clip-path: polygon(45% 0, 100% 48%, 32% 100%, 0 60%); filter: drop-shadow(0 0 16px #38bdf8); opacity: 0; }
.shard-1 { --x: -360px; --y: -180px; --r: -210deg; }
.shard-2 { --x: -240px; --y: 160px; --r: 105deg; }
.shard-3 { --x: -110px; --y: -210px; --r: 270deg; }
.shard-4 { --x: 25px; --y: 190px; --r: -120deg; }
.shard-5 { --x: 180px; --y: -145px; --r: 155deg; }
.shard-6 { --x: 350px; --y: 110px; --r: -75deg; }
.shard-7 { --x: 440px; --y: -180px; --r: 200deg; }
.shard-8 { --x: -420px; --y: 65px; --r: -165deg; }

.core { display: grid; grid-template-columns: 58% 42%; align-items: center; padding: 0 6.8%; pointer-events: none; }
.core-copy { position: relative; z-index: 3; padding-top: 9px; }
.core-eyebrow { display: flex; align-items: center; gap: 10px; margin: 0; color: #aeb7c0; font-size: clamp(9px, .82vw, 12px); }
.eyebrow-pip { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.beats { position: relative; height: clamp(170px, 16vw, 235px); }
.beat { position: absolute; top: 19%; left: 0; width: 100%; }
.beat-index { display: block; margin-bottom: 12px; color: var(--accent); font-size: clamp(10px, 1vw, 13px); }
.beat h1 { margin: 0; font-family: 'Space Grotesk', Arial, sans-serif; font-size: clamp(36px, 4.8vw, 72px); font-weight: 700; letter-spacing: -.065em; line-height: 1; white-space: nowrap; }
.beat p { margin: 16px 0 0; color: #c4cbd3; font-size: clamp(17px, 1.7vw, 24px); font-weight: 400; letter-spacing: -.02em; }
.core-track { display: flex; gap: 7px; width: 180px; }
.core-track span { width: 55px; height: 3px; background: #454b52; }
.core-track span::before { display: block; width: 100%; height: 100%; background: var(--accent); content: ''; transform: scaleX(0); transform-origin: left; }
.network { position: relative; width: min(100%, 560px); aspect-ratio: 560 / 380; margin-left: auto; }
.network svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 18px #38bdf833); }
.network-halo { position: absolute; inset: 12% 4%; border-radius: 50%; background: radial-gradient(circle, #38bdf82e 0, #38bdf809 30%, transparent 65%); filter: blur(24px); }
.orbit { stroke: #7dd3fc39; stroke-width: 1; stroke-dasharray: 4 8; }
.orbit-inner { stroke: #38bdf877; stroke-dasharray: 2 5; }
.network-line { stroke: #6bd7ff; stroke-width: 1.2; opacity: .68; stroke-dasharray: 1200; stroke-dashoffset: 1200; }
.line-2 { opacity: .35; }
.line-3 { opacity: .24; }
.node { fill: var(--accent); filter: drop-shadow(0 0 7px #38bdf8); opacity: 0; }
.core-node { fill: #0b141b; stroke: var(--accent); stroke-width: 2; }
.core-node-inner { fill: #38bdf81a; stroke: #38bdf866; stroke-width: 1; }
.core-glyph { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: square; stroke-linejoin: miter; filter: drop-shadow(0 0 12px #38bdf8); }
.network-label { position: absolute; color: #9dddf8; font-size: clamp(7px, .65vw, 10px); }
.network-label-one { top: 8%; left: 4%; }
.network-label-two { bottom: 3%; right: 2%; }

.outro { z-index: 5; display: flex; align-items: center; padding: 2% 7%; opacity: 0; }
.outro-copy { position: relative; z-index: 2; }
.outro h2 { margin: 0 0 12px; font-family: 'Space Grotesk', Arial, sans-serif; font-size: clamp(44px, 5.8vw, 86px); font-weight: 700; letter-spacing: -.072em; line-height: .9; }
.outro h2 em { color: var(--accent); font-style: normal; }
.outro-detail { margin: 0 0 23px; color: #bdc3ca; font-size: clamp(8px, .85vw, 12px); }
.outro-detail span { color: var(--accent); padding: 0 4px; }
.cta-actions { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
.cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 3.5vw, 48px);
  min-height: clamp(42px, 4vw, 52px);
  padding: 0 14px 0 16px;
  border: 1px solid var(--accent-bright);
  background: var(--accent);
  box-shadow: 0 10px 42px #38bdf830;
  color: #06121a;
  font-family: 'Space Grotesk', Arial, sans-serif;
  font-size: clamp(14px, 1.2vw, 17px);
  font-weight: 700;
  text-decoration: none;
  transition: background-color .2s, transform .2s, box-shadow .2s;
}
.cta:hover { background: var(--accent-bright); transform: translateY(-3px); box-shadow: 0 15px 48px #38bdf85c; }
.cta[hidden] { display: none; }
.cta-secondary { background: #14191e; border-color: #40667b; color: var(--paper); box-shadow: none; }
.cta-secondary:hover { background: #1c3442; border-color: var(--accent); color: #fff; box-shadow: 0 10px 28px #38bdf826; }
.cta:focus-visible, .replay:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.cta svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; }
.outro-mark { position: absolute; top: 48%; right: -1%; color: #38bdf80b; font-size: clamp(200px, 35vw, 540px); font-weight: 700; letter-spacing: -.13em; line-height: 1; transform: translateY(-50%) rotate(-8deg); white-space: nowrap; }
.outro-mark span { font-size: .6em; }
.progress { position: absolute; z-index: 20; left: 0; bottom: 0; width: 100%; height: 3px; background: #ffffff12; }
.progress span { display: block; width: 100%; height: 100%; background: var(--accent); box-shadow: 0 0 15px var(--accent); transform: scaleX(0); transform-origin: left; }
.replay { position: absolute; z-index: 30; top: 6.4%; right: 2.7%; display: grid; place-items: center; width: 28px; height: 28px; padding: 4px; border: 0; background: transparent; color: #a5a3a0; cursor: pointer; }
.replay:hover { color: var(--accent); }
.replay svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* One finite timeline: the final CTA remains visible after 19.5 seconds. */
.play .intro { animation: intro-scene 4.9s both; }
.play .intro-kicker { animation: snap-top .55s .55s both; }
.play .wordmark-number { animation: slam-left .72s .18s cubic-bezier(.13,.8,.1,1) both; }
.play .wordmark-rest { animation: slam-right .72s .31s cubic-bezier(.13,.8,.1,1) both; }
.play .wordmark-cursor { animation: cursor-in .25s 1.02s both; }
.play .intro-rule { animation: rule-in .55s 1.2s both; }
.play .intro-line { animation: snap-top .55s 1.45s both; }
.play .impact-ring { animation: impact .9s .28s ease-out both; }
.play .shard { animation: shatter 1.1s .12s cubic-bezier(.13,.6,.2,1) both; }
.play .core { animation: core-scene 10.4s 4.6s both; }
.play .beat-one { animation: beat-in 3.4s 4.85s both; }
.play .beat-two { animation: beat-in 3.4s 8.05s both; }
.play .beat-three { animation: beat-in 3.7s 11.25s both; }
.play .core-track span:nth-child(1)::before { animation: track-fill 3.1s 5.05s linear both; }
.play .core-track span:nth-child(2)::before { animation: track-fill 3.1s 8.25s linear both; }
.play .core-track span:nth-child(3)::before { animation: track-fill 3.3s 11.45s linear both; }
.play .network { animation: network-enter 10.1s 4.7s both; }
.play .network-line { animation: draw-line 2.3s 5s ease-out both; }
.play .line-2 { animation-delay: 5.3s; }
.play .line-3 { animation-delay: 5.6s; }
.play .node { animation: node-in .4s 5.65s both; }
.play .outro { animation: outro-in 1s 14.65s both; }
.play .cta-primary { animation: cta-pulse 3.1s 15.8s ease-in-out 1 both; }
.play .progress span { animation: progress var(--time) linear both; }
.paused *, .paused *::before { animation-play-state: paused !important; }

@keyframes intro-scene { 0% { opacity: 1; } 78% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.18); visibility: hidden; } }
@keyframes snap-top { from { opacity: 0; transform: translateY(-24px); filter: blur(9px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
@keyframes slam-left { 0% { opacity: 0; transform: translateX(-48vw) skewX(-15deg) scale(1.2); filter: blur(12px); } 76% { opacity: 1; transform: translateX(9px) skewX(3deg) scale(1.02); filter: blur(0); } 100% { transform: none; } }
@keyframes slam-right { 0% { opacity: 0; transform: translateX(48vw) skewX(15deg) scale(1.2); filter: blur(12px); } 76% { opacity: 1; transform: translateX(-9px) skewX(-3deg) scale(1.02); filter: blur(0); } 100% { transform: none; } }
@keyframes cursor-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rule-in { from { opacity: 0; transform: scaleX(0); } to { opacity: 1; transform: scaleX(1); } }
@keyframes impact { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.1); } 20% { opacity: .9; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(18); } }
@keyframes shatter { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(0) scale(.1); } 13% { opacity: .85; } 100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--r)) scale(.55); } }
@keyframes core-scene { 0% { opacity: 0; transform: translateY(25px); } 7% { opacity: 1; transform: none; } 91% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-18px); visibility: hidden; } }
@keyframes beat-in { 0% { opacity: 0; transform: translateY(28px); filter: blur(10px); } 16% { opacity: 1; transform: none; filter: blur(0); } 78% { opacity: 1; transform: none; filter: blur(0); } 100% { opacity: 0; transform: translateY(-20px); filter: blur(5px); } }
@keyframes track-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes network-enter { 0% { opacity: 0; transform: scale(.72) rotate(-20deg); } 12% { opacity: 1; transform: scale(1) rotate(0); } 86% { opacity: 1; transform: scale(1) rotate(0); } 100% { opacity: 0; transform: scale(1.16) rotate(9deg); } }
@keyframes draw-line { to { stroke-dashoffset: 0; } }
@keyframes node-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes outro-in { 0% { opacity: 0; transform: translateY(28px); filter: blur(8px); } 100% { opacity: 1; transform: none; filter: blur(0); } }
@keyframes cta-pulse { 0%, 100% { box-shadow: 0 10px 42px #38bdf830; } 38% { box-shadow: 0 0 0 12px #38bdf800, 0 0 55px #38bdf880; } 70% { box-shadow: 0 0 0 24px #38bdf800, 0 0 62px #38bdf855; } }
@keyframes progress { to { transform: scaleX(1); } }

@media (max-width: 720px) {
  .banner { height: 100%; max-height: none; }
  .frame { left: 5%; right: 5%; font-size: 8px; }
  .frame-top { top: 4%; }
  .frame-bottom { bottom: 4%; }
  .frame-bottom > span:last-child { display: none; }
  .replay { top: 2.9%; right: 4%; }
  .intro { padding: 0 5%; }
  .wordmark { font-size: clamp(58px, 14vw, 100px); }
  .intro-kicker { font-size: 9px; }
  .intro-rule { width: 60%; }
  .core { display: block; padding: 0 8%; }
  .core-copy { position: absolute; top: 47%; left: 8%; right: 8%; transform: translateY(-50%); }
  .core-eyebrow { font-size: 9px; }
  .beats { height: 170px; }
  .beat { top: 23%; }
  .beat h1 { font-size: clamp(28px, 7.5vw, 56px); }
  .beat p { font-size: 16px; }
  .network { position: absolute; right: -34%; bottom: 3%; width: 110%; opacity: .4; }
  .outro { padding: 0 8%; }
  .outro h2 { font-size: clamp(30px, 7.8vw, 60px); }
  .outro-mark { right: -33%; opacity: .6; }
  .cta { min-height: 48px; }
  .cta-actions { flex-direction: column; align-items: flex-start; }
  .cta-actions .cta { width: min(100%, 260px); }
}

@media (max-width: 720px) and (max-height: 450px) {
  .outro h2 { font-size: clamp(30px, 5.5vw, 44px); }
  .outro-detail { margin-bottom: 8px; }
  .cta-actions { flex-direction: row; gap: 8px; }
  .cta-actions .cta { width: auto; min-height: 38px; padding: 0 10px; gap: 8px; font-size: 12px; }
}

@media (max-height: 310px) and (min-width: 721px) {
  .frame-top { top: 6%; }
  .frame-bottom { bottom: 5%; }
  .wordmark { font-size: clamp(64px, 11vh, 100px); }
  .intro-rule { margin: 10px auto; }
  .core-eyebrow { font-size: 9px; }
  .beats { height: 128px; }
  .beat { top: 11%; }
  .beat-index { margin-bottom: 6px; }
  .beat h1 { font-size: clamp(34px, 5.5vh, 54px); }
  .beat p { margin-top: 7px; font-size: 16px; }
  .outro h2 { margin: 0 0 8px; font-size: clamp(38px, 7vh, 62px); }
  .outro-detail { margin-bottom: 10px; }
  .cta { min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .play *, .play *::before { animation: none !important; transition: none !important; }
  .intro, .core { display: none; }
  .outro { opacity: 1; }
  .progress span { transform: scaleX(1); }
  .replay { display: none; }
}
