/* Landing page and 404: dark "Nocturne" scenes drawn in code. */

body.night { background: var(--night); color: #ece8f6; }
body.night .muted-night { color: #9a93b8; }
.night h1, .night h2 { color: #fff; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 800; color: #c6ff3a; margin-bottom: .8em; }

.site-header.dark { position: fixed; inset: 0 0 auto; background: linear-gradient(rgba(5, 4, 28, .75), rgba(5, 4, 28, 0)); border: 0; backdrop-filter: none; }
.site-header.dark.scrolled { background: rgba(5, 4, 28, .82); backdrop-filter: blur(10px); }
.site-header.dark .nav a { color: #d6d0ea; }
.site-header.dark .nav a:hover { color: #fff; }
.site-header.dark .btn-ghost { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: #fff; }
.site-header.dark .menu-toggle { color: #fff; }
.site-header.dark .header-user { color: #fff; }
.site-header.dark .header-user svg { color: #d6d0ea; }
.site-header.dark.open { background: rgba(5, 4, 28, .96); }
.logo-dark { color: #fff; }
.site-footer.dark { border-color: rgba(255, 255, 255, .08); color: #9a93b8; margin-top: 0; }
.site-footer.dark a:hover { color: #fff; }
.site-footer.dark .copy { color: #7d76a0; }

.btn-glass { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); color: #fff; backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255, 255, 255, .16); }

/* ---------- scene sections ---------- */
.scene-section { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; }
.scene { position: absolute; inset: 0; z-index: 0; overflow: hidden; touch-action: manipulation; cursor: pointer; }
.scene > svg, .scene > canvas, .scene > div { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* No blend modes on full-screen layers: in software compositing they cost more than everything else together. */
/* Own compositing layers: the filtered background is rasterised once, and static cloud
   banks are never repainted when the rocket moves. */
.scene .bg, .scene svg.art { will-change: transform; }
.scene .fog.back { opacity: .6; pointer-events: none; }
.scene .fx { pointer-events: none; }
.scene .fog.front { pointer-events: none; }
.scene .artfade { display: none; pointer-events: none; }
.scene-section.portrait .artfade { display: block; top: calc(var(--art-bottom, 100%) - 140px); background: linear-gradient(to bottom, rgba(5, 4, 28, 0), var(--night) 140px); }

.scene-section .content { position: relative; z-index: 2; pointer-events: none; }
.scene-section .content a, .scene-section .content button { pointer-events: auto; }
.scene-section h1 { font-size: clamp(2.3rem, 5vw, 4.1rem); line-height: 1.02; max-width: 12.5em; text-wrap: balance; }
.scene-section h1 span { display: block; color: #c6ff3a; }
.scene-section h2 { font-size: clamp(1.8rem, 3.6vw, 2.9rem); max-width: 13em; text-wrap: balance; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: #d6d0ea; max-width: 34em; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hint { margin-top: 22px; font-size: .9rem; color: #9a93b8; }
.hint::before { content: '✦ '; color: #ff3fe0; }

.hero { min-height: max(660px, 100svh); padding: calc(var(--header-h) + 40px) 0 60px; }
.problem, .dominos { min-height: max(560px, 86svh); padding: 80px 0; }
.dominos .lead, .problem .lead { max-width: 25em; }
.dominos h2, .problem h2 { max-width: 11em; }

.scene-section.portrait { align-items: flex-end; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.scene-section.portrait .hint { display: none; }

@media (max-width: 720px) {
  .ctas .btn { flex: 1; }
  .hero { padding-top: var(--header-h); }
}
@media (max-height: 620px) and (max-width: 900px) {
  .lead { display: none; }
}

/* ---------- ambient motion ---------- */
.twinkle > g { animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
.scene svg.art.drift-a { overflow: visible; will-change: transform; }
.drift-a { animation: driftA 26s ease-in-out infinite; }
.drift-b { animation: driftB 19s ease-in-out infinite; }
.drift-c { animation: driftA 15s ease-in-out infinite reverse; }
@keyframes driftA { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-26px); } }
@keyframes driftB { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(22px); } }
.flow { fill: none; stroke-linecap: round; stroke-dasharray: 90 1900; animation: flow 6s linear infinite; }
@keyframes flow { from { stroke-dashoffset: 1990; } to { stroke-dashoffset: 0; } }

/* ---------- plain dark sections ---------- */
.how { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 60px; align-items: center; padding: 110px 0; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 26px 0 30px; display: grid; gap: 18px; }
.steps li { counter-increment: s; position: relative; padding-left: 58px; color: #cfc9e4; }
.steps li b { color: #fff; display: block; font-size: 1.12rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; color: #05041c; background: #c6ff3a; box-shadow: 0 0 24px rgba(198, 255, 58, .45); }
.how-demo { position: relative; }
.how { overflow: clip; overflow-clip-margin: 40px; }
main { overflow-x: clip; }
.how-demo::before { content: ''; position: absolute; inset: -40px; background: radial-gradient(closest-side, rgba(255, 63, 224, .25), transparent), radial-gradient(closest-side at 70% 70%, rgba(54, 88, 226, .3), transparent); z-index: -1; }
.how-demo .ccard { color: var(--ink); transform: rotate(-1.5deg); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
.how-demo .ccard:hover { transform: rotate(0) translateY(-4px); }
.live-label { margin-bottom: 12px; }

.pricing { padding: 40px 0 100px; }
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 30px 0 14px; }
.price { position: relative; padding: 28px; border-radius: var(--radius-lg); background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .12); display: grid; gap: 8px; align-content: start; }
.price.featured { border-color: rgba(198, 255, 58, .55); box-shadow: 0 0 0 1px rgba(198, 255, 58, .25), 0 20px 60px rgba(198, 255, 58, .08); }
.price h3 { color: #fff; margin: 0; }
.price .amount { font-size: 2.3rem; font-weight: 800; color: #fff; line-height: 1; }
.price ul { list-style: none; padding: 0; margin: 8px 0 14px; display: grid; gap: 6px; color: #cfc9e4; }
.price li::before { content: '✓ '; color: #c6ff3a; font-weight: 800; }

.faq { padding: 0 0 110px; max-width: 820px; }
.faq details { border-bottom: 1px solid rgba(255, 255, 255, .1); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.1rem; color: #fff; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: #c6ff3a; font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq p { color: #cfc9e4; margin: 10px 0 0; }

@media (max-width: 900px) {
  .how { grid-template-columns: minmax(0, 1fr); padding: 80px 0; gap: 40px; }
  .price-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 404 ---------- */
.lost { min-height: 100svh; }
.lost .content { text-align: center; margin-inline: auto; display: grid; justify-items: center; }
.lost:not(.portrait) { align-items: flex-end; padding-bottom: 2vh; }
.lost .hint { margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  .scene .bg, .twinkle > g, .drift-a, .drift-b, .drift-c, .flow { animation: none !important; }
}
