/* ==========================================================================
   CSS Variables & Resets
   ========================================================================== */
   :root {
    --bg-dark: #0a0b10;
    --text-on-light: #1a1a1a;
    --text-on-dark: #f0ede8;
    
    /* Brand Colors */
    --color-cyan: #00e5ff;
    --color-magenta: #e00079;
    --color-obsidian: #12121c;
    
    /* Fonts */
    --font-display: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* UI metrics */
    --nav-height: 80px;
    --z-canvas: 1;
    --z-overlay: 2;
    --z-content: 10;
    --z-nav: 50;
    --z-loader: 100;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  html.lenis {
    height: auto;
  }
  
  .lenis.lenis-smooth {
    scroll-behavior: auto;
  }
  
  .lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
  }
  
  .lenis.lenis-stopped {
    overflow: hidden;
  }
  
  body {
    background-color: var(--bg-dark);
    color: var(--text-on-dark);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  a {
    color: inherit;
    text-decoration: none;
  }
  
  /* ==========================================================================
     Typography
     ========================================================================== */
  h1, h2, h3, .loader-brand {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-weight: 700;
    line-height: 0.95;
    margin: 0;
  }
  
  .hero-heading {
    font-size: clamp(4rem, 12vw, 12rem);
    letter-spacing: -0.02em;
    position: relative;
    z-index: 2;
  }
  
  .hero-heading .accent-text {
    background: linear-gradient(90deg, var(--color-cyan), var(--color-magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
  }
  
  .section-heading {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
  }
  
  .section-label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-cyan);
    margin-bottom: 1rem;
  }
  
  .section-body {
    font-size: 1.125rem;
    color: #a0a0ab;
    max-width: 32rem;
    margin-bottom: 2rem;
  }
  
  /* ==========================================================================
     Loader
     ========================================================================== */
  #loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-dark);
    z-index: var(--z-loader);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
  }
  
  .loader-brand {
    font-size: 2rem;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    color: var(--text-on-dark);
  }
  
  .loader-progress {
    width: 200px;
    height: 2px;
    background-color: #222;
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
  }
  
  #loader-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-cyan), var(--color-magenta));
    transition: width 0.2s ease;
  }
  
  #loader-percent {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: #888;
  }
  
  body.loading {
    overflow: hidden;
  }
  
  /* ==========================================================================
     Navigation
     ========================================================================== */
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: var(--z-nav);
    padding: 0 4vw;
    display: flex;
    align-items: center;
    mix-blend-mode: difference;
  }
  
  .nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
  }
  
  .logo-icon {
    width: 24px;
    height: 24px;
  }
  
  .nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }
  
  .nav-links a {
    position: relative;
  }
  
  .nav-cta {
    padding: 0.5rem 1.25rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 2rem;
    transition: all 0.3s ease;
  }
  
  .nav-cta:hover {
    border-color: var(--color-cyan);
    background: rgba(0, 229, 255, 0.1);
  }
  
  /* ==========================================================================
     Hero Standalone
     ========================================================================== */
  .hero-standalone {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 5vw;
    background-color: var(--bg-dark);
    z-index: calc(var(--z-canvas) + 1); /* Sits above canvas initially */
  }
  
  .hero-inner {
    max-width: 1200px;
  }
  
  .hero-heading .word {
    display: inline-block;
    overflow: hidden;
  }
  
  .hero-tagline {
    font-size: 1.25rem;
    color: #888;
    margin-top: 2rem;
    max-width: 400px;
  }
  
  .scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 5vw;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: #666;
  }
  
  .scroll-arrow {
    width: 1px;
    height: 40px;
    background-color: var(--color-cyan);
    position: relative;
    overflow: hidden;
  }
  
  .scroll-arrow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background-color: var(--color-magenta);
    animation: scrollAnim 1.5s infinite ease-in-out;
  }
  
  @keyframes scrollAnim {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
  }
  
  /* ==========================================================================
     Canvas & Scroll Environment
     ========================================================================== */
  .canvas-wrap {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: var(--z-canvas);
    clip-path: circle(0% at 50% 50%); /* Start hidden, reveal on scroll */
    background-color: var(--bg-dark);
  }
  
  canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  #dark-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-dark);
    opacity: 0;
    z-index: var(--z-overlay);
    pointer-events: none;
  }
  
  #scroll-container {
    position: relative;
    height: 850vh; /* Long enough for 192 frames */
    z-index: var(--z-content);
    pointer-events: none; /* Let clicks pass through to canvas if needed */
  }
  
  .scroll-spacer-hero {
    height: 100vh;
    position: relative;
  }
  
  /* ==========================================================================
     Sections & Layout
     ========================================================================== */
  .scroll-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    pointer-events: auto; /* Re-enable pointer events for sections */
  }
  
  .align-left {
    padding-left: 5vw;
    padding-right: 55vw;
  }
  
  .align-right {
    padding-left: 55vw;
    padding-right: 5vw;
    display: flex;
    justify-content: flex-end;
  }
  
  .section-inner {
    max-width: 35vw;
  }
  
  .align-right .section-inner {
    text-align: right;
  }
  .align-right .section-label {
    text-align: right;
  }
  .align-right .section-body {
    margin-left: auto;
  }
  
  /* Buttons */
  .cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
  }
  
  .cta-button.primary {
    background: linear-gradient(90deg, var(--color-cyan), var(--color-magenta));
    color: var(--text-on-light);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  }
  
  .cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(224, 0, 121, 0.3);
  }
  
  .cta-button.secondary {
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-on-dark);
  }
  
  .cta-button.secondary:hover {
    border-color: var(--color-cyan);
    color: var(--color-cyan);
  }
  
  /* ==========================================================================
     Stats Section
     ========================================================================== */
  .section-stats {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .stats-grid {
    display: flex;
    gap: 6vw;
    text-align: center;
  }
  
  .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .stat-number {
    font-family: var(--font-display);
    font-size: clamp(4rem, 8vw, 8rem);
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(180deg, #fff, #666);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  
  .stat-suffix {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 700;
    color: var(--color-magenta);
    line-height: 1;
    margin-top: -0.2em;
  }
  
  .stat-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #888;
    margin-top: 1rem;
  }
  
  /* ==========================================================================
     Input form
     ========================================================================== */
  .cta-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
  }
  
  .email-input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 1rem 1.5rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: #fff;
    width: 100%;
    max-width: 300px;
    outline: none;
    transition: border-color 0.3s ease;
  }
  
  .email-input:focus {
    border-color: var(--color-cyan);
  }
  
  /* ==========================================================================
     Marquee
     ========================================================================== */
  .marquee-wrap {
    position: fixed;
    top: 50%;
    left: 0;
    width: 100vw;
    transform: translateY(-50%);
    z-index: var(--z-canvas); /* Just above canvas, behind content */
    pointer-events: none;
    overflow: hidden;
    opacity: 0.15; /* Subtle in the background */
  }
  
  .marquee-inner {
    width: max-content;
    display: flex;
  }
  
  .marquee-text {
    font-family: var(--font-display);
    font-size: 15vw;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255,255,255,0.8);
    text-transform: uppercase;
    padding-right: 2vw;
  }
  
  /* Viewfinder corner accents for feature elements */
  .feature-box {
    position: relative;
    padding: 2rem 0;
  }
  
  .feature-box::before, .feature-box::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(0, 229, 255, 0.5);
    pointer-events: none;
  }
  
  .feature-box::before {
    top: 0;
    left: -20px;
    border-right: none;
    border-bottom: none;
  }
  
  .feature-box::after {
    bottom: 0;
    right: 20px;
    border-left: none;
    border-top: none;
  }
  
  .align-right .feature-box::before {
    left: auto;
    right: -20px;
    border-left: none;
    border-right: 1px solid rgba(0, 229, 255, 0.5);
  }
  
  .align-right .feature-box::after {
    right: auto;
    left: 20px;
    border-right: none;
    border-left: 1px solid rgba(0, 229, 255, 0.5);
  }
  
  /* ==========================================================================
     Responsive
     ========================================================================== */
  @media (max-width: 768px) {
    .align-left, .align-right {
      padding: 0 5vw;
      text-align: center;
      justify-content: center;
    }
    
    .section-inner, .align-right .section-inner {
      max-width: 100%;
      text-align: center;
    }
    
    .align-right .section-label {
      text-align: center;
    }
    
    .cta-group {
      flex-direction: column;
      align-items: center;
    }
    
    .email-input {
      max-width: 100%;
    }
    
    .stats-grid {
      flex-direction: column;
      gap: 3rem;
    }
  }
