/* ───── Tokens ───── */
:root {
  --bg: #fafafa;
  --bg-alt: #f2f2f0;
  --surface: #ffffff;
  --border: #e5e5e3;
  --border-strong: #d4d4d2;
  --text: #111111;
  --text-secondary: #555555;
  --text-tertiary: #888888;
  --highlight: #c44d2b;
  --font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", "Fira Code", monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 8px;
}

/* ───── Reset ───── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--highlight); }
img { max-width: 100%; display: block; }
code {
  font-family: var(--mono);
  font-size: 0.84em;
  background: var(--bg-alt);
  padding: 0.15em 0.45em;
  border-radius: 4px;
}

/* ───── Layout ───── */
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ───── Nav ───── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(250,250,250,0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 60px;
}
.nav-logo { font-weight: 600; font-size: 0.95rem; color: var(--text); letter-spacing: -0.01em; }
.nav-logo:hover { color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { color: var(--text-secondary); font-size: 0.88rem; font-weight: 450; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--text); color: var(--bg) !important;
  padding: 7px 16px; border-radius: 6px;
  font-size: 0.84rem !important; font-weight: 500 !important;
  transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.8; color: var(--bg) !important; }
.nav-cta svg { opacity: 0.8; }
.nav-toggle { display: none; }

/* ───── Hero ───── */
.hero { padding: 140px 0 0; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 64px;
  align-items: center;
}
.hero-label {
  font-size: 0.76rem; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 700;
  line-height: 1.12; letter-spacing: -0.03em; margin-bottom: 20px;
}
.hero h1 em { font-style: normal; color: var(--highlight); }
.hero-sub {
  font-size: 1.05rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 12px; }
.hero-stats-bar {
  display: flex; align-items: center; padding: 48px 24px; margin-top: 64px;
  border-top: 1px solid var(--border);
}
.hero-stat { display: flex; flex-direction: column; padding: 0 32px; }
.hero-stat:first-child { padding-left: 0; }
.hero-stat-divider { width: 1px; height: 40px; background: var(--border); }
.hero-stat-num {
  font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em; color: var(--text); line-height: 1.1;
}
.hero-stat-label { font-size: 0.76rem; color: var(--text-tertiary); font-weight: 450; margin-top: 4px; }

/* Hero Probe Card */
.hero-probe { perspective: 800px; }
.probe-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; position: relative; overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.probe-card:hover { box-shadow: 0 12px 40px rgba(0,0,0,0.06); }
.probe-label {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-tertiary); margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.probe-label::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--highlight); animation: probe-pulse 2s ease-in-out infinite;
}
@keyframes probe-pulse {
  0%, 100% { opacity: 0.4; } 50% { opacity: 1; }
}
.probe-query {
  font-family: var(--mono); font-size: 0.8rem; line-height: 1.5;
  padding: 10px 12px; border-radius: 6px; min-height: 40px;
  transition: opacity 0.3s;
}
.probe-query-a { background: var(--bg); border: 1px solid var(--border); color: var(--text); margin-bottom: 10px; }
.probe-query-b { background: var(--bg); border: 1px dashed var(--border-strong); color: var(--text-secondary); margin-top: 10px; }
.probe-sim-row { display: flex; align-items: center; gap: 12px; }
.probe-sim-track {
  flex: 1; height: 3px; background: var(--border); border-radius: 2px; overflow: hidden;
}
.probe-sim-fill {
  height: 100%; width: 0%; background: var(--highlight); border-radius: 2px;
  transition: width 0.8s var(--ease);
}
.probe-sim-value {
  font-family: var(--mono); font-size: 0.82rem; font-weight: 600;
  color: var(--highlight); min-width: 44px; text-align: right;
}
.probe-meta {
  display: flex; justify-content: space-between; align-items: center; margin-top: 14px;
  padding-top: 14px; border-top: 1px solid var(--border);
}
.probe-cat {
  font-size: 0.72rem; font-weight: 500; color: var(--text-tertiary);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.probe-verdict {
  font-size: 0.72rem; font-weight: 600; color: var(--highlight);
}

/* ───── Buttons ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 24px; border-radius: 6px; font-weight: 500; font-size: 0.9rem;
  transition: all 0.25s var(--ease); cursor: pointer; border: none;
}
.btn-dark { background: var(--text); color: var(--bg); }
.btn-dark:hover { opacity: 0.85; color: var(--bg); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-strong); }
.btn-outline:hover { color: var(--text); border-color: var(--text-secondary); transform: translateY(-1px); }
.btn-lg { padding: 12px 32px; font-size: 0.95rem; }

/* ───── Sections ───── */
.section { padding: 120px 0; }
.section-alt { background: var(--bg-alt); }
.section-label {
  font-size: 0.76rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-tertiary); margin-bottom: 12px;
}
.section h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 700;
  line-height: 1.2; letter-spacing: -0.025em; margin-bottom: 16px;
}
.section-sub {
  font-size: 1.02rem; color: var(--text-secondary); max-width: 560px;
  line-height: 1.7; margin-bottom: 56px;
}

/* ───── Inline number highlights ───── */
.num {
  font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--text);
  border-bottom: 1.5px solid rgba(196, 77, 43, 0);
  transition: border-color 0.5s 0.2s;
}
.num.lit { border-bottom-color: rgba(196, 77, 43, 0.4); }

/* ───── Problem Cards ───── */
.problem-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.problem-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: box-shadow 0.4s var(--ease);
}
.problem-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.problem-icon { color: var(--text-tertiary); flex-shrink: 0; }
.problem-card h3 { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.problem-pair { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 16px; }
.query-box {
  width: 100%; padding: 9px 12px; border-radius: 6px; font-family: var(--mono);
  font-size: 0.78rem; text-align: center; background: var(--bg-alt); border: 1px solid var(--border); color: var(--text);
}
.query-adversarial { border-style: dashed; color: var(--text-secondary); }
.sim-badge {
  font-size: 0.72rem; font-weight: 600; font-family: var(--mono);
  color: var(--highlight); padding: 2px 10px; border-radius: 100px; background: rgba(196,77,43,0.06);
}
.problem-card > p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; }

/* ───── 3D Tilt Cards ───── */
.tilt-card { transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.tilt-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.06); }

/* ───── Pipeline ───── */
.pipeline { position: relative; display: flex; flex-direction: column; padding-left: 0; }
.pipeline-line {
  position: absolute; left: 23px; top: 32px; bottom: 32px; width: 1px;
  background: var(--border); z-index: 0;
}
.pipeline-line-fill {
  width: 100%; height: 0%; background: var(--text); transition: height 0.1s linear;
}
.pipeline-step { position: relative; display: flex; gap: 24px; padding: 20px 0; }
.step-number {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.82rem; font-weight: 500;
  color: var(--text-secondary); position: relative; z-index: 1;
  transition: border-color 0.4s, color 0.4s, background 0.4s;
}
.pipeline-step.active .step-number { border-color: var(--text); color: var(--text); background: var(--bg); }
.step-content h3 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
.step-content p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 10px; }
.step-tag {
  display: inline-block; font-size: 0.7rem; font-weight: 500; letter-spacing: 0.02em;
  color: var(--text-tertiary); border: 1px solid var(--border); padding: 2px 8px; border-radius: 4px;
}

/* ───── Results: Provider Bars ───── */
.results-block { margin-bottom: 64px; }
.results-block h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
.results-desc { color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 28px; }
.results-note { color: var(--text-tertiary); font-size: 0.8rem; margin-top: 16px; }
.provider-bars { display: flex; flex-direction: column; gap: 12px; }
.provider-bar-row { display: grid; grid-template-columns: 130px 1fr 50px 90px; gap: 12px; align-items: center; }
.provider-name { font-weight: 500; font-size: 0.88rem; }
.provider-mode { color: var(--text-tertiary); font-weight: 400; font-size: 0.78rem; }
.bar-track { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; width: 0%; border-radius: 4px; background: var(--text); transition: width 1s var(--ease); }
.bar-value { font-family: var(--mono); font-size: 0.82rem; font-weight: 500; color: var(--text); text-align: right; }
.bar-ci { font-family: var(--mono); font-size: 0.72rem; color: var(--text-tertiary); }

/* ───── Category Bars ───── */
.category-bars { display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.cat-row { display: grid; grid-template-columns: 170px 1fr 44px; gap: 12px; align-items: center; }
.cat-label { font-size: 0.86rem; font-weight: 450; color: var(--text-secondary); text-align: right; }
.cat-track { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.cat-fill { height: 100%; width: 0%; border-radius: 3px; background: var(--text); opacity: 0.7; transition: width 0.8s var(--ease); }
.cat-value { font-family: var(--mono); font-size: 0.78rem; font-weight: 500; color: var(--text-secondary); }

/* ───── Findings Grid ───── */
.findings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 64px; }
.finding-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.finding-num {
  font-size: 1.7rem; font-weight: 700; font-family: var(--mono);
  color: var(--text); letter-spacing: -0.02em; margin-bottom: 2px;
}
.finding-label {
  font-size: 0.76rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--text-tertiary); margin-bottom: 12px;
}
.finding-card p { font-size: 0.86rem; color: var(--text-secondary); line-height: 1.6; }

/* ───── Geometry Table ───── */
.geometry-table-wrap { overflow-x: auto; margin: 0 -24px; padding: 0 24px; }
.geometry-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.geometry-table th {
  text-align: left; padding: 10px 14px; font-weight: 500; font-size: 0.74rem;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-strong); white-space: nowrap;
}
.geometry-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: 0.82rem; color: var(--text-secondary);
}
.geometry-table td:first-child { font-family: var(--font); font-weight: 500; color: var(--text); }
.geometry-table tbody tr { transition: background 0.15s; }
.geometry-table tbody tr:hover { background: rgba(0,0,0,0.02); }
.vuln-score { font-weight: 600 !important; }
.vuln-critical .vuln-score { color: var(--highlight) !important; }
.vuln-high .vuln-score { color: #c77a28 !important; }
.vuln-moderate .vuln-score { color: var(--text-secondary) !important; }

/* ───── Architecture ───── */
.arch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 48px; }
.arch-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.arch-icon { color: var(--text-tertiary); margin-bottom: 14px; }
.arch-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
.arch-card p { font-size: 0.86rem; color: var(--text-secondary); line-height: 1.6; }
.tech-stack { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-tag {
  font-size: 0.78rem; font-weight: 450; color: var(--text-secondary);
  border: 1px solid var(--border); padding: 5px 12px; border-radius: 100px;
  transition: border-color 0.2s, color 0.2s;
}
.tech-tag:hover { border-color: var(--text-secondary); color: var(--text); }

/* ───── CTA ───── */
.section-cta { text-align: center; background: var(--bg-alt); border-top: 1px solid var(--border); }
.section-cta h2 { font-size: 1.8rem; }
.section-cta .section-sub { margin: 16px auto 32px; }
.cta-code {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 20px; display: block; margin: 0 auto 28px; max-width: 680px; overflow-x: auto;
  text-align: left; white-space: nowrap;
}
.cta-prompt { font-family: var(--mono); font-size: 0.84rem; color: var(--text-tertiary); margin-right: 8px; }
.cta-code code { background: none; font-size: 0.84rem; color: var(--text-secondary); }
.cta-cursor {
  display: inline-block; width: 7px; height: 1.1em; background: var(--text);
  margin-left: 1px; vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ───── Footer ───── */
.footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; font-size: 0.82rem; color: var(--text-tertiary); }
.footer-left { font-weight: 600; color: var(--text-secondary); }

/* ───── Reveal Animations ───── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger children when parent has .reveal */
.problem-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.problem-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.findings-grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.findings-grid .reveal:nth-child(3) { transition-delay: 0.12s; }
.findings-grid .reveal:nth-child(4) { transition-delay: 0.18s; }
.arch-grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.arch-grid .reveal:nth-child(3) { transition-delay: 0.12s; }
.arch-grid .reveal:nth-child(4) { transition-delay: 0.18s; }
.arch-grid .reveal:nth-child(5) { transition-delay: 0.24s; }
.arch-grid .reveal:nth-child(6) { transition-delay: 0.30s; }
.pipeline .reveal:nth-child(3) { transition-delay: 0.06s; }
.pipeline .reveal:nth-child(4) { transition-delay: 0.12s; }
.pipeline .reveal:nth-child(5) { transition-delay: 0.18s; }
.pipeline .reveal:nth-child(6) { transition-delay: 0.24s; }
.pipeline .reveal:nth-child(7) { transition-delay: 0.30s; }

/* ───── Mobile ───── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0;
    background: rgba(250,250,250,0.97); backdrop-filter: blur(12px);
    padding: 20px 24px; gap: 16px; border-bottom: 1px solid var(--border);
  }
  .nav-toggle {
    display: flex; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 4px;
  }
  .nav-toggle span { width: 20px; height: 1.5px; background: var(--text); border-radius: 1px; }
  .hero { padding: 120px 0 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-probe { order: -1; }
  .hero-stats-bar { flex-wrap: wrap; gap: 20px; margin-top: 40px; }
  .hero-stat { padding: 0 20px; }
  .hero-stat-divider { display: none; }
  .hero-stat-num { font-size: 1.6rem; }
  .hero-actions { flex-direction: column; }
  .problem-grid { grid-template-columns: 1fr; }
  .provider-bar-row { grid-template-columns: 1fr; gap: 4px; }
  .bar-ci { display: none; }
  .bar-value { text-align: left; }
  .cat-row { grid-template-columns: 130px 1fr 40px; }
  .findings-grid { grid-template-columns: 1fr; }
  .arch-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .section { padding: 80px 0; }
  .hero h1 { font-size: 1.8rem; }
  .cat-row { grid-template-columns: 110px 1fr 36px; }
  .cat-label { font-size: 0.78rem; }
}
