/*
  Mini Wallet Landing Styles
  - Responsive, accessible, minimal CSS
  - Light/Dark themes via data-theme and prefers-color-scheme
*/

/* CSS Reset (lightweight) */
*, *::before, *::after { box-sizing: border-box; }
html:focus-within { scroll-behavior: smooth; }
body { margin: 0; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

:root {
  --bg: #0c0e13;
  --bg-alt: #10141b;
  --text: #e9ecf1;
  --muted: #a1acbb;
  --card: #121622;
  --border: #262b35;
  --primary-3: #98c1ff;
  --primary-4: #74a8ff;
  --primary-5: #4c8dff;
  --primary-6: #2d6bff;
  --shadow: 0 8px 24px rgba(0,0,0,.18);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-alt: #f7f8fb;
    --text: #0f172a;
    --muted: #475569; /* bump contrast for AA */
    --card: #ffffff;
    --border: #e7eaf0;
    --shadow: 0 10px 30px rgba(2,6,23,.08);
  }
}

/* Toggle theme override */
[data-theme="light"] {
  --bg: #ffffff;
  --bg-alt: #f7f8fb;
  --text: #0f172a;
  --muted: #475569; /* bump contrast for AA */
  --card: #ffffff;
  --border: #e7eaf0;
  --shadow: 0 10px 30px rgba(2,6,23,.08);
}
[data-theme="dark"] {
  --bg: #0c0e13;
  --bg-alt: #10141b;
  --text: #e9ecf1;
  --muted: #a1acbb;
  --card: #121622;
  --border: #262b35;
  --shadow: 0 8px 24px rgba(0,0,0,.18);
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1200px 600px at 70% -20%, rgba(45,107,255,.12), transparent 70%), var(--bg);
  color: var(--text);
  line-height: 1.65;
}


a { color: var(--primary-5); text-decoration: none; }
a:hover { text-decoration: underline; }

*:focus-visible { outline: 2px solid var(--primary-5); outline-offset: 2px; }

.container {
  width: min(1120px, 94vw);
  margin-inline: auto;
}

.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(120%) blur(8px);
  background: var(--bg);
  background: color-mix(in oklab, var(--bg), transparent 15%);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: calc(14px + env(safe-area-inset-top)) 0 14px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; }
.brand-name { font-weight: 700; letter-spacing: .2px; }
.logo-img { height: 26px; width: auto; display: inline-block; }

.nav { position: relative; }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 8px 10px; }
.nav-list { display: flex; gap: 18px; list-style: none; padding: 0; margin: 0; }
.nav-list a { color: inherit; opacity: .9; position: relative; }
.nav-list a:hover { opacity: 1; }
.nav-list a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: linear-gradient(90deg, var(--primary-4), var(--primary-6)); transform: scaleX(0); transform-origin: center; transition: transform .25s ease; }
.nav-list a:hover::after { transform: scaleX(1); }
.nav-list a.active { color: var(--primary-5); opacity: 1; }
.nav-list a.active::after { transform: scaleX(1); }

.actions { display: flex; gap: 10px; align-items: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--border); color: var(--text); background: transparent; text-decoration: none; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.btn .icon { width: 16px; height: 16px; display: inline-block; }
.btn.sm { height: 36px; padding: 0 12px; font-size: 14px; }
.btn.sm .icon { width: 16px; height: 16px; display: inline-block; }
.btn:hover { border-color: var(--primary-6); border-color: color-mix(in oklab, var(--border), var(--primary-6) 30%); }
.btn.primary { background: linear-gradient(90deg, var(--primary-5), var(--primary-6)); background-size: 200% 100%; background-position: 0% 0%; border-color: transparent; color: white; box-shadow: 0 6px 18px rgba(45,107,255,.25); transition: background-position .5s ease; }
.btn.primary:hover { background-position: 100% 0%; filter: brightness(1.03); }
.btn.ghost { background: var(--bg); background: color-mix(in oklab, var(--bg), var(--border) 8%); }
.btn[disabled], .btn[aria-busy="true"] { opacity: .7; cursor: progress; }

/* Stronger focus states */
.btn:focus-visible, .nav-toggle:focus-visible { box-shadow: 0 0 0 3px rgba(45,107,255,.28); }
input:focus-visible { border-color: var(--primary-5); box-shadow: 0 0 0 3px rgba(45,107,255,.18); outline: none; }

.btn.primary[aria-busy="true"]::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); border-top-color: rgba(255,255,255,0.1); margin-left: 8px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero { padding: 64px 0 32px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center; }
.hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.08; letter-spacing: -.4px; margin: 0 0 14px; background: linear-gradient(90deg, var(--primary-4), var(--primary-6)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: clamp(18px, 3.6vw, 28px); margin: 0 0 8px; font-weight: 700; color: var(--primary-5); }
.lead { font-size: clamp(15px, 2vw, 18px); color: var(--muted); margin: 0 0 22px; }
.cta-row { display: flex; gap: 12px; align-items: center; margin: 10px 0 8px; flex-wrap: wrap; }
.trust-row { display: flex; gap: 12px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
.hero-art { aspect-ratio: 3 / 2; border-radius: 20px; background:
  radial-gradient(120px 60px at 20% 10%, rgba(116,168,255,.35), transparent 60%),
  linear-gradient(180deg, var(--bg-alt), var(--bg));
  background:
  radial-gradient(120px 60px at 20% 10%, rgba(116,168,255,.35), transparent 60%),
  linear-gradient(180deg, color-mix(in oklab, var(--bg), var(--primary-6) 6%), var(--bg));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.svg-stroke { fill: none; stroke: var(--muted); stroke: color-mix(in oklab, var(--text), transparent 70%); stroke-width: 3; }
.svg-dot { fill: var(--primary-5); fill: color-mix(in oklab, var(--primary-6), var(--bg) 40%); }

.section { padding: 72px 0; }
.section { transition: background-color .35s ease, border-color .35s ease, box-shadow .35s ease; }
.section.inview { background: color-mix(in oklab, var(--bg-alt), transparent 94%); box-shadow: 0 16px 40px rgba(0,0,0,.08) inset; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section h2 { font-size: clamp(22px, 2.8vw, 32px); margin: 0 0 8px; }
.section h2 { font-size: clamp(22px, 2.8vw, 32px); margin: 0 0 8px; }
.section-lead { color: var(--muted); margin: 0 0 24px; }

.grid.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px 18px 16px; box-shadow: var(--shadow); transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-6px); border-color: var(--primary-6); border-color: color-mix(in oklab, var(--border), var(--primary-6) 25%); box-shadow: 0 18px 38px rgba(0,0,0,.28); }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }

.chain-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--card); background: color-mix(in oklab, var(--bg), var(--border) 12%); border: 1px solid var(--border); }
.chip::before { content: ""; width: 16px; height: 16px; border-radius: 3px; background: var(--chip-color, var(--border)); margin-right: 8px; box-shadow: 0 0 0 1px var(--border) inset; box-shadow: 0 0 0 1px color-mix(in oklab, var(--bg), var(--border) 35%) inset; }
.chip.usdc::before { background: url('assets/icons/usdc.svg') no-repeat center/contain; box-shadow: none; background-color: transparent; border-radius: 0; }
.chip.usdt::before { background: url('assets/icons/usdt.svg') no-repeat center/contain; box-shadow: none; background-color: transparent; border-radius: 0; }
.chip.dai::before { background: url('assets/icons/dai.svg') no-repeat center/contain; box-shadow: none; background-color: transparent; border-radius: 0; }
.chip.eth::before { background: url('assets/icons/ethereum.svg') no-repeat center/contain; box-shadow: none; background-color: transparent; border-radius: 0; }
.chip.polygon::before { background: url('assets/icons/polygon.svg') no-repeat center/contain; box-shadow: none; background-color: transparent; border-radius: 0; }
.chip.bnb::before { background: url('assets/icons/bnb.svg') no-repeat center/contain; box-shadow: none; background-color: transparent; border-radius: 0; }
.chip.arbitrum::before { background: url('assets/icons/arbitrum.svg') no-repeat center/contain; box-shadow: none; background-color: transparent; border-radius: 0; }
.chip.optimism::before { background: url('assets/icons/optimism.svg') no-repeat center/contain; box-shadow: none; background-color: transparent; border-radius: 0; }
.chip.avalanche::before { background: url('assets/icons/avalanche.svg') no-repeat center/contain; box-shadow: none; background-color: transparent; border-radius: 0; }
.chip.base::before { background: url('assets/icons/base.svg') no-repeat center/contain; box-shadow: none; background-color: transparent; border-radius: 0; }
.chip.gnosis::before { background: url('assets/icons/gnosis.svg') no-repeat center/contain; box-shadow: none; background-color: transparent; border-radius: 0; }
.chip.fantom::before { background: url('assets/icons/fantom.svg') no-repeat center/contain; box-shadow: none; background-color: transparent; border-radius: 0; }

/* When chips include <img>, hide ::before and size the image */
.chip.has-img::before { content: none; display: none; }
.chip.has-img { gap: 8px; }
.chip.has-img img { width: 16px; height: 16px; margin: 0; display: inline-block; object-fit: contain; }
.chip { transition: transform .2s ease, box-shadow .2s ease; }
.chip:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.18); }

/* Inline token icon in paragraph */
.icon-inline { width: 16px; height: 16px; vertical-align: -2px; margin-right: 6px; display: inline-block; object-fit: contain; }
.token { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

.hero-diagram { width: 100%; height: auto; color: var(--muted); color: color-mix(in oklab, var(--text), transparent 45%); }
/* Draw-on-load for hero diagram strokes */
.hero-diagram line, .hero-diagram rect, .hero-diagram polygon { 
  stroke-dasharray: 480; stroke-dashoffset: 480; 
}
.hero-diagram.animate line, .hero-diagram.animate rect, .hero-diagram.animate polygon { 
  animation: stroke-in 1.2s ease forwards; 
}
.hero-diagram.animate line:nth-of-type(2), .hero-diagram.animate rect:nth-of-type(2), .hero-diagram.animate polygon:nth-of-type(2) { animation-delay: .08s; }
.hero-diagram.animate line:nth-of-type(3), .hero-diagram.animate rect:nth-of-type(3), .hero-diagram.animate polygon:nth-of-type(3) { animation-delay: .16s; }
@keyframes stroke-in { to { stroke-dashoffset: 0; } }

.timeline { position: relative; margin-top: 14px; }
.t-row { display: grid; grid-template-columns: 18px 1fr; gap: 14px; padding: 10px 0; }
.t-dot { width: 12px; height: 12px; border: 2px solid var(--primary-6); border-radius: 999px; margin-top: 6px; }
.t-content h3 { margin: 0 0 6px; font-size: 18px; }
.t-content p { margin: 0; color: var(--muted); }

/* Logo marquees */
.logo-belt { padding: 8px 0 4px; }
.logo-belt .container { display: grid; gap: 10px; }
.marquee { --size: 36px; --gap: 18px; position: relative; overflow: visible; padding: 6px 0; }
.marquee::after, .marquee::before { display: none; }
.marquee .track { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--gap); animation: none; }
.marquee img { height: var(--size); width: var(--size); object-fit: contain; filter: drop-shadow(0 1px 0 rgba(0,0,0,.12)); opacity: .9; }
.marquee img:hover { opacity: 1; transform: scale(1.03); transition: transform .2s ease, opacity .2s ease; }

/* no animation needed for static display */

.waitlist { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.waitlist-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.waitlist-form input { height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--text); min-width: 240px; }
.form-note { grid-column: 1 / -1; margin: 0; }
.success { color: #16a34a; margin: 0; }
.error { color: #ef4444; margin: 0; }
.hidden { display: none; }
input[aria-invalid="true"] { border-color: #ef4444; }

.faq { display: grid; gap: 10px; }
details { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin: 8px 0 0; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "+"; float: right; font-weight: 700; color: var(--muted); }
details[open] > summary::after { content: "–"; }

.site-footer { padding: 28px 0; border-top: 1px solid var(--border); background: var(--bg); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.foot-brand { display: inline-flex; gap: 10px; align-items: center; }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }
.foot-social { display: flex; gap: 12px; align-items: center; }
.foot-social .icon { width: 18px; height: 18px; color: var(--muted); }
.foot-social a:hover .icon { color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Sticky CTA */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40; }
.sticky-cta.hidden { display: none; }
.sticky-cta-inner { display: flex; gap: 12px; align-items: center; justify-content: space-between; background: var(--card); background: color-mix(in oklab, var(--bg), var(--border) 14%); border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); box-shadow: var(--shadow); }

/* Anchor offset so sticky header doesn't cover sections */
.section, .hero { scroll-margin-top: 72px; }

/* Responsive */
@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; }
  .waitlist { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .grid.cards { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: inline-flex; }
  /* Mobile menu: compact panel aligned to right */
  .nav-list { position: fixed; right: 8px; left: auto; top: 64px; z-index: 60; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 10px; display: none; flex-direction: column; width: clamp(220px, 65vw, 280px); max-height: calc(100vh - 80px); overflow-y: auto; box-shadow: var(--shadow); row-gap: 6px; font-size: 15px; }
  .nav-list a { padding: 8px 10px; border-radius: 8px; }
  /* Disable underline indicator inside mobile menu */
  .nav-list a::after { content: none !important; }
  .nav-list.open { display: flex; }
  .header-inner { grid-template-columns: 1fr auto auto; }
  .brand-name { display: none; }
  .actions { gap: 6px; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .foot-brand { justify-content: center; }
  .foot-links { justify-content: center; }
  .foot-social { justify-content: center; }
}
.stepper { counter-reset: step; position: relative; }
.stepper .step { position: relative; padding-left: 52px; }
.stepper .step::before { counter-increment: step; content: counter(step); position: absolute; left: 18px; top: 18px; width: 28px; height: 28px; border-radius: 999px; background: var(--border); background: color-mix(in oklab, var(--bg), var(--primary-6) 20%); color: var(--primary-5); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }


/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .card:hover { transform: none; }
}
@media (max-width: 520px) {
  .grid.cards { grid-template-columns: 1fr; }
  .waitlist-form { grid-template-columns: 1fr; }
}

/* Back to top */
.back-to-top { position: fixed; right: 14px; bottom: calc(56px + env(safe-area-inset-bottom)); z-index: 45; width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text); display: grid; place-items: center; box-shadow: var(--shadow); cursor: pointer; }
.back-to-top.hidden { display: none; }
.back-to-top:hover { border-color: var(--primary-6); }
.back-to-top:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(45,107,255,.28); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translate(-50%, 8px); z-index: 60; background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Reveal-on-scroll animations */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.show { opacity: 1; transform: translateY(0); }

/* Mobile nav overlay */
.nav-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.36); z-index: 15; }
.nav-overlay[hidden] { display: none; }
body.nav-open { overflow: hidden; }

/* Scroll progress bar */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 50; pointer-events: none; }
.scroll-progress .bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary-4), var(--primary-6)); box-shadow: 0 0 12px rgba(45,107,255,.35); transform-origin: left center; }
.scroll-progress .label { position: absolute; right: 8px; top: 6px; font-size: 12px; color: var(--muted); background: color-mix(in oklab, var(--bg), var(--border) 12%); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; line-height: 1.3; pointer-events: none; }
