/* ============ TOKENS ============ */
:root {
  --ink: #0b0e14;
  --ink-2: #12151f;
  --ink-3: #1a1e2b;
  --line: #232838;
  --text: #e8eaf0;
  --text-dim: #8b91a3;
  --amber: #ffb454;
  --green: #5ee6a0;
  --red: #ff6b6b;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', sans-serif;
  --max-w: 1100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* CRITICAL: prevent any child from bleeding outside viewport width */
body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
}

code {
  font-family: var(--mono);
  background: var(--ink-3);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* ============ HEADER ============ */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 48px;
  position: sticky;
  top: 0;
  background: rgba(11, 14, 20, 0.9);
  backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid var(--line);
  width: 100%;
}

.logo {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

nav a {
  color: var(--text-dim);
  text-decoration: none;
  margin-left: 24px;
  font-size: 14px;
  transition: color 0.2s;
}

nav a:hover { color: var(--text); }

.star-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 16px;
}

.star-badge img { display: block; }

/* ============ LAYOUT WRAPPER ============ */
/* All sections are constrained by this pattern */
section {
  padding: 100px 48px;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
}

section h2 {
  font-family: var(--mono);
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.3;
  max-width: 680px;
}

/* ============ HERO ============ */
.hero {
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 60px 48px;
}

.hero-inner {
  max-width: 760px;
  width: 100%;
}

.eyebrow, .section-eyebrow {
  font-family: var(--mono);
  color: var(--amber);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}

.hero-title {
  font-family: var(--mono);
  font-size: clamp(30px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
}

.hero-title .line { display: block; overflow: hidden; }
.hero-title em { color: var(--amber); font-style: normal; }

.hero-sub {
  color: var(--text-dim);
  font-size: 17px;
  max-width: 620px;
  margin-bottom: 40px;
  line-height: 1.7;
}

/* ---- Terminal ---- */
.terminal {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 40px;
  max-width: 580px;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--ink-3);
  border-bottom: 1px solid var(--line);
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red   { background: var(--red); }
.dot.amber { background: var(--amber); }
.dot.green { background: var(--green); }

.terminal-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-left: 8px;
}

.terminal-body {
  font-family: var(--mono);
  font-size: 14px;
  padding: 20px;
  min-height: 80px;
  position: relative;
}

.prompt { color: var(--green); margin-right: 8px; }
.typed  { color: var(--text); }
.cursor { color: var(--text-dim); animation: blink 1s step-end infinite; }

@keyframes blink { 50% { opacity: 0; } }

.verdict-stamp {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  padding: 6px 14px;
  border-radius: 6px;
  display: inline-block;
  margin-top: 14px;
  opacity: 0;
  transform: scale(0.8) rotate(-4deg);
}

.verdict-stamp.block {
  background: rgba(255,107,107,0.15);
  color: var(--red);
  border: 1px solid var(--red);
}

/* ---- CTA buttons ---- */
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.btn-primary {
  background: var(--amber);
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 700;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-block;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,180,84,0.3);
}

.btn-primary.large { padding: 18px 36px; font-size: 16px; }

.btn-secondary {
  color: var(--text-dim);
  text-decoration: none;
  padding: 14px 20px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.2s, color 0.2s;
}

.btn-secondary:hover { border-color: var(--text-dim); color: var(--text); }

/* ============ VIDEO SECTION ============ */
/* Override the generic section rule for the video section to allow full-width feel */
section.video-intro {
  text-align: center;
  max-width: var(--max-w);
  padding: 80px 48px;
}

.video-intro h2 {
  margin: 12px auto 16px;
  max-width: 720px;
}

.video-sub {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

/* The video wrapper — constrained so it never overflows */
.video-frame {
  position: relative;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,180,84,0.2);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 40px rgba(255,180,84,0.08);
  background: #000;
  /* Force aspect ratio so the frame never collapses */
  aspect-ratio: 16 / 9;
}

/* Video fills its container exactly, never overflows */
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

/* ============ PROBLEM ============ */
.problem-text {
  color: var(--text-dim);
  font-size: 17px;
  max-width: 660px;
  margin-top: 20px;
  line-height: 1.75;
}

.problem-text em { color: var(--text); font-style: normal; }

.outcomes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 640px;
  margin-top: 28px;
}

.outcomes span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink-2);
}

.outcomes b { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; }
.block-text  { color: var(--red); }
.review-text { color: var(--amber); }
.allow-text  { color: var(--green); }

/* ============ PIPELINE ============ */
.pipeline-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 60px;
}

.pipeline-line {
  position: absolute;
  top: 34px;
  left: 0;
  width: 100%;
  height: 40px;
  z-index: 0;
}

.pipeline-stage {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 26px 22px;
  position: relative;
  z-index: 1;
}

.stage-number {
  font-family: var(--mono);
  color: var(--amber);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.pipeline-stage h3 { font-family: var(--mono); font-size: 17px; margin-bottom: 10px; }
.pipeline-stage p  { color: var(--text-dim); font-size: 14px; line-height: 1.65; }

.packet {
  position: absolute;
  top: 8px;
  left: 0;
  font-family: var(--mono);
  font-size: 12px;
  background: var(--ink-3);
  border: 1px solid var(--red);
  color: var(--red);
  padding: 6px 12px;
  border-radius: 20px;
  white-space: nowrap;
  z-index: 2;
}

.verdict-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 52px;
}

.verdict-card {
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--line);
}

.verdict-card p { color: var(--text-dim); font-size: 14px; margin-top: 8px; line-height: 1.6; }

.verdict-tag {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 5px;
}

.verdict-card.block  .verdict-tag { background: rgba(255,107,107,0.15); color: var(--red); }
.verdict-card.review .verdict-tag { background: rgba(255,180,84,0.15);  color: var(--amber); }
.verdict-card.allow  .verdict-tag { background: rgba(94,230,160,0.15);  color: var(--green); }

/* ============ FEATURES ============ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 44px;
}

.feature-card {
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--ink-2);
  border-radius: 10px;
}

.feature-card h3 { font-family: var(--mono); font-size: 14px; margin-bottom: 8px; }
.feature-card p  { color: var(--text-dim); font-size: 13px; line-height: 1.55; }

/* ============ SHOWCASE (GALLERY) ============ */
/* Use the same section max-width — no extra wrapper needed */

.showcase-text {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 700px;
  margin: 16px 0 44px;
  line-height: 1.75;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  width: 100%;
}

.gallery-item {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  /* Ensure images never overflow their card */
  overflow: hidden;
  min-width: 0;
}

.gallery-item:first-child {
  grid-column: 1 / -1;
}

.gallery-item:hover {
  transform: translateY(-4px);
  border-color: rgba(94,230,160,0.25);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.05);
  /* Prevent any image from stretching past its container */
  max-width: 100%;
  object-fit: cover;
}

.gallery-caption {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 14px;
  line-height: 1.55;
  flex-shrink: 0;
}

.gallery-caption strong { color: var(--text); }

/* ============ GET STARTED ============ */
.steps-list {
  list-style: none;
  counter-reset: step;
  max-width: 720px;
  margin-top: 32px;
  display: grid;
  gap: 12px;
}

.steps-list li {
  counter-increment: step;
  color: var(--text-dim);
  border: 1px solid var(--line);
  background: var(--ink-2);
  border-radius: 10px;
  padding: 16px 18px 16px 58px;
  position: relative;
  transition: border-color 0.2s ease;
  line-height: 1.6;
}

.steps-list li:hover { border-color: var(--amber); }

.steps-list li::before {
  content: "0" counter(step);
  color: var(--amber);
  font-family: var(--mono);
  font-weight: 700;
  position: absolute;
  left: 18px;
  top: 16px;
}

.steps-list b { color: var(--text); }

/* ============ STACK ============ */
.stack { text-align: center; }

.stack-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 28px 0;
}

.stack-grid span {
  font-family: var(--mono);
  font-size: 13px;
  border: 1px solid var(--line);
  background: var(--ink-2);
  padding: 8px 18px;
  border-radius: 20px;
  color: var(--text);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.stack-grid span:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
}

.stack-note {
  color: var(--text-dim);
  font-size: 14px;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============ FINAL CTA ============ */
.cta-final { text-align: center; }
.cta-final p { color: var(--text-dim); font-size: 17px; margin: 16px 0 36px; }

/* ============ FOOTER ============ */
.site-footer {
  text-align: center;
  padding: 36px;
  color: var(--text-dim);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

/* ============ SCROLL REVEAL ============ */
.reveal { opacity: 0; transform: translateY(24px); }

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .cursor { animation: none; }
}

/* ============ RESPONSIVE — tablet ============ */
@media (max-width: 900px) {
  section { padding: 80px 32px; }
  .site-header { padding: 16px 24px; }
  .hero { padding: 60px 32px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  section.video-intro { padding: 60px 32px; }
}

/* ============ RESPONSIVE — mobile ============ */
@media (max-width: 700px) {
  section { padding: 64px 20px; }
  .site-header { padding: 14px 20px; flex-wrap: wrap; gap: 10px; }
  .hero { padding: 40px 20px; min-height: auto; }
  section.video-intro { padding: 48px 20px; }

  .pipeline-track { grid-template-columns: 1fr; }
  .verdict-row    { grid-template-columns: 1fr; }
  .feature-grid   { grid-template-columns: 1fr; }
  .outcomes       { grid-template-columns: 1fr; }
  .gallery        { grid-template-columns: 1fr; }
  .gallery-item:first-child { grid-column: 1; }

  .pipeline-line { display: none; }
  .packet { position: static; margin-bottom: 16px; display: inline-block; }
}

/* ============ FOCUS STATES ============ */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}
