:root {
  --bg: #0a0a0c;
  --bg-elevated: #111116;
  --bg-card: #16161c;
  --fg: #e8e6e3;
  --fg-muted: #8a8a8f;
  --accent: #c9a84c;
  --accent-dim: rgba(201, 168, 76, 0.15);
  --green: #4ade80;
  --red: #f87171;
  --border: #2a2a32;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Space Grotesk', system-ui, sans-serif;
  --max-w: 1100px;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 100px 24px 80px;
  overflow: hidden;
}

.hero-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 6px 14px;
  border-radius: 4px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.accent { color: var(--accent); }

.lede {
  font-size: 1.1rem;
  color: var(--fg-muted);
  max-width: 480px;
  line-height: 1.7;
}

/* Code block */
.code-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.7;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.code-filename {
  margin-left: 8px;
  color: var(--fg-muted);
  font-size: 0.75rem;
}

.code-block pre {
  padding: 20px;
  overflow-x: auto;
}

.code-block code {
  color: var(--fg);
}

.kw { color: #c792ea; }
.fn { color: #82aaff; }
.str { color: #c3e88d; }
.num { color: #f78c6c; }
.prop { color: #ffcb6b; }
.cmt { color: #546e7a; }

.board-pattern {
  position: absolute;
  bottom: -60px;
  left: 0;
  right: 0;
  height: 120px;
  background:
    repeating-conic-gradient(rgba(201,168,76,0.04) 0% 25%, transparent 0% 50%)
    0 0 / 60px 60px;
  mask: linear-gradient(to bottom, transparent, black 40%, black 60%, transparent);
  -webkit-mask: linear-gradient(to bottom, transparent, black 40%, black 60%, transparent);
  pointer-events: none;
}

/* ===== PROBLEM ===== */
.problem {
  padding: 80px 24px;
  background: var(--bg-elevated);
}

.problem-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.problem h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: -0.02em;
}

.strike {
  text-decoration: line-through;
  text-decoration-color: var(--red);
  text-decoration-thickness: 3px;
}

.problem-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: center;
}

.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}

.card-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  margin-bottom: 20px;
}

.problem-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.problem-card li {
  position: relative;
  padding-left: 20px;
  color: var(--fg-muted);
  font-size: 0.9rem;
}

.problem-card.before li::before {
  content: '\00d7';
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 700;
}

.card-verdict {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--red);
  font-weight: 500;
}

.card-verdict.good { color: var(--green); }

.problem-arrow {
  color: var(--accent);
}

.unified-api {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.api-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.api-line::before {
  content: '\2713';
  color: var(--green);
  font-weight: 700;
  font-size: 0.85rem;
}

.mono {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--fg);
  background: rgba(255,255,255,0.05);
  padding: 4px 10px;
  border-radius: 4px;
}

/* ===== FEATURES ===== */
.features {
  padding: 80px 24px;
}

.features-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.features h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: -0.02em;
}

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

.feature {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  transition: border-color 0.2s;
}

.feature:hover {
  border-color: var(--accent);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  filter: grayscale(0.3);
}

.feature h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature p {
  color: var(--fg-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ===== CLOSING ===== */
.closing {
  padding: 100px 24px;
  text-align: center;
  background: var(--bg-elevated);
  position: relative;
}

.closing-inner {
  max-width: 680px;
  margin: 0 auto;
}

.closing-piece {
  font-size: 3rem;
  margin-bottom: 24px;
  opacity: 0.3;
}

.closing h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.closing p {
  color: var(--fg-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

.closing-subtle {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-top: 32px;
}

/* ===== FOOTER ===== */
.site-footer {
  padding: 40px 24px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--fg-muted);
}

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

.footer-links a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

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

.footer-meta {
  color: var(--fg-muted);
  font-size: 0.75rem;
  opacity: 0.6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero { padding: 60px 20px 50px; }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-visual { order: -1; }

  .problem-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .problem-arrow {
    transform: rotate(90deg);
    justify-self: center;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}