/* ========================================================
   WALK TO THE SUN — page-specific styles
   Visualizer styles lifted verbatim from the v2 landing page
   (the proven scroll-jacked Three.js experience).
   Loads alongside css/style.css (nav, buttons, footer, base).
   ======================================================== */

/* ----- Mission intro / close ----- */

.section--mission-intro { padding-bottom: 2rem; padding-top: 8.5rem; }

.mi-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -.01em;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.2;
}

.mi-sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text);
  max-width: 520px;
  margin: 1.2rem auto 0;
  line-height: 1.8;
}

.section--mission-close { padding: 4rem 1.5rem 6rem; }

.mi-close-num {
  font-size: 1.1rem;
  color: var(--text-mid);
  margin-bottom: 1.5rem;
}

.gr-text {
  background: linear-gradient(135deg, var(--fire), var(--warm));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.8rem;
  letter-spacing: -.02em;
}

.mi-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 2rem;
}

.mi-pill {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 400;
  padding: .4rem .85rem;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-dim);
  transition: transform .2s var(--ease-out);
}

.mi-pill:hover { transform: scale(1.05); }

.mi-pill--sun {
  border-color: rgba(255,107,0,.3);
  color: var(--warm);
}

.mi-arrow { color: var(--text-dim); font-size: .75rem; }

.mi-close-body { color: var(--text-mid); font-size: 1.05rem; }

/* ----- Space journey visualizer ----- */

.space-journey { height: 700vh; position: relative; }
.sj-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; background: transparent; }

#sjCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.sj-ms {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: none;
}

.sj-ms--planet .sj-ms-name { color: var(--warm); }

.sj-ms-name {
  font-family: var(--sans);
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
  margin-bottom: .3rem;
  text-shadow: 0 0 20px rgba(0,0,0,.9), 0 0 40px rgba(0,0,0,.6);
}

.sj-ms-steps {
  font-family: var(--display);
  font-weight: 700;
  text-shadow: 0 0 20px rgba(0,0,0,.9), 0 0 40px rgba(0,0,0,.6);
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  white-space: nowrap;
  color: #fff;
}

.sj-ms--dark .sj-ms-name {
  color: #1a1a1a;
  -webkit-text-stroke: 1px var(--warm);
  paint-order: stroke fill;
  text-shadow: none;
}
.sj-ms--dark .sj-ms-steps {
  color: #0a0a0a;
  -webkit-text-fill-color: #0a0a0a;
  -webkit-text-stroke: 2px var(--fire);
  paint-order: stroke fill;
  text-shadow: none;
  filter: drop-shadow(0 0 20px rgba(255,107,0,.3)) drop-shadow(0 0 60px rgba(255,107,0,.15));
}

.sj-counter {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 7;
  opacity: 0;
  transition: opacity .5s ease;
}

.sj-counter.on { opacity: 1; }

.sj-counter-num {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.8rem, 6vw, 4.5rem);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--fire), var(--warm));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all .6s ease;
}

.sj-counter.sun-mode .sj-counter-num {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: #0a0a0a;
  color: #0a0a0a;
  -webkit-text-stroke: 1.5px transparent;
  paint-order: stroke fill;
  text-shadow: none;
  filter: drop-shadow(0 0 8px rgba(255,107,0,.4));
}

.sj-counter-label {
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color .6s ease;
}

.sj-counter.sun-mode .sj-counter-label { color: #1a1a1a; }

.sj-phase {
  position: absolute;
  top: 7%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 7;
  font-family: var(--sans);
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0;
  transition: opacity .4s ease;
  white-space: nowrap;
  text-shadow: 0 0 30px rgba(0,0,0,.95), 0 0 60px rgba(0,0,0,.7);
}

.sj-phase.on { opacity: 1; }

.sj-finale {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(.5);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.sj-finale-num {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(5rem, 18vw, 14rem);
  letter-spacing: -.02em;
  line-height: 1;
  color: #0a0a0a;
  -webkit-text-fill-color: #0a0a0a;
  -webkit-text-stroke: 3px;
  -webkit-text-stroke-color: var(--fire);
  paint-order: stroke fill;
  filter: drop-shadow(0 0 20px rgba(255,107,0,.3)) drop-shadow(0 0 60px rgba(255,107,0,.15));
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.sj-finale-label {
  font-family: var(--sans);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  letter-spacing: .25em;
  text-transform: uppercase;
  color: #1a1a1a;
  -webkit-text-stroke: 1.5px var(--warm);
  paint-order: stroke fill;
  margin-top: .8rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.sj-fallback .sj-sticky {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sj-fallback #sjCanvas { display: none; }

@media (max-width: 640px) {
  .sj-ms-name { font-size: .75rem; }
  .sj-ms-steps { font-size: 1rem; }
}
