/* Upbil — Soft Indigo (DESIGN.MD §00), light by default with a dark palette. */

:root {
  --bg: #F5F6FB;
  --surface: #FFFFFF;
  --surface-muted: #EEF0F8;
  --border: #E8EAF3;
  --text: #1C1F3A;
  --text-2: #464B6E;
  --text-muted: #62678A;
  --brand: #5B55E8;
  --brand-tint: #EEEDFD;
  --brand-grad: linear-gradient(135deg, #6C63FF, #4F46E5);
  --on-brand: #FFFFFF;
  --ai: #9333EA;
  --ai-tint: #F5EDFE;
  --positive: #177F4D;
  --warning: #A15C07;
  --warning-tint: #FFF3E0;
  --danger: #C8262B;
  --danger-tint: #FDECEC;
  --trial: #1D5FD1;
  --trial-tint: #EAF1FE;
  --tile-indigo: #E9E8FD; --tile-indigo-fg: #4A44D1;
  --tile-orange: #FFEEDB; --tile-orange-fg: #A4520A;
  --tile-green:  #DDF5E8; --tile-green-fg:  #17774A;
  --tile-pink:   #FCE4EE; --tile-pink-fg:   #B02A5E;
  --tile-blue:   #E3EEFE; --tile-blue-fg:   #1D5FD1;
  --shadow: 0 1px 2px rgba(40, 36, 120, .05), 0 12px 32px -12px rgba(60, 52, 180, .18);
  --card-edge: 1px solid var(--border);

  --r-card: 20px;
  --r-list: 16px;
  --r-btn: 14px;
  --r-tile: 12px;

  --ui: "Geist", Inter, Manrope, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: 20px;
  --max: 1160px;
  color-scheme: light;
}

/* Dark: follows the system unless the visitor picked a theme with the toggle. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1020;
    --surface: #181A2E;
    --surface-muted: #1F2238;
    --border: #2C3050;
    --text: #ECEDF7;
    --text-2: #B4B8D4;
    --text-muted: #9CA1C2;
    --brand: #8B85FF;
    --brand-tint: #2A2752;
    --ai: #C084FC;
    --ai-tint: #33204A;
    --positive: #4ADE9A;
    --warning: #F5A94A;
    --warning-tint: #3A2B16;
    --danger: #FF6B6B;
    --danger-tint: #3D1D22;
    --trial: #7DB2FF;
    --trial-tint: #172A45;
    --tile-indigo: #26244A; --tile-indigo-fg: #A5A1FF;
    --tile-orange: #3A2A18; --tile-orange-fg: #F5B26B;
    --tile-green:  #173327; --tile-green-fg:  #5FD9A0;
    --tile-pink:   #3A1B2A; --tile-pink-fg:   #F58AB0;
    --tile-blue:   #172A45; --tile-blue-fg:   #7DB2FF;
    /* Soft elevation barely reads on dark, so cards trade it for a hairline. */
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1020;
  --surface: #181A2E;
  --surface-muted: #1F2238;
  --border: #2C3050;
  --text: #ECEDF7;
  --text-2: #B4B8D4;
  --text-muted: #9CA1C2;
  --brand: #8B85FF;
  --brand-tint: #2A2752;
  --ai: #C084FC;
  --ai-tint: #33204A;
  --positive: #4ADE9A;
  --warning: #F5A94A;
  --warning-tint: #3A2B16;
  --danger: #FF6B6B;
  --danger-tint: #3D1D22;
  --trial: #7DB2FF;
  --trial-tint: #172A45;
  --tile-indigo: #26244A; --tile-indigo-fg: #A5A1FF;
  --tile-orange: #3A2A18; --tile-orange-fg: #F5B26B;
  --tile-green:  #173327; --tile-green-fg:  #5FD9A0;
  --tile-pink:   #3A1B2A; --tile-pink-fg:   #F58AB0;
  --tile-blue:   #172A45; --tile-blue-fg:   #7DB2FF;
  /* Soft elevation barely reads on dark, so cards trade it for a hairline. */
  --shadow: none;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 12px; z-index: 100; background: var(--surface); padding: 10px 16px; border-radius: 10px; }
.skip:focus { left: 12px; }

/* Money: figures never shift width as they render */
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--r-btn);
  font: 600 16px/1 var(--ui);
  text-decoration: none;
  transition: transform .1s ease, box-shadow .2s ease;
}
.btn:active { transform: scale(.98); }
.btn--primary {
  background: var(--brand-grad); color: var(--on-brand);
  box-shadow: 0 8px 20px -8px rgba(79, 70, 229, .6);
}
.btn--primary:hover { box-shadow: 0 12px 26px -8px rgba(79, 70, 229, .7); }
.btn--quiet { color: var(--brand); background: var(--brand-tint); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn--block { width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
}
.nav__inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.nav nav { margin-left: auto; }
.nav__links { display: flex; gap: 28px; }
.nav__links a { color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav__links a:hover { color: var(--brand); }
.nav__links a[aria-current="page"] { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--brand); padding-bottom: 4px; }
.nav__toggle {
  display: none; width: 44px; height: 44px; margin-right: -8px;
  border: 0; border-radius: 12px; background: transparent; color: var(--text); cursor: pointer;
}
.nav__toggle svg { width: 24px; height: 24px; margin: auto; stroke: currentColor; stroke-width: 2; stroke-linecap: round; fill: none; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 96px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto 40%; height: 720px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 16%, transparent), transparent);
  pointer-events: none;
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; }

/* Headlines follow the app: the UI sans at 800 with tight tracking (DESIGN.MD §00, §6) */
.display {
  font: 800 clamp(42px, 5.4vw, 70px)/1.02 var(--ui);
  letter-spacing: -.035em;
  display: flex; flex-direction: column;
}
.display__second { color: var(--brand); }
.lede { margin-top: 24px; max-width: 34em; font-size: 19px; color: var(--text-2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__note { margin-top: 20px; font-size: 14px; color: var(--text-muted); }

/* The statement card */
.statement {
  margin: 0;
  background: var(--surface);
  border: var(--card-edge);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  padding: 20px;
}
.statement__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 4px 16px; }
.statement__title { font-weight: 700; }
.statement__meta { font-size: 14px; color: var(--text-muted); }

.rows { display: grid; gap: 10px; }
.row {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 16px; align-items: center;
  padding: 10px 12px;
  border-radius: var(--r-list);
  background: var(--surface-muted);
}
.raw {
  font: 500 12.5px/1.4 var(--mono);
  color: var(--text);
  overflow-wrap: anywhere;
}
.noise { color: var(--text-muted); transition: opacity .5s ease, color .5s ease; }
.clean { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; }
.clean__name { display: flex; flex-direction: column; font-weight: 650; font-size: 15px; line-height: 1.3; }
.clean__name small { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; font-size: 13px; color: var(--text-muted); }
.clean__amt { font-weight: 700; font-size: 15px; }

.mark {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px;
}
.mark--pink { background: var(--tile-pink); color: var(--tile-pink-fg); }
.mark--green { background: var(--tile-green); color: var(--tile-green-fg); }
.mark--orange { background: var(--tile-orange); color: var(--tile-orange-fg); }
.mark--blue { background: var(--tile-blue); color: var(--tile-blue-fg); }
.mark--indigo { background: var(--tile-indigo); color: var(--tile-indigo-fg); }

/* Unconfirmed (§12.1): dashed AI-violet border and left edge, amount in secondary text. Never opacity. */
.row--unsure {
  background: var(--surface);
  border: 1.5px dashed var(--ai);
  box-shadow: inset 4px 0 0 var(--ai);
}
.row--unsure .clean__name small { color: var(--ai); }
.row--unsure .clean__amt { color: var(--text-muted); font-weight: 600; }
.sparkle { width: 12px; height: 12px; fill: currentColor; flex: none; }

.total {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  margin-top: 16px; padding: 20px;
  border-radius: var(--r-list);
  background: var(--brand-grad); color: var(--on-brand);
}
.total__label { display: block; font-size: 13px; font-weight: 500; opacity: .9; }
.total__value { display: block; font-weight: 800; font-size: clamp(34px, 4vw, 48px); line-height: 1.05; letter-spacing: -.02em; }
.total__side { text-align: right; }
.total__annual { display: block; font-weight: 700; font-size: 20px; }
.statement__foot { margin-top: 12px; padding: 0 4px; font-size: 13px; color: var(--text-muted); }

/* The one orchestrated moment: noise fades, clean rows arrive, then the total. Plays once. */
.js .row .clean,
.js .total,
.js .statement__foot { opacity: 0; transform: translateY(8px); }
.js .row .clean { transition: opacity .45s cubic-bezier(.2, .7, .2, 1), transform .45s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(.5s + var(--i) * .22s); }
.js .row .noise { transition-delay: calc(.2s + var(--i) * .22s); }
.js .total, .js .statement__foot { transition: opacity .5s ease, transform .5s ease; transition-delay: 1.8s; }

.is-run .row .clean,
.is-run .total,
.is-run .statement__foot { opacity: 1; transform: none; }
.is-run .row .noise { opacity: .35; text-decoration: line-through; text-decoration-thickness: 1px; }

/* ---------- Sections ---------- */
.section { padding: 104px 0; }
.section--tint { background: var(--surface); border-block: 1px solid var(--border); }
.h2 { font: 800 clamp(30px, 3.4vw, 44px)/1.1 var(--ui); letter-spacing: -.03em; max-width: 20em; text-wrap: balance; }
.section__lede { margin-top: 18px; max-width: 38em; font-size: 18px; color: var(--text-2); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 56px; counter-reset: step; }
.step { position: relative; padding-top: 24px; border-top: 2px solid var(--border); }
.step__n {
  display: grid; place-items: center;
  width: 36px; height: 36px; margin-bottom: 18px;
  border-radius: 50%;
  background: var(--brand-tint); color: var(--brand);
  font-weight: 800; font-size: 15px;
}
.step:first-child { border-top-color: var(--brand); }
.step h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.step p { margin-top: 8px; font-size: 15.5px; color: var(--text-2); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.split--flip > :first-child { order: 0; }

.facts { margin-top: 28px; display: grid; gap: 14px; }
.facts li { position: relative; padding-left: 30px; color: var(--text-2); font-size: 16px; }
.facts li::before {
  content: ""; position: absolute; left: 0; top: .3em;
  width: 18px; height: 18px; border-radius: 6px;
  background: var(--brand-tint)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%235B55E8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

/* Alerts */
.alerts { display: grid; gap: 14px; }
.alert {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center;
  padding: 16px;
  background: var(--bg);
  border: var(--card-edge);
  border-radius: var(--r-list);
}
.alert:nth-child(2) { margin-left: 28px; }
.alert:nth-child(3) { margin-left: 56px; }
.alert h3 { font-size: 16px; font-weight: 700; }
.alert p { font-size: 14px; color: var(--text-muted); }
.tile { width: 44px; height: 44px; border-radius: var(--r-tile); display: grid; place-items: center; }
.tile svg { width: 22px; height: 22px; fill: currentColor; }
.tile--warning { background: var(--warning-tint); color: var(--warning); }
.tile--danger { background: var(--danger-tint); color: var(--danger); }
.tile--trial { background: var(--trial-tint); color: var(--trial); }
.pill { padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill--warning { background: var(--warning-tint); color: var(--warning); }
.pill--danger { background: var(--danger-tint); color: var(--danger); }
.pill--trial { background: var(--trial-tint); color: var(--trial); }

/* Decide */
.draft { display: grid; gap: 16px; }
.choice {
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 5px; border-radius: var(--r-btn);
  background: var(--surface); border: var(--card-edge);
  font-size: 15px; font-weight: 600; text-align: center;
}
.choice span { padding: 10px 6px; border-radius: 10px; color: var(--text-2); }
.choice .is-on { background: var(--brand); color: var(--on-brand); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .choice .is-on { background: #5B55E8; } }
:root[data-theme="dark"] .choice .is-on { background: #5B55E8; }
.draft__card {
  padding: 22px;
  background: var(--surface);
  border: var(--card-edge);
  border-left: 4px solid var(--ai);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}
.draft__tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  background: var(--ai-tint); color: var(--ai);
  font-size: 13px; font-weight: 600;
}
.draft__subject { margin: 16px 0 8px; font-weight: 700; }
.draft__card > p:not(.draft__tag):not(.draft__subject) { color: var(--text-2); font-size: 15.5px; }
.draft__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* Privacy */
.privacy { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 48px; }
.privacy li { padding: 22px; background: var(--bg); border: var(--card-edge); border-radius: var(--r-card); }
.privacy h3 { font-size: 17px; font-weight: 700; }
.privacy p { margin-top: 8px; font-size: 15px; color: var(--text-2); }

/* Pricing */
.pricing { display: grid; grid-template-columns: 1fr 420px; gap: 72px; align-items: center; }
.price {
  padding: 32px;
  background: var(--surface);
  border: var(--card-edge);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}
.price__amount .money { font-weight: 800; font-size: 56px; letter-spacing: -.03em; line-height: 1; }
.price__amount small { margin-left: 6px; font-size: 16px; color: var(--text-muted); }
.price__alt { margin-top: 8px; color: var(--text-2); font-size: 15px; }
.price__list { display: grid; gap: 10px; margin: 24px 0 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.price__list li { font-size: 15.5px; padding-left: 26px; position: relative; }
.price__list li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.price__fine { margin-top: 14px; text-align: center; font-size: 13px; color: var(--text-muted); }

/* FAQ */
.faq > * { max-width: 760px; }
.faq .h2 { margin-bottom: 32px; }
details { border-top: 1px solid var(--border); }
details:last-child { border-bottom: 1px solid var(--border); }
summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 64px; cursor: pointer; list-style: none;
  font-weight: 650; font-size: 17px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; flex: none; width: 10px; height: 10px;
  border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand);
  transform: rotate(45deg) translateY(-3px);
  transition: transform .2s ease;
}
details[open] summary::after { transform: rotate(225deg) translateY(-3px); }
details p { padding: 0 0 22px; color: var(--text-2); max-width: 40em; }

/* ---------- Page header (inner pages) ---------- */
.page-head { padding: 72px 0 8px; }
.display--page { font-size: clamp(38px, 4.6vw, 60px); max-width: 16em; }
.section--flush { padding-top: 56px; }

/* ---------- Home: three things Upbil does ---------- */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 56px; }
.trio .tile { margin-bottom: 18px; }
.trio h3 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.trio p { margin-top: 8px; color: var(--text-2); font-size: 16px; }
.trio a, .more a { display: inline-block; margin-top: 14px; font-weight: 600; font-size: 15px; text-underline-offset: 3px; }
.tile--indigo { background: var(--tile-indigo); color: var(--tile-indigo-fg); }
.tile--green { background: var(--tile-green); color: var(--tile-green-fg); }

/* ---------- Security: keep / don't keep ---------- */
.split--top { align-items: start; }
.ledger { padding: 28px; background: var(--surface); border: var(--card-edge); border-radius: var(--r-card); box-shadow: var(--shadow); }
.ledger h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.ledger .facts { margin-top: 20px; }
.facts--no li::before {
  background: var(--danger-tint)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 4.5l7 7m0-7l-7 7' fill='none' stroke='%23C8262B' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

/* ---------- Store buttons ---------- */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 54px; padding: 0 20px 0 16px;
  border-radius: var(--r-btn);
  background: var(--text); color: var(--bg);
  text-decoration: none;
  transition: transform .1s ease;
}
.store:active { transform: scale(.98); }
.store[aria-disabled="true"] { cursor: default; }
.store[aria-disabled="true"]:active { transform: none; }
.store svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.store span { display: flex; flex-direction: column; font-weight: 700; font-size: 17px; line-height: 1.1; letter-spacing: -.01em; }
.store small { font-weight: 500; font-size: 11.5px; letter-spacing: 0; opacity: .85; }
.stores--lg { margin-top: 36px; }
.stores--lg .store { min-height: 60px; }

/* ---------- CTA band ---------- */
.section--cta { padding: 24px 0 104px; }
.cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 48px;
  padding: 48px;
  border-radius: 28px;
  background: var(--brand-grad); color: var(--on-brand);
}
.cta .h2 { font-size: clamp(28px, 3vw, 38px); }
.cta p { margin-top: 10px; max-width: 30em; font-size: 17px; opacity: .92; }
.cta .store { background: #0B0B1A; color: #FFFFFF; }

/* ---------- Download page ---------- */
.download { padding: 72px 0 104px; }
.download__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 64px; align-items: center; }
.download__soon { margin-top: 18px; font-size: 15px; color: var(--text-muted); }
.download__art { display: grid; place-items: center; }
.download__art img { width: min(220px, 60vw); height: auto; border-radius: 26%; box-shadow: 0 30px 60px -20px rgba(79, 70, 229, .55); }

/* ---------- Footer ---------- */
.footer { padding: 64px 0 56px; border-top: 1px solid var(--border); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; color: var(--text-muted); font-size: 15px; }
.footer__brand p { margin-top: 12px; }
.footer h2 { font-size: 14px; font-weight: 700; color: var(--text); }
.footer ul { display: grid; gap: 8px; margin-top: 12px; }
.footer nav a { color: var(--text-2); text-decoration: none; }
.footer nav a:hover { color: var(--brand); }
.footer__small { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--border); font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero__grid, .split, .pricing { grid-template-columns: 1fr; gap: 48px; }
  .split--flip > :first-child { order: 1; }
  .steps, .privacy { grid-template-columns: repeat(2, 1fr); }
  .pricing .price { max-width: 480px; }
  .trio { grid-template-columns: 1fr; gap: 32px; max-width: 560px; }
  .download__grid { grid-template-columns: 1fr; }
  .download__art { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav__inner { gap: 12px; }
  .nav__download { margin-left: auto; }
  .js .nav__toggle { display: grid; }
  /* Menu drops below the bar; without JS it simply stays open */
  .nav nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 24px -16px rgba(30, 33, 64, .25);
  }
  .js .nav nav { display: none; }
  .js .nav.is-open nav { display: block; }
  .nav__links { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  .nav__links a { display: flex; align-items: center; min-height: 48px; font-size: 17px; }
  .nav__links a[aria-current="page"] { box-shadow: none; color: var(--brand); padding-bottom: 0; }
  .page-head { padding-top: 48px; }
  .cta { padding: 32px 24px; }
  .section--cta { padding-bottom: 72px; }
  .download { padding: 48px 0 72px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .hero { padding: 32px 0 72px; }
  .section { padding: 72px 0; }
  .row { grid-template-columns: 1fr; gap: 8px; }
  .steps, .privacy { grid-template-columns: 1fr; }
  .alert:nth-child(n) { margin-left: 0; }
  .statement { padding: 14px; }
  .total { flex-direction: column; align-items: flex-start; }
  .total__side { text-align: left; }
}

/* Reduced motion: show the finished frame, no movement. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .row .clean, .js .total, .js .statement__foot { opacity: 1; transform: none; transition: none; }
  .js .row .noise { opacity: .35; text-decoration: line-through; transition: none; }
  .btn { transition: none; }
  .btn:active { transform: none; opacity: .85; }
}

/* ---------- App screenshots ---------- */
.section--gallery { padding-top: 24px; }
.shots {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  width: min(100% - 2 * var(--gutter), var(--max)); margin: 48px auto 0;
}
.shot img {
  width: 100%; height: auto;
  border-radius: 32px;
  box-shadow: 0 30px 60px -30px rgba(60, 52, 180, .45);
}
.shot p { margin-top: 18px; font-weight: 600; font-size: 16px; text-align: center; }

.paywall { margin: 40px 0 0; max-width: 300px; }
.paywall img { width: 100%; height: auto; border-radius: 28px; border: var(--card-edge); box-shadow: var(--shadow); }
.paywall figcaption { margin-top: 12px; font-size: 14px; color: var(--text-muted); }

.download__art img { width: min(300px, 70vw); border-radius: 32px; }

/* On phones the gallery becomes a swipeable row that bleeds to the edge */
@media (max-width: 760px) {
  .shots {
    display: flex; gap: 16px; width: auto; margin-top: 32px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 0 var(--gutter) 12px; scroll-padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .shots::-webkit-scrollbar { display: none; }
  .shot { flex: 0 0 72%; scroll-snap-align: start; }
  .paywall { max-width: 240px; }
}

/* Pricing page: price card beside the in-app screenshot */
.pricing--shot { grid-template-columns: minmax(0, 460px) 320px; justify-content: space-between; align-items: start; gap: 64px; }
.pricing__main { display: grid; gap: 40px; }
.why h2 { font: 800 24px/1.2 var(--ui); letter-spacing: -.02em; }
.why p { margin-top: 12px; color: var(--text-2); max-width: 30em; }
.pricing--shot .paywall { margin: 0; max-width: none; }
@media (max-width: 1000px) {
  .pricing--shot { grid-template-columns: 1fr; }
  .pricing--shot .paywall { max-width: 260px; }
}

/* ---------- Home hero: the app, fanned out ---------- */
.stage {
  position: relative;
  height: clamp(480px, 46vw, 640px);
}
.stage::before {
  content: ""; position: absolute; left: 50%; top: 52%;
  width: 90%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 22%, transparent), transparent 72%);
}
.phone {
  position: absolute; left: 50%; top: 50%;
  height: 94%; width: auto;
  border-radius: 12.5% / 5.8%;
  box-shadow: 0 40px 70px -30px rgba(40, 34, 140, .55);
  transform-origin: 50% 90%;
  transition: transform .9s cubic-bezier(.2, .8, .2, 1), opacity .6s ease;
}
.phone--center { z-index: 3; transform: translate(-50%, -50%); }
.phone--left   { z-index: 1; transform: translate(-50%, -50%) translateX(-52%) rotate(-9deg) scale(.84); }
.phone--right  { z-index: 2; transform: translate(-50%, -50%) translateX(52%) rotate(9deg) scale(.84); }

.chip {
  position: absolute; z-index: 4;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px 12px 12px;
  background: var(--surface); border: var(--card-edge);
  border-radius: var(--r-list);
  box-shadow: 0 18px 40px -18px rgba(40, 34, 140, .45);
  transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .5s ease;
}
.chip .tile { width: 40px; height: 40px; }
.chip .tile svg { width: 20px; height: 20px; }
.chip strong { display: block; font-size: 14.5px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.chip small { display: block; font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.chip--a { left: -6%; top: 58%; }
.chip--b { right: -4%; top: 80%; }

/* Entrance, once: the phones rise stacked, then fan out; the chips land last. */
.js .stage .phone { opacity: 0; transform: translate(-50%, -42%) scale(.9); }
.js .stage .chip { opacity: 0; transform: translateY(14px) scale(.96); }
.js .stage .phone--center { transition-delay: .1s; }
.js .stage .phone--left, .js .stage .phone--right { transition-delay: .45s; }
.js .stage .chip--a { transition-delay: 1.1s; }
.js .stage .chip--b { transition-delay: 1.3s; }
.stage.is-run .phone { opacity: 1; }
.stage.is-run .phone--center { transform: translate(-50%, -50%); }
.stage.is-run .phone--left  { transform: translate(-50%, -50%) translateX(-52%) rotate(-9deg) scale(.84); }
.stage.is-run .phone--right { transform: translate(-50%, -50%) translateX(52%) rotate(9deg) scale(.84); }
.stage.is-run .chip { opacity: 1; transform: none; }

@media (max-width: 1000px) {
  .stage { height: clamp(440px, 90vw, 600px); margin-top: 8px; }
}
@media (max-width: 760px) {
  .phone--left, .stage.is-run .phone--left   { transform: translate(-50%, -50%) translateX(-44%) rotate(-8deg) scale(.8); }
  .phone--right, .stage.is-run .phone--right { transform: translate(-50%, -50%) translateX(44%) rotate(8deg) scale(.8); }
  .chip { padding: 10px 12px 10px 10px; gap: 10px; }
  .chip .tile { width: 34px; height: 34px; }
  .chip strong { font-size: 13px; }
  .chip small { font-size: 12px; }
  .chip--a { left: 0; top: 58%; }
  .chip--b { right: 0; top: 81%; }
}
@media (prefers-reduced-motion: reduce) {
  .js .stage .phone, .js .stage .chip { transition: none; opacity: 1; }
  .js .stage .phone--center { transform: translate(-50%, -50%); }
  .js .stage .phone--left  { transform: translate(-50%, -50%) translateX(-52%) rotate(-9deg) scale(.84); }
  .js .stage .phone--right { transform: translate(-50%, -50%) translateX(52%) rotate(9deg) scale(.84); }
  .js .stage .chip { transform: none; }
}

.download__art img { border-radius: 12.5% / 5.8%; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: none; place-items: center;
  width: 44px; height: 44px; flex: none;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text); cursor: pointer;
  transition: transform .1s ease;
}
.js .theme-toggle { display: grid; }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle__moon { fill: currentColor; }
.theme-toggle__sun { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; display: none; }
.theme-toggle__sun circle { fill: currentColor; stroke: none; }
.theme-toggle[data-mode="dark"] .theme-toggle__moon { display: none; }
.theme-toggle[data-mode="dark"] .theme-toggle__sun { display: block; }
@media (max-width: 760px) {
  .theme-toggle { width: 40px; height: 40px; }
}

/* ---------- Pricing plans ---------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 400px)); gap: 24px; }
.plan {
  display: flex; flex-direction: column;
  padding: 32px;
  background: var(--surface); border: var(--card-edge);
  border-radius: var(--r-card); box-shadow: var(--shadow);
}
.plan--best { border: 2px solid var(--brand); }
.plan__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan__name { font-size: 18px; font-weight: 700; }
.plan__price { margin-top: 18px; }
.plan__price .money { font-weight: 800; font-size: 56px; letter-spacing: -.03em; line-height: 1; }
.plan__price small { margin-left: 6px; font-size: 16px; color: var(--text-muted); }
.plan__note { margin: 10px 0 28px; color: var(--text-2); font-size: 15px; flex: 1; }
.pill--save { background: var(--brand-tint); color: var(--brand); }
.plans__foot { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 64px; max-width: 960px; }
.plans__h { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.plans__foot .facts { margin-top: 18px; }
@media (max-width: 760px) {
  .plans, .plans__foot { grid-template-columns: 1fr; }
  .plans__foot { gap: 36px; margin-top: 48px; }
  .plan { padding: 24px; }
}

/* ---------- Legal pages ---------- */
.legal { padding: 72px 0 104px; }
.legal__wrap { max-width: 760px; margin-left: max(var(--gutter), calc((100% - var(--max)) / 2)); }
.legal__meta { margin-top: 16px; color: var(--text-muted); font-size: 15px; }
.legal > .wrap > p { margin-top: 24px; color: var(--text-2); }
.legal section { margin-top: 40px; }
.legal h2 { font-size: 21px; font-weight: 700; letter-spacing: -.015em; }
.legal section p { margin-top: 12px; color: var(--text-2); }
.legal section ul { margin-top: 12px; display: grid; gap: 10px; }
.legal section li { position: relative; padding-left: 22px; color: var(--text-2); }
.legal section li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.legal strong { color: var(--text); }
.placeholder { background: var(--warning-tint); color: var(--text); padding: 2px 4px; border-radius: 4px; }

/* Phone header: logo, Download app, theme, menu */
@media (max-width: 760px) {
  .nav__inner { gap: 8px; }
  .nav__download { order: 2; }
  .theme-toggle { order: 3; }
  .nav__toggle { order: 4; }
}

/* Home FAQ */
.home-faq > * { max-width: 760px; }
.home-faq .h2 { margin-bottom: 28px; }
