/* Home + Features pages. Builds on /style.css tokens (--bg, --surface, --sunken, --border, --ink, --muted, --green, --green-tint).
 * Layout = full-bleed bands (cream / surface / green-tint / dark green). Motion = springs, transform/opacity only. */

:root {
  --paper: #fffdf8;
  --glass: rgba(255, 248, 238, 0.74);
  --deep: #0f3b27;
  --deep-ink: #fff8ee;
  --deep-muted: rgba(255, 248, 238, 0.72);
  --shadow: 0 1px 2px rgba(28, 26, 23, 0.06), 0 12px 40px rgba(28, 26, 23, 0.12);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #24211d;
    --glass: rgba(18, 17, 16, 0.72);
    --deep: #0b2a1c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 48px rgba(0, 0, 0, 0.5);
  }
}

body.mk { overflow-x: hidden; }
/* style.css caps <main> at 720px for the text pages; these pages use full-bleed bands with their own .wrap. */
body.mk main { max-width: none; margin: 0; padding: 0; }
/* Footer lines up with the 1080px bands on these pages (style.css centres it at 720px for text pages). */
body.mk footer.site { max-width: 1080px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); margin: 0 0 10px; }
.money { font-family: 'Bricolage Grotesque', -apple-system, sans-serif; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.lede { font-size: clamp(18px, 2.4vw, 21px); line-height: 1.55; color: var(--muted); margin: 0 0 22px; max-width: 36ch; }
.mk h1 { font-size: clamp(40px, 10vw, 72px); margin: 0 0 16px; line-height: 1.02; }
.mk h2 { font-size: clamp(28px, 6vw, 44px); margin: 0 0 12px; }
.mk h3 { font-size: 19px; margin: 0 0 6px; }
.hl { color: var(--green); }
.more-link { font-weight: 700; text-decoration: none; color: var(--green); white-space: nowrap; }
.more-link:hover { text-decoration: underline; }

/* ── Bands ───────────────────────────────────────────────────────────────── */
.band { padding: 64px 0; }
.b-cream { background: var(--bg); }
.b-surface { background: var(--surface); border-block: 1px solid var(--border); }
.b-tint { background: var(--green-tint); }
.b-dark { background: var(--deep); color: var(--deep-ink); }
.b-dark .kicker { color: #4cc08a; }
.b-dark .lede, .b-dark p { color: var(--deep-muted); }
.b-dark a { color: #4cc08a; }
.head { margin-bottom: 28px; }
.head .lede { margin-bottom: 0; }

/* ── Header: condenses into a glass pill on scroll ───────────────────────── */
.bar { position: sticky; top: 0; z-index: 30; padding: 10px 12px 0; padding-top: max(10px, env(safe-area-inset-top)); }
.bar-inner {
  position: relative; max-width: 1080px; margin: 0 auto; padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  transition: transform 0.45s var(--spring);
}
.bar-inner::before {
  content: ''; position: absolute; inset: 0; border-radius: 999px; z-index: -1;
  background: var(--glass); border: 1px solid var(--border); box-shadow: var(--shadow);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  opacity: 0; transform: scale(0.96); transition: opacity 0.3s ease, transform 0.45s var(--spring);
}
.bar.scrolled .bar-inner { transform: scale(0.97); }
.bar.scrolled .bar-inner::before { opacity: 1; transform: scale(1); }
.bar .brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 17px; }
.bar .brand img { width: 32px; height: 32px; border-radius: 8px; }
.bar nav { display: flex; gap: 16px; }
.bar nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.bar nav a:hover, .bar nav a[aria-current='page'] { color: var(--green); }
@media (max-width: 380px) { .bar .brand span { display: none; } }

/* ── Reveal (only with JS; without it everything is visible) ─────────────── */
html.js [data-reveal] {
  opacity: 0; transform: translateY(26px) scale(0.985);
  transition: opacity 0.7s var(--ease-out), transform 0.9s var(--spring);
  transition-delay: var(--d, 0ms);
}
html.js [data-reveal].in { opacity: 1; transform: none; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero { display: grid; gap: 28px; align-items: center; padding-block: 28px 56px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; padding: 13px 24px; border-radius: 999px;
  background: var(--green); color: #fff; font-weight: 700; font-size: 16px; text-decoration: none;
  box-shadow: 0 8px 22px rgba(31, 122, 77, 0.28); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(31, 122, 77, 0.34); }
.button:active { transform: translateY(0) scale(0.98); }
@media (prefers-color-scheme: dark) { .button { color: #0f1a14; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4); } }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(76, 192, 138, 0.55); }
  70%, 100% { box-shadow: 0 0 0 10px rgba(76, 192, 138, 0); }
}
.hero-visual { position: relative; display: flex; justify-content: center; padding: 30px 0 34px; }
.device {
  width: min(330px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 34px;
  padding: 20px 20px 16px; box-shadow: var(--shadow); will-change: transform;
}
.device-top { display: flex; justify-content: space-between; align-items: center; }
.k { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0; }
.pill-mini { font-size: 13px; color: var(--green); background: var(--green-tint); padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.ring-wrap { position: relative; width: 168px; height: 168px; margin: 12px auto 4px; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 11; stroke-linecap: round; stroke-dasharray: 1 1; }
.ring-track { stroke: var(--sunken); }
.ring-fill { stroke: var(--green); stroke-dashoffset: 0.224; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-center .money { font-size: 34px; line-height: 1; }
.ring-center .of { font-size: 13px; color: var(--muted); margin-top: 4px; }
.under { text-align: center; color: var(--green); font-weight: 700; margin: 4px 0 12px; font-size: 15px; }
.days { list-style: none; margin: 0; padding: 0; }
.days li { display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--border); font-size: 15px; }
.days li b { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.days li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.days li em { font-style: normal; font-weight: 800; color: var(--green); font-family: 'Bricolage Grotesque', -apple-system, sans-serif; font-variant-numeric: tabular-nums; }
.per { text-align: right; font-size: 12px; color: var(--muted); margin: 2px 0 0; }
html.js .days li, html.js .under { opacity: 0; transform: translateX(14px); transition: opacity 0.5s var(--ease-out), transform 0.7s var(--spring); }
html.js .days li.in, html.js .under.in { opacity: 1; transform: none; }
.float-chip {
  position: absolute; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 14px; font-weight: 600;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); will-change: transform; white-space: nowrap;
}
.chip-a { top: 0; left: 0; }
.chip-b { bottom: 0; right: 0; }
.ic { width: 18px; height: 18px; border-radius: 50%; background: var(--green-tint); position: relative; flex: none; }
.ic::after { content: ''; position: absolute; inset: 5px; border-radius: 2px; background: var(--green); }
.ic-check::after { inset: 4px 6px 6px 6px; border-radius: 0; background: none; border: solid var(--green); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* ── Steps (home: how it works) ──────────────────────────────────────────── */
.steps { display: grid; gap: 12px; grid-template-columns: 1fr; counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps li { position: relative; background: var(--bg); border: 1px solid var(--border); border-radius: 22px; padding: 18px 18px 18px 70px; }
.steps li::before {
  counter-increment: step; content: counter(step); position: absolute; left: 18px; top: 16px;
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green); color: #fff; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 19px;
}
.steps p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.5; }
/* Three steps sit in one row from tablet width up — never 2 + 1. */
@media (min-width: 700px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* ── Highlight / privacy bands ───────────────────────────────────────────── */
.split { display: grid; gap: 28px; align-items: center; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.badges li { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; font-size: 15px; color: var(--green); }
.badges li.x { color: var(--ink); }
html.js .badges li { opacity: 0; transform: scale(0.6); transition: transform 0.55s var(--spring), opacity 0.25s; transition-delay: var(--d, 0ms); }
html.js .in .badges li, html.js .badges.in li { opacity: 1; transform: none; }
.lockup { display: flex; align-items: center; gap: 16px; }
.lockup svg { width: 54px; height: 54px; flex: none; fill: none; stroke: #4cc08a; stroke-width: 1.8; stroke-linecap: round; }
.facts { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.facts li { display: flex; gap: 10px; align-items: baseline; }
.facts li::before { content: '✓'; color: #4cc08a; font-weight: 800; }
.b-dark .facts li { color: var(--deep-ink); }

/* ── CTA ─────────────────────────────────────────────────────────────────── */
.cta { text-align: center; }
.cta img { width: 84px; height: 84px; border-radius: 21px; box-shadow: var(--shadow); }
.cta h2 { margin-top: 16px; }
.cta .lede { margin-left: auto; margin-right: auto; }

/* ── Features page ───────────────────────────────────────────────────────── */
.page-hero { padding-block: 24px 36px; }
.jump { position: sticky; top: 76px; z-index: 20; padding: 0 12px; }
.jump-scroll {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 6px; max-width: 1080px; margin: 0 auto;
  border-radius: 999px; background: var(--glass); border: 1px solid var(--border); box-shadow: var(--shadow);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
}
.jump-scroll::-webkit-scrollbar { display: none; }
.jump a {
  flex: none; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none;
  color: var(--ink); background: transparent; border: 1px solid transparent; transition: background 0.2s, color 0.2s;
}
.jump a.on { background: var(--green); color: #fff; border-color: var(--green); }
.feat { scroll-margin-top: 130px; }
.feat .split { gap: 32px; }
.points { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.points li { padding-left: 26px; position: relative; color: var(--ink); }
.points li::before { content: ''; position: absolute; left: 4px; top: 0.6em; width: 10px; height: 10px; border-radius: 50%; background: var(--green); }
.b-dark .points li { color: var(--deep-ink); }
.visual { display: flex; justify-content: center; align-items: center; gap: 18px; flex-wrap: wrap; }
.phone {
  width: min(250px, 66vw); aspect-ratio: 560 / 1218; border-radius: 42px; padding: 8px; background: #1c1a17;
  box-shadow: 0 30px 60px rgba(28, 26, 23, 0.25); flex: none;
}
.phone img { display: block; width: 100%; height: 100%; border-radius: 34px; object-fit: cover; }
.hero-phone { width: min(300px, 70vw); box-shadow: 0 40px 80px rgba(28, 26, 23, 0.28), 0 0 0 1px rgba(28, 26, 23, 0.06); }
@media (prefers-color-scheme: dark) { .hero-phone { background: #000; box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 248, 238, 0.12); } }
.timing { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 15px; }
.timing td { padding: 8px 0; border-bottom: 1px solid var(--border); }
.timing td:last-child { text-align: right; font-weight: 700; color: var(--green); white-space: nowrap; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 14px 18px; margin: 10px 0; }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--green); font-size: 22px; line-height: 1; transition: transform 0.3s var(--spring); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* Marquee */
.marquee { padding: 16px 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee-track span { font-family: 'Bricolage Grotesque', -apple-system, sans-serif; font-weight: 800; font-size: clamp(24px, 5vw, 34px); padding: 0 20px; white-space: nowrap; }
.marquee-track span:nth-child(even) { color: var(--green); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Receipt + plan box */
.scan-stage { display: grid; gap: 16px; justify-items: center; width: 100%; }
.receipt {
  position: relative; width: min(320px, 100%); background: var(--paper); color: var(--ink); padding: 20px 18px 28px;
  border-radius: 14px 14px 0 0; box-shadow: var(--shadow); overflow: hidden; font: 13px/1.5 ui-monospace, 'SF Mono', Menlo, monospace;
  -webkit-mask: radial-gradient(circle 7px at 50% 100%, transparent 98%, #000) bottom/18px 100% repeat-x;
  mask: radial-gradient(circle 7px at 50% 100%, transparent 98%, #000) bottom/18px 100% repeat-x;
}
.r-store { text-align: center; font-weight: 700; letter-spacing: 0.12em; margin: 0 0 12px; }
.r-rows { list-style: none; margin: 0; padding: 0; }
.r-rows li { display: grid; grid-template-columns: 20px 1fr auto; gap: 6px; align-items: center; padding: 3px 0; }
.r-rows em, .r-total em { font-style: normal; font-variant-numeric: tabular-nums; transition: color 0.3s; }
.r-rows li.done em { color: var(--green); font-weight: 700; }
.r-total { display: flex; justify-content: space-between; border-top: 1px dashed var(--border); margin: 10px 0 0; padding-top: 8px; font-weight: 700; }
.tick { width: 16px; height: 16px; display: inline-block; }
.tick svg { width: 16px; height: 16px; display: block; }
.tick path { fill: none; stroke: var(--green); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 0; transition: stroke-dashoffset 0.45s var(--ease-out); }
html.js .tick path { stroke-dashoffset: 1; }
html.js .done .tick path { stroke-dashoffset: 0; }
.sweep {
  position: absolute; left: 0; right: 0; top: 0; height: 56px; pointer-events: none; opacity: 0; will-change: transform, opacity;
  background: linear-gradient(180deg, rgba(76, 192, 138, 0) 0%, rgba(76, 192, 138, 0.22) 85%, rgba(76, 192, 138, 0.95) 100%);
}
.plan-box { width: min(320px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 16px 20px; box-shadow: var(--shadow); }
.plan-box .big { font-size: 46px; line-height: 1.05; margin: 6px 0 8px; color: var(--ink); }
.delta { margin: 0; font-size: 15px; color: var(--muted); }
.delta span { display: inline-block; background: var(--green-tint); color: var(--green); font-weight: 800; padding: 2px 10px; border-radius: 999px; margin-right: 4px; }
html.js .delta span { transform: scale(0.4); opacity: 0; transition: transform 0.6s var(--spring), opacity 0.3s; }
html.js .delta.in span { transform: none; opacity: 1; }
.src { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: 10px 0 0; }

/* Small animated panels */
.panel { width: min(320px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 16px; box-shadow: var(--shadow); }
.viz-tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.viz-tasks li { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.viz-tasks .tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--muted); display: grid; place-items: center; transition: background 0.3s, border-color 0.3s; flex: none; }
.viz-tasks .tick svg { width: 14px; height: 14px; }
.viz-tasks .tick path { stroke: var(--surface); }
.viz-tasks .done .tick { background: var(--green); border-color: var(--green); }
.viz-tasks small { color: var(--muted); font-weight: 500; margin-left: auto; white-space: nowrap; }
.viz-live { display: flex; align-items: center; gap: 12px; background: #141312; color: #fff8ee; border-radius: 30px; padding: 12px 16px; width: min(340px, 100%); box-shadow: var(--shadow); }
.mini-ring { width: 40px; height: 40px; transform: rotate(-90deg); flex: none; }
.mini-ring circle { fill: none; stroke-width: 4; stroke-dasharray: 1 1; stroke-linecap: round; }
.mini-ring .t { stroke: rgba(255, 255, 255, 0.15); }
.mini-ring .p { stroke: #4cc08a; stroke-dashoffset: 0.38; }
.viz-live .lt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.viz-live .lt small { color: rgba(255, 248, 238, 0.6); font-size: 12px; }
.viz-live .clock { margin-left: auto; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 24px; color: #4cc08a; font-variant-numeric: tabular-nums; }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper .lbl { font-weight: 700; margin-right: auto; }
.stepper .btn { width: 36px; height: 36px; border-radius: 50%; background: var(--bg); border: 1px solid var(--border); display: grid; place-items: center; font-size: 18px; }
.stepper .num { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 26px; min-width: 22px; text-align: center; display: inline-block; }

/* ── Desktop ─────────────────────────────────────────────────────────────── */
@media (min-width: 880px) {
  .band { padding: 96px 0; }
  .hero { grid-template-columns: 1.1fr 0.9fr; padding-block: 48px 80px; }
  .split { grid-template-columns: 1fr 1fr; gap: 56px; }
  .split.rev > :first-child { order: 2; }
  .jump { top: 80px; }
  .jump-scroll { width: max-content; max-width: 100%; }
}

/* ── Reduced motion: static and readable ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal], html.js .days li, html.js .under, html.js .delta span, html.js .badges li { opacity: 1; transform: none; transition: none; }
  html.js .tick path { stroke-dashoffset: 0; transition: none; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee-track span[aria-hidden] { display: none; }
  .bar-inner, .bar-inner::before { transition: none; }
}
