/* Viva Wonderland: style after kb/design/templates/active theory, colours palette B with turquoise (Owner S2776c) */
:root {
  --bg: #1A0B2E;
  --gold: #FFC94A;
  --teal: #4ED9C6;
  --ink: #f4f1fa;
  --mute: rgba(244, 241, 250, .94);
  --line: rgba(255, 255, 255, .14);
  --glass: rgba(26, 11, 46, .46);
  --sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: Times, "Times New Roman", Georgia, serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  color: var(--ink);
  font: 17px/1.88 var(--serif);
  background: radial-gradient(120% 80% at 70% 30%, #3a1760 0%, var(--bg) 55%, #0d0518 100%) fixed;
  overflow-x: hidden;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

#world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.no-webgl #world { display: none; }
.flash { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 33%, #fff 0, #fff3d1 35%, #FFC94A 75%, #d99a1e 110%); }
@media (min-width: 900px) { .flash { background: radial-gradient(circle at 70% 50%, #fff 0, #fff3d1 35%, #FFC94A 75%, #d99a1e 110%); } }

/* Chrome */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; gap: 14px;
  padding: 16px clamp(16px, 4vw, 48px);
  font: 400 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
}
.brand { font-weight: 500; text-decoration: none; color: var(--ink); }
.tag { color: var(--gold); border: 1px solid rgba(255, 201, 74, .5); border-radius: 500px; padding: 6px 10px; font-size: 11px; }
.nav .btn { margin-left: auto; }
.rail { position: fixed; right: clamp(14px, 2.4vw, 32px); top: 31vh; height: 38vh; width: 1px; background: var(--line); z-index: 5; }
.rail i { position: absolute; left: 0; top: 0; width: 1px; height: calc(var(--p, 0) * 100%); background: var(--gold); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 700 14px/1 var(--sans); letter-spacing: .02em; text-transform: none;
  text-decoration: none; cursor: pointer;
  transition: background-color .3s, border-color .3s, color .3s;
}
.btn-primary { background: var(--teal); color: var(--bg); border: 0; border-radius: 500px; padding: 16px 28px; min-height: 48px; }
.btn-primary:hover { background: #82e8da; }
.btn-ghost {
  color: var(--ink); border: 1px solid rgba(255, 255, 255, .45); border-radius: 5px; padding: 10px 14px;
  background: rgba(26, 11, 46, .3); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.btn-ghost:hover { border-color: var(--teal); }

/* Facts that hang on the 3D objects, placed by js/story.js */
#labels { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.lbl {
  position: absolute; left: 0; top: 0; opacity: 0; will-change: transform, opacity;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 7px 13px; border-radius: 500px;
  border: 1px solid rgba(255, 255, 255, .22); background: rgba(26, 11, 46, .55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  font: 500 12px/1.2 var(--sans); letter-spacing: .02em; color: var(--ink);
}
.lbl.icon { padding: 6px; }
a.lbl { pointer-events: auto; }
.lbl img[src$="youtube-icon.png"] { object-fit: contain; }
.lbl img { width: 32px; height: 32px; display: block; }
.lbl.icon img { width: 52px; height: 52px; }
.lbl.key { border-color: rgba(78, 217, 198, .6); color: var(--teal); }
.lbl.hot { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 22px rgba(255, 201, 74, .45); }
.lbl.fn img { width: 26px; height: 26px; }
.lbl.strong { padding: 9px 17px; font-size: 14px; border-color: rgba(78, 217, 198, .75); color: var(--teal); box-shadow: 0 0 18px rgba(78, 217, 198, .3); }
.lbl.strong img { width: 30px; height: 30px; }

/* The guided journey after a click on "Get early access" */
.skip {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 12px); z-index: 11;
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s;
  font: 500 13px/1 var(--sans); color: var(--ink); cursor: pointer;
  padding: 12px 18px; border-radius: 500px; border: 1px solid rgba(255, 255, 255, .45);
  background: rgba(26, 11, 46, .6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.touring .skip { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }

/* Story */
main { position: relative; z-index: 1; }
.ch { min-height: 135vh; display: flex; align-items: center; padding: 96px clamp(18px, 6vw, 96px); position: relative; }
.hero { min-height: 100vh; }
.panel {
  max-width: 480px; padding: 30px 32px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--glass); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.ch-wide .panel { max-width: 600px; }
.hero .panel { max-width: 580px; padding: 0; border: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
h1 { font: 500 clamp(40px, 5.6vw, 70px)/1.05 var(--sans); letter-spacing: -.02em; text-wrap: balance; }
h2 { font: 500 clamp(28px, 3.3vw, 42px)/1.12 var(--sans); letter-spacing: -.015em; text-wrap: balance; margin-bottom: 16px; }
h3 { font: 500 19px/1.3 var(--sans); text-wrap: balance; }
.panel p { color: var(--mute); text-wrap: pretty; text-shadow: 0 1px 10px rgba(13, 5, 24, .9), 0 0 2px rgba(13, 5, 24, .8); }
.panel p + p { margin-top: 14px; }
.eyebrow { font: 500 12px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold) !important; margin-bottom: 16px; }
.hero .lead { font-size: 19px; margin: 22px 0 30px; max-width: 480px; }
.unlock { font: 500 13px/1.4 var(--sans); letter-spacing: .04em; color: var(--teal) !important; margin-top: 18px !important; }
.motto { font: 500 22px/1.35 var(--sans); color: var(--gold) !important; margin: 22px 0 !important; }
.hint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  font: 400 11px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--mute);
  padding-bottom: 34px;
}
.hint::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 1px; height: 26px; background: linear-gradient(var(--gold), transparent); animation: hint 2.4s ease-in-out infinite; }
@keyframes hint { 0%, 100% { opacity: .2; transform: scaleY(.4); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); transform-origin: top; } }

/* Play: the stages light up with the spiral */
.stages { list-style: none; margin-top: 22px; border-top: 1px solid var(--line); }
.stages li {
  display: grid; grid-template-columns: 34px 1fr; column-gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  opacity: .42; transition: opacity .5s;
}
.stages li.lit { opacity: 1; }
.stages .n {
  grid-row: span 2; width: 26px; height: 26px; margin-top: 2px; border-radius: 500px;
  display: flex; align-items: center; justify-content: center;
  font: 500 12px/1 var(--sans); color: var(--gold); border: 1px solid rgba(255, 201, 74, .5);
  transition: background-color .5s, color .5s;
}
.stages li.lit .n { background: var(--gold); color: var(--bg); }
.stages b { font: 500 16px/1.4 var(--sans); }
.stages .d { font-size: 15px; line-height: 1.6; color: var(--mute); text-wrap: pretty; }

/* Price */
.prices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.price:first-child { grid-column: 1 / -1; }
.price { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: rgba(255, 255, 255, .04); }
.price .lvl { font: 500 11px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.price .amt { font: 500 24px/1.2 var(--sans); color: var(--teal); margin: 8px 0 10px !important; }
.price p { font-size: 15px; line-height: 1.6; }

/* Early access */
.signup label { display: block; margin-top: 18px; font: 500 12px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.signup label span { text-transform: none; letter-spacing: 0; }
.signup input, .signup textarea {
  display: block; width: 100%; margin-top: 8px; padding: 12px 14px;
  border-radius: 5px; border: 1px solid rgba(255, 255, 255, .45); background: rgba(0, 0, 0, .25);
  color: var(--ink); font: 17px/1.5 var(--serif);
}
.signup textarea { resize: vertical; }
.signup input:focus, .signup textarea:focus { border-color: var(--teal); outline: none; }
.signup .btn { margin-top: 20px; }
.form-status { min-height: 1.6em; margin-top: 12px; color: var(--gold) !important; }
/* The end: the sign-up floats in the galaxy without a frame, quiet, one light among the others */
.end .panel { padding: 0; border: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.end .signup input, .end .signup textarea { border: 0; border-bottom: 1px solid rgba(255, 255, 255, .3); border-radius: 0; background: none; padding: 10px 0; }
.end .signup .btn-primary { background: none; border: 1px solid var(--teal); color: var(--teal); }
.end .signup .btn-primary:hover { background: rgba(78, 217, 198, .12); }

/* The end fills exactly one screen, so the last scroll position leaves the sign-up in the middle; the footer sits at its bottom */
.end { min-height: 100vh; }
.foot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 24px clamp(18px, 6vw, 96px); font: 400 12px/1.6 var(--sans); letter-spacing: .06em; color: rgba(244, 241, 250, .6); }

/* Phone: the scene sits in the upper half, the text below it */
@media (max-width: 899px) {
  body { font-size: 17px; }
  .rail { display: none; }
  .ch { display: block; min-height: 120vh; padding: 60vh 14px 14vh; }
  .hero { display: flex; align-items: flex-end; min-height: 100vh; padding: 0 18px 15vh; }
  .panel { padding: 22px 20px; max-width: none; }
  .hint { display: none; }
  .prices { grid-template-columns: 1fr; gap: 8px; }
  .end { display: flex; align-items: center; min-height: 100vh; padding: 10vh 14px 12vh; }
  .btn-ghost { min-height: 44px; }
  .skip { min-height: 44px; }
  /* Price: the spiral climbs in free sky first, then compact rows follow, so the panel does not cover the levels while they light up */
  .ch[data-station="8"] { padding-top: 100vh; }
  .price { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: baseline; padding: 12px 14px; }
  .price .lvl, .price .amt + p { grid-column: 1 / -1; }
  .price .lvl { margin-bottom: 2px; }
  .price .amt { font-size: 18px; margin: 0 !important; }
  .price p + p { margin-top: 4px; }
  .price p { font-size: 14px; line-height: 1.5; }
}
@media (max-width: 520px) {
  .tag { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hint::after { animation: none; }
}
