:root {
  --ink: #0d0b12;
  --ink-soft: #17141f;
  --ink-softer: #201c2b;
  --paper: #f3ead9;
  --paper-dim: #e8dcc2;
  --seal: #8368ff;
  --seal-deep: #6a4de8;
  --brass: #d1a85a;
  --brass-soft: #9c824f;
  --fg: #f4f1ea;
  --muted: #a49cb0;
  --line: rgba(244, 241, 234, 0.11);
  --line-strong: rgba(244, 241, 234, 0.2);
  --code-bg: #100e17;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --ink: #f7f2e7;
    --ink-soft: #ffffff;
    --ink-softer: #efe8d8;
    --paper: #ffffff;
    --paper-dim: #efe8d8;
    --seal: #6a4de8;
    --seal-deep: #5638c9;
    --brass: #9c7a2e;
    --brass-soft: #b3924a;
    --fg: #211c2c;
    --muted: #675f75;
    --line: rgba(33, 28, 44, 0.12);
    --line-strong: rgba(33, 28, 44, 0.22);
    --code-bg: #211c2c;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1100px 620px at 82% -10%, color-mix(in srgb, var(--seal) 16%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 15%, color-mix(in srgb, var(--brass) 10%, transparent), transparent 55%),
    var(--ink);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--seal); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 24px;
}
.nav .brand {
  display: flex;
  align-items: center;
  color: var(--fg);
}
/* Icon + wordmark are one fixed SVG (assets/lockup.svg) with their relative size and
   spacing baked in, so the lockup looks identical everywhere it's used -- callers only
   ever set a single height, never size the mark and the wordmark independently. */
.nav .brand .lockup {
  height: 21px;
  width: auto;
  display: block;
}
.nav .links { display: flex; gap: 26px; font-size: 14px; }
.nav .links a { color: var(--muted); }
.nav .links a.active, .nav .links a:hover { color: var(--fg); text-decoration: none; }
.nav .links a.active { position: relative; }
.nav .links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -8px;
  height: 2px;
  background: var(--brass);
  border-radius: 2px;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* ---------- hero ---------- */
.hero {
  padding: 56px 24px 24px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 56px;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 25%, transparent);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.4vw, 68px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0 0 22px;
  color: var(--fg);
}
.hero h1 em {
  font-style: italic;
  color: var(--seal);
}
.hero p.lead {
  color: var(--muted);
  font-size: 17.5px;
  max-width: 480px;
  margin: 0 0 30px;
}
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 11px;
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid var(--line-strong);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn.primary {
  background: linear-gradient(160deg, var(--seal), var(--seal-deep));
  color: #ffffff;
  border: none;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--seal) 35%, transparent);
}
.btn.primary:hover { transform: translateY(-1px); text-decoration: none; }
.btn.secondary { color: var(--fg); }
.btn.secondary:hover { background: var(--ink-soft); text-decoration: none; transform: translateY(-1px); }

/* ---------- signature visual: one credential, many doors ---------- */
.credential-scene {
  position: relative;
  display: grid;
  gap: 14px;
  justify-items: stretch;
}
.credential-card {
  position: relative;
  background: linear-gradient(155deg, var(--paper), var(--paper-dim));
  color: #241d12;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--brass) 40%, transparent);
  z-index: 2;
}
.credential-card .cc-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.credential-card .cc-seal {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(155deg, var(--seal), var(--seal-deep));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.35);
}
.credential-card .cc-seal svg { width: 15px; height: 15px; }
.credential-card .cc-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: #6b5a34; font-weight: 700; }
.credential-card .cc-name { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.credential-card .cc-id {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #6b5a34;
  letter-spacing: 0.01em;
  word-break: break-all;
}

.door-rail {
  position: relative;
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px;
  display: grid;
  gap: 4px;
  z-index: 1;
}
.door-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 11px;
}
.door-row .door-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--ink-softer);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--muted);
}
.door-row .door-icon svg { width: 16px; height: 16px; }
.door-row .door-label { font-size: 13.5px; color: var(--fg); font-weight: 550; flex: 1; }
.door-row .door-stamp {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: transparent;
  background: transparent;
  animation: stamp-in 0.5s ease-out both;
  animation-delay: calc(var(--stamp-order, 0) * 0.32s + 0.5s);
}
.door-row .door-stamp svg { width: 12px; height: 12px; }
@keyframes stamp-in {
  0% { transform: scale(1.7); border-color: var(--line-strong); color: transparent; background: transparent; }
  55% { transform: scale(0.92); }
  70% { border-color: var(--brass); background: color-mix(in srgb, var(--brass) 22%, transparent); color: var(--brass); }
  100% { transform: scale(1); border-color: var(--brass); background: color-mix(in srgb, var(--brass) 22%, transparent); color: var(--brass); }
}
@media (prefers-reduced-motion: reduce) {
  .door-row .door-stamp {
    animation: none;
    border-color: var(--brass);
    background: color-mix(in srgb, var(--brass) 22%, transparent);
    color: var(--brass);
  }
}
.credential-scene .scene-caption {
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  padding-top: 2px;
}

/* ---------- compare section ---------- */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 36px 0 8px;
}
@media (max-width: 800px) {
  .compare-grid { grid-template-columns: 1fr; }
}
.compare-card {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
}
.compare-card h3 { margin: 0 0 4px; font-size: 15.5px; font-family: var(--font-display); font-weight: 600; }
.compare-card .compare-kicker { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 6px; display: block; }
.compare-card p { margin: 0; color: var(--muted); font-size: 13.5px; }
.compare-card.is-bitlogin {
  background: linear-gradient(165deg, color-mix(in srgb, var(--seal) 16%, var(--ink-soft)), var(--ink-soft));
  border-color: color-mix(in srgb, var(--brass) 55%, var(--line));
  box-shadow: 0 18px 40px color-mix(in srgb, var(--seal) 18%, transparent);
  transform: translateY(-6px);
}
@media (max-width: 800px) {
  .compare-card.is-bitlogin { transform: none; }
}
.compare-card.is-bitlogin .compare-kicker { color: var(--brass); }
.compare-card.is-bitlogin p { color: var(--fg); opacity: 0.85; }

/* ---------- diagram (kept for docs/account pages) ---------- */
.diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 48px 0;
  font-size: 13.5px;
}
.diagram .step {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  min-width: 140px;
  text-align: center;
}
.diagram .step .k { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.diagram .arrow { color: var(--brass); font-size: 18px; }

/* ---------- feature grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 40px 0;
}
.feature {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.feature:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.feature h3 { margin: 0 0 8px; font-size: 15.5px; font-family: var(--font-display); font-weight: 600; }
.feature p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* Six cards in a grid that's four columns wide leaves a lopsided 4+2 last row --
   pin that row's two cards under the middle two columns instead of the left two. */
@media (min-width: 860px) {
  .grid-center-last-row { grid-template-columns: repeat(4, 1fr); }
  .grid-center-last-row .feature:nth-child(5) { grid-column: 2 / 3; }
  .grid-center-last-row .feature:nth-child(6) { grid-column: 3 / 4; }
}

section { padding: 20px 0 40px; }
h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
p.section-sub { color: var(--muted); margin: 0 0 28px; max-width: 620px; }

pre {
  background: var(--code-bg);
  color: #ece8f5;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.55;
}
code { font-family: var(--font-mono); }
:not(pre) > code {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 0.92em;
}

.step-list { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.step-list > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 28px 44px;
  border-left: 2px solid var(--line);
  margin-left: 15px;
}
.step-list > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.step-list > li::before {
  content: counter(step);
  position: absolute;
  left: -15px;
  top: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(155deg, var(--seal), var(--seal-deep));
  color: white;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-list h3 { margin: 2px 0 8px; font-size: 16px; font-family: var(--font-display); font-weight: 600; }

.callout {
  border: 1px solid var(--line);
  background: var(--ink-soft);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--muted);
  margin: 18px 0;
}
.callout strong { color: var(--fg); }

.app-layout {
  display: flex;
  justify-content: center;
  padding: 48px 24px 80px;
  gap: 40px;
}
.app-layout .side {
  max-width: 340px;
}
.app-layout .side h1 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.app-layout .side p { color: var(--muted); font-size: 14px; }
@media (max-width: 820px) {
  .app-layout { flex-direction: column; align-items: center; gap: 24px; }
  .app-layout .side { max-width: 460px; text-align: center; }
}

footer {
  border-top: 1px solid var(--line);
  padding: 28px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
footer .footer-links {
  margin-top: 8px;
}
