/* =========================================================
   Kingdom of David — Shared Design System
   Mobile-first · Three pages: Vision | Wealth | Plan
   ========================================================= */

:root {
  /* Vision palette */
  --vision-abyss: #04121F;
  --vision-deep: #071E33;
  --vision-panel: #0A2740;
  --vision-ocean: #0E5A8A;
  --vision-charcoal: #14181C;
  --vision-gold: #C9A24B;
  --vision-white: #FFFFFF;

  /* Wealth palette */
  --wealth-black: #0A0A0C;
  --wealth-night: #160A26;
  --wealth-purple: #2A0F4A;
  --wealth-gold: #D4AF37;
  --wealth-gold-light: #F1D78A;

  /* Plan palette */
  --plan-deep: #240D40;
  --plan-royal: #4A1A7A;
  --plan-gold: #C9A24B;
  --plan-red: #B3243A;

  /* Shared */
  --text: #E8ECF0;
  --text-muted: #A0AAB4;
  --line: rgba(255,255,255,0.12);
  --radius: 4px;
  --max: 1180px;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: #000;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--vision-gold);
  color: #000;
  padding: 0.5rem 1rem;
  z-index: 1000;
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--vision-gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  color: var(--vision-gold);
  font-weight: 700;
}
.nav-links {
  display: flex;
  gap: 0.25rem;
}
.nav-links a {
  padding: 0.45rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-links a:hover,
.nav-links a:focus-visible {
  color: #fff;
  outline: none;
}
.nav-links a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--page-accent, var(--vision-gold));
}

/* Mobile nav — three items fit, no hamburger needed */
@media (max-width: 520px) {
  .nav-links a {
    padding: 0.4rem 0.55rem;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
  }
  .brand span { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  text-align: center;
}
.btn:focus-visible {
  outline: 2px solid var(--vision-gold);
  outline-offset: 3px;
}
.btn-primary {
  background: var(--page-accent, var(--vision-gold));
  color: #0A0A0C;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.35);
}
.btn-ghost:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.06);
}
.btn-dashed {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px dashed rgba(255,255,255,0.25);
  cursor: default;
}
.btn-sm { padding: 0.55rem 1rem; font-size: 0.72rem; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--page-accent, var(--vision-gold));
  margin: 0 0 0.75rem;
}
.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 1rem;
  color: #fff;
}
.display-xl { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.display-lg { font-size: clamp(1.9rem, 4vw, 3rem); }
.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 36em;
  margin: 0 0 1.5rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: #fff;
  margin: 0 0 1rem;
}

/* ---------- Status chips (from blueprint) ---------- */
.chip {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}
.chip-v { background: #DDF3E6; color: #14532D; }
.chip-cf { background: #DCE6FF; color: #1E3A8A; }
.chip-u { background: #FBDDDD; color: #7F1D1D; }
.chip-r { background: #FFE2C2; color: #7A3A00; }
.chip-a { background: #FFF1CC; color: #6B4B00; }
.chip-q { background: #E5E7EB; color: #374151; }

/* ---------- Cards ---------- */
.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.5rem;
}
.card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
  color: #fff;
}
.card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  margin-top: 4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}
.footer-nav a:hover { color: #fff; }
.risk-note {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  line-height: 1.55;
  color: #8A939C;
}

/* =========================================================
   PAGE: VISION
   ========================================================= */
body.page-vision {
  --page-accent: var(--vision-gold);
  background: var(--vision-abyss);
}
.vision-hero {
  padding: 3rem 0 4rem;
  min-height: min(88vh, 820px);
  display: flex;
  align-items: center;
}
.vision-hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 860px) {
  .vision-hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3.5rem;
  }
}
.vision-hero-copy .display { margin-bottom: 0.75rem; }
.vision-quote {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-style: italic;
  color: var(--vision-gold);
  margin: 0 0 1.75rem;
  line-height: 1.35;
}
.vision-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.vision-photo-wrap {
  position: relative;
  justify-self: center;
  max-width: 380px;
  width: 100%;
}
.vision-photo {
  width: 100%;
  border: 1px solid rgba(201,162,75,0.35);
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  background: #000;
}
.vision-photo-caption {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}
.vision-photo-caption a {
  color: var(--vision-gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Pillars */
.pillars {
  padding: 1rem 0 4rem;
}
.pillars-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 700px) {
  .pillars-grid { grid-template-columns: repeat(3, 1fr); }
}
.pillar {
  display: block;
  padding: 1.75rem 1.5rem;
  background: var(--vision-panel);
  border: 1px solid rgba(14,90,138,0.4);
  border-radius: 6px;
  transition: border-color 0.2s, transform 0.2s;
  height: 100%;
}
.pillar:hover {
  border-color: var(--vision-gold);
  transform: translateY(-2px);
}
.pillar-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--vision-gold);
  margin-bottom: 0.5rem;
}
.pillar h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
  color: #fff;
}
.pillar p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.journey {
  padding: 3rem 0 4rem;
  border-top: 1px solid var(--line);
}
.journey p { max-width: 42em; color: var(--text-muted); }

/* =========================================================
   PAGE: WEALTH
   ========================================================= */
body.page-wealth {
  --page-accent: var(--wealth-gold);
  background: var(--wealth-black);
}
.wealth-hero {
  padding: 3rem 0 3.5rem;
  background: linear-gradient(165deg, var(--wealth-night) 0%, var(--wealth-black) 55%);
}
.wealth-hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 860px) {
  .wealth-hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
  }
}
.wealth-logo-frame {
  justify-self: center;
  width: min(260px, 70vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #3a1a5c 0%, #160A26 60%, #0A0A0C 100%);
  border: 2px solid var(--wealth-gold);
  box-shadow: 0 0 40px rgba(212,175,55,0.18), inset 0 0 30px rgba(0,0,0,0.4);
  display: grid;
  place-items: center;
  padding: 1.5rem;
}
.wealth-logo-frame img {
  width: 78%;
  border-radius: 50%;
}
.wealth-dog-note {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.wealth-dog-note a { color: var(--wealth-gold); text-decoration: underline; text-underline-offset: 2px; }

.contract-box {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 6px;
}
.contract-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wealth-gold);
  margin-bottom: 0.45rem;
}
.contract-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
.contract-address {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  word-break: break-all;
  color: #fff;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(212,175,55,0.15);
  color: var(--wealth-gold);
  border: 1px solid rgba(212,175,55,0.35);
  border-radius: 3px;
  transition: background 0.15s;
}
.copy-btn:hover { background: rgba(212,175,55,0.28); }
.copy-btn.is-copied { background: #14532D; color: #DDF3E6; border-color: #14532D; }

.facts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1.25rem 0;
}
.facts-table th,
.facts-table td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.facts-table th {
  width: 38%;
  color: var(--text-muted);
  font-weight: 500;
}
.facts-table td { color: #fff; }

.section {
  padding: 3.5rem 0;
  border-top: 1px solid var(--line);
}
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 1rem;
}
.steps li {
  position: relative;
  padding: 1.25rem 1.25rem 1.25rem 3.5rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1.1rem;
  top: 1.2rem;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--wealth-gold);
  color: #0A0A0C;
  border-radius: 50%;
}
.steps strong { color: #fff; display: block; margin-bottom: 0.25rem; }
.steps p { margin: 0; font-size: 0.92rem; color: var(--text-muted); }

.risk-box {
  margin-top: 2rem;
  padding: 1.35rem 1.5rem;
  background: rgba(179,36,58,0.08);
  border: 1px solid rgba(179,36,58,0.3);
  border-radius: 6px;
  font-size: 0.88rem;
  color: #D4C0C4;
}
.risk-box strong { color: #F1D0D4; }

.page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* =========================================================
   PAGE: PLAN
   ========================================================= */
body.page-plan {
  --page-accent: var(--plan-gold);
  background: var(--plan-deep);
}
.plan-hero {
  padding: 3.5rem 0 3rem;
  border-bottom: 3px solid var(--plan-red);
}
.plan-hero .display { max-width: 14ch; }
.plan-theme {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--plan-gold);
  margin: 0.5rem 0 1.5rem;
  font-style: italic;
}
.strategy-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
}
@media (min-width: 700px) {
  .strategy-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .strategy-grid { grid-template-columns: repeat(4, 1fr); }
}
.strategy-card {
  padding: 1.5rem 1.25rem;
  background: rgba(74,26,122,0.35);
  border: 1px solid rgba(201,162,75,0.2);
  border-radius: 6px;
  text-align: center;
}
.strategy-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--plan-gold);
  margin-bottom: 0.35rem;
}
.strategy-card h3 {
  font-size: 1rem;
  margin: 0 0 0.4rem;
  color: #fff;
}
.strategy-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.books-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}
@media (min-width: 700px) {
  .books-grid { grid-template-columns: repeat(3, 1fr); }
}
.book-card {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.book-cover {
  aspect-ratio: 3/4;
  background: linear-gradient(160deg, #3a1a5c, #1a0a2e);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}
.book-body {
  padding: 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.book-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
  color: #fff;
}
.book-body p {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  flex: 1;
}
.placeholder-note {
  font-size: 0.78rem;
  color: #8A939C;
  font-style: italic;
  margin-top: 0.5rem;
}

/* Toast for copy */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: #14532D;
  color: #DDF3E6;
  padding: 0.65rem 1.25rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 200;
  transition: transform 0.25s ease;
  pointer-events: none;
}
.toast.is-visible { transform: translateX(-50%) translateY(0); }
.toast.is-error { background: #7F1D1D; color: #FBDDDD; }

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
