/* Option 1 — Worlds: a strip of scenes, one world after another, on a rising new planet. */

:root {
  --ink: #eef0ff;
  --muted: #a3abd0;
  --faint: #6f78a3;
  --bg: #070a1f;
  --panel: rgba(16, 21, 50, .82);
  --line: rgba(255, 255, 255, .08);
  --mint: #3ee6b0;
  --cyan: #6fe7ff;
  --sun: #ffd166;
  --coral: #ff8a7a;
  --violet: #9b8cff;
  --gutter: clamp(16px, 5vw, 56px);
  --card: clamp(272px, 32vw, 400px);
  --gap: clamp(14px, 2vw, 24px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--bg); overflow-x: hidden; }
h1, h2, p { margin: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Sky ---------- */

.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: radial-gradient(120% 70% at 50% 0%, #161a4a 0%, #0b0e2c 45%, var(--bg) 100%); }
.stars { position: absolute; inset: 0; background-image: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .75) 0 1px, transparent 1.5px), radial-gradient(circle at 70% 80%, rgba(200, 220, 255, .55) 0 .8px, transparent 1.3px); background-size: 160px 150px, 230px 210px; -webkit-mask-image: linear-gradient(#000, transparent 75%); mask-image: linear-gradient(#000, transparent 75%); opacity: .6; animation: twinkle 6s ease-in-out infinite alternate; }
.glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .35; }
.glow-a { width: 46vmax; height: 30vmax; top: -12vmax; left: -10vmax; background: #2b6bff; animation: drift-a 24s ease-in-out infinite alternate; }
.glow-b { width: 40vmax; height: 28vmax; top: -8vmax; right: -12vmax; background: #7a4dff; animation: drift-b 28s ease-in-out infinite alternate; }

/* ---------- Layout ---------- */

.page { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; }

.top { display: flex; align-items: center; gap: 28px; max-width: 1200px; width: 100%; margin: 0 auto; padding: max(clamp(14px, 3vw, 22px), env(safe-area-inset-top)) var(--gutter) clamp(14px, 3vw, 22px); }
.brand { display: inline-flex; align-items: center; gap: .6rem; margin-right: auto; color: inherit; text-decoration: none; font-weight: 700; font-size: 1.1rem; border-radius: 8px; }
.brand-mark { width: 30px; height: 30px; }
.top nav { display: flex; gap: 26px; }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.top nav a:hover { color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: .8em 1.5em; border-radius: 999px; font-weight: 700; font-size: 1rem; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-mint { background: var(--mint); color: #062a22; box-shadow: 0 10px 30px rgba(62, 230, 176, .3); }
.btn-small { padding: .55em 1.1em; font-size: .9rem; box-shadow: none; }
.btn-ghost { color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .28); }

.hero { max-width: 900px; margin: 0 auto; padding: clamp(20px, 6vh, 60px) var(--gutter) 0; text-align: center; }
.eyebrow { margin-bottom: 1.1rem; font-size: .78rem; font-weight: 650; letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.4rem); font-weight: 750; line-height: 1.04; letter-spacing: -.03em; text-wrap: balance; }
.glow-text { background: linear-gradient(90deg, var(--cyan), var(--mint) 40%, var(--sun) 80%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 40rem; margin: 1.25rem auto 0; font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

/* ---------- Scene strip ---------- */

.demo { position: relative; margin-top: clamp(64px, 10vh, 104px); }

/* A new world rising behind the scenes. */
.horizon { position: absolute; left: 50%; top: 22%; width: max(150%, 1400px); aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle at 50% 0%, #22346e 0%, #121845 12%, #0a0d2a 26%, var(--bg) 40%); pointer-events: none; }
.horizon::before { content: ""; position: absolute; left: 50%; top: -220px; width: 64%; height: 440px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 209, 102, .42), rgba(255, 138, 122, .22) 35%, rgba(62, 230, 176, .14) 60%, transparent); filter: blur(14px); animation: sunrise 8s ease-in-out infinite alternate; }
.rim { position: absolute; inset: 0; border-radius: 50%; border-top: 2px solid rgba(160, 240, 255, .95); box-shadow: 0 -10px 40px rgba(111, 231, 255, .45), 0 -30px 120px rgba(62, 230, 176, .3); -webkit-mask-image: linear-gradient(90deg, transparent 8%, #000 30%, #000 70%, transparent 92%); mask-image: linear-gradient(90deg, transparent 8%, #000 30%, #000 70%, transparent 92%); }

.mascot { position: absolute; z-index: 2; top: -84px; left: calc(50% + var(--card) / 2 - 116px); width: 96px; height: 96px; overflow: visible; pointer-events: none; }
.mascot * { transform-box: fill-box; }
.mascot-float { animation: float 3.6s ease-in-out infinite; }
.mascot-eyes { transform-origin: center; animation: blink 5s ease-in-out infinite; }
.mascot-antenna { animation: pulse 1.8s ease-in-out infinite; }
.mascot-wave { transform-origin: 0% 100%; animation: wave 2.4s ease-in-out infinite; }

.strip { position: relative; overflow: hidden; padding: 8px 0 12px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.strip-track { display: flex; gap: var(--gap); width: max-content; will-change: transform; }

.scene { flex: none; width: var(--card); overflow: hidden; border: 1px solid rgba(255, 255, 255, .1); border-radius: 20px; background: var(--panel); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 24px 60px rgba(2, 4, 20, .55); opacity: .5; transform: scale(.9); transition: opacity .9s ease, transform .9s cubic-bezier(.6, .05, .2, 1), border-color .9s ease; }
.scene.is-active { opacity: 1; transform: none; border-color: rgba(111, 231, 255, .3); }
.scene-art { aspect-ratio: 400 / 240; background: linear-gradient(180deg, var(--a, #1b2463), var(--b, #121845)); }
.scene-art svg { display: block; width: 100%; height: 100%; }
.s-world { --a: #0b0f33; --b: #251f5e; }
.s-board { --a: #142056; --b: #0e1540; }
.s-office { --a: #1b2463; --b: #121845; }
.s-family { --a: #2a1f5e; --b: #171447; }
.s-home { --a: #1a2752; --b: #10183d; }
.s-care { --a: #13305a; --b: #0f1c40; }
.s-people { --a: #2c1f55; --b: #16163f; }

.scene-copy { min-height: 132px; padding: 16px 18px 18px; }
.scene-tag { display: inline-block; margin-bottom: 8px; padding: 3px 9px; border-radius: 999px; background: rgba(111, 231, 255, .12); color: var(--cyan); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.scene-copy p { font-size: .98rem; font-weight: 600; line-height: 1.42; }
.scene-pair { display: flex; align-items: center; margin-top: 12px; color: var(--muted); font-size: .8rem; }
.scene-pair > span:last-child { margin-left: 8px; }
.av { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: .58rem; font-weight: 750; }
.av-h { background: var(--c); color: #1a1433; }
.av-b { margin-left: -6px; background: #20285c; border: 1px solid rgba(111, 231, 255, .35); box-shadow: 0 0 0 2px #121738; }
.av-b svg { width: 15px; height: 15px; }

.strip-controls { position: relative; display: flex; justify-content: center; gap: 12px; margin-top: 18px; }
.strip-controls[hidden] { display: none; }
.strip-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(111, 231, 255, .35); border-radius: 50%; background: rgba(111, 231, 255, .1); color: var(--ink); cursor: pointer; }
.strip-btn:hover { background: rgba(255, 255, 255, .12); }
.strip-btn svg { width: 16px; height: 16px; }

/* ---------- Scene motion ---------- */
/* Positioning lives on parent groups' transform attributes; animated children only get CSS transforms. */

.scene svg * { transform-box: fill-box; }
.scene text { font-family: inherit; }

.bot-float { animation: float 3.4s ease-in-out infinite; }
.hover-glow { transform-origin: center; animation: glow-pulse 3.4s ease-in-out infinite; }
.eyes { transform-origin: center; animation: blink 5.5s ease-in-out infinite; }
.antenna, .beacon { animation: pulse 1.8s ease-in-out infinite; }
.holo { animation: holo 3s ease-in-out infinite; }
.type-arm { transform-origin: 0 0; animation: type .32s ease-in-out infinite alternate; }
.point-arm { transform-origin: 0 100%; animation: point 2.6s ease-in-out infinite; }
.cheer-arm { transform-origin: 0 100%; animation: cheer .7s ease-in-out infinite alternate; }
.stir-arm { transform-origin: 0 50%; animation: stir .7s ease-in-out infinite alternate; }
.shake-arm { transform-origin: 0 0; animation: shake .35s ease-in-out infinite alternate; }
.pop { transform-origin: center; animation: pop 5s ease-out infinite backwards; }
.doc-fly { animation: doc-fly 3s ease-in-out infinite backwards; }
.steam { animation: steam 2.4s ease-out infinite backwards; }
.draft-line { transform-origin: 0 50%; animation: draft 5s ease-out infinite backwards; }
.dash-flow { animation: dash-flow 1s linear infinite; }
.packet { animation: packet 3s linear infinite; }
.packet-back { animation-name: packet-back; animation-duration: 3.6s; }
.orbit-dot { animation: orbit 8s linear infinite; }
.card-move { animation: card-move 6s cubic-bezier(.6, .05, .2, 1) infinite; }
.card-check { transform-origin: center; animation: card-check 6s ease-out infinite; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes glow-pulse { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(.72); opacity: .5; } }
@keyframes blink { 0%, 90%, 96%, 100% { transform: scaleY(1); } 93% { transform: scaleY(.1); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes holo { 0%, 100% { opacity: .9; } 50% { opacity: .5; } }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-14deg); } 80% { transform: rotate(8deg); } 90% { transform: rotate(-10deg); } }
@keyframes type { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
@keyframes point { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-8deg); } }
@keyframes cheer { from { transform: rotate(-14deg); } to { transform: rotate(10deg); } }
@keyframes stir { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
@keyframes shake { from { transform: rotate(-3deg); } to { transform: rotate(5deg); } }
@keyframes pop { 0% { transform: scale(0); } 8% { transform: scale(1.2); } 12%, 85% { transform: scale(1); } 95%, 100% { transform: scale(0); } }
@keyframes doc-fly { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: 1; } 80% { transform: translate(-42px, 18px); opacity: 1; } 100% { transform: translate(-42px, 20px); opacity: 0; } }
@keyframes steam { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: .9; } 100% { transform: translateY(-12px); opacity: 0; } }
@keyframes draft { 0% { transform: scaleX(0); } 30%, 88% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes dash-flow { to { stroke-dashoffset: -14; } }
@keyframes packet { 0% { stroke-dashoffset: 0; opacity: 0; } 10%, 90% { opacity: 1; } 100% { stroke-dashoffset: -100; opacity: 0; } }
@keyframes packet-back { 0% { stroke-dashoffset: -100; opacity: 0; } 10%, 90% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes orbit { to { stroke-dashoffset: -100; } }
@keyframes card-move { 0%, 30% { transform: translateX(0); } 50%, 92% { transform: translateX(88px); opacity: 1; } 97% { transform: translateX(88px); opacity: 0; } 100% { transform: translateX(0); opacity: 0; } }
@keyframes card-check { 0%, 48% { transform: scale(0); } 56% { transform: scale(1.3); } 62%, 92% { transform: scale(1); } 100% { transform: scale(0); } }
@keyframes sunrise { from { opacity: .7; transform: translateX(-50%) scale(.96); } to { opacity: 1; transform: translateX(-50%) scale(1.04); } }
@keyframes twinkle { from { opacity: .4; } to { opacity: .7; } }
@keyframes drift-a { to { transform: translate(8vmax, 3vmax); } }
@keyframes drift-b { to { transform: translate(-8vmax, 4vmax); } }

/* ---------- Pillars, closing and footer ---------- */

.pillars { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; max-width: 1120px; margin: 0 auto; padding: clamp(48px, 8vh, 88px) var(--gutter) 0; }
.pillars article { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .03); }
.pillar-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px; border-radius: 12px; background: rgba(111, 231, 255, .1); color: var(--mint); }
.pillar-icon svg { width: 22px; height: 22px; fill: var(--cyan); }
.pillars h2 { margin-bottom: 6px; font-size: 1.05rem; font-weight: 650; }
.pillars p { color: var(--muted); font-size: .92rem; line-height: 1.55; }

.enter { position: relative; display: grid; justify-items: center; gap: 12px; padding: clamp(60px, 10vh, 110px) var(--gutter) clamp(50px, 8vh, 80px); text-align: center; }
.enter h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 750; letter-spacing: -.03em; }
.enter p { color: var(--muted); font-size: 1.08rem; }
.enter .btn { margin-top: 14px; }

.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; max-width: 1200px; width: 100%; margin: 0 auto; padding: 18px var(--gutter) 90px; border-top: 1px solid var(--line); color: var(--faint); font-size: .85rem; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }

@media (max-width: 720px) {
  :root { --card: min(84vw, 340px); }
  .top nav { display: none; }
  .strip { -webkit-mask-image: none; mask-image: none; }
  .mascot { top: -66px; width: 76px; height: 76px; left: calc(50% + var(--card) / 2 - 92px); }
  .pillars { grid-template-columns: minmax(0, 1fr); }
  .foot { justify-content: center; }
}
