/* Space — Home: viaggio in profondità (asse Z) verso il Sole.
   Richiede header.css + footer.css. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #000004;
  color: rgba(255,255,255,0.85);
  font-family: 'Exo 2', sans-serif;
  overflow-x: hidden;
  cursor: default;
}
::selection { background: rgba(124,131,255,0.3); color: #fff; }

/* ───────────────────────────────────────────  WARP STARFIELD  */
.warp { position: fixed; inset: 0; z-index: 0; pointer-events: none; display: block; }
.cosmos-tint {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 50% 50%, transparent 40%, rgba(0,0,6,0.55) 100%),
    radial-gradient(ellipse 120% 80% at 50% -10%, rgba(40,36,90,0.30) 0%, transparent 55%);
}

/* warm glow as the Sun fills the view */
.warm-veil {
  position: fixed; inset: 0; z-index: 6; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 52%, rgba(255,205,120,0.85) 0%, rgba(255,150,60,0.45) 26%, rgba(255,100,40,0.15) 50%, transparent 70%);
  will-change: opacity;
}

/* ──────────────────────────────────────────  TELEMETRY HUD  */
.hud { position: fixed; z-index: 80; pointer-events: none; font-family: 'Orbitron', sans-serif;
  text-transform: uppercase; color: rgba(255,255,255,0.40); opacity: 0; transition: opacity .6s cubic-bezier(0.4,0,0.2,1); }
.hud.on { opacity: 1; }
.hud-tl { top: 84px; left: 40px; }
.hud-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.hud-k { font-size: .5rem; letter-spacing: 3px; color: rgba(255,255,255,0.20); width: 78px; }
.hud-v { font-size: .68rem; letter-spacing: 2px; color: rgba(255,255,255,0.85); }
.hud-v.accent { color: #7c83ff; }

/* top progress bar */
.progress { position: fixed; top: 0; left: 0; height: 2px; z-index: 95; width: 0;
  background: linear-gradient(90deg, #7c83ff, #ffb35c); box-shadow: 0 0 12px rgba(124,131,255,.5); }

/* ═══════════════════════════════════════  FLY-THROUGH STAGE  */
.fly-scroll { position: relative; height: 760vh; z-index: 10; }
.fly-stage {
  position: sticky; top: 0; height: 100vh; width: 100%; overflow: hidden;
  perspective: 900px; perspective-origin: 50% 46%;
}
.field { position: absolute; inset: 0; transform-style: preserve-3d; }

/* a single object travelling toward the camera */
.obj { position: absolute; left: 50%; top: 46%; will-change: transform, opacity; transform-style: preserve-3d; }

/* PLANET object */
.obj-planet { width: 320px; margin: -160px 0 0 -160px; }
.obj-planet img { display: block; width: 100%; height: auto;
  filter: drop-shadow(0 0 50px rgba(150,170,255,0.10)); }
.obj-planet .halo { position: absolute; inset: -14%; border-radius: 50%;
  background: radial-gradient(circle, rgba(160,180,255,0.10), transparent 62%); pointer-events: none; }

/* TEXT object (passes on the opposite side from its planet) */
.obj-text { width: 380px; margin-left: -190px; margin-top: -120px; }
.obj-text.align-r { text-align: right; }
.obj-text.align-l { text-align: left; }
.obj-eyebrow { font-family: 'Orbitron', sans-serif; font-size: .58rem; letter-spacing: 5px; text-transform: uppercase;
  color: rgba(255,255,255,0.34); margin: 0 0 14px; display: flex; align-items: center; gap: 12px; }
.obj-text.align-r .obj-eyebrow { justify-content: flex-end; }
.obj-eyebrow .bar { width: 34px; height: 1px; background: currentColor; opacity: .5; }
.obj-name { font-family: 'Orbitron', sans-serif; font-weight: 400; letter-spacing: 2px;
  font-size: clamp(2rem, 3.4vw, 3rem); color: rgba(255,255,255,0.95); margin: 0 0 16px;
  text-shadow: 0 4px 40px rgba(0,0,10,0.6); }
.obj-desc { font-size: .92rem; font-weight: 200; line-height: 1.85; color: rgba(255,255,255,0.52);
  margin: 0 0 22px; }
.obj-stats { display: flex; gap: 30px; }
.obj-text.align-r .obj-stats { justify-content: flex-end; }
.stat { border-left: 1px solid rgba(255,255,255,0.18); padding-left: 13px; }
.obj-text.align-r .stat { border-left: none; border-right: 1px solid rgba(255,255,255,0.18); padding-left: 0; padding-right: 13px; }
.stat .val { display: block; font-family: 'Orbitron', sans-serif; font-size: 1.15rem; font-weight: 300;
  color: rgba(255,255,255,0.9); }
.stat .lbl { display: block; font-size: .56rem; letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,0.32); margin-top: 5px; }

/* INTRO object */
.obj-intro { width: 760px; margin-left: -380px; margin-top: -200px; text-align: center; }
.obj-intro .obj-eyebrow { justify-content: center; }
.intro-title { font-family: 'Orbitron', sans-serif; font-weight: 400; letter-spacing: 3px; line-height: 1.25;
  font-size: clamp(2rem, 4.6vw, 3.6rem); color: rgba(255,255,255,0.95); margin: 0 auto 22px; max-width: 16ch; }
.intro-sub { font-size: 1rem; font-weight: 200; line-height: 1.8; color: rgba(255,255,255,0.5);
  max-width: 560px; margin: 0 auto; }

/* SUN object (the destination disc you approach) */
.obj-sun { width: 360px; height: 360px; margin: -180px 0 0 -180px; }
.obj-sun .sun-core { position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 40% 36%, #fff6da, #ffd27a 34%, #ff9b3e 64%, #e9651f 100%);
  box-shadow: 0 0 120px 40px rgba(255,150,60,.5), inset -16px -12px 50px rgba(150,45,0,.4); }
.obj-sun .sun-glow { position: absolute; inset: -45%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,210,140,.7) 0%, rgba(255,150,60,.35) 38%, transparent 66%);
  filter: blur(6px); }

/* ═══════════════════════════════  ARRIVAL OVERLAY (Sun finale)  */
.arrival { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 0;
  opacity: 0; pointer-events: none; }
.arrival.on { pointer-events: auto; }
.arrival-title { font-family: 'Orbitron', sans-serif; font-weight: 600; letter-spacing: 18px;
  font-size: clamp(3rem, 11vw, 7.5rem); color: #fff8ec; margin: 0;
  text-shadow: 0 0 40px rgba(255,180,90,.85), 0 0 110px rgba(255,140,50,.55); }
.arrival-tagline { font-size: 1.05rem; font-weight: 200; letter-spacing: 1px; color: rgba(255,238,214,.85);
  margin: 20px 0 40px; }
.arrival-cta { display: inline-flex; align-items: center; gap: 12px; font-family: 'Orbitron', sans-serif;
  font-size: .72rem; letter-spacing: 3px; text-transform: uppercase; color: #1a0c00;
  background: linear-gradient(135deg, #ffe9b8, #ffb35c); border: none; border-radius: 999px;
  padding: 17px 38px; cursor: pointer; text-decoration: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,.25) inset, 0 8px 30px rgba(255,140,40,.35);
  transition: transform .25s cubic-bezier(0.4,0,0.2,1), box-shadow .25s cubic-bezier(0.4,0,0.2,1); }
.arrival-cta:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(255,255,255,.45) inset, 0 14px 40px rgba(255,150,50,.55); }
.arrival-cta svg { width: 15px; height: 15px; }

/* ═══════════════════════════════════════════════  SCROLL HINT  */
.scroll-hint { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: inline-flex; flex-direction: column; align-items: center; gap: 9px; z-index: 8;
  font-family: 'Orbitron', sans-serif; font-size: .5rem; letter-spacing: 3px; text-transform: uppercase;
  color: rgba(255,255,255,0.34); transition: opacity .5s; }
.scroll-hint .bar { width: 1px; height: 34px; background: linear-gradient(to bottom, rgba(255,255,255,0.55), transparent);
  position: relative; overflow: hidden; }
.scroll-hint .bar::after { content:''; position: absolute; top: -34px; left: 0; width: 1px; height: 34px;
  background: linear-gradient(to bottom, transparent, #fff); animation: railDrop 1.8s cubic-bezier(0.4,0,0.2,1) infinite; }
@keyframes railDrop { 0% { top: -34px; } 60%,100% { top: 34px; } }

/* ═══════════════════════════════════════  NAVICELLA (PNG placeholder) */
.ship { position: absolute; left: 50%; bottom: 9%; width: 540px;
  margin-left: -270px; z-index: 20; pointer-events: none; perspective: 760px;
  will-change: transform; }
.ship-tilt { position: relative; width: 100%; transform-origin: 50% 64%;
  transform: rotateX(12deg); will-change: transform; }
.ship-img { display: block; width: 100%; height: auto; position: relative; z-index: 1;
  filter: drop-shadow(0 14px 30px rgba(0,0,0,0.5)); }
.exhaust { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; }

@media (max-width: 900px) {
  .hud-tl { display: none; }
  .obj-text { width: 84vw; margin-left: -42vw; }
  .obj-intro { width: 90vw; margin-left: -45vw; }
  .ship { width: 380px; margin-left: -190px; bottom: 12%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-hint .bar::after { animation: none; }
}
