/* Vaultra RP website. Brand tokens from D-002 (docs/NAMING.md, brand/): solid panels, no glass or blur. */
@font-face { font-family: "Chakra Petch"; src: url("../fonts/ChakraPetch-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Chakra Petch"; src: url("../fonts/ChakraPetch-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  --gold: #E8B54A;        /* Vault Gold */
  --teal: #3CCFD8;        /* Signal Teal */
  --steel: #0A0D13;       /* Night Steel */
  --surface: #18202C;     /* panel surface */
  --surface-2: #1F2937;   /* raised panel */
  --line: #2C3848;        /* panel border */
  --text: #E6EDF5;
  --muted: #9AA6B8;
  --gold-soft: rgba(232, 181, 74, 0.14);
  --teal-soft: rgba(60, 207, 216, 0.14);
  --radius: 14px;
  --display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--steel);
  color: var(--text);
  font: 400 16px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: #7FE3EA; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

/* Backdrop: a fine vault-door grid and two slow light sweeps, drawn behind everything. */
.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.backdrop::before {
  content: ""; position: absolute; inset: -2px;
  background-image:
    linear-gradient(rgba(44, 56, 72, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44, 56, 72, 0.35) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 30%, transparent 80%);
}
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 420px at 18% 12%, rgba(232, 181, 74, 0.10), transparent 70%),
    radial-gradient(520px 380px at 85% 30%, rgba(60, 207, 216, 0.08), transparent 70%);
  animation: drift 24s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(0, 40px, 0) scale(1.05); } }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10, 13, 19, 0.92);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); background: var(--steel); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand svg { width: 34px; height: 34px; }
.brand-word { font: 700 20px/1 var(--display); letter-spacing: 0.22em; color: var(--gold); }
.brand-tag {
  font: 700 11px/1 var(--display); letter-spacing: 0.08em; color: var(--steel);
  background: var(--teal); padding: 4px 6px; border-radius: 4px;
}
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 8px; color: var(--muted);
  font: 600 14px/1 var(--body); letter-spacing: 0.02em; transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--surface); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 10px;
  font: 700 15px/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, color 0.25s;
}
.btn-gold { background: var(--gold); color: var(--steel); box-shadow: 0 8px 28px -10px rgba(232, 181, 74, 0.6); }
.btn-gold:hover { color: var(--steel); transform: translateY(-2px); box-shadow: 0 14px 36px -12px rgba(232, 181, 74, 0.75); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { color: var(--text); border-color: var(--teal); transform: translateY(-2px); }
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* Hero */
.hero { padding: 88px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font: 600 13px/1 var(--mono); color: var(--muted); letter-spacing: 0.02em;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(60, 207, 216, 0.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(60, 207, 216, 0); } 100% { box-shadow: 0 0 0 0 rgba(60, 207, 216, 0); } }
.hero h1 {
  margin: 22px 0 18px; font: 700 clamp(44px, 7vw, 84px)/0.98 var(--display); letter-spacing: 0.01em;
}
.hero h1 .gold { color: var(--gold); }
.hero h1 .line { display: block; }
.lede { max-width: 34em; margin: 0 0 32px; font-size: 19px; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* The dial: ticks turn like a combination lock, the V halves lock in, the crack glows. */
.dial { position: relative; justify-self: center; width: min(400px, 80vw); aspect-ratio: 1; }
.dial::before {
  content: ""; position: absolute; inset: 8%; border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 181, 74, 0.16), transparent 65%);
  animation: glow 5s ease-in-out infinite alternate;
}
@keyframes glow { to { transform: scale(1.08); opacity: 0.7; } }
.dial svg { position: relative; width: 100%; height: 100%; overflow: visible; }
.dial .ticks { transform-origin: 100px 100px; animation: spin 60s linear infinite; }
.dial .majors { transform-origin: 100px 100px; animation: spin 90s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.dial .arm-l { animation: lock-l 1.2s var(--ease) 0.3s both; }
.dial .arm-r { animation: lock-r 1.2s var(--ease) 0.3s both; }
@keyframes lock-l { from { transform: translate(-18px, -10px); opacity: 0; } }
@keyframes lock-r { from { transform: translate(18px, -10px); opacity: 0; } }
.dial .crack { animation: crack 3.2s ease-in-out 1.4s infinite; filter: drop-shadow(0 0 3px rgba(60, 207, 216, 0.9)); }
@keyframes crack { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Sections */
section { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.kicker { font: 700 13px/1 var(--display); letter-spacing: 0.2em; text-transform: uppercase; color: var(--teal); }
h2 { margin: 12px 0 12px; font: 700 clamp(30px, 4vw, 44px)/1.1 var(--display); }
.section-head p { margin: 0; color: var(--muted); font-size: 17px; }

.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  position: relative; padding: 28px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s;
}
.card::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--teal)); transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: #3A485C; background: var(--surface-2); }
.card:hover::after { transform: scaleX(1); }
.card .icon {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px;
  background: var(--gold-soft); color: var(--gold); margin-bottom: 18px;
}
.card .icon svg { width: 22px; height: 22px; }
.card h3 { margin: 0 0 8px; font: 700 20px/1.2 var(--display); }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.stat .num { font: 700 38px/1 var(--display); color: var(--gold); font-variant-numeric: tabular-nums; }
.stat .label { margin-top: 8px; color: var(--muted); font-size: 14px; }

.join {
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 32px; align-items: center;
  padding: 44px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.join::before {
  content: ""; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%;
  border: 2px solid rgba(232, 181, 74, 0.18); box-shadow: 0 0 0 40px rgba(232, 181, 74, 0.04), 0 0 0 80px rgba(232, 181, 74, 0.03);
}
.join h2 { margin-top: 0; }
.join p { color: var(--muted); margin: 0 0 22px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; position: relative; }
.steps li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; background: var(--steel); border: 1px solid var(--line); font-size: 15px; }
.steps .n { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font: 700 13px/1 var(--display); }

/* Document pages (rules, privacy) */
.doc { padding: 64px 0 88px; }
.doc-head { max-width: 760px; margin-bottom: 36px; }
.doc-head h1 { margin: 10px 0 12px; font: 700 clamp(36px, 5vw, 56px)/1.05 var(--display); }
.doc-head p { color: var(--muted); font-size: 18px; margin: 0; }
.doc-body { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; }
.toc { position: sticky; top: 92px; display: grid; gap: 2px; font-size: 14px; }
.toc a { color: var(--muted); padding: 7px 12px; border-left: 2px solid var(--line); transition: color 0.2s, border-color 0.2s; }
.toc a:hover, .toc a.active { color: var(--text); border-left-color: var(--gold); }
.prose { max-width: 760px; }
.prose h2 { font-size: 26px; margin: 44px 0 12px; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font: 700 18px/1.3 var(--display); margin: 26px 0 8px; color: var(--gold); }
.prose p, .prose li { color: #C9D3DF; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--text); }
.prose code { font: 500 0.9em var(--mono); background: var(--surface); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; color: var(--text); }
.note {
  padding: 16px 18px; border-radius: 10px; background: var(--gold-soft); border: 1px solid rgba(232, 181, 74, 0.35);
  color: var(--text); font-size: 15px; margin: 0 0 28px;
}
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); margin: 14px 0 8px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface); font: 700 13px/1.3 var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td { color: #C9D3DF; }
.rules { list-style: none; padding: 0; counter-reset: rule; display: grid; gap: 12px; }
.rules li {
  counter-increment: rule; position: relative; padding: 18px 20px 18px 66px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); margin: 0;
}
.rules li::before {
  content: counter(rule, decimal-leading-zero); position: absolute; left: 20px; top: 17px;
  font: 700 20px/1 var(--display); color: var(--gold);
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; color: var(--muted); font-size: 14px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.fineprint { width: 100%; font-size: 13px; color: #6F7C8F; margin: 8px 0 0; }

/* Reveal on scroll. Only once site.js has marked the page (html.js), so the content shows without JavaScript.
   The hero animates in with CSS alone, on load. */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal-stagger > * { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal-stagger.in > * { opacity: 1; transform: none; }
.js .reveal-stagger.in > *:nth-child(2) { transition-delay: 0.08s; }
.js .reveal-stagger.in > *:nth-child(3) { transition-delay: 0.16s; }
.js .reveal-stagger.in > *:nth-child(4) { transition-delay: 0.24s; }
.hero-copy { animation: rise 1s var(--ease) 0.1s both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .dial { order: -1; width: min(280px, 64vw); }
  .pillars, .stats { grid-template-columns: repeat(2, 1fr); }
  .join { grid-template-columns: 1fr; padding: 28px; }
  .doc-body { grid-template-columns: 1fr; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .toc a { border-left: 0; background: var(--surface); border-radius: 8px; }
}
@media (max-width: 560px) {
  .nav-links .hide-sm { display: none; }
  .nav { gap: 8px; }
  .brand { gap: 8px; }
  .brand svg, .brand img { width: 28px; height: 28px; }
  .brand-word { font-size: 16px; letter-spacing: 0.16em; }
  .brand-tag { display: none; }
  .nav-links a { padding: 8px 10px; font-size: 13px; }
  .pillars, .stats { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 40px; }
  section { padding: 52px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; }
}
