/* Vault2FA site — one design system for every page. */

:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #f7f7fb;
  --bg-elev: #ffffff;
  --bg-sunk: #eeeef5;
  --ink: #16162a;
  --ink-2: #4b4d66;
  --ink-3: #82849c;
  --line: rgba(22, 22, 42, 0.08);
  --line-strong: rgba(22, 22, 42, 0.14);

  --brand: #5a3ea0;
  --brand-2: #2a2b6b;
  --accent: #2ab8a3;
  --accent-soft: rgba(42, 184, 163, 0.14);
  --brand-soft: rgba(90, 62, 160, 0.10);

  --shadow-sm: 0 1px 2px rgba(20, 20, 43, 0.06), 0 2px 8px rgba(20, 20, 43, 0.04);
  --shadow-md: 0 2px 4px rgba(20, 20, 43, 0.06), 0 12px 32px rgba(20, 20, 43, 0.08);
  --shadow-lg: 0 8px 16px rgba(20, 20, 43, 0.08), 0 32px 80px rgba(20, 20, 43, 0.16);

  --radius: 14px;
  --radius-lg: 22px;
  --max: 1120px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0d0d16;
  --bg-elev: #15151f;
  --bg-sunk: #0a0a12;
  --ink: #ececf4;
  --ink-2: #b1b3c7;
  --ink-3: #7c7f96;
  --line: rgba(236, 236, 244, 0.08);
  --line-strong: rgba(236, 236, 244, 0.16);

  --brand: #a58cf0;
  --brand-2: #6b5ad6;
  --accent: #5fe0c9;
  --accent-soft: rgba(95, 224, 201, 0.14);
  --brand-soft: rgba(165, 140, 240, 0.14);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.45), 0 32px 80px rgba(0, 0, 0, 0.6);

  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0d16;
    --bg-elev: #15151f;
    --bg-sunk: #0a0a12;
    --ink: #ececf4;
    --ink-2: #b1b3c7;
    --ink-3: #7c7f96;
    --line: rgba(236, 236, 244, 0.08);
    --line-strong: rgba(236, 236, 244, 0.16);
    --brand: #a58cf0;
    --brand-2: #6b5ad6;
    --accent: #5fe0c9;
    --accent-soft: rgba(95, 224, 201, 0.14);
    --brand-soft: rgba(165, 140, 240, 0.14);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.45), 0 32px 80px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color .25s ease, color .25s ease;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(40px, 6vw, 68px); letter-spacing: -0.035em; }
h2 { font-size: clamp(28px, 3.6vw, 40px); }
h3 { font-size: 19px; letter-spacing: -0.01em; }

p { margin: 0; }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: min(36em, 100%); }
.muted { color: var(--ink-3); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before { content: ""; width: 20px; height: 2px; background: var(--brand); border-radius: 2px; }

code, pre { font-family: var(--mono); }
code { font-size: .88em; background: var(--brand-soft); padding: 2px 7px; border-radius: 7px; }
pre {
  margin: 0; padding: 18px 20px; overflow-x: auto;
  background: var(--bg-sunk); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 14px; line-height: 1.55;
}
pre code { padding: 0; background: none; font-size: inherit; }

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

section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { display: grid; gap: 14px; max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }

/* ---------- nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 700; letter-spacing: -0.02em; font-size: 18px; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #2a2b6b, #5a3ea0); box-shadow: var(--shadow-sm); }
.logo-mark svg { width: 22px; height: 22px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--ink-2); font-weight: 500; font-size: 15px;
  padding: 8px 12px; border-radius: 10px;
}
.nav-links a:hover { color: var(--ink); background: var(--brand-soft); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--ink); }
@media (max-width: 720px) { .nav-links a:not(.theme) { display: none; } }

.theme {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg-elev);
  color: var(--ink-2); cursor: pointer; padding: 0; margin-left: 8px;
  transition: transform .15s ease, background-color .2s ease;
}
.theme:hover { transform: translateY(-1px); color: var(--ink); }
.theme svg { width: 18px; height: 18px; }
.theme .sun, .theme .moon, .theme .auto { display: none; }
:root[data-theme="light"] .theme .sun { display: block; }
:root[data-theme="dark"] .theme .moon { display: block; }
:root:not([data-theme]) .theme .auto { display: block; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border-radius: 12px; font-weight: 600; font-size: 16px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none !important;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--brand-2), var(--brand)); box-shadow: 0 8px 24px rgba(90, 62, 160, .28); }
.btn-primary:hover { box-shadow: 0 12px 32px rgba(90, 62, 160, .36); }
.btn-ghost { color: var(--ink); background: var(--bg-elev); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--brand); }

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

.hero { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 104px) 0 clamp(48px, 7vw, 96px); }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto -20%; height: 120%;
  background:
    radial-gradient(60% 50% at 20% 30%, var(--brand-soft), transparent 70%),
    radial-gradient(40% 40% at 80% 20%, var(--accent-soft), transparent 70%);
  pointer-events: none; z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } .hero-phone { order: -1; justify-self: center; min-width: 0; } .phone { --w: min(300px, 78vw); } }
.hero-copy { display: grid; gap: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 18px 26px; margin-top: 10px; color: var(--ink-3); font-size: 14px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 16px; height: 16px; color: var(--accent); }

/* ---------- phone mockup ---------- */

.phone {
  --w: 300px;
  width: var(--w); aspect-ratio: 300 / 640; margin: 0 auto;
  border-radius: 46px; padding: 10px;
  background: linear-gradient(160deg, #3a3a4a, #101018);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255,255,255,.06);
  position: relative; transform: rotate(-3deg);
  animation: float 9s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .phone { animation: none; } }
@keyframes float { 0%,100% { transform: rotate(-3deg) translateY(0); } 50% { transform: rotate(-3deg) translateY(-10px); } }
.screen {
  position: absolute; inset: 10px; border-radius: 38px; overflow: hidden;
  background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column;
  font-size: 12px;
}
.island { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 84px; height: 24px; border-radius: 14px; background: #000; z-index: 2; }
.s-bar { display: flex; justify-content: space-between; padding: 16px 22px 0; font-size: 11px; font-weight: 600; }
.s-nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; }
.s-nav b { font-size: 14px; }
.s-pill { display: inline-flex; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 999px; background: var(--bg-elev); box-shadow: var(--shadow-sm); color: var(--brand); font-weight: 700; font-size: 12px; }
.s-search { margin: 0 14px 10px; padding: 8px 12px; border-radius: 10px; background: var(--bg-sunk); color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.s-search svg { width: 12px; height: 12px; }
.s-head { display: flex; justify-content: space-between; padding: 6px 18px 4px; font-size: 11px; font-weight: 600; color: var(--ink-3); }
.s-card { margin: 0 12px 10px; border-radius: 14px; background: var(--bg-elev); box-shadow: var(--shadow-sm); overflow: hidden; }
.s-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; }
.s-row + .s-row { border-top: 1px solid var(--line); }
.s-avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; }
.s-name { font-weight: 600; font-size: 11.5px; display: flex; align-items: center; gap: 4px; }
.s-name .star { color: #f5b83d; font-size: 10px; }
.s-acct { color: var(--ink-3); font-size: 9.5px; margin-top: 1px; }
.s-code { font-size: 22px; font-weight: 500; letter-spacing: .04em; font-variant-numeric: tabular-nums; margin-top: 3px; }
.ring { width: 26px; height: 26px; position: relative; }
.ring svg { width: 26px; height: 26px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.ring .track { stroke: var(--line-strong); }
.ring .arc { stroke: var(--brand); stroke-linecap: round; stroke-dasharray: 63; animation: countdown 30s linear infinite; }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 9px; font-weight: 600; color: var(--ink-2); }
@keyframes countdown { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 63; } }

/* ---------- feature grid ---------- */

.grid { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid { grid-template-columns: minmax(0, 1fr); } }

.card {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow-sm);
  display: grid; gap: 12px; align-content: start;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card p { color: var(--ink-2); font-size: 15.5px; }
.icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
}
.icon svg { width: 22px; height: 22px; }

/* ---------- split / privacy ---------- */

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }
.checks { display: grid; gap: 14px; margin-top: 10px; }
.checks li { list-style: none; display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; color: var(--ink-2); }
.checks svg { width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
.checks b { color: var(--ink); display: block; }

.panel {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-md);
}
.panel .kv { display: grid; grid-template-columns: 1fr auto; gap: 10px 20px; font-size: 15px; }
.panel .kv dt { color: var(--ink-3); }
.panel .kv dd { margin: 0; font-weight: 600; text-align: right; }
.panel hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* ---------- faq ---------- */

.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 22px; box-shadow: var(--shadow-sm);
}
.faq details[open] { border-color: var(--line-strong); }
.faq summary {
  cursor: pointer; list-style: none; font-weight: 600; padding: 18px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-weight: 400; font-size: 22px; color: var(--ink-3); line-height: 1;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); padding: 0 0 18px; }
.faq details p + p { margin-top: -8px; }

/* ---------- prose pages ---------- */

.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(24px, 4vw, 40px); }
.page-head h1 { font-size: clamp(34px, 4.5vw, 52px); }
.prose { padding-bottom: clamp(64px, 9vw, 120px); }
.prose h2 { font-size: 24px; margin: 44px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: 14px; }
.prose ul { padding-left: 22px; margin: 12px 0; display: grid; gap: 8px; }
.prose strong { color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15.5px; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--ink-3); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.prose pre { margin: 14px 0; }
.callout {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start;
  padding: 18px 20px; border-radius: var(--radius); margin: 18px 0;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.callout svg { width: 22px; height: 22px; color: var(--accent); margin-top: 2px; }
.callout p { color: var(--ink) !important; }

/* ---------- cta band ---------- */

.band {
  border-radius: var(--radius-lg); padding: clamp(36px, 5vw, 64px);
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff; display: grid; gap: 18px; justify-items: start;
  box-shadow: 0 24px 64px rgba(90, 62, 160, .28);
}
.band h2 { color: #fff; }
.band p { color: rgba(255,255,255,.82); max-width: 40em; font-size: 18px; }
.band .btn-ghost { background: #fff; color: var(--brand-2); border-color: transparent; }

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

footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--ink-3); font-size: 14px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; align-items: center; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot-links a { color: var(--ink-2); }

/* ---------- reveal on scroll ---------- */

html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
html.static .reveal, html.static .phone, html.static .ring .arc { transition: none !important; animation: none !important; }
@media (prefers-reduced-motion: reduce) { html.js .reveal { opacity: 1; transform: none; transition: none; } }
