/*
 * SpendWise marketing site.
 * Tokens mirror apps/mobile/src/theme/{colors,typography,radius,shadows}.ts so
 * the site reads as the same product. Web-only accessibility adjustments
 * (documented inline): CTA faces use primaryDark with ≥18.7px/800 text
 * (WCAG large text, 3.2:1), body-size secondary text uses a darker grey than
 * the app's #777 (4.5:1 on white), and small links use brandDark.
 */
:root {
  /* colors.ts */
  --primary: #58cc02;
  --primary-light: #7be13e;
  --primary-dark: #46a302;
  --primary-ledge: #367f01; /* web-only: ledge under a primaryDark CTA face */
  --primary-subtle: #e8f7da;
  --brand: #7c5cff;
  --brand-light: #9e86ff;
  --brand-dark: #5c3edb;
  --brand-subtle: #eeebff;
  --warning: #ffc800;
  --warning-dark: #e6a800;
  --warning-light: #fff5cc;
  --danger: #ff4b4b;
  --danger-text: #d33131; /* web-only: danger at 4.5:1 for small text */
  --danger-light: #ffe0e0;
  --info: #1cb0f6;
  --background: #f7f7f5;
  --background-tinted: #eef9e3;
  --surface: #ffffff;
  --border: #e5e5e5;
  --border-strong: #cccccc;
  --text: #3c3c3c;
  --text-2: #5f5f5f; /* web-only: app textSecondary #777 is 4.48:1 — darkened for body text */
  /* categoryColors (decorative identity only, never status) */
  --cat-housing: #1cb0f6;
  --cat-food: #ff9600;
  --cat-transport: #58cc02;
  --cat-bills: #ffc800;
  --cat-savings: #14b8a6;
  --cat-fun: #ce82ff;
  --cat-gifts: #ec4899;
  /* radius.ts */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 9999px;
  /* shadows.ts */
  --sh-sm: 0 1px 3px rgba(26, 26, 26, 0.06);
  --sh-md: 0 3px 8px rgba(26, 26, 26, 0.1);
  --sh-lg: 0 8px 20px rgba(26, 26, 26, 0.16);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --wrap: 1160px;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 0.5em; color: var(--text); }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.1rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.75rem); letter-spacing: -0.03em; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--text); color: #fff; padding: 10px 16px; border-radius: var(--r-md); font-weight: 700; }
.skip-link:focus { top: 12px; }
main:focus { outline: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* Eyebrow: typography.small — 700, letterSpacing 0.6, uppercase */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--brand-dark); background: var(--brand-subtle);
  padding: 6px 12px; border-radius: var(--r-pill); margin-bottom: 18px;
}
.eyebrow.green { color: #2f6f00; background: var(--primary-subtle); }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--text-2); max-width: 36em; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
/* A short lead that should read as one line wherever it fits; wraps on phones. */
.lead-one-line { max-width: none; }
@media (min-width: 900px) { .lead-one-line { white-space: nowrap; } }

/* ── Buttons: AppButton's two-layer "ledge" that collapses on press ── */
.btn {
  --face: var(--primary-dark); --ledge: var(--primary-ledge); --ink: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 28px;
  font: 800 1.1875rem/1.1 var(--font); letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none;
  color: var(--ink); background: var(--face); border: 2px solid var(--face); border-radius: var(--r-lg);
  box-shadow: 0 5px 0 var(--ledge); transform: translateY(0); cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn:active { transform: translateY(5px); box-shadow: 0 0 0 var(--ledge); }
.btn-outline { --face: var(--surface); --ink: var(--brand-dark); --ledge: var(--border-strong); border-color: var(--border); }
.btn-outline:hover { filter: none; background: var(--background); }
.btn-sm { min-height: 44px; padding: 8px 18px; font-size: 1rem; letter-spacing: 0.04em; box-shadow: 0 4px 0 var(--ledge); }
.btn-sm:active { transform: translateY(4px); }
.btn-icon { --face: var(--surface); --ink: var(--text); --ledge: var(--border-strong); border-color: var(--border); min-width: 44px; min-height: 44px; padding: 0; font-size: 1.4rem; box-shadow: 0 3px 0 var(--ledge); border-radius: var(--r-md); }
.btn-icon:active { transform: translateY(3px); }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.45; cursor: not-allowed; transform: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: 16px 20px; align-items: center; }
.cta-note { font-size: 0.95rem; color: var(--text-2); margin: 14px 0 0; }

/* ── Header ── */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 2px solid var(--border); }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.brand { display: inline-flex; position: relative; font-weight: 800; font-size: 1.65rem; letter-spacing: -0.03em; text-decoration: none; padding-bottom: 6px; margin-right: auto; }
.brand { align-items: center; }
.brand-mark { width: 40px; height: auto; margin-right: 8px; flex: none; transform-origin: 60% 90%; }
.brand:hover .brand-mark { animation: bird-hop 0.6s var(--ease-spring); }
@keyframes bird-hop { 0%, 100% { transform: translateY(0) rotate(0); } 40% { transform: translateY(-5px) rotate(-6deg); } 70% { transform: translateY(0) rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .brand:hover .brand-mark { animation: none; } }
/* Smallest phones: the bird + wordmark + Log in + menu must fit in one row. */
@media (max-width: 380px) { .site-header .brand { font-size: 1.35rem; } .site-header .brand-mark { width: 30px; margin-right: 5px; } .link-login-mobile { padding: 0 6px; } }
.brand-spend { color: var(--brand); }
.brand-wise { color: var(--primary); position: relative; }
.brand-wise::after { content: ''; position: absolute; left: 0; right: 0; bottom: -5px; height: 4px; border-radius: 4px; background: var(--primary); transform-origin: left; }
.brand:hover .brand-wise::after { animation: underline-wiggle 0.5s var(--ease-spring); }
@keyframes underline-wiggle { 0% { transform: scaleX(0.4); } 100% { transform: scaleX(1); } }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav ul a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--r-md); color: var(--text); font-weight: 700; text-decoration: none; }
.site-nav ul a:hover { background: var(--background); }
.site-nav ul a[aria-current='page'] { color: var(--brand-dark); background: var(--brand-subtle); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.link-login { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; white-space: nowrap; font-weight: 800; color: var(--brand-dark); text-decoration: none; border-radius: var(--r-md); }
.link-login:hover { background: var(--brand-subtle); }
.link-login-mobile, .nav-toggle { display: none; }
.nav-toggle { width: 48px; height: 48px; border: 2px solid var(--border); border-radius: var(--r-md); background: var(--surface); box-shadow: 0 3px 0 var(--border-strong); cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 20px; height: 3px; border-radius: 3px; background: var(--text); position: relative; transition: transform 0.2s ease; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ''; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded='true'] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded='true'] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle, .link-login-mobile { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 12px; padding: 12px 20px 24px; background: var(--surface); border-bottom: 2px solid var(--border); box-shadow: var(--sh-lg); }
  .site-nav.open { display: flex; animation: drop 0.22s ease; }
  .site-nav ul { flex-direction: column; }
  .site-nav ul a { min-height: 52px; font-size: 1.15rem; }
  .nav-actions { flex-direction: column; align-items: stretch; }
  .nav-actions .link-login { display: none; }
  .nav-actions .btn { min-height: 52px; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ── Sections ── */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-tint { background: var(--background); }
.section-green { background: var(--background-tinted); }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.center { margin-left: auto; margin-right: auto; }

/* ── Hero ── */
.hero { position: relative; padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 110px); overflow: hidden; background: radial-gradient(1200px 500px at 85% 10%, var(--brand-subtle), transparent 60%), radial-gradient(900px 500px at 0% 100%, var(--primary-subtle), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 .pop { color: var(--brand); display: inline-block; }
.hero h1 .pop-green { color: var(--primary-dark); }
.hero .lead { margin-bottom: 32px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; padding: 0; list-style: none; }
.hero-badges li { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.95rem; padding: 8px 14px; border-radius: var(--r-pill); background: var(--surface); border: 2px solid var(--border); }
.hero-badges li::before { content: '✓'; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--primary-subtle); color: #2f6f00; font-weight: 900; font-size: 0.8rem; }
.page-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 6vw, 72px); background: radial-gradient(900px 400px at 90% 0%, var(--brand-subtle), transparent 60%), radial-gradient(700px 400px at 0% 100%, var(--primary-subtle), transparent 60%); }
.page-hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: center; }
@media (max-width: 860px) {
  .hero-grid, .page-hero-grid { grid-template-columns: 1fr; }
}

/* ── Phone frame around real app screenshots ── */
.phone {
  position: relative; width: min(300px, 78vw); aspect-ratio: 390 / 893; margin: 0 auto;
  border-radius: 44px; padding: 10px; background: #1f1f24;
  box-shadow: 0 2px 0 #3a3a40 inset, 0 30px 60px -20px rgba(60, 40, 140, 0.45), 0 18px 30px -18px rgba(0, 0, 0, 0.4);
}
.phone::before { content: ''; position: absolute; top: 18px; left: 50%; width: 86px; height: 24px; transform: translateX(-50%); border-radius: 14px; background: #1f1f24; z-index: 3; }
/* The screenshots have no status bar, so the screen gets one (47pt of a 390pt-wide
   iPhone = 12cqw): the camera notch sits in it and never covers the app's own header. */
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: #fff; container-type: inline-size; }
.phone-screen::before { content: '9:41'; position: absolute; top: 0; left: 0; width: 30%; height: 12cqw; display: grid; place-items: center; font: 700 4.2cqw/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #1f1f24; z-index: 2; }
.phone-screen::after { content: ''; position: absolute; top: 0; right: 0; width: 30%; height: 12cqw; z-index: 2; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 68 12'%3E%3Cg fill='%231f1f24'%3E%3Crect x='0' y='8' width='3' height='4' rx='1'/%3E%3Crect x='5' y='6' width='3' height='6' rx='1'/%3E%3Crect x='10' y='3.5' width='3' height='8.5' rx='1'/%3E%3Crect x='15' y='1' width='3' height='11' rx='1'/%3E%3Cpath d='M30 3.2a10 10 0 0 1 13 0l-1.6 1.7a7.6 7.6 0 0 0-9.8 0Zm2.6 2.8a6 6 0 0 1 7.8 0l-1.6 1.7a3.6 3.6 0 0 0-4.6 0Zm3.9 4.4-1.7-1.8a2.4 2.4 0 0 1 3.4 0Z'/%3E%3Crect x='47.5' y='1.5' width='17' height='9' rx='2.6' fill='none' stroke='%231f1f24' stroke-opacity='.4'/%3E%3Crect x='49.5' y='3.5' width='12' height='5' rx='1.4'/%3E%3Crect x='65.6' y='4.3' width='1.6' height='3.4' rx='.8' fill-opacity='.4'/%3E%3C/g%3E%3C/svg%3E") center / 55% auto no-repeat; }
.phone-screen img { position: absolute; top: 12cqw; left: 0; width: 100%; height: calc(100% - 12cqw); object-fit: cover; object-position: top; }
.phone-sm { width: min(240px, 66vw); border-radius: 36px; padding: 8px; }
.phone-sm .phone-screen { border-radius: 28px; }
.phone-sm::before { top: 14px; width: 64px; height: 18px; }
.hero-stage { position: relative; display: grid; place-items: center; min-height: 520px; }
/* Hero phone: stays upright. It rises in once, then floats gently; the soft
   halo behind it and the shadow under it breathe in time with the float. */
.hero-phone { position: relative; }
.hero-phone::before { content: ''; position: absolute; inset: 6% -22% 10%; border-radius: 50%; background: radial-gradient(closest-side, rgba(124, 92, 255, 0.22), rgba(88, 204, 2, 0.08) 60%, transparent); z-index: -1; animation: halo 6s ease-in-out infinite; }
.hero-phone::after { content: ''; position: absolute; left: 18%; right: 18%; bottom: -26px; height: 18px; border-radius: 50%; background: radial-gradient(closest-side, rgba(40, 24, 110, 0.28), transparent); animation: shadow 6s ease-in-out infinite; }
.hero-stage .phone { animation: phone-in 0.9s var(--ease-spring) both, float 6s ease-in-out 0.9s infinite; }
@keyframes phone-in { from { opacity: 0; transform: translateY(40px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes shadow { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(0.82); opacity: 0.6; } }
@keyframes halo { 0%, 100% { transform: scale(0.96); opacity: 0.85; } 50% { transform: scale(1.04); opacity: 1; } }
/* Screens slide up into place as they change, like scrolling to the next one. */
.slides img { opacity: 0; transform: translateY(14px) scale(0.985); transition: opacity 0.6s ease, transform 0.7s var(--ease-spring); }
.slides img.is-active { opacity: 1; transform: none; }
.slide-controls { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; }
.slide-dot { width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; padding: 0; border-radius: 50%; }
.slide-dot::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--border-strong); transition: width 0.25s ease, background 0.25s ease; }
.slide-dot[aria-current='true']::before { width: 28px; border-radius: 8px; background: var(--brand); }
.slide-pause { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); cursor: pointer; font-size: 0.9rem; font-weight: 900; color: var(--text); }
.slide-caption { text-align: center; font-weight: 700; color: var(--text-2); margin-top: 6px; min-height: 1.6em; }

/* Floating chips around the hero phone (decorative) */
.chip { position: absolute; z-index: 4; display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-lg); background: var(--surface); border: 2px solid var(--border); box-shadow: var(--sh-lg); font-weight: 800; font-size: 0.95rem; white-space: nowrap; }
.chip small { display: block; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); font-weight: 800; }
.chip .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 1rem; flex: none; }
/* Anchored to the phone's edges (phone = 320px, centred) so a chip only
   overlaps the bezel and never hides the numbers on the screenshot. */
.chip-a { top: 2%; right: calc(50% + 136px); animation: chip-in 0.6s var(--ease-spring) 0.5s both, bob 5s ease-in-out 1.1s infinite; }
.chip-b { bottom: 16%; left: calc(50% + 136px); animation: chip-in 0.6s var(--ease-spring) 0.9s both, bob 6s ease-in-out 1.5s infinite; }
.chip-c { top: 38%; left: calc(50% + 136px); animation: chip-in 0.6s var(--ease-spring) 0.7s both, bob 5.5s ease-in-out 1.3s infinite; }
@keyframes chip-in { from { opacity: 0; transform: translateY(12px) scale(0.85); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (max-width: 520px) { .chip { font-size: 0.82rem; padding: 8px 10px; } .chip .dot { width: 28px; height: 28px; } .hero-stage { min-height: 460px; } }
/* Too narrow to sit beside the phone: keep one chip, under the screenshot's tab bar. */
/* Two-column hero without room beside the phone: no chips (they'd be clipped). */
@media (min-width: 961px) and (max-width: 1359px) { .chip { display: none; } }
@media (max-width: 760px) { .chip-a, .chip-c { display: none; } .chip-b { left: auto; right: 0; top: 0; bottom: auto; } }

/* Coins drifting (decorative) */
.coin { position: absolute; width: 38px; height: 38px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe680, var(--warning) 60%); border: 3px solid var(--warning-dark); display: grid; place-items: center; font-weight: 900; color: var(--warning-dark); font-size: 1.1rem; animation: coin-float 7s ease-in-out infinite; z-index: 1; }
.coin::before { content: '$'; }
@keyframes coin-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-18px) rotate(20deg); } }

/* ── Cards ── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.card { position: relative; background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-xl); padding: 28px; box-shadow: 0 4px 0 var(--border); transition: transform 0.25s var(--ease-spring), box-shadow 0.25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 0 var(--border); }
.card h3 { margin-top: 4px; }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 1.6rem; margin-bottom: 16px; color: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.12); }
.card .more { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 800; text-decoration: none; }
.card .more::after { content: '→'; transition: transform 0.2s ease; }
.card .more:hover::after { transform: translateX(4px); }
.bg-brand { background: var(--brand); }
.bg-green { background: var(--primary-dark); }
.bg-blue { background: var(--cat-housing); }
.bg-orange { background: var(--cat-food); }
.bg-teal { background: var(--cat-savings); }
.bg-pink { background: var(--cat-gifts); }
.bg-yellow { background: var(--warning); color: var(--text) !important; }

/* ── Feature row: text + phone ── */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.feature + .feature { margin-top: clamp(64px, 9vw, 112px); }
.feature.flip > :first-child { order: 2; }
.feature > * { min-width: 0; } /* a wide child (e.g. the people card) must not widen the track past the screen */
@media (max-width: 820px) { .feature { grid-template-columns: 1fr; } .feature.flip > :first-child { order: 0; } }
.checklist { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.checklist li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.checklist li::before { content: '✓'; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-subtle); color: #2f6f00; font-weight: 900; font-size: 0.85rem; margin-top: 1px; }

/* ── Walkthrough tabs (Home) ── */
.tour { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 860px) { .tour { grid-template-columns: 1fr; } }
.tour-tabs { display: grid; gap: 12px; }
.tour-tab { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; text-align: left; width: 100%; padding: 18px; border-radius: var(--r-xl); border: 2px solid var(--border); background: var(--surface); cursor: pointer; font: inherit; color: inherit; box-shadow: 0 4px 0 var(--border); transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
.tour-tab:hover { transform: translateY(-2px); }
.tour-tab[aria-selected='true'] { border-color: var(--brand); box-shadow: 0 4px 0 var(--brand); background: var(--brand-subtle); }
.tour-tab .num { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-weight: 900; font-size: 1.25rem; background: var(--background); color: var(--text); }
.tour-tab[aria-selected='true'] .num { background: var(--brand); color: #fff; }
.tour-tab strong { display: block; font-size: 1.15rem; font-weight: 800; }
.tour-tab span.desc { display: block; color: var(--text-2); font-size: 0.98rem; margin-top: 2px; }
.tour-progress { height: 4px; border-radius: 4px; background: rgba(124, 92, 255, 0.18); margin-top: 10px; overflow: hidden; grid-column: 2; }
.tour-progress i { display: block; height: 100%; width: 0; background: var(--brand); }
.tour-tab[aria-selected='true'] .tour-progress i.run { animation: progress var(--tour-ms, 6000ms) linear forwards; }
@keyframes progress { to { width: 100%; } }
.tour-panel { display: grid; place-items: center; }
.tour-panel .phone img { transition: opacity 0.45s ease, transform 0.6s var(--ease-spring); }

/* ── Sticky steps (How it works) ── */
.steps { display: grid; grid-template-columns: 1fr 340px; gap: clamp(32px, 6vw, 96px); }
.steps-list { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 0; opacity: 0.4; transition: opacity 0.4s ease; }
.step.is-active { opacity: 1; }
.step-num { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--brand); color: #fff; font-weight: 900; font-size: 1.5rem; margin-bottom: 18px; box-shadow: 0 5px 0 var(--brand-dark); }
.step .phone { display: none; margin: 28px 0 0; }
.steps-stage { position: sticky; top: 110px; height: calc(100vh - 140px); max-height: 720px; display: grid; place-items: center; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .steps-stage { display: none; }
  .step { min-height: 0; opacity: 1; padding: 32px 0; border-bottom: 2px dashed var(--border); }
  .step .phone { display: block; }
}
html:not(.js) .step { opacity: 1; }

/* ── Glossary / term cards ── */
.term { display: flex; flex-direction: column; gap: 6px; }
.term .tag { align-self: flex-start; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border-radius: var(--r-pill); background: var(--background); color: var(--text-2); }
.term .eg { margin-top: auto; padding: 12px 14px; border-radius: var(--r-md); background: var(--background); font-size: 0.95rem; }
.money { font-variant-numeric: tabular-nums; font-weight: 800; }

/* Status pill with a non-color indicator (icon + word), like the app's StatusPill */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 800; padding: 4px 10px; border-radius: var(--r-pill); border: 2px solid; }
.pill-ok { color: #2f6f00; border-color: var(--primary); background: var(--primary-subtle); }
.pill-warn { color: #7a5900; border-color: var(--warning); background: var(--warning-light); }
.pill-over { color: var(--danger-text); border-color: var(--danger); background: var(--danger-light); }
.pill-info { color: var(--brand-dark); border-color: var(--brand-light); background: var(--brand-subtle); }

/* ── Demo shell (shared by both demos) ── */
.demo { position: relative; background: var(--surface); border: 2px solid var(--border); border-radius: 28px; box-shadow: 0 6px 0 var(--border), var(--sh-lg); padding: clamp(20px, 3.5vw, 36px); overflow: hidden; }
.demo-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(20px, 4vw, 40px); align-items: start; }
@media (max-width: 860px) { .demo-grid { grid-template-columns: 1fr; } }
.demo-label { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); margin: 0 0 6px; }
.rta { position: relative; border-radius: var(--r-xl); padding: 24px; color: #fff; background: linear-gradient(135deg, var(--brand) 0%, #6a48f5 100%); overflow: hidden; transition: background 0.4s ease; }
.rta::after { content: ''; position: absolute; width: 180px; height: 180px; right: -50px; top: -60px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.rta .demo-label { color: rgba(255, 255, 255, 0.92); }
.rta-amount { font-size: clamp(2.4rem, 6vw, 3.3rem); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.rta.is-zero { background: linear-gradient(135deg, var(--primary-dark) 0%, #3a8f00 100%); }
.rta.is-over { background: linear-gradient(135deg, #c93030 0%, #e04545 100%); }
.meter { height: 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.28); margin-top: 16px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: 12px; background: #fff; transition: width 0.35s var(--ease-spring); }
.rta-status { margin: 14px 0 0; font-weight: 700; min-height: 3.2em; }
.rta-status .ico { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); margin-right: 6px; font-size: 0.85rem; }
.envelopes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.envelope { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 2px solid var(--border); border-radius: var(--r-lg); background: var(--surface); transition: border-color 0.2s, transform 0.25s var(--ease-spring); }
.envelope.bump { transform: scale(1.02); border-color: var(--brand-light); }
.envelope .disc { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 1.15rem; }
.envelope .name { font-weight: 800; }
.envelope .hint { display: block; font-size: 0.85rem; color: var(--text-2); font-weight: 600; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper input { width: 6.4em; min-height: 44px; text-align: right; font: 800 1rem var(--font); font-variant-numeric: tabular-nums; color: var(--text); border: 2px solid var(--border); border-radius: var(--r-md); padding: 0 10px; background: var(--background); }
.stepper input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.3); }
@media (max-width: 480px) {
  .envelope { grid-template-columns: 36px 1fr; }
  .envelope .disc { width: 36px; height: 36px; font-size: 0.95rem; }
  .stepper { grid-column: 1 / -1; justify-content: flex-end; }
}
.demo-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.demo-step2 { margin-top: 22px; padding: 20px; border-radius: var(--r-xl); border: 2px dashed var(--warning-dark); background: var(--warning-light); }
.demo-step2[hidden], .demo-finish[hidden] { display: none; }
.demo-step2 h3 { font-size: 1.15rem; margin-bottom: 6px; }
.cover-options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.demo-finish { margin-top: 22px; padding: 24px; border-radius: var(--r-xl); background: var(--primary-subtle); border: 2px solid var(--primary); text-align: center; animation: pop-in 0.5s var(--ease-spring); }
.demo-finish h3 { font-size: 1.4rem; }
@keyframes pop-in { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.confetti i { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 3px; animation: fall 1.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(560px) rotate(540deg); opacity: 0; } }

/* Split demo */
.seg { display: inline-flex; padding: 4px; border-radius: var(--r-lg); background: var(--background); border: 2px solid var(--border); gap: 4px; flex-wrap: wrap; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--r-md); font-weight: 800; color: var(--text-2); cursor: pointer; }
.seg input:checked + span { background: var(--surface); color: var(--brand-dark); box-shadow: var(--sh-md); }
.seg input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field > label, .field > .demo-label { font-weight: 800; }
.field input[type='text'], .field input[inputmode] { min-height: 48px; font: 800 1.25rem var(--font); font-variant-numeric: tabular-nums; padding: 0 14px; border: 2px solid var(--border); border-radius: var(--r-md); background: var(--background); color: var(--text); max-width: 220px; }
.field input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.3); }
.field .err { color: var(--danger-text); font-weight: 700; font-size: 0.95rem; }
.people { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.person { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border: 2px solid var(--border); border-radius: var(--r-lg); }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 900; }
.person .who { font-weight: 800; }
.person .sub { display: block; overflow-wrap: anywhere; font-size: 0.88rem; color: var(--text-2); font-weight: 600; }
.person .pct { width: 4.2em; min-height: 40px; text-align: right; font: 800 1rem var(--font); border: 2px solid var(--border); border-radius: var(--r-sm); padding: 0 8px; }
.sum-check { margin-top: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.settle-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.settle-list li { padding: 12px 14px; border-radius: var(--r-md); background: var(--background); font-weight: 700; }

/* ── Callouts & CTA band ── */
.note { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; padding: 18px 20px; border-radius: var(--r-lg); background: var(--brand-subtle); border: 2px solid #d9d0ff; }
.note .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 900; }
.note p:last-child { margin: 0; }
.cta-band { position: relative; overflow: hidden; border-radius: 32px; padding: clamp(36px, 6vw, 72px); background: linear-gradient(135deg, var(--brand) 0%, #5f3ff0 100%); color: #fff; text-align: center; box-shadow: 0 8px 0 var(--brand-dark); }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.92); max-width: 34em; margin-left: auto; margin-right: auto; font-size: 1.15rem; }
.cta-band .cta-row { justify-content: center; margin-top: 28px; }
.cta-band .btn-light { --face: #fff; --ink: var(--brand-dark); --ledge: #c9bdff; }
.cta-band a.link-on-dark { color: #fff; font-weight: 800; min-height: 44px; display: inline-flex; align-items: center; }
.cta-band .coin { opacity: 0.9; }

/* ── FAQ (native <details>) ── */
.faq-group { margin-bottom: 48px; }
.faq-group h2 { font-size: 1.6rem; }
.faq { border: 2px solid var(--border); border-radius: var(--r-lg); background: var(--surface); margin-bottom: 12px; box-shadow: 0 3px 0 var(--border); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 14px 20px; font-weight: 800; font-size: 1.08rem; cursor: pointer; border-radius: var(--r-lg); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-subtle); color: var(--brand-dark); font-size: 1.3rem; font-weight: 900; transition: transform 0.25s var(--ease-spring); }
.faq[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 20px 18px; color: var(--text); }
.faq .answer p:last-child { margin-bottom: 0; }
.faq .answer ul { margin: 0 0 12px; padding-left: 1.2em; }
.faq .answer li { margin-bottom: 6px; }
.faq-index { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.faq-index a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); border: 2px solid var(--border); background: var(--surface); font-weight: 800; text-decoration: none; color: var(--text); }
.faq-index a:hover { border-color: var(--brand); color: var(--brand-dark); }

/* ── Illustration ── */
.illo { width: 100%; max-width: 460px; margin: 0 auto; }
/* Nest egg: coins drop into the nest (behind its woven front); the bird bobs as each lands. */
.illo .drop { animation: coin-drop 3.2s cubic-bezier(.5, 0, .9, .6) infinite; }
.illo .drop.d2 { animation-delay: 1.6s; }
.illo .bird { transform-box: fill-box; transform-origin: 50% 100%; animation: bird-bob 1.6s ease-in-out infinite; }
@keyframes coin-drop { 0% { transform: translateY(-70px); opacity: 0; } 12% { opacity: 1; } 62% { transform: translateY(48px); opacity: 1; } 70%, 100% { transform: translateY(56px); opacity: 0; } }
@keyframes bird-bob { 0%, 52%, 100% { transform: none; } 60% { transform: translateY(-3px) scale(1.02, .98); } 68% { transform: translateY(1px); } }

/* ── Scroll reveal (only when JS runs) ── */
html.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.7s var(--ease-spring); }
html.js .reveal.in { opacity: 1; transform: none; }
html.js .reveal.d1 { transition-delay: 0.08s; }
html.js .reveal.d2 { transition-delay: 0.16s; }
html.js .reveal.d3 { transition-delay: 0.24s; }

/* ── Footer ── */
.site-footer { background: var(--text); color: #e9e9e9; padding: 56px 0 28px; margin-top: 0; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.brand-footer .brand-spend { color: #b8a8ff; }
.brand-footer .brand-wise { color: var(--primary-light); }
.brand-footer .brand-wise::after { background: var(--primary-light); }
.footer-note { color: #cfcfcf; max-width: 26em; margin-top: 14px; }
.footer-h { color: #fff; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 6px 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 600; }
.site-footer li a:hover { text-decoration: underline; }
.footer-legal { border-top: 1px solid #5a5a5a; margin-top: 36px; padding-top: 20px; font-size: 0.9rem; color: #cfcfcf; }

/* ── Reduced motion: no transforms, no loops, no auto-advance (JS checks too) ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html.js .reveal { opacity: 1; transform: none; }
  .hero-stage .phone, .slides img { transform: none; }
  .hero-phone::before, .hero-phone::after { animation: none; }
  .confetti { display: none; }
}

/* ── Walkthrough video (How it works + home). Explicit width/height on <video>
      reserve the 16:9 box, so nothing shifts when the poster loads. No autoplay. ── */
.video-tour { margin: 0 auto; max-width: 960px; }
.video-tour.video-compact { max-width: 760px; }
.video-frame { border-radius: var(--r-xl); overflow: hidden; background: var(--surface); border: 2px solid var(--border); box-shadow: var(--sh-lg); }
.video-frame video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--background); }
.video-tour figcaption { margin-top: 14px; text-align: center; font-weight: 700; color: var(--text-2); font-size: 1rem; }
.video-home { margin-top: clamp(48px, 7vw, 80px); }
.video-home h3 { margin-bottom: 20px; }
.transcript { margin: 16px auto 0; max-width: 760px; background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-lg); }
.transcript summary { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 18px; font-weight: 800; color: var(--brand-dark); cursor: pointer; border-radius: var(--r-lg); list-style: none; }
.transcript summary::-webkit-details-marker { display: none; }
.transcript summary::after { content: '+'; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-subtle); font-size: 1.1rem; transition: transform 0.25s var(--ease-spring); }
.transcript[open] summary::after { transform: rotate(45deg); }
.transcript-body { padding: 0 22px 18px; font-size: 1rem; }
.transcript-body ol { margin: 0; padding-left: 1.3em; display: grid; gap: 10px; }
@media (prefers-reduced-motion: reduce) { .transcript summary::after { transition: none; } }

@media (max-width: 360px) { .person { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 8px; padding: 10px; } .person .avatar { width: 36px; height: 36px; } }

/* ── Pricing ── */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
@media (max-width: 960px) { .price-grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } }
.price-card { display: flex; flex-direction: column; gap: 6px; }
.price-card .checklist { margin: 16px 0 24px; flex: 1; align-content: start; }
.price-card .btn { align-self: stretch; justify-content: center; }
.price-featured { border-color: var(--primary); box-shadow: 0 6px 0 var(--primary-dark); }
.price-featured:hover { box-shadow: 0 10px 0 var(--primary-dark); }
.price-badge { align-self: flex-start; margin: 0 0 4px; padding: 4px 12px; border-radius: 999px; background: var(--primary); color: #fff; font-weight: 800; font-size: 0.85rem; }
.price-name { font-size: 1.25rem; margin: 0; }
.price { margin: 8px 0 0; display: flex; align-items: baseline; gap: 4px; }
.price .amount { font-size: clamp(2.4rem, 5vw, 3rem); font-weight: 900; letter-spacing: -0.02em; color: var(--text); }
.price .per { font-size: 1.05rem; color: var(--text-2); font-weight: 700; }
.billed { margin: 0; color: var(--text-2); }
.billed strong { color: var(--text); }
