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

:root {
  --bg: #0D0D12;
  --surface: #13131A;
  --surface2: #1A1A24;
  --accent: #BFFF00;
  --accent-dim: rgba(191, 255, 0, 0.12);
  --text: #EDEDED;
  --text-muted: #8A8A9A;
  --border: rgba(255,255,255,0.07);
  --lime-glow: rgba(191, 255, 0, 0.35);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section-label {
  font-family: 'Space Grotesk', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

/* === NAV === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 48px;
  background: rgba(13, 13, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}

.nav-tagline {
  font-family: 'Space Grotesk', monospace;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

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

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(191,255,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(191,255,0,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  font-family: 'Space Grotesk', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(191,255,0,0.25);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
  background: rgba(191,255,0,0.06);
}

.hero-headline {
  font-size: clamp(48px, 6vw, 80px);
  color: var(--text);
  margin-bottom: 24px;
  line-height: 1.0;
}

.hero-headline br { display: block; }

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 48px;
}

.hero-constraints {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 28px;
  width: fit-content;
}

.constraint {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
}

.constraint-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

.constraint-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.constraint-sep {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* === HERO VISUAL === */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.glow-orb {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(191,255,0,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(40px);
}

.stack-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 320px;
  position: relative;
  box-shadow: 0 0 60px rgba(191,255,0,0.06);
}

.stack-layer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.layer-1 { background: rgba(191,255,0,0.08); border: 1px solid rgba(191,255,0,0.2); }
.layer-2 { background: var(--surface2); border: 1px solid var(--border); }
.layer-3 { background: var(--surface2); border: 1px solid var(--border); margin-bottom: 0; }

.layer-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  font-family: 'Space Grotesk', monospace;
}

.layer-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.layer-1 .layer-val { color: var(--accent); }

.stack-arrow {
  position: absolute;
  right: -36px;
  top: 50%;
  transform: translateY(-50%);
}

/* === SHARED SECTION STYLES === */n.problem, .model, .approach, .process, .closing, .footer {
  padding: 100px 48px;
}

.problem-inner, .model-inner, .approach-inner, .process-inner, .closing-inner, .footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* === PROBLEM === */
.problem { background: var(--bg); }

.problem-headline {
  font-size: clamp(28px, 4vw, 48px);
  color: var(--text);
  max-width: 640px;
  margin-bottom: 64px;
  line-height: 1.2;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.problem-card {
  background: var(--surface);
  padding: 40px 36px;
}

.problem-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: 10px;
  margin-bottom: 20px;
}

.problem-card h3 {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 12px;
}

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

/* === MODEL === */
.model { background: var(--surface); }

.model-headline {
  font-size: clamp(28px, 3.5vw, 40px);
  color: var(--text);
  max-width: 560px;
  margin-bottom: 16px;
}

.model-desc {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 600px;
  margin-bottom: 48px;
  line-height: 1.7;
}

.model-table {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 32px;
  font-family: 'Space Grotesk', monospace;
  font-size: 13px;
}

.table-head {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
  padding: 14px 24px;
  background: var(--surface2);
  color: var(--text-muted);
  letter-spacing: 0.05em;
  font-size: 11px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
  padding: 16px 24px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.table-row:last-child { border-bottom: none; }
.table-row:hover { background: var(--surface); }

.table-row-win {
  background: rgba(191,255,0,0.05);
  color: var(--text);
  border-left: 2px solid var(--accent);
}

.table-row-win strong { color: var(--accent); }

.model-callout {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: var(--accent-dim);
  border: 1px solid rgba(191,255,0,0.2);
  border-radius: 10px;
}

.callout-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
  box-shadow: 0 0 8px var(--accent);
}

.model-callout p {
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
}

/* === APPROACH === */
.approach { background: var(--bg); }

.approach-headline {
  font-size: clamp(28px, 3.5vw, 40px);
  color: var(--text);
  max-width: 520px;
  margin-bottom: 64px;
}

.approach-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.approach-step { position: relative; }

.step-num {
  font-family: 'Space Grotesk', monospace;
  font-size: 56px;
  font-weight: 700;
  color: var(--surface2);
  line-height: 1;
  margin-bottom: 20px;
  -webkit-text-stroke: 1px rgba(255,255,255,0.08);
}

.step-content h3 {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 10px;
}

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

/* === PROCESS === */
.process { background: var(--surface); }

.process-headline {
  font-size: clamp(28px, 3.5vw, 40px);
  color: var(--text);
  margin-bottom: 64px;
}

.process-timeline {
  position: relative;
  padding-left: 80px;
}

.process-timeline::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent) 0%, transparent 100%);
  opacity: 0.3;
}

.timeline-item {
  position: relative;
  margin-bottom: 56px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -58px;
  top: 4px;
  width: 14px;
  height: 14px;
  background: var(--bg);
  border: 2px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(191,255,0,0.4);
}

.timeline-period {
  font-family: 'Space Grotesk', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.timeline-content h3 {
  font-size: 22px;
  color: var(--text);
  margin-bottom: 12px;
}

.timeline-content ul {
  list-style: none;
  margin-bottom: 16px;
}

.timeline-content ul li {
  font-size: 14px;
  color: var(--text-muted);
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

.timeline-content ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  opacity: 0.5;
  font-family: 'Space Grotesk', monospace;
}

.timeline-cost {
  font-family: 'Space Grotesk', monospace;
  font-size: 12px;
  color: var(--accent);
  opacity: 0.7;
}

.process-total {
  margin-top: 48px;
  padding: 24px 28px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.total-sub {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
}

/* === CLOSING === */
.closing { background: var(--bg); }

.closing-inner { text-align: center; }

.closing-headline {
  font-size: clamp(28px, 4vw, 52px);
  color: var(--text);
  max-width: 700px;
  margin: 0 auto 24px;
  line-height: 1.15;
}

.closing-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.closing-tag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: var(--accent-dim);
  border: 1px solid rgba(191,255,0,0.2);
  border-radius: 100px;
}

.closing-tag::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
}

.closing-tag span {
  font-family: 'Space Grotesk', monospace;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
}

/* === FOOTER === */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 64px 48px;
}

.footer-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.footer-note {
  font-size: 12px;
  color: rgba(255,255,255,0.2);
  font-family: 'Space Grotesk', monospace;
  letter-spacing: 0.05em;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .nav { padding: 16px 24px; }
  .hero { padding: 120px 24px 80px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { order: -1; }
  .stack-card { max-width: 280px; margin: 0 auto; }
  .problem-grid { grid-template-columns: 1fr; }
  .approach-grid { grid-template-columns: 1fr 1fr; }
  .table-head, .table-row { grid-template-columns: 2fr 1fr 1fr; }
  .table-head span:nth-child(4),
  .table-head span:nth-child(5),
  .table-row span:nth-child(4),
  .table-row span:nth-child(5) { display: none; }
  .process-timeline { padding-left: 48px; }
  .timeline-marker { left: -34px; }
}

@media (max-width: 600px) {
  .problem, .model, .approach, .process, .closing, .footer { padding: 72px 24px; }
  .approach-grid { grid-template-columns: 1fr; }
  .hero-headline { font-size: 40px; }
  .hero-constraints { flex-direction: column; gap: 16px; }
  .constraint-sep { width: 40px; height: 1px; }
  .process-total { flex-direction: column; gap: 8px; }
}