:root {
  color-scheme: dark;
  --ink: #07030f;
  --violet: #a74cff;
  --violet-bright: #e3b7ff;
  --ember: #ff6c45;
  --line: rgba(235, 203, 255, 0.2);
  --soft: rgba(238, 220, 255, 0.68);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--ink); }
body { overflow-x: hidden; font-family: "Space Grotesk", system-ui, sans-serif; color: #fff; }
button, video { font: inherit; }

.portal-shell {
  position: relative; min-height: 100svh; overflow: hidden; isolation: isolate;
  display: grid; place-items: center; padding: clamp(24px, 4vw, 64px);
  background:
    radial-gradient(circle at 50% 43%, rgba(120, 25, 205, .2), transparent 26%),
    radial-gradient(circle at 12% 82%, rgba(255, 81, 42, .12), transparent 28%),
    linear-gradient(145deg, #07030f 0%, #110724 46%, #08040f 100%);
}
.portal-shell:fullscreen { width: 100vw; height: 100vh; min-height: 100vh; padding: clamp(24px, 4vw, 64px); }
.portal-shell:-webkit-full-screen { width: 100vw; height: 100vh; min-height: 100vh; padding: clamp(24px, 4vw, 64px); }
.portal-shell::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .4; background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent); }

.intro-gate { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; overflow: auto; overscroll-behavior: none; padding: 20px; background: radial-gradient(circle at 50% 28%, rgba(255, 214, 106, .15), transparent 27%), linear-gradient(145deg, rgba(10, 4, 20, .72), rgba(32, 12, 55, .78)); transition: opacity .45s ease, visibility .45s ease; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.intro-gate::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .34; background-image: radial-gradient(circle, rgba(255, 231, 154, .9) 0 1px, transparent 1.7px), radial-gradient(circle, rgba(218, 159, 255, .8) 0 1px, transparent 1.7px); background-size: 92px 87px, 137px 121px; animation: drift 26s linear infinite; }
.portal-shell[data-state="intro"] { opacity: .38; filter: blur(10px) brightness(.7); pointer-events: none; transform: scale(.98); transition: opacity .5s ease, filter .5s ease, transform .5s ease; }
.portal-shell[data-state="intro"] { position: fixed; inset: 0; width: 100vw; height: 100dvh; min-height: 100dvh; padding: 0; opacity: .72; filter: brightness(.62) saturate(.9); transform: none; }
.portal-shell[data-state="intro"] .portal-stage { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; aspect-ratio: auto; display: block; }
.portal-shell[data-state="intro"] .portal-aura,
.portal-shell[data-state="intro"] .portal-ring,
.portal-shell[data-state="intro"] .portal-core,
.portal-shell[data-state="intro"] .portal-copy,
.portal-shell[data-state="intro"] .corner-mark { display: none; }
.portal-shell[data-state="intro"] .video-frame { width: 100%; height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; transform: none; box-shadow: none; }
.portal-shell[data-state="intro"] .mars-video { object-fit: cover; }
.intro-gate.is-closing { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-glow { position: absolute; width: min(92vw, 740px); height: 90vh; border-radius: 50%; background: radial-gradient(ellipse, rgba(255, 197, 63, .18), transparent 67%); filter: blur(26px); animation: intro-glow 5s ease-in-out infinite; }
.intro-card { position: relative; width: min(100%, 560px); max-height: min(92svh, 900px); min-height: 0; overflow: hidden; display: flex; flex-direction: column; padding: 16px; border: 1px solid rgba(255, 226, 151, .34); border-radius: 30px; background: linear-gradient(160deg, rgba(41, 19, 58, .96), rgba(16, 9, 26, .97)); box-shadow: 0 34px 100px rgba(0,0,0,.64), 0 0 70px rgba(255, 190, 54, .18), inset 0 1px 0 rgba(255,255,255,.14); animation: intro-card-in .7s cubic-bezier(.16,.83,.27,1) both; }
.intro-card-topline { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 3px 3px 12px; color: rgba(255, 237, 187, .78); font: 600 10px "Barlow Condensed", sans-serif; letter-spacing: .17em; text-transform: uppercase; }
.intro-kicker { display: inline-flex; align-items: center; gap: 4px; }
.intro-counter { color: rgba(255,255,255,.38); }
.intro-video-wrap { position: relative; flex: 0 0 auto; height: min(38svh, 360px); overflow: hidden; border-radius: 21px; border: 1px solid rgba(255,255,255,.22); background: #120818; box-shadow: 0 18px 36px rgba(0,0,0,.35), 0 0 34px rgba(255, 187, 65, .16); touch-action: manipulation; }
.intro-video { display: block; width: 100%; height: 100%; object-fit: cover; background: #120818; }
.intro-video-shine { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(125deg, rgba(255,255,255,.2), transparent 22%, transparent 75%, rgba(255, 207, 101, .16)); mix-blend-mode: screen; }
.intro-play-button { position: absolute; left: 50%; top: 50%; z-index: 3; display: inline-flex; align-items: center; gap: 9px; min-height: 48px; transform: translate(-50%, -50%); padding: 12px 18px; border: 1px solid rgba(255, 237, 166, .9); border-radius: 999px; color: #fff; cursor: pointer; background: rgba(108, 42, 160, .92); box-shadow: 0 0 28px rgba(255, 196, 71, .45), inset 0 1px 0 rgba(255,255,255,.38); font: 700 15px "Barlow Condensed", sans-serif; letter-spacing: .04em; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.intro-play-button:hover { background: rgba(138, 54, 190, .96); }
.intro-play-button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.intro-play-button[hidden] { display: none; }
.play-triangle { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.18); font-size: 12px; }
.intro-sound-button { align-self: center; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; margin: 10px auto 2px; padding: 8px 14px; border: 1px solid rgba(255, 231, 146, .78); border-radius: 999px; color: #fff7d4; cursor: pointer; background: rgba(255, 173, 47, .18); box-shadow: 0 0 18px rgba(255, 190, 53, .24), inset 0 1px 0 rgba(255,255,255,.18); font: 700 12px "Barlow Condensed", sans-serif; letter-spacing: .04em; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.intro-sound-button:hover { background: rgba(255, 190, 53, .3); transform: translateY(-1px); }
.intro-sound-button:active { transform: scale(.97); background: rgba(255, 190, 53, .34); }
.intro-sound-button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.intro-sound-button[hidden] { display: none; }
.sound-icon { color: #ffe274; font-size: 13px; letter-spacing: -.08em; }
.buttercup-pill { position: relative; z-index: 2; align-self: center; display: inline-flex; align-items: center; gap: 11px; margin: 6px auto 10px; padding: 10px 15px; border: 1px solid rgba(255, 231, 146, .72); border-radius: 999px; color: #fff4bd; background: linear-gradient(110deg, rgba(165, 90, 255, .95), rgba(89, 28, 141, .96)); box-shadow: 0 8px 25px rgba(0,0,0,.3), 0 0 24px rgba(255, 201, 75, .3), inset 0 1px 0 rgba(255,255,255,.36); font: 700 13px "Barlow Condensed", sans-serif; letter-spacing: .035em; animation: pill-float 3.5s ease-in-out infinite; }
.buttercup-flower { position: relative; display: inline-block; width: 22px; height: 22px; flex: 0 0 22px; animation: flower-bob 2.7s ease-in-out infinite; }
.buttercup-flower i { position: absolute; left: 7px; top: 1px; width: 8px; height: 12px; border-radius: 70% 40% 70% 40%; background: #ffe475; box-shadow: 0 0 8px rgba(255, 223, 85, .72); transform-origin: 4px 10px; }
.buttercup-flower i:nth-child(1) { transform: rotate(0deg); } .buttercup-flower i:nth-child(2) { transform: rotate(72deg); } .buttercup-flower i:nth-child(3) { transform: rotate(144deg); } .buttercup-flower i:nth-child(4) { transform: rotate(216deg); } .buttercup-flower b { position: absolute; left: 8px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: #ffad29; box-shadow: 0 0 6px #ffcf50; }
.flower-two { animation-delay: -1.2s; transform: scale(.82) rotate(13deg); }
.intro-download { flex: 0 0 auto; margin: 2px 8px 5px; padding: 10px 12px 12px; border: 1px solid rgba(255, 226, 151, .2); border-radius: 16px; background: rgba(255, 255, 255, .045); }
.intro-download .download-brand { margin: 0 0 3px; text-align: center; }
.intro-download-label { margin: 0 0 9px; color: #ffe59d; text-align: center; font: 700 15px/1.05 "Barlow Condensed", sans-serif; letter-spacing: .03em; text-transform: uppercase; }
.intro-download .store-downloads { justify-content: center; }
.intro-download .store-link { min-height: 44px; padding: 7px 13px 7px 9px; font-size: 13px; }
.intro-download .store-mark { width: 24px; height: 24px; }
.intro-message { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 2px 8px 5px; color: rgba(255, 245, 224, .78); scrollbar-color: rgba(255, 208, 80, .65) transparent; font-size: 13px; line-height: 1.52; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.intro-message p { margin: 0 0 12px; }
.intro-message .message-lede { color: #ffe59d; font: 700 18px/1.05 "Barlow Condensed", sans-serif; letter-spacing: .015em; }
.intro-message .message-note { padding: 10px 12px; border-left: 2px solid #ffcf57; background: rgba(255, 207, 87, .08); border-radius: 0 12px 12px 0; }
.intro-message .message-signoff { color: #ffd98b; }
.continue-button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; margin-top: 7px; padding: 13px 14px 13px 18px; border: 1px solid rgba(255, 230, 155, .76); border-radius: 999px; color: #fff; cursor: pointer; background: linear-gradient(110deg, #a653ff, #6d2eaf 56%, #ff9b37); box-shadow: 0 0 28px rgba(187, 99, 255, .38), inset 0 1px 0 rgba(255,255,255,.36); font: 700 15px "Barlow Condensed", sans-serif; letter-spacing: .04em; transition: transform .2s ease, box-shadow .2s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.continue-button:hover { transform: translateY(-2px); box-shadow: 0 0 38px rgba(255, 196, 76, .5), inset 0 1px 0 rgba(255,255,255,.4); }
.continue-button:active { transform: translateY(1px) scale(.99); box-shadow: 0 0 18px rgba(187, 99, 255, .28), inset 0 1px 0 rgba(255,255,255,.28); }
.continue-button:focus-visible { outline: 2px solid #fff4bd; outline-offset: 3px; }
.continue-arrow { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: rgba(255,255,255,.2); font-size: 18px; }
.intro-hint { margin: 8px 0 0; color: rgba(255, 238, 188, .46); text-align: center; font-size: 10px; }
.stars { position: absolute; inset: -20%; z-index: -2; pointer-events: none; background-image: radial-gradient(circle, rgba(255,255,255,.85) 0 1px, transparent 1.6px), radial-gradient(circle, rgba(191,122,255,.8) 0 1px, transparent 1.8px); background-size: 83px 91px, 127px 113px; animation: drift 24s linear infinite; opacity: .28; }
.stars-b { transform: rotate(18deg) scale(1.2); animation-duration: 34s; animation-direction: reverse; opacity: .16; }
.nebula { position: absolute; width: 80vw; aspect-ratio: 1.4; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: .18; background: conic-gradient(from 210deg, transparent, #4c15ae, transparent 38%, #ff542d, transparent 72%); animation: breathe 9s ease-in-out infinite; }

.portal-stage { position: relative; width: min(68vw, 570px); max-height: 78svh; aspect-ratio: 720 / 1628; display: grid; place-items: center; animation: arrive 1.1s cubic-bezier(.17,.84,.32,1) both; }
.portal-aura { position: absolute; inset: -15%; border-radius: 48% 52% 44% 56%; background: radial-gradient(ellipse, rgba(162,78,255,.25), transparent 65%); filter: blur(24px); animation: aura 5s ease-in-out infinite; }
.portal-ring { position: absolute; width: 116%; height: 70%; top: 15%; border-radius: 50%; border: 1px solid rgba(218, 177, 255, .4); box-shadow: 0 0 36px rgba(151,66,255,.33), inset 0 0 30px rgba(151,66,255,.23); transform: rotate(-15deg); animation: pulse 4.8s ease-in-out infinite; }
.portal-ring-inner { width: 105%; height: 63%; border-color: rgba(255, 115, 73, .47); box-shadow: 0 0 26px rgba(255,83,42,.24), inset 0 0 22px rgba(255,83,42,.16); animation-delay: -1.8s; }
.portal-core { position: absolute; width: 92%; height: 94%; border-radius: 47% 53% 49% 51%; background: linear-gradient(160deg, rgba(31, 10, 62, .75), rgba(255, 78, 39, .12)); filter: blur(18px); opacity: .5; }
.video-frame { position: relative; z-index: 2; height: 100%; aspect-ratio: 720 / 1628; overflow: hidden; border-radius: 22px; border: 1px solid rgba(255,255,255,.24); background: #050209; box-shadow: 0 35px 90px rgba(0,0,0,.65), 0 0 0 10px rgba(150,70,255,.04), 0 0 75px rgba(138,57,255,.28); transform: perspective(900px) rotateY(-4deg) rotateX(1deg); transition: transform .6s ease, box-shadow .6s ease; }
.video-frame:hover { transform: perspective(900px) rotateY(0) rotateX(0) scale(1.015); box-shadow: 0 38px 100px rgba(0,0,0,.7), 0 0 90px rgba(138,57,255,.35); }
.mars-video { display: block; width: 100%; height: 100%; object-fit: cover; background: #050209; }
.mars-video:fullscreen { width: 100vw; height: 100vh; object-fit: contain; background: #000; }
.mars-video:-webkit-full-screen { width: 100vw; height: 100vh; object-fit: contain; background: #000; }
.video-vignette { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 70px rgba(0,0,0,.55), inset 0 0 1px 1px rgba(255,255,255,.18); }

.portal-copy { position: absolute; z-index: 4; left: clamp(24px, 7vw, 108px); bottom: clamp(28px, 8vh, 96px); max-width: 330px; animation: copy-in .9s .35s cubic-bezier(.16,.82,.3,1) both; }
.eyebrow { margin: 0 0 16px; color: var(--soft); text-transform: uppercase; letter-spacing: .18em; font: 600 11px "Barlow Condensed", sans-serif; }
.signal-dot { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #ff6848; box-shadow: 0 0 12px #ff6848; animation: blink 1.8s ease-in-out infinite; }
h1 { margin: 0; max-width: 340px; font: 700 clamp(34px, 5vw, 66px)/.9 "Barlow Condensed", sans-serif; letter-spacing: -.025em; text-transform: uppercase; }
h1 em { color: var(--violet-bright); font-style: normal; text-shadow: 0 0 25px rgba(179,91,255,.55); }
.subcopy { margin: 14px 0 18px; max-width: 295px; color: rgba(239,230,250,.75); font-size: 13px; line-height: 1.5; }
.download-brand { margin: 14px 0 3px; color: rgba(255, 238, 188, .52); font: 600 9px/1 "Barlow Condensed", sans-serif; letter-spacing: .22em; text-transform: uppercase; }
.download-label { margin: 0 0 10px; color: #ffe59d; font: 700 18px/1.05 "Barlow Condensed", sans-serif; letter-spacing: .015em; text-transform: uppercase; }
.store-downloads { display: flex; flex-wrap: wrap; gap: 10px; }
.store-link { display: inline-flex; align-items: center; gap: 9px; min-height: 48px; padding: 9px 16px 9px 11px; border: 1px solid rgba(237,210,255,.7); border-radius: 999px; color: #fff; text-decoration: none; background: linear-gradient(120deg, rgba(151,67,255,.95), rgba(91,23,157,.95)); box-shadow: 0 0 24px rgba(142,61,255,.3), inset 0 1px 0 rgba(255,255,255,.34); transition: transform .2s ease, box-shadow .2s ease, background .2s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.store-link:hover { transform: translateY(-2px); box-shadow: 0 0 34px rgba(177,85,255,.53), inset 0 1px 0 rgba(255,255,255,.34); }
.store-link:active { transform: translateY(1px) scale(.98); }
.store-link:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.store-mark { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: rgba(255,255,255,.16); font-size: 20px; line-height: 1; }
.store-mark svg { width: 16px; height: 16px; fill: currentColor; }
.store-apple { color: #fff; }
.store-google { color: #fff; font: 800 18px Arial, sans-serif; text-shadow: 1px 0 #34a853, -1px 0 #ea4335, 0 1px #fbbc05; }
.hint { margin: 9px 0 0 3px; color: rgba(239,230,250,.48); font-size: 10px; line-height: 1.35; }
.corner-mark { position: absolute; z-index: 4; bottom: 24px; color: rgba(255,255,255,.42); font: 600 10px "Barlow Condensed", sans-serif; letter-spacing: .22em; }
.corner-mark-left { left: 30px; } .corner-mark-right { right: 30px; }

.portal-shell[data-state="playing"] .portal-copy { opacity: .26; transform: translateY(8px) scale(.96); transition: opacity .6s ease, transform .6s ease; pointer-events: none; }
.portal-shell[data-state="playing"] .portal-stage { animation: none; }
.portal-shell[data-state="playing"] .video-frame { transform: perspective(900px) rotateY(0) rotateX(0); }

@keyframes arrive { from { opacity: 0; transform: scale(.76) translateY(24px); filter: blur(8px); } to { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); } }
@keyframes copy-in { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes drift { to { transform: translate3d(3%, -2%, 0) rotate(5deg); } }
@keyframes breathe { 50% { transform: scale(1.12) rotate(8deg); opacity: .25; } }
@keyframes aura { 50% { transform: scale(1.08); opacity: .72; } }
@keyframes pulse { 50% { opacity: .65; transform: rotate(-15deg) scale(1.03); } }
@keyframes blink { 50% { opacity: .42; } }
@keyframes intro-card-in { from { opacity: 0; transform: translateY(22px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes intro-glow { 50% { transform: scale(1.1); opacity: .76; } }
@keyframes pill-float { 50% { transform: translateY(-3px); } }
@keyframes flower-bob { 50% { transform: translateY(-3px) rotate(7deg); } }

@media (max-width: 760px) {
  .portal-shell { display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: 22px 18px 32px; }
  .portal-stage { width: min(78vw, 420px); max-height: 70svh; }
  .portal-copy { position: relative; left: auto; bottom: auto; width: min(100%, 360px); max-width: none; text-align: center; }
  .download-label { margin-top: 10px; }
  .store-downloads { justify-content: center; }
  .portal-copy .eyebrow { margin-bottom: 8px; }
  .intro-gate { align-items: start; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
  .intro-card { height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); padding: 12px; border-radius: 24px; }
  .intro-video-wrap { height: min(34svh, 300px); }
  .intro-sound-button { min-height: 48px; padding-inline: 18px; }
  .buttercup-pill { margin-top: 6px; }
  .continue-button { min-height: 52px; }
  .intro-message { font-size: 12px; line-height: 1.45; }
  .intro-message .message-lede { font-size: 17px; }
  h1 { margin: auto; font-size: 38px; }
  .subcopy { margin: 10px auto 15px; }
  .hint { margin-left: 0; }
  .corner-mark { bottom: 12px; font-size: 8px; }
  .corner-mark-left { left: 14px; } .corner-mark-right { right: 14px; }
  .portal-shell:fullscreen, .portal-shell:-webkit-full-screen { padding: 22px 18px 32px; }
}
@supports not (height: 100dvh) {
  @media (max-width: 760px) { .intro-card { height: calc(100svh - 24px); max-height: calc(100svh - 24px); } }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* Device-aware fallback for mobile and in-app browsers that expose a desktop-width viewport. */
.portal-shell[data-device="mobile"] { padding: 22px 18px 32px; }
.portal-shell[data-device="mobile"] .intro-gate { align-items: start; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
.portal-shell[data-device="mobile"] .intro-card { max-height: calc(100dvh - 24px); padding: 12px; border-radius: 24px; height: calc(100dvh - 24px); }
.portal-shell[data-device="mobile"] .intro-video-wrap { height: min(34svh, 300px); }
.portal-shell[data-device="mobile"] .intro-message { font-size: 12px; line-height: 1.45; }
.portal-shell[data-device="mobile"] .intro-message .message-lede { font-size: 17px; }
.portal-shell[data-device="mobile"] .intro-sound-button { min-height: 48px; padding-inline: 18px; }
.portal-shell[data-device="mobile"] .buttercup-pill { margin-top: 6px; }
.portal-shell[data-device="mobile"] .continue-button { min-height: 52px; }
.portal-shell[data-device="mobile"] .portal-stage { width: min(78vw, 420px); max-height: 70svh; }
.portal-shell[data-device="mobile"] .portal-copy { position: relative; left: auto; bottom: auto; width: min(100%, 360px); max-width: none; text-align: center; }
@supports not (height: 100dvh) {
  .portal-shell[data-device="mobile"] .intro-card { max-height: calc(100svh - 24px); height: calc(100svh - 24px); }
}
