/* ============================================================
   NEBULA — Galaxy Squishy Landing Page
   ============================================================ */

:root {
  --bg: #000000;
  --text: #e8f4f8;
  --text-dim: #5a7a82;
  --accent: #00d4c8;
  --accent-glow: #7b2fd6;
  --font-display: 'Unbounded', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--bg); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
}

/* ---- LOADER ---- */
#loader {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-brand {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: var(--text);
  text-shadow: 0 0 40px rgba(0, 212, 200, 0.4);
}
.loader-bar-wrap {
  width: 220px;
  height: 1px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
#loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-glow));
  transition: width 0.1s linear;
}
#loader-percent {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  font-weight: 400;
}

/* ---- HEADER ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.6rem 3rem;
  mix-blend-mode: difference;
}
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: #fff;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}
.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 400;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.nav-links a:hover { opacity: 1; }

/* ---- INTRO SCROLL ---- */
#intro-scroll {
  position: relative;
  height: 220vh;
  background: var(--bg);
  z-index: 12;
}

#intro-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 14vh 5vw 3vh;
  overflow: hidden;
}

#intro-header {
  text-align: center;
  margin-bottom: 3.5rem;
  will-change: transform;
  position: relative;
  z-index: 2;
}

.intro-heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 5.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 1.2rem 0 1.4rem;
}

.intro-heading-big {
  display: block;
  font-size: clamp(3rem, 7vw, 8rem);
  color: transparent;
  -webkit-text-stroke: 1px var(--accent);
  text-shadow: 0 0 60px rgba(0,212,200,0.25);
  line-height: 0.95;
}

.intro-tagline {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 300;
}

#intro-perspective {
  width: 100%;
  max-width: 960px;
  perspective: 1000px;
  perspective-origin: 50% 50%;
}

#intro-card-wrap {
  width: 100%;
  will-change: transform;
  transform-origin: center center;
}

#intro-card {
  width: 100%;
  border: 3px solid #6C6C6C;
  border-radius: 24px;
  background: #1a1a1a;
  padding: 0.6rem;
  box-shadow:
    0 0 #0000004d,
    0 9px 20px #0000004a,
    0 37px 37px #00000042,
    0 84px 50px #00000026,
    0 149px 60px #0000000a,
    0 0 80px rgba(0,212,200,0.06);
  margin-top: -1.5rem;
}

#intro-card-inner {
  border-radius: 16px;
  overflow: hidden;
  background: #0a0a0a;
  height: clamp(200px, 35vh, 420px);
}

#intro-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  will-change: transform;
}

/* ---- HERO ---- */
.hero-standalone {
  position: relative;
  height: 100vh;
  background: #000;
  display: flex;
  align-items: flex-end;
  padding: 0 5vw 8vh;
  overflow: hidden;
  z-index: 10;
}
.hero-inner { position: relative; z-index: 2; }

.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.4rem;
  font-weight: 400;
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(5rem, 13vw, 13rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.01em;
  color: var(--text);
}
.hero-heading .word {
  display: inline-block;
  will-change: transform;
}
.hero-heading .word.accent {
  color: transparent;
  -webkit-text-stroke: 1px var(--accent);
  text-shadow: 0 0 60px rgba(0,212,200,0.3);
}
.hero-tagline {
  margin-top: 2rem;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 300;
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  right: 5vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.58rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.scroll-arrow {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, rgba(0,212,200,0.5), transparent);
  animation: arrowPulse 2.2s infinite;
}
@keyframes arrowPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.4); }
}

/* ---- HERO SHADER ---- */
.hero-shader-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

/* ---- CANVAS WRAP ---- */
.canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  clip-path: circle(0% at 50% 50%);
  will-change: clip-path;
}
canvas#canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---- DARK OVERLAY ---- */
#dark-overlay {
  position: fixed;
  inset: 0;
  z-index: 6;
  background: rgba(0,0,0,0.92);
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

/* ---- MARQUEES ---- */
.marquee-wrap {
  position: fixed;
  z-index: 8;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  will-change: opacity;
}
#marquee-1 {
  bottom: 5vh;
  left: 0;
  right: 0;
}
#marquee-2 {
  bottom: 17vh;
  left: 0;
  right: 0;
}
.marquee-text {
  font-family: var(--font-display);
  font-size: 11vw;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.05em;
  white-space: nowrap;
  color: rgba(0,212,200,0.04);
  will-change: transform;
}
.marquee-right .marquee-text {
  font-size: 7vw;
  font-weight: 300;
  color: rgba(123,47,214,0.06);
  letter-spacing: 0.12em;
}

/* ---- SCROLL CONTAINER ---- */
#scroll-container {
  position: relative;
  height: 900vh;
  z-index: 9;
}

/* ---- SCROLL SECTIONS ---- */
.scroll-section {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  min-height: 100vh;
  opacity: 0;
  will-change: opacity, transform;
  pointer-events: none;
}
.scroll-section.is-active { pointer-events: auto; }

.align-left  { padding: 0 55vw 0 5vw; }
.align-right { padding: 0 5vw 0 55vw; }
.section-inner { max-width: 38vw; min-width: 280px; }

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5.5vw, 6.5rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 1.8rem;
}
.section-body {
  font-size: 0.88rem;
  line-height: 1.8;
  color: rgba(232,244,248,0.55);
  font-weight: 300;
  max-width: 26rem;
}
.section-note {
  display: block;
  margin-top: 1.6rem;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 400;
}

/* ---- STATS ---- */
.section-stats {
  justify-content: center;
  padding: 0 5vw;
}
.stats-grid {
  display: flex;
  gap: clamp(3rem, 8vw, 9rem);
  align-items: flex-end;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; align-items: flex-start; }
.stat-row {
  display: flex;
  align-items: baseline;
  gap: 0.15em;
  line-height: 1;
}
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(4rem, 8.5vw, 10rem);
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.02em;
}
.stat-suffix {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 4.5rem);
  font-weight: 300;
  color: var(--accent);
}
.stat-label {
  margin-top: 0.7rem;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(232,244,248,0.35);
  font-weight: 400;
}

/* ---- CTA ---- */
.section-cta {
  align-items: center;
  justify-content: flex-end;
  padding: 0 5vw 0 55vw;
}
.cta-heading {
  font-size: clamp(3.5rem, 6.5vw, 8rem);
  font-weight: 900;
  line-height: 0.88;
}
.cta-button {
  display: inline-block;
  margin-top: 2.8rem;
  padding: 1.1rem 3rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.cta-button:hover {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 40px rgba(0,212,200,0.35);
}

/* ---- MOBILE ---- */
@media (max-width: 768px) {
  #intro-scroll { height: 180vh; }
  .intro-heading { font-size: clamp(2rem, 10vw, 4rem); }
  .intro-heading-big { font-size: clamp(2.5rem, 13vw, 5.5rem); }
  #intro-card-inner { height: clamp(160px, 28vh, 260px); }
  .hero-heading { font-size: clamp(4rem, 18vw, 7rem); }
  #scroll-container { height: 600vh; }
  .align-left, .align-right { padding: 6rem 2rem; justify-content: center; }
  .section-inner { max-width: 100%; }
  .section-cta { padding: 6rem 2rem; justify-content: center; }
  .stats-grid { flex-direction: column; gap: 2.5rem; align-items: flex-start; }
  .marquee-text { font-size: 18vw; }
  .nav-links { display: none; }
}
