/* WalletStack website. Colours, type, spacing and radii come from the WalletStack Design System
   (same tokens as src/ui/theme.py). Dark is the default; light follows the visitor's system setting. */

@font-face { font-family: "Jakarta"; src: url("assets/fonts/PlusJakartaSans-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("assets/fonts/PlusJakartaSans-600.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("assets/fonts/PlusJakartaSans-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("assets/fonts/PlusJakartaSans-800.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  --surface-100: #070E1F; --surface-200: #101A33; --surface-300: #18254A;
  --border: #24325A; --border-strong: #8A9AC2;
  --ink: #EEF3FF; --ink-muted: #A6B4D6;
  --navy: #1B3A8C; --header-top: #040A1C; --brand: #6E97FF; --on-brand: #0B1F4B;
  --action: #6E97FF; --on-action: #0B1F4B; --link: #7FA3FF; --tint: #24428F;
  --positive: #3DD6B5; --negative: #FF9966; --warning: #FFC24D;
  --source-1: #5BB5FF; --source-2: #4FD1C0; --source-3: #FFB84D; --on-source: #0B1F4B;
  --focus: #9DB8FF; --logo-square: #0B1F4B;
  --card-shadow: none; --card-border: 1px solid var(--border);
  --float-shadow: 0 12px 32px #00000099;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px;
  --wrap: 1120px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --surface-100: #F3F6FB; --surface-200: #FFFFFF; --surface-300: #E8EDF7;
    --border: #DCE3F0; --border-strong: #6B7A99;
    --ink: #0B1F4B; --ink-muted: #4A5878;
    --navy: #0B1F4B; --header-top: #06102E; --brand: #2A63F0; --on-brand: #FFFFFF;
    --action: #0B1F4B; --on-action: #FFFFFF; --link: #2A63F0; --tint: #CFE0FF;
    --positive: #0A7C6E; --negative: #C2410C; --warning: #8A5A00;
    --source-1: #1D7FD6; --source-2: #0F8B7D; --source-3: #B45309; --on-source: #FFFFFF;
    --focus: #2A63F0;
    --card-shadow: 0 8px 24px #0B1F4B14; --card-border: 1px solid transparent;
    --float-shadow: 0 12px 32px #0B1F4B2E;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0; background: var(--surface-100); color: var(--ink);
  font: 400 16px/1.55 "Jakarta", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 1.07rem; font-weight: 700; }
p { margin: 0 0 1em; }
code, pre { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: .88em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.narrow { max-width: 640px; }
.center .narrow, .center.narrow { margin-left: auto; margin-right: auto; }
.lead { font-size: 1.125rem; color: var(--ink-muted); }
.eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: .75rem; }
.accent { color: var(--brand); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--action); color: var(--on-action); padding: 8px 14px; border-radius: var(--r-sm); z-index: 10; }
.skip:focus { left: 8px; }

/* ---------------------------------------------------------------- logo (navy square, three ascending bars) */
.logo { --s: 36px; width: var(--s); height: var(--s); border-radius: calc(var(--s) * .26); background: var(--logo-square);
  display: inline-flex; align-items: flex-end; justify-content: center; gap: calc(var(--s) * .07);
  padding-bottom: calc(var(--s) * .2); flex: none; }
.logo i { width: calc(var(--s) * .13); border-radius: 99px; background: #fff; }
.logo i:nth-child(1) { height: calc(var(--s) * .26); }
.logo i:nth-child(2) { height: calc(var(--s) * .40); }
.logo i:nth-child(3) { height: calc(var(--s) * .56); background: #6E97FF; }
.logo-sm { --s: 28px; }
.logo.inverse { background: #fff; }
.logo.inverse i { background: #0B1F4B; }
.logo.inverse i:nth-child(3) { background: #2A63F0; }
@media (prefers-color-scheme: dark) { .site-header .logo, .site-footer .logo { box-shadow: inset 0 0 0 1px var(--border); } }
@media (prefers-color-scheme: light) { .logo i:nth-child(3) { background: #2A63F0; } }

/* ---------------------------------------------------------------- header / footer */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--surface-100) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.wordmark { font-weight: 800; font-size: 1.125rem; white-space: nowrap; }
.site-header nav { display: flex; align-items: center; gap: 6px; }
.site-header nav a:not(.btn) { color: var(--ink-muted); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 10px 12px; border-radius: var(--r-md); }
.site-header nav a:not(.btn):hover, .site-header nav a:not(.btn)[aria-current] { color: var(--ink); }
@media (max-width: 560px) { .site-header nav a:not(.btn) { display: none; } }

.site-footer { border-top: 1px solid var(--border); padding: 40px 0 28px; margin-top: 24px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.foot p { max-width: 420px; margin-top: 12px; font-size: .9rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: flex-start; }
.foot nav a { color: var(--ink-muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.foot nav a:hover { color: var(--ink); }
.fine { font-size: .8rem; margin-top: 24px; }
a.quiet { color: inherit; text-decoration: underline; text-decoration-color: var(--border-strong); text-decoration-thickness: 1px; }
a.quiet:hover { color: var(--ink); text-decoration-color: currentColor; }

/* ---------------------------------------------------------------- buttons (min height 48, radius-lg) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: var(--r-lg); font-family: inherit; font-weight: 600; font-size: 1rem; line-height: 1; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; transition: transform .18s ease-out, background-color .18s ease-out; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-secondary { border-color: var(--border-strong); color: var(--ink); }
.btn-secondary:hover { background: var(--surface-300); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .95rem; }
.btn.is-disabled { opacity: .4; pointer-events: none; }
.link { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-decoration: none; }
.link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; padding: 64px 0 72px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 70%; height: 140%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 22%, transparent), transparent); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 20px; }
.trust-row { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--ink-muted); font-weight: 600; font-size: .92rem; }
.trust-row li { display: inline-flex; align-items: center; gap: 6px; }
.trust-row svg { width: 18px; height: 18px; fill: none; stroke: var(--positive); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 860px) {
  .hero { padding: 40px 0 56px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}

/* ---------------------------------------------------------------- phone mock-up of the home screen */
.phone { margin: 0 auto; width: min(340px, 100%); }
.screen { border-radius: 36px; overflow: hidden; background: var(--surface-100); border: 8px solid #02060F;
  box-shadow: var(--float-shadow), 0 0 0 1px var(--border); }
.phone figcaption { text-align: center; font-size: .8rem; margin-top: 10px; }
.ph-head { background: linear-gradient(180deg, #040A1C, #1B3A8C); color: #fff; padding: 18px 20px 22px; }
@media (prefers-color-scheme: light) { .ph-head { background: linear-gradient(180deg, #06102E, #0B1F4B); } }
.ph-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.ph-eye svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; }
.ph-label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .75; margin: 0 0 4px; }
.ph-total { margin: 0; font-size: 2.15rem; line-height: 1.15; }
.ph-total b { font-weight: 800; }
.ph-total span { font-weight: 400; opacity: .7; }
.ph-change { display: inline-flex; align-items: center; gap: 4px; margin: 8px 0 0; font-size: .8rem; font-weight: 600; color: #3DD6B5; }
.ph-change svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ph-body { padding: 14px 12px 16px; display: grid; gap: 10px; }
.ph-pills { display: flex; background: var(--surface-300); border-radius: 99px; padding: 4px; font-size: .82rem; font-weight: 700; }
.ph-pills span { flex: 1; text-align: center; padding: 6px; border-radius: 99px; color: var(--ink-muted); }
.ph-pills .on { background: var(--surface-200); color: var(--ink); box-shadow: var(--card-shadow); }
.ph-card { background: var(--surface-200); border: var(--card-border); box-shadow: var(--card-shadow); border-radius: var(--r-lg); padding: 4px 12px; }
.ph-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.ph-row + .ph-row { border-top: 1px solid var(--border); }
.ph-row img { width: 32px; height: 32px; border-radius: 50%; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: var(--on-source); flex: none; }
.s1 { background: var(--source-1); } .s2 { background: var(--source-2); } .s3 { background: var(--source-3); }
.ph-name { flex: 1; min-width: 0; font-weight: 700; font-size: .85rem; line-height: 1.25; }
.ph-name small, .ph-amt small { display: block; font-weight: 500; font-size: .72rem; color: var(--ink-muted); }
.ph-amt { text-align: right; font-size: .9rem; line-height: 1.25; white-space: nowrap; }
.ph-amt b { font-weight: 700; }
.ph-amt small { display: inline; font-size: .9rem; font-weight: 400; }

/* ---------------------------------------------------------------- sections */
.section { padding: 72px 0; }
.section.tight { padding: 24px 0; }
.section.alt { background: var(--surface-200); border-block: 1px solid var(--border); }
@media (prefers-color-scheme: light) { .section.alt { border-color: transparent; } }
.page-head { padding: 56px 0 24px; }
@media (max-width: 600px) { .section { padding: 52px 0; } .page-head { padding: 40px 0 16px; } }

.grid { display: grid; gap: 16px; }
.cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); margin-top: 32px; }
.card { background: var(--surface-200); border: var(--card-border); box-shadow: var(--card-shadow); border-radius: var(--r-xl); padding: 24px; }
.section.alt .card { background: var(--surface-100); }
.card p { color: var(--ink-muted); margin: 0; font-size: .95rem; }
.ico { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--tint); color: var(--brand); display: grid; place-items: center; margin-bottom: 16px; }
@media (prefers-color-scheme: dark) { .ico { color: #EEF3FF; } }
.ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li { position: relative; padding: 16px 18px 16px 52px; background: var(--surface-100); border: var(--card-border); border-radius: var(--r-lg); color: var(--ink-muted); }
.checks li strong { color: var(--ink); }
.checks li::before { content: ""; position: absolute; left: 18px; top: 18px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--positive) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center/14px no-repeat; }

.steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.steps li { padding: 24px; border-radius: var(--r-xl); border: 1px solid var(--border); }
.steps p { color: var(--ink-muted); margin: 0; }
.num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--action); color: var(--on-action); font-weight: 800; margin-bottom: 14px; }

.chips { list-style: none; margin: 24px 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 8px 16px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface-100); font-weight: 600; font-size: .95rem; }

.faq { display: grid; gap: 10px; margin-top: 24px; max-width: 820px; }
.faq details { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface-200); }
.faq summary { cursor: pointer; padding: 18px 52px 18px 20px; font-weight: 700; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 400; color: var(--ink-muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 20px 18px; margin: 0; color: var(--ink-muted); }

.cta-band { background: linear-gradient(180deg, var(--surface-100), var(--surface-200)); }
.cta-band .btn { margin-top: 8px; }

/* ---------------------------------------------------------------- download */
.platforms { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.platform { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.platform h2 { font-size: 1.35rem; margin: 0; }
.platform .btn { margin-top: 12px; }
.platform .small { margin: 10px 0 0; word-break: break-all; }
.note { border-left: 4px solid var(--warning); background: var(--surface-200); border-radius: var(--r-md); padding: 16px 20px; margin: 24px 0; }
.note h3 { margin-top: 0; }
.note p { margin: 0; }

/* ---------------------------------------------------------------- long text (legal, install steps) */
.prose { max-width: 760px; }
article.prose { padding-top: 48px; padding-bottom: 32px; }
.prose h1 { font-size: clamp(2rem, 4.4vw, 2.75rem); }
.prose h2 { font-size: 1.35rem; margin-top: 2em; }
.prose p, .prose li { color: var(--ink-muted); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose pre { background: var(--surface-200); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; overflow-x: auto; color: var(--ink); }
.prose pre.hash { white-space: pre-wrap; word-break: break-all; }
.prose :not(pre) > code { background: var(--surface-300); padding: 2px 6px; border-radius: 6px; color: var(--ink); }
.table { overflow-x: auto; margin: 1em 0 1.5em; border: 1px solid var(--border); border-radius: var(--r-md); }
.table table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.table th, .table td { text-align: left; padding: 12px 14px; vertical-align: top; border-bottom: 1px solid var(--border); }
.table th { background: var(--surface-200); font-weight: 700; }
.table tr:last-child td { border-bottom: 0; }
.table td { color: var(--ink-muted); }
mark.todo { background: color-mix(in srgb, var(--warning) 25%, transparent); color: var(--ink); padding: 0 4px; border-radius: 4px; }
