/* ============================================================
   VARIABLES
   ============================================================ */
:root {
  --bg:            #000000;
  --text-primary:  #f2f2f2;
  --text-secondary:#a8a8a8;
  --text-muted:    #555555;
  --accent:        #4d8fff;
  --accent-dim:    rgba(77, 143, 255, 0.10);
  --accent-border: rgba(77, 143, 255, 0.22);
  --font-display:  'Space Grotesk', sans-serif;
  --font-body:     'Inter', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Subtle noise grain */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  color: var(--accent);
  letter-spacing: 0;
}

/* ============================================================
   LOADER
   ============================================================ */
#loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-brand {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.loader-bar-wrap {
  width: 160px;
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
}

#loader-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.08s linear;
}

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

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 66px;
  display: flex;
  align-items: center;
  padding: 0 5vw;
  background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, transparent 100%);
}

.site-header nav {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--accent-border);
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-decoration: none;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--text-primary); }

.nav-cta {
  color: var(--text-primary) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  padding: 7px 16px !important;
  border-radius: 3px;
  transition: border-color 0.25s ease, background 0.25s ease !important;
}

.nav-cta:hover {
  border-color: var(--accent) !important;
  background: var(--accent-dim) !important;
}

/* ============================================================
   HERO
   ============================================================ */
.hero-standalone {
  position: relative;
  height: 100vh;
  width: 100%;
  background: var(--bg);
  display: flex;
  align-items: center;
  z-index: 10;
  overflow: hidden;
  will-change: opacity;
}

/* Decorative grid overlay */
.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(77, 143, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 143, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 80%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 6vw;
  max-width: 1000px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 32px;
  opacity: 0;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 10.5rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.038em;
  color: var(--text-primary);
  margin-bottom: 34px;
}

.hero-heading .word {
  display: block;
  opacity: 0;
  transform: translateY(68px);
}

.hero-word-accent {
  color: #7ba8ff;
}

.hero-tagline {
  font-size: clamp(0.875rem, 1.3vw, 1.125rem);
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 480px;
  opacity: 0;
}

.scroll-indicator {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 64px;
  opacity: 0;
}

.scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollLinePulse 2s ease-in-out infinite;
}

@keyframes scrollLinePulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.15); }
}

.scroll-text {
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============================================================
   CANVAS
   ============================================================ */
.canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 1;
  clip-path: circle(0% at 50% 50%);
  will-change: clip-path;
}

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

/* Vignette: blends canvas edges into black */
.canvas-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 72% 72% at 50% 50%,
    transparent 40%,
    rgba(0, 0, 0, 0.55) 75%,
    rgba(0, 0, 0, 0.90) 100%
  );
}

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

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee-wrap {
  position: fixed;
  bottom: 5vh;
  left: 0;
  right: 0;
  z-index: 4;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

.marquee-text {
  font-family: var(--font-display);
  font-size: 11vw;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.038);
  white-space: nowrap;
  line-height: 1;
  letter-spacing: -0.02em;
  user-select: none;
  will-change: transform;
}

/* ============================================================
   SCROLL CONTAINER
   ============================================================ */
#scroll-container {
  position: relative;
  height: 1100vh;
  width: 100%;
}

/* ============================================================
   SCROLL SECTIONS
   ============================================================ */
.scroll-section {
  position: absolute;
  width: 100%;
  transform: translateY(-50%);
  z-index: 6;
  pointer-events: none;
}

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

/* Side zones — text sits in outer 38% */
.align-left  { padding-left: 5vw;  padding-right: 58vw; }
.align-right { padding-left: 58vw; padding-right: 5vw;  }

.align-left  .section-inner,
.align-right .section-inner { max-width: 38vw; }

/* Section inner: left accent border */
.section-inner {
  border-left: 1px solid var(--accent-border);
  padding-left: 24px;
  position: relative;
}

/* Soft dark halo behind text so it reads over canvas */
.section-inner::before {
  content: '';
  position: absolute;
  inset: -30px -20px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.52) 0%, transparent 72%);
  pointer-events: none;
  z-index: -1;
  border-radius: 4px;
}

/* Label */
.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.label-num {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* Heading */
.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.8vw, 3.75rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 18px;
}

/* Body */
.section-body {
  font-size: clamp(0.8125rem, 0.95vw, 1rem);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 380px;
}

/* ============================================================
   CTA BUTTON
   ============================================================ */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 36px;
  padding: 12px 28px;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  border-radius: 3px;
  transition: background 0.28s ease, color 0.28s ease, box-shadow 0.28s ease;
}

.cta-button:hover {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 28px rgba(77, 143, 255, 0.28);
}

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

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

  .align-left  .section-inner,
  .align-right .section-inner {
    max-width: 100%;
    background: rgba(0,0,0,0.78);
    padding: 24px 20px;
    border-radius: 3px;
    border-left: none;
  }

  .section-body { max-width: 100%; }
  .marquee-text { font-size: 20vw; }
  .nav-links li:not(:last-child) { display: none; }
  .hero-grid { display: none; }
}
