/* ============================================
   VAN ELSEN AI — Automate Everything
   Dark cinematic aesthetic with electric blue
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Outfit:wght@300;400;500;600&display=swap');

:root {
  --bg-dark: #0a0a0f;
  --bg-deeper: #06060a;
  --bg-card: #111118;
  --accent-cyan: #00d4ff;
  --accent-blue: #3b82f6;
  --accent-gold: #f0a830;
  --text-primary: #eeeef0;
  --text-secondary: #8a8a9a;
  --text-muted: #55556a;
  --font-display: 'Syne', sans-serif;
  --font-body: 'Outfit', sans-serif;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  max-width: 100vw;
}

::selection {
  background: var(--accent-cyan);
  color: var(--bg-dark);
}

/* ============================================
   LOADER
   ============================================ */

#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-deeper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--text-primary);
}

.loader-track {
  width: 200px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 1px;
  overflow: hidden;
}

#loader-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-cyan);
  border-radius: 1px;
  transition: width 0.1s linear;
}

#loader-percent {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 3vw;
  mix-blend-mode: difference;
}

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

.logo {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.25em;
  color: var(--text-primary);
  text-decoration: none;
}

.logo-ai {
  color: var(--accent-cyan);
  margin-left: 0.15em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.nav-cta {
  padding: 0.5rem 1.4rem;
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan) !important;
  font-weight: 500 !important;
  transition: background 0.3s ease, color 0.3s ease !important;
}

.nav-cta:hover {
  background: var(--accent-cyan);
  color: var(--bg-dark) !important;
}

/* ============================================
   HERO
   ============================================ */

.hero-standalone {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg-deeper);
  z-index: 10;
  overflow: clip;
}

.hero-standalone::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 30% 60%, rgba(0, 212, 255, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 70% 40%, rgba(59, 130, 246, 0.03) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  padding-left: 8vw;
  padding-right: 5vw;
  max-width: 100%;
  position: relative;
  z-index: 2;
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 10rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin: 1.2rem 0 1.5rem;
}

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

.hero-heading .dot {
  color: var(--accent-cyan);
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.8vw, 1.4rem);
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 500px;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(30px);
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeInUp 1s ease 2s forwards;
}

.scroll-indicator svg {
  animation: bobDown 2s ease-in-out infinite;
}

@keyframes fadeInUp {
  to { opacity: 0.6; }
}

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

/* ============================================
   CANVAS
   ============================================ */

.canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 1;
  clip-path: circle(0% at 50% 50%);
}

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

/* ============================================
   DARK OVERLAY
   ============================================ */

#dark-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-deeper);
  z-index: 2;
  pointer-events: none;
  opacity: 0;
}

/* ============================================
   MARQUEE
   ============================================ */

.marquee-wrap {
  position: fixed;
  z-index: 3;
  width: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow: hidden;
}

#marquee-1 {
  top: 15%;
}

#marquee-2 {
  bottom: 12%;
}

.marquee-text {
  font-family: var(--font-display);
  font-size: clamp(6rem, 12vw, 14vw);
  font-weight: 800;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 212, 255, 0.15);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
}

/* ============================================
   SCROLL CONTAINER
   ============================================ */

#scroll-container {
  position: relative;
  width: 100%;
  height: 1100vh;
  z-index: 5;
}

/* ============================================
   SECTIONS
   ============================================ */

.scroll-section {
  position: absolute;
  width: 100%;
  pointer-events: none;
  opacity: 0;
}

.section-content {
  display: flex;
  align-items: center;
  min-height: 60vh;
}

.align-left {
  padding-left: 5vw;
  padding-right: 55vw;
  justify-content: flex-start;
}

.align-right {
  padding-left: 55vw;
  padding-right: 5vw;
  justify-content: flex-end;
}

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

.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.2rem;
}

.section-body {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.1vw, 1.15rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 460px;
}

/* ============================================
   STATS
   ============================================ */

.section-stats {
  display: flex;
  align-items: center;
  justify-content: 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(3rem, 5vw, 5rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-suffix {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  font-weight: 700;
  color: var(--accent-cyan);
  display: inline;
  margin-left: 0.1em;
}

.stat .stat-number,
.stat .stat-suffix {
  display: inline;
}

.stat-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.8rem;
  max-width: 180px;
}

/* ============================================
   CTA
   ============================================ */

.section-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.cta-inner {
  max-width: 600px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-heading {
  text-align: center;
}

.cta-button {
  display: inline-block;
  margin-top: 2rem;
  padding: 1rem 3rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--bg-dark);
  background: var(--accent-cyan);
  text-decoration: none;
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.3);
}

.cta-button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.cta-button:hover::after {
  transform: translateX(100%);
}

/* ============================================
   LOGO GRID FOOTER
   ============================================ */

.logo-grid-footer {
  position: relative;
  z-index: 10;
  background: var(--bg-deeper);
  padding: 6rem 5vw 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.logo-grid-header {
  text-align: center;
  margin-bottom: 4rem;
}

.logo-grid-header .section-label {
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 1.2rem 0.5rem;
  opacity: 0.4;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.logo-item:hover {
  opacity: 1;
  transform: translateY(-4px);
}

.logo-item img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.logo-item span {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  text-align: center;
  white-space: nowrap;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.25em;
  color: var(--text-primary);
}

.footer-tagline {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* ============================================
   NOISE GRAIN OVERLAY
   ============================================ */

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

/* ============================================
   MOBILE (<768px)
   ============================================ */

@media (max-width: 768px) {
  .hero-content {
    padding-left: 6vw;
    padding-right: 6vw;
    max-width: 100vw;
  }

  .hero-heading {
    font-size: clamp(2.2rem, 10vw, 5rem);
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .nav-links {
    gap: 0.8rem;
  }

  .nav-links a {
    font-size: 0.65rem;
  }

  .nav-cta {
    padding: 0.4rem 0.8rem !important;
  }

  .site-header {
    padding: 1rem 3vw;
  }

  #scroll-container {
    height: 700vh;
  }

  .logo-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 1rem;
  }

  .logo-grid-footer {
    padding: 4rem 4vw 3rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .align-left,
  .align-right {
    padding-left: 6vw;
    padding-right: 6vw;
    justify-content: flex-start;
  }

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

  .section-heading {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .stats-grid {
    flex-direction: column;
    gap: 2.5rem;
  }

  .marquee-text {
    font-size: 15vw;
  }

  .site-header {
    padding: 1rem 4vw;
  }
}
