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

:root {
  --bg: #080c14;
  --card-bg: #0d1424;
  --border: rgba(139,92,246,0.15);
  --border-bright: rgba(139,92,246,0.35);
  --purple: #a78bfa;
  --purple-dark: #8b5cf6;
  --green: #22c55e;
  --red: #ef4444;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --font-head: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Inter', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
}

section { position: relative; }

/* ─── Nav Dots ─────────────────────────────────────────────────────────────── */
#nav-dots {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 100;
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-bright);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  border: none;
}
.nav-dot.active { background: var(--purple); transform: scale(1.4); }
.nav-dot:hover { background: var(--purple); }

/* ─── Password Gate ────────────────────────────────────────────────────────── */
#password-gate {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.6s ease;
}
#password-gate.fade-out { opacity: 0; }
#password-gate.hidden { display: none; }

.gate-card {
  background: var(--card-bg);
  border: 1px solid var(--border-bright);
  border-radius: 1.5rem;
  padding: 3rem 2.5rem;
  width: min(420px, 90vw);
  text-align: center;
  box-shadow: 0 0 60px rgba(139,92,246,0.15);
}

.logo-mark {
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--purple);
  background: linear-gradient(135deg, var(--purple), #6d28d9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.gate-card h1 {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.gate-card > p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  font-family: var(--font-mono);
}

#gate-input {
  width: 100%;
  background: rgba(139,92,246,0.05);
  border: 1px solid var(--border-bright);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 1rem;
  text-align: center;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
#gate-input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}

.gate-card button {
  width: 100%;
  background: linear-gradient(135deg, var(--purple-dark), #7c3aed);
  border: none;
  border-radius: 0.75rem;
  padding: 0.85rem;
  color: #fff;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.gate-card button:hover { opacity: 0.9; transform: translateY(-1px); }

.error {
  color: var(--red);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  font-family: var(--font-mono);
}
.hidden { display: none !important; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
.shake { animation: shake 0.4s ease; }

/* ─── Main Content ─────────────────────────────────────────────────────────── */
#main-content { opacity: 1; }
#main-content.hidden { display: none; }

/* ─── Section Common ───────────────────────────────────────────────────────── */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.75rem;
}

.section-sub {
  color: var(--muted);
  text-align: center;
  font-size: 1.05rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Reveal Animation ─────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ─── SCREEN 1 — HERO ──────────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#particle-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 900px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
  text-align: center;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.hero-content.visible { opacity: 1; transform: none; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--purple);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.hero-headline {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.strike {
  text-decoration: line-through;
  color: var(--red);
  opacity: 0.8;
}
.highlight { color: var(--green); }

.hero-sub {
  color: var(--muted);
  font-size: 1.15rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Stats grid */
.stats-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem 2rem;
  min-width: 130px;
  text-align: center;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.stat:hover {
  border-color: var(--border-bright);
  box-shadow: 0 0 20px rgba(139,92,246,0.1);
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--purple);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}

.footnote {
  color: var(--muted);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  margin-bottom: 2.5rem;
  line-height: 1.6;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--purple-dark), #7c3aed);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.9rem 2.5rem;
  border-radius: 3rem;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 0 30px rgba(139,92,246,0.3);
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(139,92,246,0.5);
}

/* ─── SCREEN 2 — COMPARISON ────────────────────────────────────────────────── */
#comparison {
  padding: 6rem 0;
  background: linear-gradient(180deg, var(--bg) 0%, #0a0f1e 100%);
}

.scenario-block {
  margin-bottom: 4rem;
}

.scenario-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--purple);
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .compare-grid { grid-template-columns: 1fr; }
}

.compare-card {
  background: var(--card-bg);
  border-radius: 1.25rem;
  padding: 1.75rem;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.compare-card.chatbot {
  border-color: rgba(239,68,68,0.2);
  opacity: 0.85;
}

.compare-card.agentx {
  border-color: rgba(139,92,246,0.35);
  box-shadow: 0 0 30px rgba(139,92,246,0.08);
}

.card-header {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  padding: 0.4rem 0.75rem;
  border-radius: 0.4rem;
  display: inline-block;
  width: fit-content;
}

.compare-card.chatbot .card-header {
  background: rgba(239,68,68,0.1);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.2);
}

.compare-card.agentx .card-header {
  background: rgba(139,92,246,0.1);
  color: var(--purple);
  border: 1px solid var(--border-bright);
}

.user-prompt {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
  border-left: 2px solid var(--border);
  padding-left: 0.75rem;
}

.compare-card.agentx .user-prompt {
  border-color: var(--border-bright);
  color: var(--text);
}

.response-text {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--muted);
  font-family: var(--font-body);
}

.compare-card.agentx .response-text {
  color: #c4b5fd;
}

.typewriter-text {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--muted);
  white-space: pre-wrap;
}

.compare-card.agentx .typewriter-text {
  color: #c4b5fd;
}

.card-stats {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--green);
  background: rgba(34,197,94,0.05);
  border: 1px solid rgba(34,197,94,0.15);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  line-height: 1.6;
}

.card-verdict {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  text-align: center;
  margin-top: auto;
}

.compare-card.chatbot .card-verdict {
  background: rgba(239,68,68,0.07);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.15);
}

.compare-card.agentx .card-verdict {
  background: rgba(34,197,94,0.07);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.15);
}

/* ─── SCREEN 3 — GUARDRAILS ────────────────────────────────────────────────── */
#guardrails {
  padding: 6rem 0;
  background: var(--bg);
}

.guardrail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}

@media (max-width: 900px) {
  .guardrail-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .guardrail-grid { grid-template-columns: 1fr; }
}

.guardrail-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.5rem;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.guardrail-card:hover {
  border-color: var(--border-bright);
  box-shadow: 0 0 25px rgba(139,92,246,0.1);
  transform: translateY(-3px);
}

.guardrail-icon {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
  display: block;
}

.guardrail-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 0.5rem;
}

.guardrail-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

.guardrail-bottom {
  text-align: center;
  padding: 2.5rem;
  background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(139,92,246,0.03));
  border: 1px solid var(--border-bright);
  border-radius: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.guardrail-bottom p {
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 600;
  line-height: 1.5;
}

.guardrail-bottom .danger { color: var(--red); }
.guardrail-bottom .safe { color: var(--green); }

/* ─── SCREEN 4 — WHAT WAS BUILT ────────────────────────────────────────────── */
#built {
  padding: 6rem 0;
  background: linear-gradient(180deg, #0a0f1e 0%, var(--bg) 100%);
}

.built-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .built-grid { grid-template-columns: 1fr; }
}

.built-category {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.75rem;
  transition: border-color 0.3s;
}
.built-category:hover { border-color: var(--border-bright); }

.category-header {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.built-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}

.built-item .check {
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-top: 0.05rem;
}

.built-item .item-note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--purple);
  opacity: 0.8;
}

/* ─── SCREEN 5 — TECH STACK ────────────────────────────────────────────────── */
#stack {
  padding: 6rem 0;
  background: var(--bg);
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .stack-grid { grid-template-columns: 1fr; }
}

.stack-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.stack-card:hover {
  border-color: var(--border-bright);
  box-shadow: 0 0 20px rgba(139,92,246,0.08);
  transform: translateY(-2px);
}

.stack-icon {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.stack-name {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.stack-role {
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.stack-footnote {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 1rem;
}

/* ─── SCREEN 6 — FTE COMPARISON ────────────────────────────────────────────── */
#fte {
  padding: 6rem 0;
  background: linear-gradient(180deg, var(--bg) 0%, #0a0f1e 100%);
}

.fte-table-wrap {
  overflow-x: auto;
  border-radius: 1.25rem;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

thead tr {
  background: rgba(139,92,246,0.1);
  border-bottom: 1px solid var(--border-bright);
}

thead th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
  padding: 1rem 1.25rem;
  text-align: left;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
tbody tr:nth-child(even) { background: rgba(255,255,255,0.02); }
tbody tr:hover { background: rgba(139,92,246,0.05); }

tbody td {
  padding: 0.9rem 1.25rem;
  color: var(--muted);
  vertical-align: top;
}

tbody td:first-child {
  color: var(--text);
  font-weight: 500;
}

.cost-cell {
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.total-row {
  background: linear-gradient(90deg, rgba(139,92,246,0.12), rgba(139,92,246,0.05)) !important;
  border-top: 2px solid var(--border-bright) !important;
}
.total-row td {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
}
.total-row .cost-cell {
  color: var(--red);
  font-size: 1rem;
}

.fte-footnote {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 1.5rem;
  font-style: italic;
}

/* ─── SCREEN 7 — THE MONEY SLIDE ───────────────────────────────────────────── */
#money {
  min-height: 100vh;
  padding: 6rem 0;
  display: flex;
  align-items: center;
  background: radial-gradient(ellipse at center, #0d0a1e 0%, var(--bg) 70%);
}

.money-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.money-block {
  border-radius: 1.5rem;
  padding: 3rem 2.5rem;
  margin-bottom: 2.5rem;
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
  transform: translateY(20px);
}
.money-block.visible { opacity: 1; transform: none; }

#traditional-block {
  background: rgba(239,68,68,0.05);
  border: 1px solid rgba(239,68,68,0.2);
}

#traditional-block.fade-out-block {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#agentx-block {
  background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(34,197,94,0.05));
  border: 1px solid var(--border-bright);
}

#agentx-block.glow-in {
  box-shadow: 0 0 60px rgba(139,92,246,0.2), 0 0 120px rgba(34,197,94,0.05);
}

.money-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: block;
}

#traditional-block .money-label { color: var(--red); }
#agentx-block .money-label { color: var(--purple); }

.money-price {
  font-family: var(--font-head);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 1.5rem;
}

#traditional-block .money-price { color: var(--red); }
#agentx-block .money-price {
  color: var(--green);
  text-shadow: 0 0 30px rgba(34,197,94,0.4);
}

.money-meta {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 2;
}

#agentx-block .money-meta { color: #c4b5fd; }

.money-quote {
  font-family: var(--font-head);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-style: italic;
  color: var(--muted);
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.money-quote.visible { opacity: 1; transform: none; }

.money-quote::before { content: '"'; color: var(--purple); }
.money-quote::after { content: '"'; color: var(--purple); }

.closer-text {
  margin-top: 3rem;
  padding: 2.5rem;
  background: rgba(139,92,246,0.05);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  text-align: left;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.closer-text.visible { opacity: 1; transform: none; }

.closer-question {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 0.5rem;
  text-align: center;
}

.closer-answer {
  font-family: var(--font-head);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 600;
  color: var(--green);
  text-align: center;
  margin-bottom: 2rem;
}

.closer-body {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.9;
  text-align: center;
}

.closer-body strong {
  color: var(--text);
}

.closer-end {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--purple);
  text-align: center;
  margin-top: 1.5rem;
  line-height: 1.6;
}

.money-footnote {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.75rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  font-style: italic;
  opacity: 0.8;
}

.money-footer {
  margin-top: 3rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* ─── Glitch Keyframes ──────────────────────────────────────────────────────── */
@keyframes glitch {
  0%   { transform: translate(0); filter: none; }
  20%  { transform: translate(-3px, 3px); filter: hue-rotate(90deg) brightness(1.5); }
  40%  { transform: translate(3px, -3px); filter: hue-rotate(180deg) brightness(0.8); }
  60%  { transform: translate(-1px, 1px); filter: none; }
  80%  { transform: translate(1px, -1px); filter: hue-rotate(270deg) brightness(1.3); }
  100% { transform: translate(0); filter: hue-rotate(360deg); }
}

.glitch-active {
  animation: glitch 0.3s ease-in-out 3;
}

/* ─── Scrollbar ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple-dark); }

/* ─── Divider ───────────────────────────────────────────────────────────────── */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-bright), transparent);
  margin: 0 4rem;
}
