:root {
  --bg: #000000;
  --bg-dark: #000000;
  --text: #f0ede8;
  --text-dim: #8a8a8a;
  --accent: #0a1628;
  --accent-light: #3b82f6;
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html { font-size: 16px; }

html, body {
  overflow-x: hidden;
  max-width: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
}

/* ── Loader ─────────────────────────────────────────── */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  transition: opacity 0.6s ease;
}
#loader.hidden { opacity: 0; pointer-events: none; }
.loader-brand {
  font-family: var(--font-mono);
  font-size: 1.2rem; font-weight: 700;
  letter-spacing: 0.15em; color: var(--accent-light);
  margin-bottom: 2rem;
}
#loader-bar {
  width: 200px; height: 2px;
  background: rgba(255,255,255,0.1);
  
}
#loader-fill {
  height: 100%; width: 0%;
  background: var(--accent-light);
  transition: width 0.1s linear;
}
#loader-percent {
  font-family: var(--font-mono);
  font-size: 0.7rem; color: var(--text-dim);
  margin-top: 0.8rem; letter-spacing: 0.1em;
}

/* ── Header ─────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100; padding: 1.2rem 3vw;
  background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 100%);
}
.site-header nav {
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 0.6rem;
}
.logo-img { width: 28px; height: 28px; filter: invert(1) brightness(2); }
.logo-text {
  font-family: var(--font-mono);
  font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.12em; color: var(--text);
}
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  color: var(--text-dim); text-decoration: none;
  font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ── Hero ───────────────────────────────────────────── */
.hero-standalone {
  position: relative; z-index: 10;
  height: 100vh; display: flex;
  flex-direction: column; justify-content: center;
  padding-left: 5vw; padding-right: 55vw;
  background: var(--bg);
}
.hero-heading {
  font-size: clamp(3rem, 10vw, 12rem);
  font-weight: 700; line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}
.hero-heading span {
  display: inline-block;
  opacity: 0; transform: translateY(40px);
}
.hero-tagline {
  font-size: clamp(0.9rem, 1.5vw, 1.2rem);
  color: var(--text-dim);
  max-width: 30ch; line-height: 1.6;
}
.scroll-indicator {
  position: absolute; bottom: 3rem; left: 5vw;
  display: flex; flex-direction: column;
  align-items: center; gap: 0.5rem;
  color: var(--text-dim); font-size: 0.65rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  font-family: var(--font-mono);
}
.scroll-arrow {
  animation: bobArrow 1.5s ease-in-out infinite;
  font-size: 0.8rem;
}
@keyframes bobArrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ── Canvas ─────────────────────────────────────────── */
.canvas-wrap {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 1;
  -webkit-mask-image: radial-gradient(circle, black 0%, transparent 0%);
  mask-image: radial-gradient(circle, black 0%, transparent 0%);
}
canvas { width: 100%; height: 100%; display: block; }

/* ── Dark overlay ───────────────────────────────────── */
#dark-overlay {
  position: fixed; inset: 0; z-index: 2;
  background: rgba(0,0,0,0.9);
  pointer-events: none; opacity: 0;
}

/* ── Marquee ────────────────────────────────────────── */
.marquee-wrap {
  position: fixed; top: 50%; left: 0;
  transform: translateY(-50%);
  z-index: 3; pointer-events: none;
  opacity: 0; width: 500vw;
}
.marquee-text {
  font-size: 14vw; font-weight: 700;
  white-space: nowrap;
  color: rgba(255,255,255,0.20);
  letter-spacing: -0.02em;
  font-family: var(--font-display);
  text-transform: uppercase;
}

/* ── Scroll container ───────────────────────────────── */
#scroll-container {
  position: relative;
  height: 430vh;
  z-index: 5;
}

/* ── Content sections ───────────────────────────────── */
.scroll-section {
  position: fixed; left: 0; right: 0;
  top: 50%; transform: translateY(calc(-50% + 100vh));
  display: flex; align-items: center;
  min-height: 100vh;
  pointer-events: none;
  opacity: 0;
  z-index: 10;
  transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.2s ease;
}
.scroll-section.visible {
  transform: translateY(-50%);
  opacity: 1;
  pointer-events: auto;
}
.scroll-section.section-above {
  transform: translateY(calc(-50% - 100vh));
}

.section-content.align-left {
  padding-left: 5vw; padding-right: 55vw;
}
.section-content.align-right {
  padding-left: 55vw; padding-right: 5vw;
}
.section-inner {
  max-width: 40vw;
  background: rgba(0, 0, 0, 0.65);
  padding: 2rem 2.5rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-left: 3px solid var(--accent-light);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 1rem;
}
.section-heading {
  font-size: clamp(1.8rem, 4vw, 4rem);
  font-weight: 700; line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}
.section-body {
  font-size: clamp(0.85rem, 1.2vw, 1.05rem);
  line-height: 1.7; color: #ccc;
  max-width: 38ch;
}

/* ── Stats ──────────────────────────────────────────── */
.section-stats {
  justify-content: center;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem; text-align: center;
  width: 80vw; margin: 0 auto;
  background: rgba(0,0,0,0.75);
  padding: 2.5rem 2rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.stat-number {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 700; color: var(--text);
  line-height: 1;
}
.stat-suffix {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2vw, 1.8rem);
  color: var(--accent-light);
  font-weight: 500;
}
.stat-label {
  display: block;
  font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim); margin-top: 0.5rem;
}
.stat-label-big {
  display: block;
  font-size: clamp(0.9rem, 1.8vw, 1.3rem);
  font-weight: 700; color: var(--text);
  letter-spacing: 0.02em;
  margin-bottom: 0.4rem;
}
.stat-desc {
  display: block;
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  color: var(--text-dim);
  line-height: 1.4;
}

/* ── CTA ────────────────────────────────────────────── */
.cta-button {
  display: inline-block;
  margin-top: 2rem; padding: 1rem 2.5rem;
  background: var(--accent-light);
  color: #fff; text-decoration: none;
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  transition: background 0.2s, transform 0.2s;
  pointer-events: auto;
}
.cta-button:hover {
  background: #2563eb;
  transform: translateY(-2px);
}

/* ── Section 002: Framework tiles ──────────────────── */
.fw-tiles {
  margin-top: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.fw-tile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.8rem;
  background: rgba(59, 130, 246, 0.07);
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 6px;
}
.fw-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-light);
  flex-shrink: 0;
  animation: fwPulse 2.2s ease-in-out infinite;
}
.fw-dot--green { background: #22c55e; }
@keyframes fwPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.fw-name {
  font-family: var(--font-mono);
  font-size: 0.72rem; font-weight: 700;
  color: var(--text);
  min-width: 7.5rem;
}
.fw-desc {
  font-size: 0.68rem;
  color: var(--text-dim);
  line-height: 1.3;
}
.hype-closer {
  margin-top: 1.1rem !important;
}
.hype-closer strong { color: var(--text); }

/* ── Section 003: Use-case grid ─────────────────────── */
.usecase-wrap {
  width: 60vw; margin: 0 auto;
  background: rgba(0,0,0,0.65);
  padding: 2.5rem 2.2rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.usecase-header { margin-bottom: 1.6rem; }
.usecase-header .section-label { margin-bottom: 0.4rem; }
.usecase-header .section-heading {
  font-size: clamp(1.4rem, 2.8vw, 2.4rem);
  margin-bottom: 0;
}
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}
.usecase-tile {
  padding: 1.2rem 1rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-top: 2px solid var(--accent-light);
  border-radius: 8px;
  transition: background 0.2s, border-top-color 0.2s;
}
.usecase-tile:hover {
  background: rgba(59,130,246,0.06);
  border-top-color: #60a5fa;
}
.uc-num {
  font-family: var(--font-mono);
  font-size: 0.6rem; font-weight: 700;
  color: var(--accent-light);
  letter-spacing: 0.1em;
  margin-bottom: 0.55rem;
}
.uc-title {
  font-size: 0.82rem; font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
  line-height: 1.3;
}
.uc-desc {
  font-size: 0.7rem;
  color: var(--text-dim);
  line-height: 1.45;
}

/* ── Section 004: 3-stappen grid ────────────────────── */
.steps-wrap {
  width: 60vw; margin: 0 auto;
  background: rgba(0,0,0,0.65);
  padding: 2.5rem 2.2rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.steps-header {
  margin-bottom: 1.8rem;
  text-align: center;
}
.steps-header .section-label { margin-bottom: 0.4rem; }
.steps-header .section-heading {
  font-size: clamp(1.4rem, 2.8vw, 2.4rem);
  margin-bottom: 0;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  position: relative;
}
.step-tile {
  padding: 2rem 1.5rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  position: relative;
}
.step-tile:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -1.1rem; top: 50%;
  transform: translateY(-50%);
  color: rgba(59,130,246,0.5);
  font-size: 1.1rem;
  z-index: 1;
}
.step-num {
  font-family: var(--font-mono);
  font-size: 2.8rem; font-weight: 700;
  color: rgba(59,130,246,0.2);
  line-height: 1; margin-bottom: 0.9rem;
}
.step-title {
  font-size: 1rem; font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
}
.step-desc {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ── Section 005: Security points ───────────────────── */
.sec-points {
  margin-top: 1.2rem;
  display: flex; flex-direction: column;
  gap: 0.5rem;
}
.sec-point {
  font-family: var(--font-mono);
  font-size: 0.72rem; color: var(--text);
  padding: 0.55rem 0.8rem;
  background: rgba(255,255,255,0.03);
  border-left: 2px solid var(--accent-light);
  border-radius: 0 4px 4px 0;
  line-height: 1.4;
}
.sec-cta-body { margin-top: 1.4rem !important; }

/* ── Lang switcher ──────────────────────────────────── */
.lang-switcher {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 2px;
  margin-left: 0.6rem;
  gap: 2px;
}
.lang-btn {
  color: rgba(255,255,255,0.28);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 4px;
  border: none;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
  line-height: 1;
}
.lang-btn:hover { color: rgba(255,255,255,0.55); }
.lang-btn.lang-active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 1px 4px rgba(59,130,246,0.4);
}

/* ── Hamburger toggle ───────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  cursor: pointer;
  padding: 7px 8px;
  z-index: 200;
}
.nav-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-standalone {
    padding: 0 6vw;
    justify-content: flex-end;
    padding-bottom: 15vh;
  }
  .hero-heading { font-size: clamp(2.5rem, 12vw, 5rem); }
  .section-content.align-left,
  .section-content.align-right {
    padding: 0 5vw;
    align-items: center;
  }
  .section-inner {
    max-width: 100%;
    background: rgba(0,0,0,0.65);
    padding: 1.8rem 1.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-left: 2px solid var(--accent-light);
  }
  .section-heading {
    font-size: clamp(1.4rem, 6vw, 2.2rem);
  }
  .section-body {
    font-size: 0.85rem;
  }
  .section-stats {
    align-items: center;
    padding: 0 4vw;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    width: 90vw; gap: 1.2rem;
    background: rgba(0,0,0,0.85);
    padding: 1.5rem;
    backdrop-filter: blur(12px);
  }
  #scroll-container { height: 520vh; }
  .marquee-text { font-size: 20vw; }
  .scroll-indicator { display: none; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: 56px; left: 0; right: 0;
    background: rgba(0,0,0,0.97);
    padding: 1.2rem 6vw 1.6rem;
    flex-direction: column;
    gap: 0.6rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 150;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    font-size: 1rem;
    letter-spacing: 0.04em;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: var(--text);
  }
  .nav-links a:last-child { border-bottom: none; }

  .usecase-wrap,
  .steps-wrap {
    width: 92vw;
    padding: 1.8rem 1.2rem;
  }
  .usecase-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7rem;
  }
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .step-tile:not(:last-child)::after { display: none; }
  .fw-name { min-width: auto; }
  .fw-desc { display: none; }
}

/* ── Reduced motion accessibility ───────────────────── */
@media (prefers-reduced-motion: reduce) {
  .scroll-section {
    transition: opacity 0.2s ease;
    transform: translateY(-50%) !important;
  }
  .scroll-section.visible { opacity: 1; }
  .scroll-section:not(.visible) { opacity: 0; }
}
