@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;650&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --border: #e6e8ec;
  --text: #0c1a2b;
  --text-2: #5b6472;
  --text-3: #8a93a1;
  --accent-text: #a8791c;
  --accent-fill: #f5cb1d;
  --deep-gold: #d4a537;
  --success: #15803d;
  --warn: #b45309;
  --danger: #b91c1c;
  --sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: 0; }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1rem; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }

/* ---------- header ---------- */

header.site {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(12px);
  z-index: 40;
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 66px;
}
header.site img { height: 30px; width: auto; display: block; }
nav.site { display: flex; gap: 22px; align-items: center; }
nav.site a {
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
}
nav.site a:hover { color: var(--text); text-decoration: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 13px 24px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.btn:hover { text-decoration: none; opacity: 0.88; }
.btn-primary { background: var(--accent-fill); color: #0c1a2b; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-block { width: 100%; }

/* ---------- hero ---------- */

.hero { padding: 84px 0 64px; }
.kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 18px;
}
.lede {
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  color: var(--text-2);
  max-width: 44ch;
  margin-bottom: 30px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note {
  font-size: 0.85rem;
  color: var(--text-3);
  margin-top: 16px;
}

.rule {
  height: 3px;
  width: 52px;
  background: var(--accent-fill);
  border-radius: 2px;
  margin: 0 0 22px;
}

/* ---------- sections ---------- */

section { padding: 64px 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
section.alt .card { background: var(--bg); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: 0.93rem; margin: 0; }

/* ---------- spec table ---------- */

table.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
table.spec th, table.spec td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.spec thead th {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
}
table.spec td.n {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
table.spec tbody th { font-weight: 500; color: var(--text); }
.yes { color: var(--success); font-weight: 500; }
.no  { color: var(--text-3); }

/* ---------- callouts ---------- */

.note, .warn, .rec {
  border-left: 3px solid var(--deep-gold);
  background: var(--surface);
  padding: 16px 18px;
  border-radius: 0 8px 8px 0;
  font-size: 0.92rem;
  color: var(--text-2);
  margin: 0 0 20px;
}
.warn { border-left-color: var(--danger); }
.rec  { border-left-color: var(--success); }
.note p:last-child, .warn p:last-child, .rec p:last-child { margin-bottom: 0; }

/* ---------- long-form documents ---------- */

.doc { padding: 56px 0 80px; }
.doc h2 { margin-top: 44px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.doc h2:first-of-type { margin-top: 24px; }
.doc h3 { margin-top: 26px; }
.doc ul { padding-left: 20px; margin: 0 0 1rem; }
.doc li { margin-bottom: 7px; color: var(--text-2); }
.doc p { color: var(--text-2); }
.doc .updated {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-3);
}

/* ---------- download dialog ---------- */

dialog.gate {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0;
  max-width: 420px;
  width: calc(100% - 40px);
  box-shadow: 0 18px 50px rgba(12, 26, 43, 0.16);
}
dialog.gate::backdrop { background: rgba(12, 26, 43, 0.4); }
.gate-body { padding: 28px; }
.gate-body h3 { font-size: 1.22rem; margin-bottom: 6px; }
.gate-body p.sub { color: var(--text-2); font-size: 0.9rem; margin-bottom: 18px; }
.gate-body label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 6px;
}
.gate-body input[type=email] {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 14px;
  color: var(--text);
}
.gate-body input[type=email]:focus {
  outline: 2px solid var(--deep-gold);
  outline-offset: -1px;
  border-color: transparent;
}
.consent {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 0.8rem;
  color: var(--text-2);
  margin-bottom: 18px;
}
.consent input { margin-top: 3px; flex: none; }
.gate-msg { font-size: 0.85rem; margin-top: 12px; min-height: 1.2em; }
.gate-msg.err { color: var(--danger); }
.gate-msg.ok { color: var(--success); }
.gate-close {
  background: none;
  border: 0;
  color: var(--text-3);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  margin-top: 14px;
}

/* ---------- footer ---------- */

footer.site {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  font-size: 0.85rem;
  color: var(--text-3);
}
footer.site .cols {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  align-items: flex-start;
}
footer.site nav { display: flex; flex-wrap: wrap; gap: 20px; }
footer.site a { color: var(--text-2); }
footer.site img { height: 24px; width: auto; opacity: 0.9; }
.legal { margin-top: 24px; max-width: 60ch; line-height: 1.5; }

@media (max-width: 640px) {
  .hero { padding: 56px 0 44px; }
  section { padding: 48px 0; }
  nav.site { gap: 14px; }
  nav.site a { font-size: 0.82rem; }
  .btn { width: 100%; }
  .hero-actions { flex-direction: column; align-items: stretch; }
}
