/* ================================================================
   ALF — alf.capital
   Design System & Layout Styles
   ================================================================ */

/* ----------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   ---------------------------------------------------------------- */
:root {
  --bg-primary:    #0F172A;
  --bg-secondary:  #1E293B;
  --bg-deep:       #0A0F1A;
  --text-primary:  #F8FAFC;
  --text-secondary:#94A3B8;
  --text-muted:    #64748B;
  --accent:        #0EA5E9;
  --accent-alt:    #F59E0B;
  --card-bg:       rgba(255, 255, 255, 0.04);
  --card-border:   rgba(255, 255, 255, 0.08);

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 12px;

  --max-width: 1200px;
  --section-pad: 100px;
  --section-pad-sm: 64px;
}

/* ----------------------------------------------------------------
   Reset & Base
   ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grain texture overlay — barely visible, adds perceived depth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ----------------------------------------------------------------
   Layout Utilities
   ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-centered {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

/* ----------------------------------------------------------------
   Background Variants
   ---------------------------------------------------------------- */
.bg-primary   { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-deep      { background-color: var(--bg-deep); }
.bg-gradient  { background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%); }
.bg-cta       { background: linear-gradient(135deg, rgba(14,165,233,0.08) 0%, var(--bg-primary) 60%); }

/* ----------------------------------------------------------------
   Typography
   ---------------------------------------------------------------- */
.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.section-headline {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 28px;
}

.section-headline-center {
  text-align: center;
  margin-bottom: 48px;
}

.subsection-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.subsection-intro {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 17px;
}

p { color: var(--text-secondary); line-height: 1.75; }
p + p { margin-top: 16px; }

/* ----------------------------------------------------------------
   Buttons
   ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  transition: all 150ms ease;
  cursor: pointer;
  white-space: nowrap;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background-color: #38BDF8;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.35);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--card-border);
}
.btn-ghost:hover {
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.18);
  background: var(--card-bg);
}

.btn-sm  { padding: 8px 16px; font-size: 13px; }
.btn-lg  { padding: 14px 28px; font-size: 16px; }
.btn-xl  { padding: 18px 40px; font-size: 17px; }
.btn-full { width: 100%; justify-content: center; }

/* ----------------------------------------------------------------
   Navigation
   ---------------------------------------------------------------- */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background-color 250ms ease, backdrop-filter 250ms ease, border-color 250ms ease;
  border-bottom: 1px solid transparent;
}

#nav.scrolled {
  background-color: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--card-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

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

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 150ms ease;
}
.nav-link:hover { color: var(--text-primary); }

.nav-cta { margin-left: auto; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  transition: all 200ms ease;
  border-radius: 2px;
  transform-origin: center;
}

/* Hamburger → X when active */
.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav menu */
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px 24px 24px;
  background-color: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--card-border);
}
.nav-mobile.open { display: flex; }

.nav-mobile-link {
  padding: 10px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--card-border);
  transition: color 150ms ease;
}
.nav-mobile-link:hover { color: var(--text-primary); }
.nav-mobile .btn { margin-top: 12px; }

/* ----------------------------------------------------------------
   Section Spacing
   ---------------------------------------------------------------- */
section {
  padding: var(--section-pad) 0;
}
#hero { padding: 0; }

/* ----------------------------------------------------------------
   HERO
   ---------------------------------------------------------------- */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Radial accent glow behind hero content */
#hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 70%;
  height: 100%;
  background: radial-gradient(ellipse at 20% 55%, rgba(14,165,233,0.11) 0%, transparent 62%);
  pointer-events: none;
  z-index: 0;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 120px 24px 80px;
  max-width: 800px;
}

.hero-headline {
  font-size: clamp(38px, 5.5vw, 64px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  background: linear-gradient(140deg, #F8FAFC 35%, #7DD3FC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 20px;
  line-height: 1.65;
}

.hero-anchor {
  font-size: 15px;
  color: #CBD5E1;
  max-width: 560px;
  margin-bottom: 40px;
  font-style: italic;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ----------------------------------------------------------------
   PROBLEM
   ---------------------------------------------------------------- */
#problem {
  padding: var(--section-pad) 0;
}

.problem-body {
  max-width: 680px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.8;
}

.problem-body p {
  color: var(--text-secondary);
}

/* ----------------------------------------------------------------
   WHAT ALF DOES — two-column
   ---------------------------------------------------------------- */
.two-col-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

.two-col-copy {
  padding-top: 16px;
}

.body-stack p { color: var(--text-secondary); font-size: 16px; }

.two-col-diagram {
  display: flex;
  justify-content: center;
}

.pipeline-svg {
  width: 100%;
  max-width: 320px;
}

/* Pipeline node animation */
.pipeline-node {
  opacity: 0;
  transition: opacity 400ms ease-out;
}
.pipeline-arrow {
  opacity: 0;
  transition: opacity 300ms ease-out;
}
.pipeline-svg.visible .pipeline-node,
.pipeline-svg.visible .pipeline-arrow {
  opacity: 1;
}
/* nth-of-type targets <g> elements specifically (ignores <defs>, <line>) */
.pipeline-svg.visible .pipeline-node:nth-of-type(1) { transition-delay: 0ms; }
.pipeline-svg.visible .pipeline-node:nth-of-type(2) { transition-delay: 150ms; }
.pipeline-svg.visible .pipeline-node:nth-of-type(3) { transition-delay: 300ms; }
.pipeline-svg.visible .pipeline-node:nth-of-type(4) { transition-delay: 450ms; }
.pipeline-svg.visible .pipeline-node:nth-of-type(5) { transition-delay: 600ms; }
.pipeline-svg.visible .pipeline-node:nth-of-type(6) { transition-delay: 750ms; }
.pipeline-svg.visible .pipeline-node:nth-of-type(7) { transition-delay: 900ms; }
.pipeline-svg.visible .pipeline-node:nth-of-type(8) { transition-delay: 1050ms; }
.pipeline-svg.visible .pipeline-arrow { transition-delay: 200ms; }

/* ----------------------------------------------------------------
   FIVE PILLARS
   ---------------------------------------------------------------- */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.pillar-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.pillar-card:hover {
  transform: translateY(-3px);
  border-color: rgba(14, 165, 233, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.pillar-icon {
  color: var(--accent);
  margin-bottom: 16px;
}

.pillar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.3;
}

.pillar-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ----------------------------------------------------------------
   ALF FRAMEWORK + VERIFIABLE
   ---------------------------------------------------------------- */
.framework-header { margin-bottom: 40px; }

.framework-subsection { margin-bottom: 48px; }

.governance-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}

.governance-item {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--card-border);
  border-right: 1px solid var(--card-border);
  align-items: baseline;
}
.governance-item:nth-child(even) { border-right: none; }
.governance-item:last-child { border-bottom: none; }
.governance-item:last-child:nth-child(odd) {
  border-right: none;
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.governance-pillar {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  min-width: 120px;
}

.governance-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.framework-statement {
  font-size: 16px;
  color: var(--text-secondary);
  font-style: italic;
  padding: 16px 20px;
  border-left: 2px solid var(--accent);
}

.framework-divider {
  width: 40%;
  height: 1px;
  background: var(--accent);
  opacity: 0.3;
  margin: 48px auto;
}

/* VERIFIABLE */
.verifiable-section { margin-top: 0; }

.verifiable-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  margin-top: 32px;
}

.verifiable-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 300ms ease-out, transform 300ms ease-out;
}

.verifiable-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

.v-letter {
  font-family: var(--font-mono);
  font-size: clamp(28px, 3.5vw, 52px);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.v-word {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}

.v-desc {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.4;
  opacity: 0;
  transition: opacity 300ms ease-out 150ms;
}

.verifiable-item.revealed .v-desc { opacity: 1; }

/* ----------------------------------------------------------------
   BY THE NUMBERS
   ---------------------------------------------------------------- */
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.number-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
}

.number-value {
  font-family: var(--font-mono);
  font-size: clamp(36px, 4.5vw, 64px);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
  display: block;
}

.number-label {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.numbers-footnote {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ----------------------------------------------------------------
   HOW IT WORKS
   ---------------------------------------------------------------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

/* Connector lines between steps */
.steps-grid::before {
  content: '';
  position: absolute;
  top: 36px;
  left: calc(12.5% + 12px);
  right: calc(12.5% + 12px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--card-border) 10%, var(--card-border) 90%, transparent);
  z-index: 0;
}

.step-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  position: relative;
  z-index: 1;
  transition: border-color 200ms ease, transform 200ms ease;
}
.step-card:hover {
  border-color: rgba(14, 165, 233, 0.2);
  transform: translateY(-2px);
}

.step-number {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
  opacity: 0.7;
}

.step-icon {
  color: var(--text-muted);
  margin-bottom: 14px;
}

.step-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.step-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ----------------------------------------------------------------
   WHO IT'S FOR
   ---------------------------------------------------------------- */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
}

/* Each card spans 2 of 6 cols → 3 per row */
.audience-card {
  grid-column: span 2;
}

/* 5th card: center the last 2 by shifting them into cols 2-4 and 4-6 */
.audience-grid > .audience-card:nth-child(4) { grid-column: 2 / 4; }
.audience-grid > .audience-card:nth-child(5) { grid-column: 4 / 6; }

.audience-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-top: 3px solid var(--accent-top, var(--accent));
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.audience-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.audience-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
}

.audience-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
}

.audience-quote {
  font-size: 14px;
  color: var(--accent);
  font-style: italic;
  line-height: 1.5;
  padding-top: 12px;
  border-top: 1px solid var(--card-border);
}

/* ----------------------------------------------------------------
   ARCHITECTURE — Accordion
   ---------------------------------------------------------------- */
#architecture .section-headline {
  margin-bottom: 40px;
}

.accordion {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid var(--card-border);
}
.accordion-item:last-child { border-bottom: none; }

.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  background: transparent;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
  text-align: left;
  gap: 16px;
}
.accordion-trigger:hover {
  background: rgba(255,255,255,0.03);
  color: var(--accent);
}
.accordion-item.open .accordion-trigger {
  color: var(--accent);
}

.accordion-icon {
  font-size: 20px;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform 200ms ease;
  flex-shrink: 0;
  line-height: 1;
}
.accordion-item.open .accordion-icon {
  transform: rotate(45deg);
  color: var(--accent);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease;
}
.accordion-item.open .accordion-body {
  max-height: 800px;
}

.accordion-content {
  padding: 0 24px 28px;
}

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

.accordion-note {
  font-size: 13px !important;
  color: var(--text-muted) !important;
  font-style: italic;
  margin-bottom: 16px !important;
}

/* Score formula */
.score-formula { margin-bottom: 20px; }

.score-components {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
}

.score-component {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 8px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  line-height: 1.4;
}

.score-weight {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
  font-size: 14px;
  margin-top: 2px;
}

.score-op {
  font-size: 18px;
  font-weight: 300;
  color: var(--text-muted);
}

.score-result {
  border: 1px solid rgba(14,165,233,0.3);
  background: rgba(14,165,233,0.08);
}

/* Tables */
.threshold-table,
.checks-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 4px;
}

.threshold-table th,
.checks-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--card-border);
}

.threshold-table td,
.checks-table td {
  padding: 10px 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.threshold-table tr:last-child td,
.checks-table tr:last-child td { border-bottom: none; }

code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  background: rgba(14,165,233,0.1);
  padding: 2px 6px;
  border-radius: 3px;
}

/* Stack grid */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stack-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
}

.stack-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.stack-role {
  font-size: 12px;
  color: var(--text-muted);
}

/* ----------------------------------------------------------------
   LIVE VALIDATED
   ---------------------------------------------------------------- */
#live-validated {
  padding: 80px 0;
}

.live-body {
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.75;
}
.live-body p { color: var(--text-secondary); }

/* ----------------------------------------------------------------
   CTA SECTION
   ---------------------------------------------------------------- */
#cta { padding: var(--section-pad) 0; }

.cta-body {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

/* ----------------------------------------------------------------
   NEWSLETTER
   ---------------------------------------------------------------- */
#newsletter {
  padding: 72px 0;
}

.newsletter-headline {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  margin-bottom: 12px;
}

.newsletter-body {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 28px;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 440px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 150ms ease;
  outline: none;
}
.newsletter-input::placeholder { color: var(--text-muted); }
.newsletter-input:focus { border-color: rgba(14,165,233,0.5); }

/* ----------------------------------------------------------------
   FOOTER
   ---------------------------------------------------------------- */
#footer {
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--card-border);
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.footer-brandname {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-domain,
.footer-contact {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
  transition: color 150ms ease;
}
.footer-domain:hover,
.footer-contact:hover { color: var(--text-secondary); }

.footer-col-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 150ms ease;
}
.footer-link:hover { color: var(--text-primary); }

.footer-social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  transition: color 150ms ease;
}
.footer-social-link:hover { color: var(--text-primary); }

.footer-legal {
  padding-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-legal p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ----------------------------------------------------------------
   MODAL
   ---------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 15, 26, 0.88);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(16px);
  transition: transform 200ms ease;
}
.modal-overlay.open .modal-panel {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  color: var(--text-muted);
  padding: 6px;
  border-radius: 4px;
  transition: color 150ms ease, background 150ms ease;
}
.modal-close:hover { color: var(--text-primary); background: var(--card-bg); }

.modal-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* Form */
.briefing-form,
.form-group,
.form-row { width: 100%; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-optional { color: var(--text-muted); font-weight: 400; }

.form-group input,
.form-group select {
  padding: 10px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 150ms ease;
}
.form-group input:focus,
.form-group select:focus {
  border-color: rgba(14,165,233,0.5);
}
.form-group input::placeholder { color: var(--text-muted); }

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748B' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-group select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.briefing-form .btn-primary { margin-top: 8px; }

.form-success {
  display: none;
  text-align: center;
  padding: 24px 0;
}
.form-success p {
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 500;
}
.form-success.show { display: block; }

/* ----------------------------------------------------------------
   Scroll Reveal
   ---------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 350ms ease-out, transform 350ms ease-out;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ----------------------------------------------------------------
   RESPONSIVE — Tablet (≤1024px)
   ---------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root { --section-pad: 80px; }

  .pillars-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .pillars-grid .pillar-card:nth-child(4),
  .pillars-grid .pillar-card:nth-child(5) {
    grid-column: span 1;
  }

  .numbers-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps-grid::before { display: none; }

  .two-col-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .verifiable-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  /* Audience grid: 2 columns on tablet */
  .audience-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .audience-grid > .audience-card { grid-column: span 2; }
  .audience-grid > .audience-card:nth-child(4) { grid-column: 1 / 3; }
  .audience-grid > .audience-card:nth-child(5) { grid-column: 3 / 5; }
}

/* ----------------------------------------------------------------
   RESPONSIVE — Mobile (≤768px)
   ---------------------------------------------------------------- */
@media (max-width: 768px) {
  :root { --section-pad: var(--section-pad-sm); }

  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { text-align: center; justify-content: center; }

  .pillars-grid {
    grid-template-columns: 1fr;
    overflow-x: auto;
    display: flex;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding-bottom: 8px;
  }
  .pillar-card {
    min-width: 260px;
    scroll-snap-align: start;
  }

  .governance-grid {
    grid-template-columns: 1fr;
  }
  .governance-item { border-right: none !important; }
  .governance-item:last-child { grid-column: auto; }

  .verifiable-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
  }
  .v-desc { display: none; }
  .v-word { font-size: 9px; }

  .numbers-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .audience-grid {
    grid-template-columns: 1fr;
  }
  .audience-grid > .audience-card:nth-child(4),
  .audience-grid > .audience-card:nth-child(5) {
    grid-column: 1 / -1;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
  }
  .newsletter-form .btn { width: 100%; justify-content: center; }

  .modal-panel { padding: 24px; }

  .score-components { gap: 6px; }
  .score-component { padding: 6px 8px; font-size: 11px; }

  .stack-grid { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------------
   CTA BUTTON SHIMMER
   ---------------------------------------------------------------- */
@keyframes shimmer-sweep {
  0%   { transform: translateX(-100%) skewX(-12deg); }
  100% { transform: translateX(200%) skewX(-12deg); }
}

.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.18) 50%,
    transparent 100%
  );
  transform: translateX(-100%) skewX(-12deg);
  pointer-events: none;
}

.btn-primary:hover::after {
  animation: shimmer-sweep 0.65s ease forwards;
}

/* ----------------------------------------------------------------
   FROSTED GLASS ACCORDION
   ---------------------------------------------------------------- */
.accordion {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.accordion-item.open .accordion-content {
  background: rgba(14, 165, 233, 0.025);
  border-top: 1px solid rgba(14, 165, 233, 0.1);
}

/* ----------------------------------------------------------------
   TERMINAL CARD
   ---------------------------------------------------------------- */
.terminal-card {
  margin-top: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  background: var(--bg-deep);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(14,165,233,0.08), 0 16px 48px rgba(0,0,0,0.4);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--card-border);
}

.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  opacity: 0.85;
}

.terminal-filename {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.terminal-body {
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-secondary);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.terminal-body code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
  border-radius: 0;
}

.json-key    { color: #7DD3FC; }   /* sky-300 — keys */
.json-string { color: #86EFAC; }   /* green-300 — string values */
.json-number { color: #FCA5A5; }   /* red-300 — numbers */
.json-bool   { color: #FCD34D; }   /* amber-300 — booleans */

@media (max-width: 768px) {
  .terminal-body { font-size: 11px; padding: 16px; }
}

/* ----------------------------------------------------------------
   SCROLL PROGRESS BAR
   ---------------------------------------------------------------- */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #7DD3FC);
  z-index: 9999;
  transition: width 80ms linear;
  pointer-events: none;
}

/* ----------------------------------------------------------------
   ACTIVE NAV LINK
   ---------------------------------------------------------------- */
.nav-link.active {
  color: var(--text-primary);
}
.nav-link.active::after {
  content: '';
  display: block;
  height: 1px;
  background: var(--accent);
  margin-top: 2px;
  border-radius: 1px;
}

/* ----------------------------------------------------------------
   ENHANCED CARD HOVER GLOWS
   ---------------------------------------------------------------- */
.pillar-card:hover {
  box-shadow: 0 0 0 1px rgba(14,165,233,0.2), 0 8px 32px rgba(14,165,233,0.08);
}

.step-card:hover {
  box-shadow: 0 0 0 1px rgba(14,165,233,0.15), 0 8px 24px rgba(0,0,0,0.25);
}

.audience-card:hover {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 12px 40px rgba(0,0,0,0.3);
}

/* ----------------------------------------------------------------
   ACCENT LINES — Numbers + CTA sections
   ---------------------------------------------------------------- */
#numbers {
  position: relative;
}
#numbers::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

#cta {
  position: relative;
}
#cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(14,165,233,0.6), transparent);
}

/* ----------------------------------------------------------------
   MOBILE FIXES
   ---------------------------------------------------------------- */

/* Hero — better vertical centering and text on small screens */
@media (max-width: 768px) {
  .hero-content {
    padding: 100px 24px 60px;
    text-align: center;
  }
  .hero-ctas {
    justify-content: center;
  }
  .hero-anchor {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Pipeline SVG — center on mobile */
@media (max-width: 1024px) {
  .two-col-diagram {
    justify-content: center;
  }
  .pipeline-svg {
    max-width: 280px;
  }
}

/* VERIFIABLE — better mobile treatment */
@media (max-width: 768px) {
  .verifiable-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }
  .v-letter { font-size: 28px; }
  .v-word { font-size: 9px; }
  .v-desc { display: none; }
}

@media (max-width: 480px) {
  /* VERIFIABLE 2-row layout on very small screens */
  .verifiable-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
  }
  .v-letter { font-size: 22px; }
  .v-word { display: none; }
}

/* Steps — mobile vertical stack */
@media (max-width: 768px) {
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .step-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0 16px;
    align-items: start;
  }
  .step-number {
    grid-row: 1;
    grid-column: 1;
    font-size: 24px;
    margin-bottom: 0;
    padding-top: 2px;
  }
  .step-icon {
    display: none;
  }
  .step-title {
    grid-row: 1;
    grid-column: 2;
    font-size: 16px;
    margin-bottom: 6px;
    align-self: center;
  }
  .step-desc {
    grid-row: 2;
    grid-column: 2;
    font-size: 13px;
  }
}

/* Accordion — prevent table overflow on mobile */
@media (max-width: 768px) {
  .accordion-content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .threshold-table,
  .checks-table {
    min-width: 380px;
    font-size: 12px;
  }
  .threshold-table th,
  .checks-table th,
  .threshold-table td,
  .checks-table td {
    padding: 8px 10px;
  }
  .score-components {
    flex-wrap: wrap;
    justify-content: center;
  }
  .score-op { font-size: 14px; }
}

/* Governance grid — single column on mobile */
@media (max-width: 600px) {
  .governance-grid {
    grid-template-columns: 1fr;
  }
  .governance-item {
    border-right: none !important;
  }
  .governance-item:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

/* Numbers — ensure 2x2 stays readable */
@media (max-width: 480px) {
  .numbers-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .number-item { padding: 20px 12px; }
  .number-value { font-size: 36px; }
  .number-label { font-size: 11px; }
}

/* Section headlines — tighter on mobile */
@media (max-width: 480px) {
  .section-headline { font-size: 24px; }
  .hero-headline { font-size: 32px; }
}

/* Nav mobile menu — full width button */
@media (max-width: 768px) {
  #nav { position: fixed; }
  .nav-mobile .btn { width: 100%; justify-content: center; }
}

/* Footer — tighter on mobile */
@media (max-width: 480px) {
  .footer-grid { gap: 24px; }
  .footer-legal { gap: 4px; }
}

/* Reduced motion — skip parallax + animations */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .verifiable-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .pipeline-node,
  .pipeline-arrow {
    opacity: 1;
    transition: none;
  }
  #scroll-progress { display: none; }
}

/* ----------------------------------------------------------------
   RESPONSIVE — Small Mobile (≤480px)
   ---------------------------------------------------------------- */
@media (max-width: 480px) {
  .verifiable-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  .v-letter { font-size: 24px; }

  .numbers-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .number-value { font-size: 40px; }
}
