/* ProofOfLife design system — black envelope / wax seal / antique gold.
   Quiet. Serious. Premium. No gradients-for-show, no particles, no memes. */

:root {
  --bg: #080808;
  --surface: #101010;
  --elevated: #151515;
  --border: #202020;
  --border-soft: #181818;
  --text: #E8E5DF;
  --muted: #77736C;
  --faint: #4a4741;
  --gold: #C8A24A;
  --gold-bright: #E3C878;
  --gold-dim: #7a6535;
  --danger: #8e3b3b;
  --danger-text: #d98a8a;
  --success: #4a7c59;
  --success-text: #8fc39e;
  --serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --sans: 'Inter', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
  --radius: 10px;
}

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

html { scroll-behavior: smooth; }

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

::selection { background: rgba(200, 162, 74, 0.25); }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); }

/* ---------- layout ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
section { padding: 96px 0; }
.eyebrow {
  font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--gold-dim); margin-bottom: 20px; font-weight: 600;
}

/* ---------- type ---------- */
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 500; }
h1 { font-size: clamp(44px, 7vw, 84px); line-height: 1.05; letter-spacing: -0.01em; }
h2 { font-size: clamp(32px, 4.5vw, 52px); line-height: 1.12; margin-bottom: 18px; }
h3 { font-size: 24px; margin-bottom: 10px; }
.lede { font-size: 19px; color: var(--muted); max-width: 640px; }
.mono { font-family: var(--mono); font-size: 13px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 8, 8, 0.86); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand span { font-family: var(--serif); font-size: 22px; letter-spacing: 0.02em; }
.nav-links { display: flex; gap: 28px; align-items: center; font-size: 14px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  padding: 14px 30px; border-radius: 8px; border: 1px solid transparent;
  cursor: pointer; transition: all 0.25s ease; white-space: nowrap;
}
.btn-gold { background: var(--gold); color: #0a0a0a; }
.btn-gold:hover { background: var(--gold-bright); color: #0a0a0a; transform: translateY(-1px); }
.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--gold-dim); color: var(--gold-bright); }
.btn-danger-ghost { border-color: #3a2323; color: var(--danger-text); background: transparent; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-large { padding: 18px 44px; font-size: 17px; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 110px 0 90px; position: relative; overflow: hidden; }
.hero-logo { width: min(340px, 70vw); margin: 0 auto 36px; display: block;
  filter: drop-shadow(0 0 60px rgba(200, 162, 74, 0.14)); }
.hero h1 { margin-bottom: 22px; }
.hero h1 em { font-style: normal; color: var(--gold-bright); }
.hero .lede { margin: 0 auto 40px; }
.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 26px; font-size: 13px; color: var(--faint); letter-spacing: 0.08em; }

/* ---------- cards / panels ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 32px;
}
.card.glow { border-color: rgba(200, 162, 74, 0.28); box-shadow: 0 0 44px rgba(200, 162, 74, 0.07); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-5 { grid-template-columns: 1fr; } }

/* ---------- steps ---------- */
.step-num {
  font-family: var(--serif); font-size: 40px; color: var(--gold-dim);
  display: block; margin-bottom: 12px;
}
.step-card h3 { margin-bottom: 8px; }
.step-card p { color: var(--muted); font-size: 15px; }

/* ---------- trust diagram ---------- */
.trust-flow { display: flex; flex-direction: column; align-items: center; gap: 0; margin: 48px auto 0; max-width: 560px; }
.trust-node {
  width: 100%; text-align: center; padding: 18px 24px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 15px;
}
.trust-node strong { display: block; font-size: 17px; margin-bottom: 2px; }
.trust-node small { color: var(--muted); font-size: 13px; }
.trust-node.gold { border-color: rgba(200, 162, 74, 0.4); }
.trust-node.gold strong { color: var(--gold-bright); }
.trust-arrow { color: var(--gold-dim); font-size: 22px; line-height: 1; padding: 8px 0; }
.trust-tag {
  display: inline-block; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 20px; margin-top: 8px;
}
.trust-tag.ok { color: var(--success-text); border: 1px solid rgba(74, 124, 89, 0.5); }
.trust-tag.warn { color: var(--gold-bright); border: 1px solid rgba(200, 162, 74, 0.5); }

/* ---------- forms ---------- */
.field { margin-bottom: 22px; }
.field label { display: block; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; font-weight: 600; }
.field input, .field textarea, .field select {
  width: 100%; background: var(--elevated); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); padding: 14px 16px; font-size: 16px; font-family: var(--sans);
}
.field textarea { min-height: 130px; resize: vertical; font-family: var(--mono); font-size: 14px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--gold-dim); box-shadow: 0 0 0 3px rgba(200, 162, 74, 0.12);
}
.field .hint { font-size: 13px; color: var(--faint); margin-top: 8px; }
.field .error { font-size: 13px; color: var(--danger-text); margin-top: 8px; display: none; }
.seal-warning {
  border: 1px solid rgba(142, 59, 59, 0.45); background: rgba(142, 59, 59, 0.08);
  border-radius: var(--radius); padding: 18px 20px; font-size: 14px; color: var(--danger-text);
  margin: 24px 0;
}

/* ---------- wizard ---------- */
.wizard-steps { display: flex; gap: 8px; margin-bottom: 36px; }
.wizard-steps .wstep {
  flex: 1; height: 4px; border-radius: 2px; background: var(--border);
}
.wizard-steps .wstep.done, .wizard-steps .wstep.now { background: var(--gold); }
.wizard-nav { display: flex; justify-content: space-between; margin-top: 32px; gap: 16px; }
.seal-stages { display: flex; justify-content: center; gap: 14px; margin: 34px 0; flex-wrap: wrap; }
.seal-stage {
  padding: 12px 22px; border: 1px solid var(--border); border-radius: 24px;
  font-size: 14px; color: var(--faint); transition: all 0.4s ease;
}
.seal-stage.lit { border-color: var(--gold); color: var(--gold-bright); box-shadow: 0 0 24px rgba(200, 162, 74, 0.18); }

/* ---------- dashboard ---------- */
.status-hero { text-align: center; padding: 56px 0 40px; }
.status-word {
  font-family: var(--serif); font-size: clamp(40px, 6vw, 68px);
  color: var(--gold-bright); letter-spacing: 0.06em; margin-bottom: 8px;
}
.status-word.warning { color: #d8a05a; }
.status-word.grace { color: var(--danger-text); }
.countdown { font-family: var(--mono); font-size: clamp(28px, 5vw, 52px); letter-spacing: 0.04em; margin: 18px 0 6px; }
.countdown-label { color: var(--muted); font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; }
.alive-btn { margin: 30px 0 10px; }
.panel-title { font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; font-weight: 600; }
.kv { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border-soft); font-size: 15px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { text-align: right; }
.pill { display: inline-block; padding: 4px 14px; border-radius: 20px; font-size: 12px; letter-spacing: 0.14em; font-weight: 700; }
.pill.ok { color: var(--success-text); border: 1px solid rgba(74, 124, 89, 0.55); }
.pill.warn { color: var(--gold-bright); border: 1px solid rgba(200, 162, 74, 0.55); }
.pill.bad { color: var(--danger-text); border: 1px solid rgba(142, 59, 59, 0.55); }

/* state timeline */
.state-track { display: flex; align-items: stretch; margin: 8px 0 4px; overflow-x: auto; padding-bottom: 8px; }
.state-node { flex: 1; min-width: 110px; text-align: center; position: relative; padding-top: 26px; }
.state-node::before {
  content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--elevated); border: 1px solid var(--faint);
}
.state-node::after {
  content: ''; position: absolute; top: 14px; left: calc(-50% + 10px); right: calc(50% + 10px);
  height: 1px; background: var(--border);
}
.state-node:first-child::after { display: none; }
.state-node.done::before { background: var(--gold-dim); border-color: var(--gold-dim); }
.state-node.now::before { background: var(--gold); border-color: var(--gold-bright); box-shadow: 0 0 16px rgba(200, 162, 74, 0.55); }
.state-node .sn { font-size: 12px; letter-spacing: 0.1em; color: var(--muted); }
.state-node.now .sn { color: var(--gold-bright); font-weight: 700; }

/* event feed */
.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border-soft); }
.feed-item:last-child { border-bottom: none; }
.feed-time { font-family: var(--mono); font-size: 12px; color: var(--faint); min-width: 86px; padding-top: 3px; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-dim); margin-top: 7px; flex-shrink: 0; }
.feed-body { font-size: 14px; }
.feed-body small { display: block; color: var(--faint); font-size: 12px; margin-top: 2px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--border-soft); padding: 48px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-inner p { color: var(--faint); font-size: 13px; max-width: 520px; }

/* ---------- misc ---------- */
.hidden { display: none !important; }
.center { text-align: center; }
.mt-2 { margin-top: 16px; } .mt-4 { margin-top: 32px; }
.divider { height: 1px; background: var(--border-soft); margin: 40px 0; }
.test-watermark {
  background: rgba(200, 162, 74, 0.08); border: 1px dashed rgba(200, 162, 74, 0.45);
  color: var(--gold-bright); font-size: 13px; padding: 12px 18px; border-radius: 8px;
  text-align: center; margin-bottom: 24px; letter-spacing: 0.04em;
}
.api-bar { display: flex; gap: 10px; margin-bottom: 24px; }
.api-bar input { flex: 1; background: var(--elevated); border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 10px 14px; font-size: 13px; font-family: var(--mono); }
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--elevated); border: 1px solid var(--gold-dim); color: var(--text);
  padding: 14px 26px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none;
  transition: all 0.3s ease; z-index: 100; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: var(--danger); }

@media (max-width: 640px) {
  section { padding: 64px 0; }
  .nav-links a:not(.btn) { display: none; }
  .wizard-nav { flex-direction: column-reverse; }
  .wizard-nav .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
