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

:root {
  --bg: #060810;
  --surface: #0c0f1a;
  --surface2: #111827;
  --border: #1a2035;
  --fg: #e8edf5;
  --fg-muted: #7a8499;
  --fg-dim: #4a5568;
  --cyan: #00d4ff;
  --green: #39ff14;
  --red: #ff4757;
  --green-dim: rgba(57, 255, 20, 0.15);
  --cyan-dim: rgba(0, 212, 255, 0.12);
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'IBM Plex Sans', sans-serif;
}

html {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  font-size: 16px;
}

body { background: var(--bg); }

/* ===== LAYOUT ===== */
.hero, .problem, .features, .shiftlog-section, .metrics-section, .closing-section, .site-footer {
  width: 100%;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 60px 100px;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(0, 212, 255, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 20% 80%, rgba(57, 255, 20, 0.03) 0%, transparent 60%);
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cyan-dim);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 100px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 32px;
  width: fit-content;
}

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero-headline {
  font-family: var(--font-mono);
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--fg) 0%, #a0aec0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  line-height: 1.65;
  color: var(--fg-muted);
  max-width: 460px;
  margin-bottom: 36px;
}

.hero-terminal-tag {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--green);
  max-width: fit-content;
}

.prompt { color: var(--fg-dim); margin-right: 6px; }

/* Terminal */
.hero-terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,212,255,0.05);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.tb-dots { display: flex; gap: 7px; }
.tb-dot { width: 12px; height: 12px; border-radius: 50%; }
.tb-dot.red { background: #ff5f57; }
.tb-dot.yellow { background: #febc2e; }
.tb-dot.green { background: #28c840; }

.tb-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
}

.tb-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
}

.terminal-body {
  padding: 20px 22px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.8;
}

.t-line { display: flex; gap: 8px; align-items: baseline; color: var(--fg); }
.t-dim { color: var(--fg-dim); }
.dim { color: var(--fg-dim); }
.spacer { margin-top: 8px; }
.t-success { color: var(--green); margin-right: 6px; }
.success { color: var(--green); font-weight: 500; }

.cursor-line { margin-top: 4px; }
.cursor { color: var(--cyan); animation: blink 1s step-end infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ===== PROBLEM ===== */
.problem {
  padding: 120px 60px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.problem-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  align-items: start;
}

.problem-label, .feat-tag, .sl-badge, .metrics-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 20px;
}

.problem-headline {
  font-family: var(--font-mono);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.problem-body {
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg-muted);
  margin-bottom: 48px;
}

.problem-stat-row {
  display: flex;
  gap: 40px;
}

.problem-stat {}

.ps-num {
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 8px;
}

.ps-label {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.4;
  max-width: 140px;
}

/* ===== FEATURES ===== */
.features { padding: 120px 60px; background: var(--surface); border-top: 1px solid var(--border); }

.features-inner { max-width: 1300px; margin: 0 auto; }

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  margin-bottom: 120px;
}

.feature-row.reverse { direction: rtl; }
.feature-row.reverse > * { direction: ltr; }

.feat-headline {
  font-family: var(--font-mono);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 20px;
}

.feat-body {
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg-muted);
  margin-bottom: 28px;
}

.feat-pills { display: flex; flex-wrap: wrap; gap: 8px; }

.pill {
  background: var(--cyan-dim);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 100px;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
}

/* Viz cards */
.viz-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}

.vc-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.vc-chart { display: flex; flex-direction: column; gap: 12px; }

.vc-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vc-file {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  width: 80px;
  flex-shrink: 0;
}

.vc-bar-wrap { flex: 1; }

.vc-bar {
  background: var(--red);
  border-radius: 3px;
  height: 18px;
  width: 0;
  transition: width 1.2s ease;
  animation: bar-grow 1.2s ease forwards;
}

@keyframes bar-grow { from { width: 0; } to { width: inherit; } }

.vc-bar::after {
  content: attr(data-val);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-muted);
  margin-left: 8px;
}

.vc-result {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.vc-arrow { font-size: 20px; color: var(--cyan); }

.vc-after { display: flex; flex-direction: column; gap: 2px; }

.vc-score {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--green);
}

.vc-reduced {
  font-size: 11px;
  color: var(--fg-dim);
}

/* Coverage bars */
.coverage-bars { display: flex; flex-direction: column; gap: 14px; }

.cb-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cb-name {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  width: 50px;
  flex-shrink: 0;
}

.cb-track {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.cb-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}

.cb-fill.high { background: var(--green); }
.cb-fill.medium { background: var(--cyan); }
.cb-fill.low { background: var(--red); }

.cb-pct {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  width: 36px;
  text-align: right;
}

.cb-fill-legend {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.cf-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Shift log card */
.viz-card.slim { padding: 0; overflow: hidden; }

.sl-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.sl-logo {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--bg);
  flex-shrink: 0;
}

.sl-meta { display: flex; flex-direction: column; gap: 2px; }
.sl-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
}
.sl-date { font-size: 11px; color: var(--fg-dim); }

.sl-items { padding: 8px 0; }

.sl-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--border);
}

.sl-item:last-child { border-bottom: none; }

.sl-icon {
  color: var(--green);
  flex-shrink: 0;
  margin-top: 1px;
}

.sl-text { line-height: 1.5; }

.sl-footer {
  padding: 12px 22px;
  background: var(--surface2);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
}

/* ===== SHIFT LOG SECTION ===== */
.shiftlog-section {
  padding: 120px 60px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.sl-inner {
  max-width: 1300px;
  margin: 0 auto;
}

.sl-head { text-align: center; margin-bottom: 80px; }

.sl-headline {
  font-family: var(--font-mono);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.sl-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}

.sl-steps::before {
  content: '';
  position: absolute;
  top: 32px;
  left: calc(16.67% + 20px);
  right: calc(16.67% + 20px);
  height: 1px;
  background: linear-gradient(90deg, var(--border) 0%, var(--cyan) 50%, var(--border) 100%);
}

.sl-step {
  padding: 40px 36px;
  border-right: 1px solid var(--border);
}

.sl-step:last-child { border-right: none; }

.ss-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.ss-title {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 14px;
  line-height: 1.3;
}

.ss-body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--fg-muted);
  margin-bottom: 24px;
}

.ss-code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
}

.sc-prompt { color: var(--fg-dim); margin-right: 6px; }

/* ===== METRICS ===== */
.metrics-section {
  padding: 120px 60px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.metrics-inner { max-width: 1300px; margin: 0 auto; text-align: center; }

.metrics-label { display: block; margin-bottom: 60px; }

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

.metric-card {
  padding: 48px 32px;
  background: var(--surface2);
  border: 1px solid var(--border);
  text-align: left;
}

.mc-value {
  font-family: var(--font-mono);
  font-size: 52px;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.mc-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.4;
  margin-bottom: 10px;
}

.mc-note {
  font-size: 12px;
  color: var(--fg-dim);
  line-height: 1.4;
}

/* ===== CLOSING ===== */
.closing-section {
  padding: 120px 60px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.closing-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.closing-quote {}

.cq-text {
  font-family: var(--font-mono);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.6;
  color: var(--fg-muted);
  margin-bottom: 32px;
  font-style: italic;
}

.cq-attr {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cq-line {
  width: 32px;
  height: 2px;
  background: var(--cyan);
}

.cq-attr span {
  font-size: 13px;
  color: var(--fg-dim);
}

.cta-headline {
  font-family: var(--font-mono);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 20px;
}

.cta-body {
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg-muted);
}

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

.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.footer-brand { display: flex; align-items: center; gap: 14px; }

.fb-logo {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--bg);
}

.fb-text { display: flex; flex-direction: column; gap: 2px; }
.fb-name { font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--fg); }
.fb-tagline { font-size: 12px; color: var(--fg-dim); }

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

.footer-links a {
  font-size: 13px;
  color: var(--fg-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--fg-muted); }

.footer-copy { font-size: 12px; color: var(--fg-dim); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero, .problem, .features, .shiftlog-section, .metrics-section, .closing-section { padding: 80px 40px; }
  .hero-inner { grid-template-columns: 1fr; gap: 60px; }
  .hero-terminal { max-width: 560px; }
  .problem-inner { grid-template-columns: 1fr; gap: 48px; }
  .feature-row { grid-template-columns: 1fr; gap: 48px; }
  .feature-row.reverse { direction: ltr; }
  .sl-steps { grid-template-columns: 1fr; gap: 0; }
  .sl-steps::before { display: none; }
  .sl-step { border-right: none; border-bottom: 1px solid var(--border); }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .closing-inner { grid-template-columns: 1fr; }
  .footer-inner { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .hero, .problem, .features, .shiftlog-section, .metrics-section, .closing-section { padding: 60px 24px; }
  .site-footer { padding: 40px 24px; }
  .metrics-grid { grid-template-columns: 1fr; }
  .problem-stat-row { flex-direction: column; gap: 24px; }
  .ps-num { font-size: 32px; }
  .mc-value { font-size: 36px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}