/* Quantum Grok — family P "THE QUANTUM GANTRY" */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html,body{background:#e8f6ff;color:#06205a;font-family:Onest,system-ui,sans-serif;font-weight:400;overflow-x:hidden}
img{display:block;max-width:100%}
button{font:inherit;color:inherit;cursor:pointer}
code{font-family:Onest,ui-monospace,monospace}

/* ---- loader (reused dashed rim, reskinned) ---- */
#loader{position:fixed;inset:0;z-index:99;background:#e8f6ff;display:grid;place-items:center;transition:opacity .5s}
#loader img{width:132px;height:132px;object-fit:contain;border-radius:22px;grid-area:1/1;background:#000;box-shadow:0 0 32px #2fd0ff}
#loader .rim{grid-area:1/1;width:168px;height:168px;border-radius:50%;border:6px dashed #2fd0ff;animation:sp 1.2s linear infinite}
#loader b{position:absolute;top:calc(50% + 104px);font-family:"Passion One",sans-serif;font-weight:700;letter-spacing:.06em;color:#0a3fd6;font-size:22px}
#loader.done{opacity:0;pointer-events:none}
@keyframes sp{to{transform:rotate(360deg)}}

/* ---- fixed gantries ---- */
#gantries{position:fixed;inset:0;z-index:8;pointer-events:none}
.gantry{position:absolute;top:0;bottom:0;width:56px}
.gantry.left{left:0}
.gantry.right{right:0}
.gantry .rail{
  position:absolute;inset:0;
  background:
    repeating-linear-gradient(180deg, rgba(47,208,255,.55) 0 3px, transparent 3px 28px),
    linear-gradient(90deg,#f7fbff 0 8px, transparent 8px 100%),
    linear-gradient(90deg,transparent 0 calc(100% - 8px), #f7fbff calc(100% - 8px)),
    linear-gradient(180deg,#d4eeff,#b8e4ff 40%,#9ad6ff);
  box-shadow:inset 0 0 0 2px #7ef0ff, 0 0 18px rgba(47,208,255,.35);
}
.gantry.right .rail{
  background:
    repeating-linear-gradient(180deg, rgba(180,76,255,.4) 0 3px, transparent 3px 28px),
    linear-gradient(90deg,#f7fbff 0 8px, transparent 8px 100%),
    linear-gradient(90deg,transparent 0 calc(100% - 8px), #f7fbff calc(100% - 8px)),
    linear-gradient(180deg,#e8f0ff,#d4e8ff 40%,#c8d8ff);
  box-shadow:inset 0 0 0 2px #c9a6ff, 0 0 18px rgba(180,76,255,.28);
}
.car{
  position:absolute;left:6px;right:6px;bottom:8%;
  aspect-ratio:1;
  z-index:2;
  filter:drop-shadow(0 0 10px #2fd0ff);
  transition:none;
}
.car img{width:100%;height:100%;object-fit:contain;background:#000;border-radius:10px}
.ticks{position:absolute;inset:12px 4px 12px auto;display:flex;flex-direction:column-reverse;justify-content:space-between;list-style:none;z-index:1}
.ticks li{font-family:McLaren,cursive;font-size:10px;color:#0a3fd6;background:#fff;border:1px solid #7ef0ff;border-radius:4px;padding:1px 3px;text-align:center;opacity:.55}
.ticks li.on{opacity:1;background:#2fd0ff;color:#06205a;box-shadow:0 0 8px #2fd0ff}
.altread{position:absolute;top:50%;right:6px;transform:translateY(-50%);writing-mode:vertical-rl;text-orientation:mixed;display:flex;align-items:center;gap:8px;z-index:1}
.altread span{font-family:McLaren,cursive;font-size:10px;letter-spacing:.14em;color:#0a3fd6}
.altread b{font-family:"Passion One",sans-serif;font-weight:700;font-size:28px;color:#0a3fd6;line-height:1}
.altread small{font-family:McLaren,cursive;font-size:10px;color:#1d6bff;white-space:nowrap}

/* ---- launch pad (first screen) ---- */
#pad{
  position:relative;z-index:2;
  min-height:100dvh;
  display:flex;flex-direction:column;align-items:center;justify-content:space-between;
  padding:18px 72px 22px;
  text-align:center;
  background:
    radial-gradient(ellipse at 70% 8%, #fff8d0 0 8%, transparent 28%),
    radial-gradient(ellipse at 50% 120%, #7ef0ff 0 16%, transparent 48%),
    linear-gradient(180deg,#b8eaff 0%,#e8f6ff 42%,#fff6e8 100%);
  overflow:hidden;
}
#pad .sun{
  position:absolute;top:6%;right:12%;width:120px;height:120px;border-radius:50%;
  background:radial-gradient(circle at 40% 40%,#fff,#ffe08a 40%,rgba(255,224,138,0) 70%);
  filter:blur(1px);pointer-events:none;
}
#pad .platform{
  position:absolute;left:10%;right:10%;bottom:-8%;height:32%;
  background:radial-gradient(ellipse at 50% 0%, rgba(47,208,255,.35), transparent 70%);
  pointer-events:none;
}
.kick{font-family:McLaren,cursive;font-size:13px;color:#1d6bff;letter-spacing:.04em;position:relative}
h1{font-family:"Passion One",sans-serif;font-weight:900;font-size:clamp(52px,8.4vw,128px);line-height:.86;letter-spacing:.02em;color:#0a3fd6;
  text-shadow:0 0 18px rgba(47,208,255,.6), 0 2px 0 #fff;position:relative}
.ticker{font-family:"Passion One",sans-serif;font-weight:700;font-size:clamp(22px,3vw,36px);color:#b44cff;letter-spacing:.12em;position:relative}
.tag{font-family:McLaren,cursive;font-size:clamp(14px,1.6vw,20px);max-width:34em;color:#06205a;position:relative}
.core{position:relative;border:0;background:transparent;padding:0;border-radius:28px;margin:4px 0}
.core img{width:min(280px,42vw);height:auto;background:#000;border-radius:28px;box-shadow:0 0 0 4px #7ef0ff,0 0 48px #2fd0ff,0 12px 30px rgba(6,32,90,.25)}
.core:focus-visible{outline:3px solid #ffd056;outline-offset:6px}
.core.shake{animation:boop .4s ease}
@keyframes boop{0%,100%{transform:scale(1)}40%{transform:scale(1.08) rotate(-3deg)}70%{transform:scale(1.04) rotate(2deg)}}

/* launch console — pale heat-shield hex tiles */
.console{
  position:relative;z-index:3;
  width:min(860px,100%);
  background:
    repeating-linear-gradient(90deg,#efe7d6 0 14px,#e4dcc8 14px 28px);
  border:3px solid #2fd0ff;
  border-radius:22px 22px 8px 8px;
  box-shadow:0 10px 0 #7ab8d0, 0 0 24px rgba(47,208,255,.35), inset 0 1px 0 #fff;
  padding:10px 14px 12px;
}
.ca-plate{display:flex;align-items:center;justify-content:center;gap:10px;background:#fffdf8;border:2px dashed #b44cff;border-radius:999px;padding:6px 14px;margin:0 auto 8px;max-width:100%}
.ca-plate small{font-family:McLaren,cursive;color:#b44cff;letter-spacing:.12em}
.ca-plate code{font-weight:700;font-size:13px;word-break:break-all;color:#06205a}
.hexes{display:flex;justify-content:center;flex-wrap:wrap;gap:8px}
.hex{
  --c:#2fd0ff;
  position:relative;width:92px;height:80px;border:0;background:transparent;padding:0;flex:0 0 92px;
}
.hex::before{
  content:"";position:absolute;inset:0;
  background:var(--c);
  clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%);
  filter:drop-shadow(0 3px 0 rgba(6,32,90,.2));
}
.hex::after{
  content:"";position:absolute;inset:4px;
  background:linear-gradient(#fffdf8,#efe7d6);
  clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%);
}
.hex span{position:relative;z-index:1;font-family:McLaren,cursive;font-size:14px;color:#06205a;display:grid;place-items:center;height:100%}
.hex:hover{transform:translateY(-2px)}
.hex:hover::after{background:linear-gradient(#fff,#fff3c8)}
.hex:active{transform:translateY(2px)}
.hint{font-family:McLaren,cursive;font-size:13px;color:#1d6bff;position:relative}

/* ---- altitude murals ---- */
#shaft{position:relative;z-index:2}
.alt{
  min-height:100dvh;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:28px 8px 40px;
  background:linear-gradient(180deg,#e8f6ff,#f4fbff 40%,#efe8ff);
}
.alt:nth-child(2){background:linear-gradient(180deg,#e8f6ff,#e8f4ff)}
.alt:nth-child(3){background:linear-gradient(180deg,#e4f0ff,#f3e9ff)}
.alt:nth-child(4){background:linear-gradient(180deg,#dce8ff,#e8f0ff)}
.alt:nth-child(5){background:linear-gradient(180deg,#ffe8d0,#fff0e0 50%,#e8f6ff)}
.alt-label{font-family:"Passion One",sans-serif;font-weight:700;letter-spacing:.08em;color:#0a3fd6;font-size:clamp(22px,3vw,36px);margin-bottom:8px;text-align:center}
.shot{width:92vw;max-width:92vw;margin:0 auto;position:relative}
.shot img{width:100%;height:auto;max-height:calc(100dvh - 210px);object-fit:cover;object-position:center;border-radius:18px;box-shadow:0 0 0 4px #7ef0ff,0 16px 40px rgba(6,32,90,.2);background:#012}
.shot figcaption{font-family:McLaren,cursive;font-size:clamp(16px,2.2vw,28px);color:#06205a;text-align:center;margin-top:10px}
.fact{width:min(920px,90vw);margin:10px auto 0;font-size:14px;line-height:1.5;color:#16325a;text-align:center}
.fact b{color:#0a3fd6}

footer{position:relative;z-index:2;padding:36px 72px 48px;text-align:center;background:#e8f6ff}
footer .hexes{margin-bottom:16px}
.tok{font-size:14px;margin:8px auto;max-width:50em}
.disc{font-size:12px;line-height:1.5;max-width:62em;margin:8px auto 0;color:#16325a}

#toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%) translateY(20px);background:#06205a;color:#fff;font-family:McLaren,cursive;padding:10px 16px;border-radius:14px;z-index:50;opacity:0;pointer-events:none;transition:.25s;max-width:min(92vw,440px);text-align:center;box-shadow:0 0 0 3px #2fd0ff}
#toast.on{opacity:1;transform:translateX(-50%) translateY(0)}

#plume{position:fixed;inset:0;pointer-events:none;z-index:40}
.spark{position:absolute;bottom:12%;width:8px;height:8px;border-radius:50%;background:#2fd0ff;box-shadow:0 0 10px #fff;animation:up 1.1s ease-out forwards}
@keyframes up{to{transform:translateY(-70vh) scale(.2);opacity:0}}

/* phones: side gantries drop; a bottom climb rail takes over */
@media (max-width:720px){
  #gantries{top:auto;left:0;right:0;bottom:0;height:36px;inset:auto 0 0 0}
  .gantry.right{display:none}
  .gantry.left{left:0;right:0;width:auto;height:36px;top:auto;bottom:0}
  .gantry.left .rail{
    background:
      repeating-linear-gradient(90deg, rgba(47,208,255,.55) 0 3px, transparent 3px 22px),
      linear-gradient(#d4eeff,#b8e4ff);
  }
  .ticks{flex-direction:row;inset:6px 40px 6px 40px;align-items:center}
  .car{left:auto;right:auto;top:3px;bottom:3px;width:30px;height:30px;aspect-ratio:auto}
  #pad{padding:10px 12px 48px}
  #pad .sun{width:72px;height:72px;top:4%;right:4%}
  h1{font-size:clamp(40px,14vw,64px)}
  .core img{width:min(148px,46vw)}
  .hex{width:68px;height:60px;flex-basis:68px}
  .hex span{font-size:12px}
  .console{padding:8px 8px 10px}
  .shot{width:100%;max-width:100%}
  .shot img{border-radius:0}
  .alt{padding:18px 0 56px}
  .alt-label{padding:0 12px}
  .shot figcaption,.fact{padding:0 12px}
  footer{padding:28px 14px 64px}
  .hint{margin-bottom:4px}
}
