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

/* ---- Dark theme (default) ---- */
:root {
  --bg: #07090f;
  --bg-card: #0d1117;
  --bg-card-hover: #161b22;
  --surface: #1c2333;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --text: #e2e8f0;
  --text-muted: #8b95a5;
  --text-strong: #ffffff;
  --primary: #818cf8;
  --primary-glow: rgba(129,140,248,0.2);
  --accent-pink: #f472b6;
  --accent-amber: #fbbf24;
  --accent-green: #34d399;
  --accent-red: #f87171;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow-card: 0 16px 48px rgba(0,0,0,0.3);
  --nav-bg: rgba(7,9,15,0.82);
  --nav-mobile-bg: rgba(7,9,15,0.97);
  --hero-float-bg: rgba(17, 24, 39, 0.8);
  --envelope-line: rgba(255,255,255,0.08);
  --grid-line: rgba(255,255,255,0.02);
  --card-subtle-bg: rgba(255,255,255,0.02);
  --card-subtle-bg-hover: rgba(255,255,255,0.04);
  --stat-icon-bg: rgba(255,255,255,0.04);
  --tag-bg: rgba(129,140,248,0.08);
  --tag-border: rgba(129,140,248,0.1);
  color-scheme: dark;
}

/* ---- Light theme ---- */
[data-theme="light"] {
  --bg: #f8f9fc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f3f8;
  --surface: #e8ebf0;
  --border: rgba(0,0,0,0.08);
  --border-hover: rgba(0,0,0,0.15);
  --text: #1e293b;
  --text-muted: #64748b;
  --text-strong: #0f172a;
  --primary: #6366f1;
  --primary-glow: rgba(99,102,241,0.15);
  --accent-pink: #ec4899;
  --accent-amber: #d97706;
  --accent-green: #059669;
  --accent-red: #dc2626;
  --shadow-card: 0 8px 32px rgba(0,0,0,0.08);
  --nav-bg: rgba(248,249,252,0.85);
  --nav-mobile-bg: rgba(248,249,252,0.97);
  --hero-float-bg: rgba(255,255,255,0.85);
  --envelope-line: rgba(0,0,0,0.08);
  --grid-line: rgba(0,0,0,0.03);
  --card-subtle-bg: rgba(0,0,0,0.02);
  --card-subtle-bg-hover: rgba(0,0,0,0.04);
  --stat-icon-bg: rgba(0,0,0,0.04);
  --tag-bg: rgba(99,102,241,0.06);
  --tag-border: rgba(99,102,241,0.12);
  color-scheme: light;
}

/* Auto-detect system preference when no manual override */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f8f9fc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f3f8;
    --surface: #e8ebf0;
    --border: rgba(0,0,0,0.08);
    --border-hover: rgba(0,0,0,0.15);
    --text: #1e293b;
    --text-muted: #64748b;
    --text-strong: #0f172a;
    --primary: #6366f1;
    --primary-glow: rgba(99,102,241,0.15);
    --accent-pink: #ec4899;
    --accent-amber: #d97706;
    --accent-green: #059669;
    --accent-red: #dc2626;
    --shadow-card: 0 8px 32px rgba(0,0,0,0.08);
    --nav-bg: rgba(248,249,252,0.85);
    --nav-mobile-bg: rgba(248,249,252,0.97);
    --hero-float-bg: rgba(255,255,255,0.85);
    --envelope-line: rgba(0,0,0,0.08);
    --grid-line: rgba(0,0,0,0.03);
    --card-subtle-bg: rgba(0,0,0,0.02);
    --card-subtle-bg-hover: rgba(0,0,0,0.04);
    --stat-icon-bg: rgba(0,0,0,0.04);
    --tag-bg: rgba(99,102,241,0.06);
    --tag-border: rgba(99,102,241,0.12);
    color-scheme: light;
  }
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

img, svg { display: block; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color .2s;
}

a:hover { color: color-mix(in srgb, var(--primary) 70%, var(--text-strong)); }

strong { font-weight: 600; }

/* ===========================
   SCROLL REVEAL ANIMATIONS
   =========================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===========================
   NAVBAR
   =========================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 18px 0;
  transition: background .35s, box-shadow .35s, padding .35s;
}

.navbar.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 1px 0 var(--border), 0 4px 24px rgba(0,0,0,0.08);
  padding: 12px 0;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-strong);
  font-weight: 700;
  font-size: 18px;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo svg { flex-shrink: 0; }

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

.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color .2s;
  position: relative;
}

.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  transition: width 0.3s;
}

.nav-links a:not(.btn):hover::after { width: 100%; }
.nav-links a:hover { color: var(--text-strong); }

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-strong);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

.mobile-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===========================
   BUTTONS
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  transition: all .3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: none;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: 12px;
}

.btn-primary {
  background: linear-gradient(135deg, #818cf8, #6366f1);
  color: #fff;
  box-shadow: 0 0 20px var(--primary-glow), 0 2px 8px rgba(99,102,241,0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #a5b4fc, #818cf8);
  color: #fff;
  box-shadow: 0 0 40px rgba(99,102,241,0.4), 0 4px 16px rgba(99,102,241,0.3);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: var(--card-subtle-bg);
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: var(--card-subtle-bg-hover);
  border-color: var(--border-hover);
  color: var(--text-strong);
  transform: translateY(-2px);
}

.btn-nav {
  background: linear-gradient(135deg, #818cf8, #6366f1);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  gap: 6px;
}

.btn-nav:hover {
  background: linear-gradient(135deg, #a5b4fc, #818cf8);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}

/* ===========================
   HERO
   =========================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 160px 0 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}

.hero-gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform;
}

.orb-1 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(129,140,248,0.18), transparent 70%);
  top: -200px;
  right: -150px;
  animation: orbFloat 20s ease-in-out infinite;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(244,114,182,0.1), transparent 70%);
  bottom: -100px;
  left: -100px;
  animation: orbFloat 25s ease-in-out infinite reverse;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(251,191,36,0.06), transparent 70%);
  top: 40%;
  left: 40%;
  animation: orbFloat 18s ease-in-out infinite 5s;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(ellipse at center, rgba(129,140,248,0.04) 0%, transparent 60%);
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(129,140,248,0.1);
  color: var(--primary);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 28px;
  border: 1px solid rgba(129,140,248,0.15);
  backdrop-filter: blur(8px);
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-strong);
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 40%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.8;
}

.hero-sub strong {
  color: var(--text-strong);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* Trust indicators */
.hero-trust {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trust-avatars {
  display: flex;
}

.trust-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: -8px;
}

.trust-avatar {
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  color: var(--bg);
}

.trust-avatar svg { color: var(--bg); }

.trust-avatar:nth-child(1) { background: var(--primary); z-index: 3; }
.trust-avatar:nth-child(2) { background: var(--accent-pink); z-index: 2; }
.trust-avatar:nth-child(3) { background: var(--accent-amber); z-index: 1; }

.trust-text {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Hero visual / illustration */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-illustration-wrap {
  position: relative;
  width: 420px;
  height: 400px;
}

.hero-float-card {
  position: absolute;
  background: var(--hero-float-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
}

.main-envelope {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: floatMain 6s ease-in-out infinite;
  z-index: 5;
}

.envelope-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.envelope-lines span {
  height: 3px;
  background: var(--envelope-line);
  border-radius: 2px;
  width: 100%;
}

@keyframes floatMain {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-10px); }
}

.hero-float-badge {
  position: absolute;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid;
  backdrop-filter: blur(8px);
  z-index: 4;
}

.badge-com {
  top: 12%;
  left: 15%;
  background: rgba(99,102,241,0.15);
  border-color: rgba(129,140,248,0.3);
  color: #c7d2fe;
  animation: floatBadge 5s ease-in-out infinite;
}

.badge-io {
  bottom: 18%;
  right: 8%;
  background: rgba(244,63,94,0.12);
  border-color: rgba(251,113,133,0.3);
  color: #fda4af;
  font-size: 12px;
  animation: floatBadge 6s ease-in-out infinite 1s;
}

.badge-ai {
  bottom: 25%;
  left: 5%;
  background: rgba(52,211,153,0.12);
  border-color: rgba(110,231,183,0.3);
  color: #a7f3d0;
  font-size: 12px;
  animation: floatBadge 7s ease-in-out infinite 0.5s;
}

.badge-dev {
  top: 18%;
  right: 10%;
  background: rgba(251,191,36,0.12);
  border-color: rgba(251,191,36,0.3);
  color: #fde68a;
  font-size: 11px;
  animation: floatBadge 5.5s ease-in-out infinite 1.5s;
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.drift-arrows {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.drift-arrows path {
  stroke-dashoffset: 0;
  animation: dashFlow 3s linear infinite;
}

@keyframes dashFlow {
  to { stroke-dashoffset: -20; }
}

.hero-at-symbol {
  position: absolute;
  top: 8%;
  right: 30%;
  font-size: 32px;
  font-weight: 800;
  color: #fbbf24;
  opacity: 0.6;
  animation: floatBadge 4s ease-in-out infinite 2s;
  z-index: 3;
}

.warning-card {
  bottom: 8%;
  right: 15%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-color: rgba(248,113,113,0.2);
  animation: floatBadge 5s ease-in-out infinite 0.8s;
  z-index: 6;
}

.warning-card span {
  font-size: 12px;
  font-weight: 600;
  color: #fca5a5;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  animation: scrollBounce 2s ease-in-out infinite;
  opacity: 0.5;
}

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

/* ===========================
   STATS BAR
   =========================== */
.stats-bar {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 56px 0;
  position: relative;
}

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

.stat-item {
  text-align: center;
  flex: 1;
  padding: 0 24px;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--stat-icon-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.stat-number {
  display: block;
  font-size: 40px;
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.5;
}

.stat-divider {
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, transparent, var(--border), transparent);
  flex-shrink: 0;
}

/* ===========================
   SECTIONS
   =========================== */
.section {
  padding: 120px 0;
  position: relative;
}

.section-dark {
  background: var(--bg-card);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 72px;
}

.section-tag {
  display: inline-block;
  padding: 5px 16px;
  background: var(--tag-bg);
  color: var(--primary);
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  border: 1px solid var(--tag-border);
}

.tag-pink {
  background: rgba(244,114,182,0.08);
  color: var(--accent-pink);
  border-color: rgba(244,114,182,0.1);
}

.tag-green {
  background: rgba(52,211,153,0.08);
  color: var(--accent-green);
  border-color: rgba(52,211,153,0.1);
}

.section-header h2 {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  color: var(--text-strong);
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.section-sub {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ===========================
   FEATURE CARDS (Overview)
   =========================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all .4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}

.feature-card:hover::before { opacity: 1; }

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  position: relative;
  z-index: 1;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* ===========================
   EVIDENCE CARDS
   =========================== */
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.evidence-card {
  background: var(--card-subtle-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: all .4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.evidence-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent, #818cf8), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.evidence-card:hover::before { opacity: 1; }

.evidence-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
  border-color: var(--border-hover);
}

.evidence-icon {
  margin: 0 auto 16px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
}

.evidence-stat {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-strong);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.evidence-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.evidence-card p strong {
  color: var(--text);
}

.evidence-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.evidence-bar-fill {
  height: 100%;
  width: 0;
  background: var(--color);
  border-radius: 2px;
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===========================
   FRAMEWORK - TWO-COLUMN LAYOUT
   =========================== */
.framework-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 80px;
  align-items: start;
  max-width: 960px;
  margin: 0 auto;
}

.fw-layer-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 120px;
}

.fw-layer {
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--layer-color) 20%, transparent);
  background: color-mix(in srgb, var(--layer-color) 6%, transparent);
  padding: 14px 18px;
  transition: all 0.3s;
}

.fw-layer:hover {
  background: color-mix(in srgb, var(--layer-color) 12%, transparent);
  border-color: color-mix(in srgb, var(--layer-color) 35%, transparent);
  transform: translateX(4px);
}

.fw-layer-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--layer-color);
  font-weight: 600;
  font-size: 14px;
}

.framework-details {
  display: flex;
  flex-direction: column;
}

.framework-item {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 0 0 40px 0;
  position: relative;
}

.framework-item:last-child { padding-bottom: 0; }

.framework-item::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 48px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--border), transparent);
}

.framework-item:last-child::before { display: none; }

.fw-number {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(129,140,248,0.08);
  border: 1px solid rgba(129,140,248,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
  position: relative;
  z-index: 2;
}

.fw-content h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 6px;
  margin-top: 2px;
}

.fw-content p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===========================
   CONTROLS GRID
   =========================== */
.controls-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.control-card {
  background: var(--card-subtle-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  transition: all .4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.control-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--card-accent);
  border-radius: 0 2px 2px 0;
  transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.control-card:hover::before { height: 100%; }

.control-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
  border-color: color-mix(in srgb, var(--card-accent) 20%, transparent);
}

.control-number {
  font-size: 12px;
  font-weight: 700;
  color: var(--card-accent);
  opacity: 0.5;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.control-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--card-accent) 8%, transparent);
  color: var(--card-accent);
  margin-bottom: 20px;
}

.control-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 10px;
}

.control-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===========================
   CTA SECTION
   =========================== */
.cta-section {
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}

.cta-card {
  position: relative;
  background: linear-gradient(135deg, rgba(129,140,248,0.08), rgba(244,114,182,0.04));
  border: 1px solid rgba(129,140,248,0.15);
  border-radius: 24px;
  overflow: hidden;
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
}

.cta-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(129,140,248,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(244,114,182,0.06) 0%, transparent 50%);
}

.cta-inner {
  position: relative;
  padding: 72px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}

.cta-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: rgba(129,140,248,0.08);
  border: 1px solid rgba(129,140,248,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 8px;
}

.cta-inner h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.cta-inner p {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 8px;
}

/* ===========================
   FOOTER
   =========================== */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text-strong); }

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
  opacity: 0.6;
}

.footer-sponsor {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 12px 0 0;
  margin-top: 16px;
  border-top: 1px solid var(--border);
}

.footer-sponsor a {
  color: var(--text-muted);
  font-weight: 600;
}

.footer-sponsor a:hover {
  color: var(--primary);
}

/* ===========================
   THEME TOGGLE
   =========================== */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card-subtle-bg);
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  color: var(--text-strong);
  border-color: var(--border-hover);
  background: var(--card-subtle-bg-hover);
  transform: scale(1.05);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s;
  position: absolute;
}

/* Sun icon (shown in dark mode) */
.theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

/* Light mode: show moon, hide sun */
[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

[data-theme="light"] .theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Auto light (system preference) */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
  }
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

/* ===========================
   HERO — BASE BACKGROUND (photo + overlay handle the visuals)
   =========================== */
.hero {
  background: #07090f; /* dark fallback while photo loads */
}

[data-theme="light"] .hero {
  background: #f4f0ff; /* light fallback */
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .hero {
    background: #f4f0ff;
  }
}

/* ===========================
   AURORA BLOBS (parallax depth layers)
   =========================== */
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}

.aurora-1 {
  width: 1100px;
  height: 750px;
  background: radial-gradient(ellipse at 40% 38%, rgba(99,102,241,0.24) 0%, rgba(139,92,246,0.1) 35%, transparent 68%);
  filter: blur(90px);
  top: -250px;
  right: -350px;
}

.aurora-2 {
  width: 900px;
  height: 900px;
  background: radial-gradient(ellipse at 58% 55%, rgba(168,85,247,0.19) 0%, rgba(99,102,241,0.07) 35%, transparent 68%);
  filter: blur(110px);
  bottom: -350px;
  left: -220px;
}

.aurora-3 {
  width: 650px;
  height: 550px;
  background: radial-gradient(ellipse at 50% 50%, rgba(236,72,153,0.14) 0%, transparent 68%);
  filter: blur(100px);
  top: 25%;
  right: 18%;
}

/* ===========================
   HERO + CTA — PHOTO BACKGROUNDS
   =========================== */

/* Hero: dark server-room photo, oversized so parallax reveals fresh edges */
.hero-photo-bg {
  position: absolute;
  inset: -200px;
  background-image: url('https://images.unsplash.com/photo-1558494949-ef010cbdcc31?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center 40%;
  opacity: 0.62;
  pointer-events: none;
  z-index: 0;
}

/* Hero overlay: darkening + colour gradients layered on top of photo */
.hero-photo-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 110% 70% at 62% -8%,  rgba(99,102,241,0.38) 0%, transparent 52%),
    radial-gradient(ellipse 80%  75% at -10% 108%, rgba(139,92,246,0.28) 0%, transparent 52%),
    radial-gradient(ellipse 55%  45% at 106%  68%, rgba(236,72,153,0.15) 0%, transparent 52%),
    radial-gradient(ellipse 65%  55% at 48%  120%, rgba(56,189,248,0.08) 0%, transparent 52%),
    linear-gradient(168deg, rgba(1,2,7,0.74) 0%, rgba(5,8,16,0.66) 30%, rgba(5,8,13,0.70) 60%, rgba(7,5,16,0.74) 100%);
}

/* CTA: fiber-optic photo, slight bleed for parallax movement */
.cta-photo-bg {
  position: absolute;
  inset: -80px;
  background-image: url('https://images.unsplash.com/photo-1544197150-b99a580bb7a8?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  opacity: 0.52;
  pointer-events: none;
  z-index: 0;
}

.cta-photo-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 100% at 50% 50%, rgba(129,140,248,0.18) 0%, transparent 65%),
    linear-gradient(to bottom, rgba(7,9,15,0.78) 0%, rgba(7,9,15,0.50) 45%, rgba(7,9,15,0.78) 100%);
}

/* Raise container + card above the photo layers */
.cta-section .container {
  position: relative;
  z-index: 2;
}

/* Light mode — photos nearly invisible; overlays carry the light palette */
[data-theme="light"] .hero-photo-bg  { opacity: 0.06; }
[data-theme="light"] .hero-photo-overlay {
  background:
    radial-gradient(ellipse 110% 70% at 62% -8%,  rgba(99,102,241,0.22) 0%, transparent 52%),
    radial-gradient(ellipse 80%  75% at -10% 108%, rgba(139,92,246,0.16) 0%, transparent 52%),
    radial-gradient(ellipse 55%  45% at 106%  68%, rgba(236,72,153,0.10) 0%, transparent 52%),
    linear-gradient(168deg, rgba(238,240,255,0.95) 0%, rgba(244,240,255,0.95) 35%, rgba(253,242,249,0.95) 65%, rgba(238,244,255,0.95) 100%);
}

[data-theme="light"] .cta-photo-bg { opacity: 0.05; }
[data-theme="light"] .cta-photo-overlay {
  background:
    radial-gradient(ellipse 100% 100% at 50% 50%, rgba(99,102,241,0.10) 0%, transparent 65%),
    linear-gradient(to bottom, rgba(248,249,252,0.96) 0%, rgba(248,249,252,0.84) 45%, rgba(248,249,252,0.96) 100%);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .hero-photo-bg  { opacity: 0.06; }
  :root:not([data-theme="dark"]) .hero-photo-overlay {
    background:
      radial-gradient(ellipse 110% 70% at 62% -8%,  rgba(99,102,241,0.22) 0%, transparent 52%),
      radial-gradient(ellipse 80%  75% at -10% 108%, rgba(139,92,246,0.16) 0%, transparent 52%),
      radial-gradient(ellipse 55%  45% at 106%  68%, rgba(236,72,153,0.10) 0%, transparent 52%),
      linear-gradient(168deg, rgba(238,240,255,0.95) 0%, rgba(244,240,255,0.95) 35%, rgba(253,242,249,0.95) 65%, rgba(238,244,255,0.95) 100%);
  }
  :root:not([data-theme="dark"]) .cta-photo-bg  { opacity: 0.05; }
  :root:not([data-theme="dark"]) .cta-photo-overlay {
    background:
      radial-gradient(ellipse 100% 100% at 50% 50%, rgba(99,102,241,0.10) 0%, transparent 65%),
      linear-gradient(to bottom, rgba(248,249,252,0.96) 0%, rgba(248,249,252,0.84) 45%, rgba(248,249,252,0.96) 100%);
  }
}

/* ===========================
   SECTION — GRADIENT PHOTO BACKGROUNDS
   =========================== */
#overview {
  background:
    radial-gradient(ellipse 65% 60% at 96% 6%, rgba(129,140,248,0.07) 0%, transparent 55%),
    radial-gradient(ellipse 55% 65% at 2% 96%, rgba(52,211,153,0.05) 0%, transparent 55%),
    var(--bg);
}

#evidence {
  background:
    radial-gradient(ellipse 85% 55% at 8% 18%, rgba(99,102,241,0.13) 0%, transparent 55%),
    radial-gradient(ellipse 65% 70% at 92% 88%, rgba(244,114,182,0.08) 0%, transparent 55%),
    radial-gradient(ellipse 45% 45% at 50% 50%, rgba(56,189,248,0.04) 0%, transparent 55%),
    var(--bg-card);
}

#framework {
  background:
    radial-gradient(ellipse 70% 55% at 100% 28%, rgba(251,191,36,0.07) 0%, transparent 55%),
    radial-gradient(ellipse 55% 65% at 3% 78%, rgba(129,140,248,0.08) 0%, transparent 55%),
    var(--bg);
}

#controls {
  background:
    radial-gradient(ellipse 70% 55% at 88% 8%, rgba(52,211,153,0.1) 0%, transparent 55%),
    radial-gradient(ellipse 55% 65% at 4% 82%, rgba(56,189,248,0.07) 0%, transparent 55%),
    var(--bg-card);
}

.cta-section {
  background: var(--bg); /* fallback; photo + overlay handle the visuals */
}

.stats-bar {
  background:
    radial-gradient(ellipse 80% 100% at 50% -10%, rgba(129,140,248,0.06) 0%, transparent 60%),
    var(--bg-card);
}

/* ===========================
   GRAIN OVERLAY (photographic texture)
   =========================== */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.038;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

[data-theme="light"] .grain-overlay {
  opacity: 0.022;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .grain-overlay {
    opacity: 0.022;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-parallax] {
    will-change: auto;
    transform: none !important;
  }
}

/* Theme transition */
html.theme-transitioning,
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
  transition-duration: 0.4s !important;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .evidence-grid { grid-template-columns: repeat(3, 1fr); }
  .framework-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .fw-layer-stack {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .fw-layer { flex: 1; min-width: 120px; }
}

@media (max-width: 768px) {
  .mobile-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--nav-mobile-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 32px 32px;
    gap: 24px;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 1px solid var(--border);
    z-index: 200;
  }

  .nav-links.open { transform: translateX(0); }

  .nav-links a:not(.btn)::after { display: none; }

  .hero { padding: 120px 0 60px; min-height: auto; }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-trust { justify-content: center; }
  .hero-visual { order: -1; }

  .hero-illustration-wrap {
    width: 320px;
    height: 300px;
  }

  .hero-scroll-indicator { display: none; }

  .stats-grid {
    flex-direction: column;
    gap: 32px;
  }

  .stat-divider {
    width: 48px;
    height: 1px;
    background: var(--border);
  }

  .section { padding: 80px 0; }

  .features-grid { grid-template-columns: 1fr; }
  .evidence-grid { grid-template-columns: 1fr; }
  .controls-grid { grid-template-columns: 1fr; }

  .fw-layer-stack { flex-direction: column; }
  .fw-layer { flex: auto; }

  .framework-item { gap: 16px; }
  .fw-number { width: 36px; height: 36px; font-size: 11px; border-radius: 10px; }

  .cta-inner {
    padding: 48px 28px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-links { gap: 20px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 30px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn-lg { justify-content: center; }

  .hero-illustration-wrap {
    width: 280px;
    height: 260px;
  }

  .hero-float-badge { font-size: 11px; padding: 6px 12px; }
  .hero-at-symbol { font-size: 24px; }
  .main-envelope { padding: 16px 20px; }
  .main-envelope svg { width: 36px; height: 36px; }
}
