/* Nab — soft, white, editorial. Serif display + clean sans, glassy pill controls. */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f6f4;
  --bg-sunk: #efefec;
  --ink: #191919;
  --ink-2: #4a4a48;
  --muted: #8b8b87;
  --line: #ebebe8;
  --accent: #191919;
  --accent-ink: #ffffff;
  --good: #1f7a4d;
  --good-bg: #e6f4ec;
  --warn: #8a5a00;
  --warn-bg: #f7efd9;
  --bubble-me: #191919;
  --bubble-me-ink: #ffffff;
  --bubble-them: #f2f2f0;
  --shadow-pill: inset 0 1px 4px rgba(255,255,255,.67), inset 0 -4px 4px rgba(255,255,255,.85), inset 0 0 14px rgba(229,229,229,.55), 0 11px 28px rgba(0,0,0,.05), 0 23px 31px rgba(0,0,0,.035);
  --shadow-card: 0 1px 2px rgba(0,0,0,.04), 0 12px 32px rgba(0,0,0,.06);
  --serif: "Fraunces", ui-serif, Georgia, serif;
  --sans: "Inter", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --radius: 22px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f0e; --bg-soft: #171716; --bg-sunk: #1e1e1c; --ink: #f1f0ec; --ink-2: #c9c8c2; --muted: #8d8c86; --line: #2a2a27;
    --accent: #f1f0ec; --accent-ink: #111; --good: #7fd3a6; --good-bg: #16301f; --warn: #e8c06a; --warn-bg: #362b12;
    --bubble-me: #f1f0ec; --bubble-me-ink: #111; --bubble-them: #1f1f1d;
    --shadow-pill: inset 0 1px 3px rgba(255,255,255,.06), 0 10px 26px rgba(0,0,0,.4);
    --shadow-card: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0f0e; --bg-soft: #171716; --bg-sunk: #1e1e1c; --ink: #f1f0ec; --ink-2: #c9c8c2; --muted: #8d8c86; --line: #2a2a27;
  --accent: #f1f0ec; --accent-ink: #111; --good: #7fd3a6; --good-bg: #16301f; --warn: #e8c06a; --warn-bg: #362b12;
  --bubble-me: #f1f0ec; --bubble-me-ink: #111; --bubble-them: #1f1f1d;
  --shadow-pill: inset 0 1px 3px rgba(255,255,255,.06), 0 10px 26px rgba(0,0,0,.4);
  --shadow-card: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--sans); letter-spacing: -0.011em; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: 600 22px/1 var(--sans); letter-spacing: -0.04em; }
.brand-mark { width: 26px; height: 26px; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a.link { text-decoration: none; color: var(--ink-2); font-size: 15px; }
.nav-links a.link:hover { color: var(--ink); }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--bg); box-shadow: var(--shadow-pill); text-decoration: none; font-weight: 500; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease; white-space: nowrap; }
.pill:hover { transform: translateY(-1px); }
.pill:active { transform: translateY(0) scale(.98); }
.pill.dark { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 24px rgba(0,0,0,.14); }
.pill.big { height: 54px; padding: 0 28px; font-size: 16px; }
.pill[disabled] { opacity: .5; cursor: default; transform: none; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 56px 16px 8px; }
.eyebrow { font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
.display { font-family: var(--serif); font-weight: 400; font-variation-settings: "SOFT" 100, "opsz" 96; font-size: clamp(40px, 7.4vw, 76px); line-height: .98; letter-spacing: -0.025em; margin: 0 auto; max-width: 13ch; text-wrap: balance; }
.lede { max-width: 34rem; margin: 22px auto 0; color: var(--ink-2); font-size: 17px; text-wrap: pretty; }

/* category chips (scrolling row) */
.chips { position: relative; margin: 36px auto 0; max-width: 760px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.chips::-webkit-scrollbar { display: none; }
.chips-track { display: flex; gap: 8px; width: max-content; padding: 14px 10%; margin: 0 auto; }
.chip { display: inline-flex; align-items: center; gap: 10px; height: 60px; padding: 0 22px 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 17px; font-weight: 500; letter-spacing: -0.02em; cursor: pointer; transition: color .2s, background .2s, box-shadow .25s; }
.chip .emoji { font-size: 30px; line-height: 1; filter: saturate(1.05); }
.chip:hover { color: var(--ink-2); }
.chip[aria-pressed="true"] { color: var(--ink); background: var(--bg); box-shadow: var(--shadow-pill); }

/* composer */
.composer { max-width: 640px; margin: 18px auto 0; padding: 0 16px; }
.composer-box { position: relative; background: var(--bg); border-radius: 28px; box-shadow: var(--shadow-card), 0 0 0 1px var(--line); padding: 18px 18px 64px; text-align: left; transition: box-shadow .2s; }
.composer-box:focus-within { box-shadow: var(--shadow-card), 0 0 0 1.5px var(--ink); }
.composer textarea { display: block; width: 100%; min-height: 84px; max-height: 240px; border: 0; outline: 0; resize: none; background: transparent; color: var(--ink); font: 400 18px/1.45 var(--sans); letter-spacing: -0.015em; }
.composer textarea::placeholder { color: var(--muted); }
.send { position: absolute; right: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; transition: transform .15s, opacity .2s; }
.send:disabled { opacity: .25; cursor: default; }
.send:not(:disabled):hover { transform: scale(1.05); }
.composer-meta { position: absolute; left: 20px; bottom: 22px; color: var(--muted); font-size: 13px; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.example { border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); border-radius: 999px; padding: 8px 14px; font-size: 14px; cursor: pointer; transition: border-color .2s, color .2s; }
.example:hover { border-color: var(--ink-2); color: var(--ink); }

/* phone demo */
.stage { display: flex; justify-content: center; padding: 64px 16px 16px; }
.phone { position: relative; width: 340px; max-width: 100%; height: 640px; border-radius: 52px; background: var(--bg-soft); box-shadow: 0 0 0 1px var(--line), 0 40px 80px rgba(0,0,0,.08), inset 0 0 0 10px var(--bg); overflow: hidden; }
.phone::before { content: ""; position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 92px; height: 26px; background: var(--ink); border-radius: 20px; z-index: 3; opacity: .92; }
.phone-head { position: absolute; top: 0; left: 0; right: 0; padding: 58px 22px 12px; display: flex; align-items: center; gap: 10px; background: linear-gradient(var(--bg-soft) 70%, transparent); z-index: 2; }
.phone-head .avatar { width: 32px; height: 32px; }
.phone-head b { font-size: 15px; display: block; line-height: 1.1; }
.phone-head small { color: var(--muted); font-size: 12px; }
.stage { flex-direction: column; align-items: center; gap: 14px; }
.phone { text-align: left; }
/* The screen is a fixed window; the track slides up as messages arrive (no layout jumps). */
.phone-body { position: absolute; inset: 104px 12px 22px; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 28px); mask-image: linear-gradient(transparent, #000 28px); }
.phone-track { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; gap: 8px; padding: 28px 0 4px; transition: transform .7s cubic-bezier(.22,.8,.24,1), opacity .45s ease; will-change: transform; }
.phone-track.fading { opacity: 0; }
.phone .msg { font-size: 14px; animation: pop .42s cubic-bezier(.2,.9,.25,1.1) both; transform-origin: bottom left; }
.phone .msg.me { transform-origin: bottom right; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.94); } to { opacity: 1; transform: none; } }
.steps { display: grid; gap: 3px; }
.step { display: flex; gap: 8px; align-items: center; animation: fadein .35s ease both; }
.step i { width: 14px; height: 14px; border-radius: 50%; flex: none; display: grid; place-items: center; font-style: normal; font-size: 10px; }
.step.now i { border: 2px solid var(--line); border-top-color: var(--ink-2); animation: spin .8s linear infinite; }
.step.done i { background: var(--good-bg); color: var(--good); }
.step.done span { color: var(--ink-2); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
/* Compact result card for the demo phone, so it fits on screen. */
.msg.card.compact .rc-head { padding: 12px 14px 8px; }
.msg.card.compact .rc-title { font-size: 18px; margin: 6px 0 0; }
.msg.card.compact .rc-best { margin: 0 10px; padding: 10px 12px; border-radius: 14px; }
.msg.card.compact .lines { margin-top: 6px; font-size: 13px; }
.msg.card.compact .lines td { padding: 2px 0; }
.msg.card.compact .lines tr.total td { font-size: 15px; padding-top: 6px; }
.msg.card.compact .save { margin: 8px 14px 0; font-size: 13px; }
.msg.card.compact .alts { padding: 4px 14px 12px; }
.msg.card.compact .alt { font-size: 13px; padding: 5px 0; }
.demo-tag { font-size: 12px; color: var(--muted); letter-spacing: .02em; }

/* ---------- chat ---------- */
.msg { max-width: 82%; padding: 10px 14px; border-radius: 20px; font-size: 15px; line-height: 1.4; animation: rise .35s cubic-bezier(.2,.8,.2,1) both; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--bubble-me); color: var(--bubble-me-ink); border-bottom-right-radius: 6px; }
.msg.them { align-self: flex-start; background: var(--bubble-them); border-bottom-left-radius: 6px; }
.msg.card { max-width: 100%; width: 100%; padding: 0; background: var(--bg); box-shadow: var(--shadow-card), 0 0 0 1px var(--line); border-radius: 22px; overflow: hidden; }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* result card */
.rc-head { padding: 16px 16px 12px; }
.rc-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--good); background: var(--good-bg); padding: 4px 10px; border-radius: 999px; }
.rc-title { font: 400 22px/1.15 var(--serif); font-variation-settings: "SOFT" 100, "opsz" 36; letter-spacing: -0.015em; margin: 10px 0 4px; text-wrap: balance; }
.rc-sub { color: var(--ink-2); font-size: 14px; margin: 0; }
.rc-best { margin: 0 12px; padding: 14px; background: var(--bg-soft); border-radius: 16px; }
.rc-merchant { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rc-merchant b { font-size: 15px; }
.rc-merchant span { color: var(--muted); font-size: 13px; text-align: right; }
.lines { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; font-variant-numeric: tabular-nums; }
.lines td { padding: 4px 0; }
.lines td:last-child { text-align: right; }
.lines .neg { color: var(--good); }
.lines tr.total td { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 600; font-size: 16px; }
.save { margin: 12px 16px 0; font-weight: 600; color: var(--good); font-size: 15px; }
.alts { padding: 8px 16px 4px; }
.alts h4, .rc-section h4 { margin: 10px 0 6px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.alt { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; font-variant-numeric: tabular-nums; }
.alt:first-of-type { border-top: 0; }
.alt a { text-decoration: none; }
.alt a:hover { text-decoration: underline; }
.alt small { color: var(--muted); display: block; }
.alt > span:last-child { white-space: nowrap; text-align: right; }
.rc-section { padding: 2px 16px 8px; font-size: 14px; color: var(--ink-2); }
.rc-section ol, .rc-section ul { margin: 0; padding-left: 18px; }
.rc-section li { margin: 3px 0; }
.rc-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 16px 16px; }
.est { font-size: 11px; color: var(--warn); background: var(--warn-bg); padding: 2px 7px; border-radius: 999px; margin-left: 6px; font-weight: 600; }

/* ---------- sections (how it works, trust, faq) ---------- */
.section { max-width: 1040px; margin: 0 auto; padding: 96px 16px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.h2 { font-family: var(--serif); font-weight: 400; font-variation-settings: "SOFT" 100, "opsz" 72; font-size: clamp(32px, 5vw, 48px); line-height: 1.04; letter-spacing: -0.02em; margin: 0 auto; max-width: 18ch; text-wrap: balance; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tile { background: var(--bg-soft); border-radius: var(--radius); padding: 26px 24px 28px; }
.tile .emoji { font-size: 34px; line-height: 1; }
.tile h3 { font-size: 18px; letter-spacing: -0.02em; margin: 18px 0 6px; font-weight: 600; }
.tile p { margin: 0; color: var(--ink-2); }
.step-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--bg); box-shadow: var(--shadow-pill); font-size: 13px; font-weight: 600; }
.faq { max-width: 720px; margin: 0 auto; }
.faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font-size: 18px; font-weight: 500; letter-spacing: -0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 300; font-size: 26px; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 20px; color: var(--ink-2); max-width: 60ch; }
.cta-band { text-align: center; padding: 120px 16px 40px; }
.cta-band .pill { margin-top: 28px; }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; max-width: 1040px; margin: 0 auto; padding: 40px 16px 48px; color: var(--muted); font-size: 13px; }
.foot a { color: var(--muted); text-decoration: none; margin-left: 16px; }

@media (max-width: 760px) {
  .nav { padding: 14px 16px; }
  .nav-links a.link { display: none; }
  .hero { padding-top: 32px; }
  .grid3 { grid-template-columns: 1fr; }
  .section { padding-top: 72px; }
  .chip { height: 52px; font-size: 16px; padding: 0 18px 0 12px; }
  .chip .emoji { font-size: 26px; }
  .stage { padding-top: 40px; }
  .phone { height: 600px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } .step.now i { border-top-color: var(--line); } }
