/* Purple Wallet — site styles.
   Same language as the app: ceramic shell, laminate cards, mono uppercase
   names, thin grotesque quantities.

   LIGHT IS THE DEFAULT, unconditionally. Dark used to sit behind
   `prefers-color-scheme`, which sounds respectful and isn't: it silently
   converts "light is the default, dark is a peer" into "whatever the visitor's
   OS happens to be set to", so anyone on a dark-mode machine — us included —
   never saw the mode the identity was designed around. Dark is kept below and
   applies only when the document opts in with `data-theme="dark"`, so it stays
   a choice rather than an inheritance.
   See docs/design-direction-02.html. */

@font-face{font-family:'Martian Mono';src:url('/fonts/martian-mono-latin-400.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:'Martian Mono';src:url('/fonts/martian-mono-latin-500.woff2') format('woff2');font-weight:500;font-display:swap}
@font-face{font-family:'Space Grotesk';src:url('/fonts/space-grotesk-latin-300.woff2') format('woff2');font-weight:300;font-display:swap}
@font-face{font-family:'Space Grotesk';src:url('/fonts/space-grotesk-latin-400.woff2') format('woff2');font-weight:400;font-display:swap}

:root{
  --mono:'Martian Mono',ui-monospace,'SF Mono',Menlo,monospace;
  --sans:'Space Grotesk',-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  --ease:cubic-bezier(.16,1,.3,1);
  --v500:#7331B0; --v400:#9D51DC; --v300:#C489F5;
  --jade:#2FA37B;

  --bg:#E6E3EC; --surf:#F2F0F6; --tx:#17131F; --dim:#655E73; --faint:#9A93A8;
  --hair:rgba(37,27,54,.09);
  --hi:rgba(255,255,255,.5); --sh:rgba(108,95,132,.42);
  --shadow:-3px -3px 14px var(--hi), 3px 4px 16px var(--sh), 0 1px 2px rgba(108,95,132,.3);
  --lam:0 1px 2px rgba(50,36,72,.5), 0 7px 18px -2px rgba(50,36,72,.55);
}
/* Opt-in only. Nothing on the site sets data-theme today, so every visitor
   gets light — which is the point. The rules stay because the dark treatment
   is designed and tuned, not because it's reachable yet; wiring a toggle is a
   later decision, not a reason to lose the work. */
html[data-theme=dark]{
  --bg:#0A090C; --surf:#161219; --tx:#F3EFF8; --dim:#968EA4; --faint:#5A5368;
  --hair:rgba(255,255,255,.08);
  --hi:rgba(255,255,255,.09); --sh:rgba(0,0,0,.85);
  --shadow:0 7px 24px -4px rgba(0,0,0,.6), 0 1px 2px rgba(0,0,0,.5);
  --lam:0 1px 2px rgba(0,0,0,.4), 0 9px 22px -2px rgba(0,0,0,.5);
  --v500:#C489F5;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{
  background:var(--bg); color:var(--tx); font-family:var(--sans);
  line-height:1.6; -webkit-font-smoothing:antialiased;
}
body::after{
  content:'';position:fixed;inset:0;pointer-events:none;z-index:99;opacity:.3;
  mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
}
html[data-theme=dark] body::after{mix-blend-mode:overlay;opacity:.45}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

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

/* ── nav ── */
nav{
  position:sticky;top:0;z-index:50;
  background:color-mix(in srgb,var(--bg) 82%,transparent);
  backdrop-filter:blur(20px) saturate(1.4);
  border-bottom:1px solid var(--hair);
}
nav .wrap{display:flex;align-items:center;gap:20px;padding-top:14px;padding-bottom:14px}
nav a{color:var(--dim);text-decoration:none}
nav a:hover{color:var(--tx)}
.brand{display:flex;align-items:center;gap:10px;margin-right:auto}
.brand svg{width:24px;height:24px;flex:none}
.brand span{font-family:var(--mono);text-transform:uppercase;font-size:11px;font-weight:500;letter-spacing:.1em;color:var(--tx)}
.navlink{font-family:var(--mono);text-transform:uppercase;font-size:9.5px;font-weight:400;letter-spacing:.16em}

/* ── type ── */
h1{font-size:clamp(34px,6vw,58px);font-weight:300;letter-spacing:-.035em;line-height:1.06;margin-bottom:20px}
h2{font-size:clamp(20px,3vw,26px);font-weight:300;letter-spacing:-.025em;line-height:1.2;margin:40px 0 12px}
h3{font-family:var(--mono);text-transform:uppercase;font-size:11px;font-weight:500;letter-spacing:.14em;margin:30px 0 10px;color:var(--tx)}
p{color:var(--dim);margin-bottom:14px;max-width:64ch}
p strong{color:var(--tx);font-weight:500}
a{color:var(--v500)}
.lede{font-size:19px;font-weight:300;color:var(--tx);max-width:56ch}
.eyebrow{font-family:var(--mono);text-transform:uppercase;font-size:9.5px;font-weight:500;letter-spacing:.24em;color:var(--v500);margin-bottom:16px}
.micro{font-family:var(--mono);text-transform:uppercase;font-size:9px;letter-spacing:.18em;color:var(--faint)}
ul{color:var(--dim);margin:0 0 16px 0;list-style:none}
ul li{padding:8px 0 8px 22px;position:relative;border-top:1px solid var(--hair);max-width:64ch}
ul li::before{content:'';position:absolute;left:2px;top:16px;width:5px;height:5px;border-radius:50%;background:var(--v400)}
ul li strong{color:var(--tx);font-weight:500}

section{padding:64px 0}
header.hero{padding:96px 0 64px}
.rule{height:1px;background:linear-gradient(90deg,var(--hair),transparent);margin:0}

/* ── surfaces ── */
.card{
  background:var(--surf);border-radius:22px;padding:26px;box-shadow:var(--shadow);
  border:1px solid var(--hair);position:relative;overflow:hidden;
}
.card::before{content:'';position:absolute;inset:0 0 auto 0;height:50%;
  background:linear-gradient(180deg,var(--hi),transparent);pointer-events:none}
.grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}

.chips{display:flex;gap:8px;flex-wrap:wrap;margin:26px 0}
.chip{width:56px;height:38px;border-radius:9px;position:relative;overflow:hidden;box-shadow:var(--lam)}
.chip::after{content:'';position:absolute;inset:0;background:linear-gradient(142deg,rgba(255,255,255,.26),transparent 54%)}
.c1{background:linear-gradient(150deg,#2E0F47,#A94FD8)}
.c2{background:linear-gradient(150deg,#0B3327,#4FD1A0)}
.c3{background:linear-gradient(150deg,#4A3708,#E8BC48)}
.c4{background:linear-gradient(150deg,#4C1128,#F07CA4)}
.c5{background:linear-gradient(150deg,#0E2340,#5B9BE0)}

.stat{font-size:44px;font-weight:300;letter-spacing:-.04em;line-height:1}
.stat small{font-size:.42em;opacity:.5}

.pill{
  display:inline-block;font-family:var(--mono);text-transform:uppercase;
  font-size:9px;font-weight:500;letter-spacing:.14em;padding:5px 10px;border-radius:999px;
  border:1px solid var(--hair);color:var(--dim);
}
.pill.soon{border-color:color-mix(in srgb,var(--v500) 40%,transparent);color:var(--v500)}

/* ── footer ── */
footer{border-top:1px solid var(--hair);padding:36px 0 60px;margin-top:40px}
footer .wrap{display:flex;gap:20px;flex-wrap:wrap;align-items:center}
footer a{color:var(--dim);text-decoration:none}
footer a:hover{color:var(--tx)}
footer .sp{flex:1}

/* ── legal pages ── */
.legal p,.legal li{font-size:14.5px}
.legal h2{font-size:19px;margin-top:36px}
.legal .updated{font-family:var(--mono);text-transform:uppercase;font-size:9px;letter-spacing:.18em;color:var(--faint);margin-bottom:34px}
.legal table{width:100%;border-collapse:collapse;margin:16px 0;font-size:13.5px}
.legal th,.legal td{text-align:left;padding:10px 8px;border-bottom:1px solid var(--hair);vertical-align:top;color:var(--dim)}
.legal th{font-family:var(--mono);text-transform:uppercase;font-size:8.5px;font-weight:500;letter-spacing:.16em;color:var(--faint)}
.legal td:first-child{color:var(--tx)}

/* ── motion: arrive, don't perform ── */
.rise{opacity:0;transform:translateY(20px);filter:blur(6px);animation:rise .9s var(--ease) forwards}
.rise:nth-child(2){animation-delay:.07s}
.rise:nth-child(3){animation-delay:.14s}
.rise:nth-child(4){animation-delay:.21s}
@keyframes rise{to{opacity:1;transform:none;filter:blur(0)}}

/* Screenshots of the running app.
   These are rendered by the app's own widgets under real phone constraints
   (test/site_shots_test.dart), not drawn in a design tool — so what's on this
   page is what the product actually does. */
.shots{display:grid;gap:20px;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));margin:28px 0 20px}
.shots figure{margin:0}
.shots img{
  display:block;width:100%;height:auto;border-radius:22px;
  box-shadow:var(--lam);border:1px solid var(--hair);
}
.shots figcaption{margin-top:12px}
.applink{
  display:inline-block;font-family:var(--mono);text-transform:uppercase;
  font-size:9.5px;letter-spacing:.18em;color:var(--tx);text-decoration:none;
  padding:12px 20px;border-radius:999px;background:var(--surf);
  box-shadow:var(--shadow);border:1px solid var(--hair);
  transition:transform .4s var(--ease)
}
.applink:hover{transform:translateY(-1px)}

/* ── The hero stage ────────────────────────────────────────────────────────
   The canvas is the illustration, so it gets real height rather than a strip.
   Sized in svh so a phone's collapsing address bar does not resize it mid
   animation — vh does, and the resize reallocates the particle field. */
.stage {
  position: relative;
  height: min(56svh, 460px);
  margin: 26px 0 6px;
}
.stage canvas { width: 100%; height: 100%; display: block; }

/* A soft floor under the ring, so the cards sit on something. */
.stage::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 4%;
  width: 62%; height: 26px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center,
    rgba(70,50,100,.16), rgba(70,50,100,0) 70%);
  pointer-events: none;
}

/* ── Staggered reveal ──────────────────────────────────────────────────────
   Translate and fade only — no scale, which on text causes a reflow-looking
   shimmer at the moment it lands.

   Gated on `.js`, which hero.js sets on the html element as its first
   statement. Hiding these unconditionally means the page is blank whenever the
   script does not run — and it did not run, for days, because the site's own
   Content-Security-Policy said `script-src 'none'`. The page fetched its
   script, refused to execute it, and every revealed element stayed at opacity
   zero. Content that is invisible unless a script runs is one bad header away
   from an empty page; this is the fix for the class of bug, not the instance. */
.js [data-stagger] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .62s cubic-bezier(.16,1,.3,1),
              transform .62s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}
.js [data-stagger].shown { opacity: 1; transform: none; }

/* A hairline that draws itself as the section arrives. */
.js .rule.draws { transform: scaleX(0); transform-origin: left; }
.js .rule.draws.shown {
  transform: scaleX(1);
  transition: transform .9s cubic-bezier(.16,1,.3,1);
}

/* Section numbers set large and faint behind the heading — illustrative
   furniture rather than another line of type competing with the copy. */
.section-mark {
  position: absolute;
  right: 0; top: -18px;
  font: 600 clamp(58px, 12vw, 128px)/1 ui-monospace, monospace;
  color: rgba(90,70,120,.07);
  pointer-events: none;
  user-select: none;
}
section .wrap { position: relative; }

@media (prefers-reduced-motion: reduce) {
  .js [data-stagger] { opacity: 1; transform: none; transition: none; }
  .js .rule.draws { transform: none; }
}

/* The hero is the hook, so the stage has to be visible without scrolling on a
   phone. Trimming the top padding and the lede's measure is what buys that —
   the animation being below the fold made it decoration nobody saw. */
@media (max-width: 640px) {
  header.hero { padding: 44px 0 32px; }
  h1 { margin-bottom: 14px; }
  .lede { font-size: 17px; max-width: 34ch; }
  .stage { height: min(42svh, 340px); margin: 18px 0 4px; }
}
