/* MAD Bounty — design system
   Dark, restrained, one accent. Terminal precision meets consumer clarity. */

:root {
  --bg: #0a0c10;
  --bg-raise: #10141b;
  --bg-card: #141924;
  --line: #1f2733;
  --line-soft: #182029;
  --ink: #eef2f7;
  --ink-2: #b6c2d2;
  --ink-3: #7d8ca1;
  --accent: #2e9bff;
  --accent-soft: rgba(46, 155, 255, .12);
  --accent-line: rgba(46, 155, 255, .35);
  --danger: #ff5c5c;
  --gold: #f5b942;
  --mono: "SF Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 14px;
  --r-lg: 22px;
  --max: 1080px;
  --pad: clamp(20px, 5vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: #fff; }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; }
h1 { font-size: clamp(2.6rem, 6vw, 4.3rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { color: var(--ink-2); }
.lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--ink-2); max-width: 42ch; }
strong { color: var(--ink); font-weight: 600; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, .mono { font-family: var(--mono); font-size: .86em; }

/* ---------- layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
section { padding: clamp(56px, 9vw, 110px) 0; }
.grid { display: grid; gap: 20px; }
@media (min-width: 720px) {
  .g2 { grid-template-columns: 1fr 1fr; }
  .g3 { grid-template-columns: repeat(3, 1fr); }
  .g4 { grid-template-columns: repeat(4, 1fr); }
}
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.stack > * + * { margin-top: 14px; }

/* ---------- header ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 12, 16, .82); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; letter-spacing: -0.02em; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand svg { display: block; }
.nav .links { display: flex; gap: 22px; margin-left: auto; }
.nav .links a { color: var(--ink-2); font-size: .95rem; }
.nav .links a:hover { color: var(--ink); text-decoration: none; }
.nav .links a.active { color: var(--accent); }
@media (max-width: 640px) { .nav .links a:not(.btn) { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #4da8ff; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink-3); background: var(--bg-raise); }
.btn-sm { padding: 8px 16px; font-size: .88rem; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(72px, 11vw, 140px) 0 clamp(56px, 8vw, 96px); }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 120%;
  background:
    radial-gradient(600px 340px at 18% 20%, rgba(46, 155, 255, .16), transparent 65%),
    radial-gradient(520px 300px at 85% 12%, rgba(245, 185, 66, .07), transparent 60%);
  pointer-events: none;
}
.hero .inner { position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 26px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.hero h1 { max-width: 15ch; }
.hero h1 .accent { color: var(--accent); }
.hero .lead { margin-top: 22px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 40px; color: var(--ink-3); font-size: .85rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- cards ---------- */
.card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px;
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: .95rem; }
.icon-tile {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid var(--accent-line); margin-bottom: 18px;
  color: var(--accent);
}
.icon-tile.gold { background: rgba(245, 185, 66, .1); border-color: rgba(245, 185, 66, .3); color: var(--gold); }
.icon-tile.red { background: rgba(255, 92, 92, .1); border-color: rgba(255, 92, 92, .3); color: var(--danger); }

/* ---------- steps ---------- */
.step { position: relative; padding-top: 8px; }
.step .num {
  font-family: var(--mono); font-size: .8rem; color: var(--accent);
  border: 1px solid var(--accent-line); background: var(--accent-soft);
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 16px;
}
.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { font-size: .93rem; }

/* ---------- stats / proof ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--bg-raise); padding: 26px 24px; }
.stat .v { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.03em; }
.stat .k { color: var(--ink-3); font-size: .82rem; margin-top: 4px; }
.stat .v .unit { color: var(--ink-3); font-size: 1rem; font-weight: 500; }

/* ---------- tables (specs) ---------- */
.spec { width: 100%; border-collapse: collapse; font-size: .92rem; }
.spec th, .spec td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.spec th { color: var(--ink-3); font-weight: 500; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.spec td:first-child { color: var(--ink); font-weight: 500; white-space: nowrap; }
.spec tr:last-child td { border-bottom: 0; }

/* ---------- callout ---------- */
.callout {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  border-radius: 0 var(--r) var(--r) 0; padding: 16px 20px; font-size: .93rem; color: var(--ink-2);
}
.callout.warn { border-color: var(--danger); background: rgba(255, 92, 92, .07); }
.callout strong { color: var(--ink); }

/* ---------- code block ---------- */
.pre {
  background: #0d1017; border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 20px; overflow-x: auto; font-family: var(--mono); font-size: .84rem; line-height: 1.7;
  color: #c9d6e5;
}
.pre .c { color: var(--ink-3); }
.pre .k { color: var(--accent); }
.pre .s { color: var(--gold); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line-soft); padding: 44px 0 60px; margin-top: 40px; }
.foot { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: flex-start; }
.foot .col { display: grid; gap: 10px; font-size: .9rem; }
.foot .col .h { color: var(--ink-3); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.foot .col a { color: var(--ink-2); }
.foot .col a:hover { color: var(--ink); }
.foot .fine { margin-top: 34px; color: var(--ink-3); font-size: .8rem; max-width: 72ch; line-height: 1.6; }

/* ---------- section headers ---------- */
.sec-head { margin-bottom: clamp(28px, 4vw, 44px); }
.sec-head .kicker { color: var(--accent); font-weight: 600; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }
.sec-head p { margin-top: 12px; max-width: 58ch; }

/* ---------- faq ---------- */
details {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-card);
  padding: 0 22px; transition: border-color .15s ease;
}
details + details { margin-top: 12px; }
details[open] { border-color: var(--accent-line); }
summary {
  cursor: pointer; padding: 18px 0; font-weight: 600; font-size: .98rem; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--ink-3); font-size: 1.2rem; transition: transform .2s ease; }
details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
details .body { padding: 0 0 20px; color: var(--ink-2); font-size: .93rem; max-width: 72ch; }

/* ---------- misc ---------- */
.pill {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .05em;
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2);
  background: var(--bg-raise); text-transform: uppercase;
}
.pill.blue { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.pill.gold { color: var(--gold); border-color: rgba(245,185,66,.3); background: rgba(245,185,66,.08); }
.pill.red  { color: var(--danger); border-color: rgba(255,92,92,.3); background: rgba(255,92,92,.07); }
.addr { font-family: var(--mono); font-size: .78rem; color: var(--ink-3); word-break: break-all; }
.divider { border: 0; border-top: 1px solid var(--line-soft); margin: clamp(40px,6vw,72px) 0; }
.toc { border: 1px solid var(--line); border-radius: var(--r); padding: 18px 22px; background: var(--bg-raise); }
.toc a { display: block; padding: 3px 0; color: var(--ink-2); font-size: .9rem; }
