/* ===========================
   NEXPAD — Retro-Futuristic
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Share+Tech+Mono&display=swap');

:root {
  --bg-dark:      #080810;
  --bg-mid:       #0d0d1a;
  --bg-stats:     #050508;
  --neon-blue:    #00d4ff;
  --neon-green:   #39ff14;
  --neon-dim:     rgba(0, 212, 255, 0.18);
  --text-primary: #e8f4ff;
  --text-muted:   #5a6a8a;
  --text-dim:     #2a3a5a;
  --font-display: 'Orbitron', sans-serif;
  --font-mono:    'Share Tech Mono', monospace;
}

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

html { scroll-behavior: auto; }

body {
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-mono);
  overflow-x: hidden;
  /* CRT scanlines */
  position: relative;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.04) 2px,
    rgba(0, 0, 0, 0.04) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

a { color: inherit; text-decoration: none; }

/* ── LOADER ── */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.loader-brand {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  color: var(--neon-blue);
  text-shadow: 0 0 30px var(--neon-blue), 0 0 80px rgba(0, 212, 255, 0.4);
}

.loader-bar-wrap {
  width: 280px;
  height: 2px;
  background: var(--text-dim);
  position: relative;
  overflow: hidden;
}

#loader-bar {
  height: 100%;
  width: 0%;
  background: var(--neon-blue);
  box-shadow: 0 0 12px var(--neon-blue);
  transition: width 0.1s linear;
}

#loader-percent {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

/* ── HEADER ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 3rem;
  border-bottom: 1px solid rgba(0, 212, 255, 0.08);
  background: linear-gradient(to bottom, rgba(8, 8, 16, 0.9), transparent);
  backdrop-filter: blur(4px);
}

.header-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.35em;
  color: var(--neon-blue);
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
}

.header-nav {
  display: flex;
  gap: 2.5rem;
}

.header-nav a {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  transition: color 0.2s;
}

.header-nav a:hover {
  color: var(--neon-blue);
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.5);
}

/* ── HERO STANDALONE ── */
.hero-standalone {
  position: relative;
  width: 100%;
  height: 100vh;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 2;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black, transparent);
}

/* Corner accents */
.hero-standalone::before,
.hero-standalone::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  border-color: rgba(0, 212, 255, 0.2);
  border-style: solid;
}
.hero-standalone::before {
  top: 2rem;
  left: 2rem;
  border-width: 1px 0 0 1px;
}
.hero-standalone::after {
  bottom: 2rem;
  right: 2rem;
  border-width: 0 1px 1px 0;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--neon-blue);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0.85;
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 13rem);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-shadow:
    0 0 40px rgba(0, 212, 255, 0.25),
    0 0 120px rgba(0, 212, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05em;
}

.hero-heading .word {
  display: block;
  overflow: hidden;
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-top: 2rem;
  text-transform: uppercase;
}

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  animation: bounce 2s ease-in-out infinite;
}

.scroll-label {
  font-size: 0.55rem;
  letter-spacing: 0.3em;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ── CANVAS WRAP ── */
.canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 1;
  clip-path: circle(0% at 50% 50%);
  pointer-events: none;
}

#canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── DARK OVERLAY ── */
#dark-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.9);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  transition: none;
}

/* ── MARQUEE ── */
.marquee-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  overflow: hidden;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  padding-bottom: 0.5rem;
  border-top: 1px solid rgba(0, 212, 255, 0.1);
  background: linear-gradient(to top, rgba(8, 8, 16, 0.6), transparent);
}

.marquee-text {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 5.5rem);
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.1em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 212, 255, 0.35);
  padding: 0.8rem 0;
  will-change: transform;
}

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

/* ── SCROLL SECTIONS (base) ── */
.scroll-section {
  position: absolute;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.scroll-section.is-visible {
  pointer-events: auto;
  visibility: visible;
}

/* ── SIDE ALIGNMENT ── */
.align-left {
  padding-left: 5vw;
  padding-right: 55vw;
}

.align-right {
  padding-left: 55vw;
  padding-right: 5vw;
}

.section-inner {
  max-width: 38vw;
}

/* ── SECTION TYPOGRAPHY ── */
.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 5.5rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-shadow:
    0 0 30px rgba(0, 212, 255, 0.2),
    0 0 80px rgba(0, 212, 255, 0.08);
  margin-bottom: 1.4rem;
}

.section-body {
  font-family: var(--font-mono);
  font-size: clamp(0.78rem, 1vw, 0.95rem);
  line-height: 1.7;
  color: #8a9abf;
  margin-bottom: 1rem;
}

.section-note {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--neon-blue);
  opacity: 0.6;
  margin-top: 1.2rem;
}

/* ── STATS SECTION ── */
.section-stats {
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  width: auto;
  text-align: center;
  z-index: 6;
}

.stats-grid {
  display: flex;
  gap: 5rem;
  align-items: center;
  justify-content: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.stat-top {
  display: flex;
  align-items: baseline;
  gap: 0.2em;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 7rem);
  font-weight: 900;
  color: var(--neon-blue);
  text-shadow: 0 0 30px var(--neon-blue), 0 0 80px rgba(0, 212, 255, 0.4);
  line-height: 1;
}

.stat-suffix {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 2.8rem);
  font-weight: 500;
  color: rgba(0, 212, 255, 0.6);
  line-height: 1;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ── CTA SECTION ── */
.section-cta {
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  width: auto;
  text-align: center;
  z-index: 6;
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: none;
}

.cta-heading {
  font-family: var(--font-display);
  font-size: clamp(5rem, 16vw, 18rem);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-shadow:
    0 0 60px rgba(0, 212, 255, 0.3),
    0 0 180px rgba(0, 212, 255, 0.15);
  margin-bottom: 2rem;
}

.cta-sub {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 3rem;
}

.cta-button {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--bg-dark);
  background: var(--neon-blue);
  padding: 1rem 3rem;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

.cta-button:hover {
  box-shadow: 0 0 30px var(--neon-blue), 0 0 80px rgba(0, 212, 255, 0.4);
  transform: translateY(-2px);
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  #scroll-container { height: 550vh; }

  .align-left,
  .align-right {
    padding: 0 5vw;
  }

  .section-inner {
    max-width: 100%;
    background: rgba(5, 5, 14, 0.85);
    padding: 1.5rem;
    backdrop-filter: blur(8px);
    border-left: 1px solid rgba(0, 212, 255, 0.15);
  }

  .stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .hero-heading {
    font-size: clamp(3rem, 18vw, 6rem);
  }

  .section-cta,
  .section-stats {
    left: 5%;
    transform: translateY(-50%);
    width: 90%;
    text-align: left;
  }

  .cta-inner {
    align-items: flex-start;
  }

  .marquee-text {
    font-size: clamp(1.8rem, 8vw, 3rem);
  }
}
