/* Colours and fonts come from the app (theme/tokens.js). */
@font-face { font-family: Baloo; src: url('/fonts/baloo2-700.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: Figtree; src: url('/fonts/figtree-500.ttf') format('truetype'); font-weight: 400 500; font-display: swap; }
@font-face { font-family: Figtree; src: url('/fonts/figtree-700.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --bg: #F8F9FD; --surface: #FFFFFF; --ink: #17163B; --mute: #575578; --primary: #3D32C8; --on-primary: #FFFFFF;
  --soft: #ECEBFA; --line: #E3E2F1; --alert: #B8155A; --hero: #3D32C8; --hero-end: #2F2599; --gold: #FFB52E; --on-gold: #17163B;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121129; --surface: #1B1A38; --ink: #F2F1FF; --mute: #B4B1D8; --primary: #B0A8FF; --on-primary: #17163B;
    --soft: #26244A; --line: #2F2D57; --alert: #FF8FBA; --hero: #2E2784; --hero-end: #1F1A5E; --gold: #FFC252; }
}

* { box-sizing: border-box; }
/* Everything sized in rem follows both the width and the height of the screen, so short laptop screens stay in proportion. */
html { font-size: clamp(15px, min(7px + .6vw, 8px + 1.05vh), 17px); scroll-behavior: smooth; scroll-padding-top: 4rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 1rem/1.55 Figtree, system-ui, sans-serif; overflow-wrap: break-word; }
h1, h2, h3 { font-family: Baloo, system-ui, sans-serif; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, min(4.4vw, 6.2vh), 3.25rem); }
h2 { font-size: clamp(1.55rem, min(3.4vw, 4.4vh), 2.1rem); }
h3 { font-size: 1.15rem; }
a { color: var(--primary); }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.wrap { width: min(66rem, 100% - 32px); margin-inline: auto; }
.narrow { width: min(46rem, 100% - 32px); }
.narrow-wide { width: min(54rem, 100% - 32px); }
.center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--surface); padding: 8px 14px; border-radius: 10px; z-index: 30; }
.skip:focus { top: 10px; }
.unset { color: var(--alert); }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; min-height: 3.75rem; gap: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; font: 700 1.35rem Baloo, system-ui, sans-serif; }
.brand img { width: 2.1rem; height: 2.1rem; border-radius: 10px; }
.brand b { color: var(--gold); }
.menu { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.menu a:not(.button) { color: var(--mute); text-decoration: none; font-size: .95rem; padding: 8px 0; }
.menu a:not(.button):hover, .menu a[aria-current="page"] { color: var(--primary); text-decoration: underline; }
.menu-button { display: none; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: none; color: inherit; font: inherit; }
@media (max-width: 820px) {
  .js .menu-button { display: block; }
  .js .menu { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding-bottom: 14px; }
  .js .menu.open { display: flex; }
  .menu a:not(.button) { padding: 11px 0; }
  html:not(.js) .top { position: static; }
}

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.85rem; padding: 0 1.3rem; border-radius: 28px; background: var(--primary); color: var(--on-primary); font-weight: 700; text-decoration: none; border: 2px solid var(--primary); text-align: center; }
.button-small { min-height: 2.5rem; padding: 0 18px; font-size: .95rem; }
.button-quiet { background: transparent; color: var(--primary); border-color: var(--line); }
.button-gold { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }

/* hero */
.hero { padding: clamp(16px, 2.6vh, 48px) 0; background: radial-gradient(circle at 85% 0, var(--soft), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero em { color: var(--primary); font-style: normal; }
.pill { display: inline-block; background: var(--soft); color: var(--primary); border-radius: 20px; padding: 5px 14px; font-size: .85rem; font-weight: 700; margin: 0 0 18px; }
.lead { font-size: 1.1rem; color: var(--mute); max-width: 34em; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 1.4rem 0 .8rem; }
.trust { font-size: .95rem; color: var(--mute); font-weight: 700; }
.phone { margin: 0 auto; }
/* A real phone shape (376 x 796). The width follows the screen's height, so the whole phone is in view. */
.phone-art { display: block; margin: 0 auto; width: min(100%, clamp(216px, calc((100vh - 170px) * .4724), 300px)); height: auto; aspect-ratio: 376 / 796; filter: drop-shadow(0 22px 28px rgba(23, 22, 59, .28)); }
.phone figcaption { text-align: center; font-size: .82rem; color: var(--mute); margin-top: 10px; }

.pot { display: block; width: 100%; height: auto; }
.pot-value { font-family: Baloo, system-ui, sans-serif; font-weight: 700; }
.pot-caption, .coin-mark { font-family: Figtree, system-ui, sans-serif; font-weight: 700; }
.coin { transition: opacity .25s; }
.coin-off { opacity: 0; }

/* stats */
.strip { background: #17163B; color: #fff; }
.strip ul { list-style: none; padding: 1.3rem 0; margin-block: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; font-size: .9rem; }
.strip strong { display: block; font: 700 1.7rem/1.2 Baloo, system-ui, sans-serif; color: #FFC252; }

/* sections */
.band { padding: clamp(36px, 6.5vh, 76px) 0; }
.band-plain { background: var(--surface); }
.band h2 { text-align: center; }
.kicker { text-align: center; text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--primary); margin: 0 0 8px; }
.sub { text-align: center; color: var(--mute); max-width: 36em; margin: 0 auto 1.4rem; }

.demo { display: grid; grid-template-columns: 1fr 1fr; gap: 0; max-width: 48rem; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 1.5rem; overflow: hidden; }
.demo-controls { padding: 1.5rem; align-self: center; }
.demo-controls label { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-weight: 700; margin-top: 8px; }
.demo-controls output { color: var(--primary); }
.demo-controls input { width: 100%; height: 2.5rem; accent-color: var(--primary); }
.note { font-size: .9rem; color: var(--mute); }
.demo-pot { background: linear-gradient(var(--hero), var(--hero-end)); color: #fff; padding: .8rem 1.2rem; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.demo-pot .pot { max-width: clamp(220px, 37vh, 300px); margin: 0 auto; }
.demo-pot p { margin: .6rem 0 .3rem; }

.cards { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cards li { background: var(--bg); border: 1px solid var(--line); border-radius: 1.2rem; padding: 1.3rem; }
.cards p { color: var(--mute); margin: 0; font-size: .97rem; }
.icon { width: 2.6rem; height: 2.6rem; padding: .55rem; border-radius: 14px; background: var(--hero); stroke: #FFC252; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; margin-bottom: 14px; }

.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { font-family: Baloo, system-ui, sans-serif; font-size: 1.1rem; background: var(--soft); }
tbody tr:last-child > * { border-bottom: 0; }

.steps { list-style: none; counter-reset: step; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; text-align: center; margin-top: 1.8rem; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 3rem; height: 3rem; margin: 0 auto .9rem; border-radius: 18px; background: var(--gold); color: var(--on-gold); font: 700 1.5rem Baloo, system-ui, sans-serif; }
.steps p { color: var(--mute); }

.promise { background: linear-gradient(135deg, var(--hero), var(--hero-end)); color: #fff; text-align: center; }
.promise ul { list-style: none; padding: 0; text-align: left; max-width: 34em; margin: 24px auto 30px; }
.promise li { padding: 10px 0 10px 34px; position: relative; }
.promise li::before { content: ''; position: absolute; left: 4px; top: 17px; width: 12px; height: 12px; border-radius: 50%; background: #FFC252; }

.faq { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 12px; }
.faq summary { cursor: pointer; padding: 17px 48px 17px 20px; font-weight: 700; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--primary); }
.faq[open] summary::after { content: '−'; }
.faq div { padding: 0 20px 8px; color: var(--mute); }
.faq-group { padding-top: 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.chips a { background: var(--soft); border-radius: 22px; padding: 8px 16px; text-decoration: none; font-weight: 700; font-size: .9rem; }

.cta { background: #17163B; color: #fff; text-align: center; padding: clamp(40px, 7vh, 76px) 0; }
.stores { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.store { display: flex; flex-direction: column; align-items: flex-start; min-width: 190px; padding: 10px 22px; border-radius: 16px; background: #fff; color: #17163B; text-decoration: none; font-weight: 700; line-height: 1.35; }
.store small { font-weight: 500; font-size: .75rem; }
.store-soon { background: transparent; color: #fff; border: 1px dashed #8D8AB5; }

/* text pages */
.page-head { background: linear-gradient(var(--hero), var(--hero-end)); color: #fff; padding: clamp(28px, 5vh, 48px) 0 clamp(24px, 4vh, 40px); text-align: center; }
.page-head h1 { font-size: clamp(1.8rem, min(4vw, 5.2vh), 2.5rem); }
.page-head p { margin: 0; }
.doc { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; padding-top: 40px; align-items: start; }
.toc { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow: auto; font-size: .9rem; }
.toc h2 { font-size: 1rem; }
.toc ol { padding-left: 28px; margin: 0; }
.toc li { margin-bottom: 7px; }
.toc a { text-decoration: none; }
.prose { padding-bottom: 60px; }
.prose h2 { font-size: 1.55rem; margin-top: 1.5em; }
.prose h3 { margin-top: 1.7em; }
.prose section:first-child h2 { margin-top: 0; }
.prose li { margin-bottom: 7px; }
.contact { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px 24px; margin-top: 34px; }
.contact h2, .contact p { margin: 0; }
.warning { border-left: 5px solid var(--gold); background: var(--soft); border-radius: 12px; padding: 14px 18px; }
.not-found { padding: 60px 0; }

/* footer */
.foot { background: #0E0D22; color: #B4B1D8; padding: 48px 0 calc(32px + env(safe-area-inset-bottom)); font-size: .92rem; }
.foot .brand { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.foot h2 { font-size: .95rem; color: #fff; }
.foot nav a { display: block; color: inherit; text-decoration: none; padding: 6px 0; }
.foot nav a:hover { color: #FFC252; }
.foot-end { border-top: 1px solid #2F2D57; margin-top: 30px; padding-top: 20px; }

@media (max-width: 900px) {
  .hero-grid, .demo, .doc { grid-template-columns: minmax(0, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .toc { position: static; max-height: none; }
  .doc { gap: 8px; }
}
@media (max-width: 640px) {
  html { font-size: 16px; }
  .phone-art { width: min(100%, 280px); }
  .cards, .steps, .foot-grid { grid-template-columns: 1fr; }
  .strip ul { grid-template-columns: repeat(2, 1fr); }
  .demo-controls { padding: 22px 18px; }
  th, td { padding: 11px 9px; font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .coin { transition: none; } }
@media print { .top, .foot, .toc { display: none; } .doc { display: block; } }
