/* Baseline — lean, one typeface, minimal emphasis */

:root {
  --paper: #EEF3F2;
  --card: #FFFFFF;
  --ink: #13211C;
  --muted: #586863;
  --line: #DDE7E3;
  --accent: #0E7C6C;
  --accent-2: #0A5D51;
  --maxw: 1060px;
  --gut: clamp(20px, 5vw, 56px);
  --sans: "Hanken Grotesk", -apple-system, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
}

a { color: inherit; text-decoration: none; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 600; font-size: 1rem;
  padding: 0.72em 1.3em; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: background .2s, transform .2s, border-color .2s;
}
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent-2); }
.btn--light { background: var(--accent); color: #fff; }
.btn--light:hover { background: #0f8273; }
.btn--text { background: none; color: var(--ink); padding-inline: 0.4em; }
.btn--text:hover { color: var(--accent); }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(238,243,242,.85); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.is-stuck { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav__right { display: inline-flex; align-items: center; gap: .5rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.brand--sm { font-size: 1.1rem; }
.nav .btn { padding: .55em 1.05em; font-size: .95rem; }

/* hero */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding-block: clamp(3rem, 9vw, 7rem); }
.phone__note { text-align: center; font-size: .8rem; color: var(--muted); margin-top: .9rem; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.lede { font-size: 1.2rem; color: var(--muted); margin-top: 1.2rem; max-width: 34ch; }
.hero__cta { display: flex; align-items: center; gap: .4rem; margin-top: 2rem; }

/* the app, shown as a phone home screen */
.phone { max-width: 392px; margin-inline: auto; background: var(--card); border: 1px solid var(--line); border-radius: 32px; padding: 1.1rem 1rem 1.3rem; box-shadow: 0 45px 80px -45px rgba(19,33,28,.5); }
.phone__notch { width: 42px; height: 5px; border-radius: 5px; background: var(--line); margin: .1rem auto 1rem; }
.phone__head { display: flex; justify-content: space-between; align-items: center; padding: 0 .35rem 1rem; }
.phone__brand { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; letter-spacing: -.02em; }
.phone__brand .dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(14,124,108,.16); }
.phone__saved { display: flex; flex-direction: column; align-items: flex-end; font-size: .72rem; color: var(--muted); line-height: 1.25; }
.phone__saved b { font-size: 1.05rem; color: var(--ink); }

.feed { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.fcard { display: flex; align-items: center; gap: .8rem; padding: .85rem .9rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.fcard--price { background: var(--card); border-color: rgba(14,124,108,.4); }
.fcard__icon { flex: none; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 9px; background: rgba(14,124,108,.12); color: var(--accent); }
.fcard__body { flex: 1; min-width: 0; }
.fcard__title { display: block; font-weight: 600; font-size: .95rem; }
.fcard__sub { display: block; font-size: .82rem; color: var(--muted); margin-top: .12rem; }
.fcard__sub s { margin-right: .25rem; }
.fcard__sub b { color: var(--accent); }
.fcard__val { flex: none; font-weight: 700; color: var(--accent); font-size: 1.05rem; }
.fcard__rec { flex: none; font-weight: 600; font-size: .78rem; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: .32em .7em; white-space: nowrap; }

/* contained colored panels (no full-bleed stripes) */
.panel { border-radius: 28px; padding: clamp(2rem, 5vw, 3.75rem); box-shadow: 0 30px 60px -45px rgba(19,33,28,.45); }
.panel--dark { background: var(--ink); color: var(--paper); }
.panel--accent { background: var(--accent); color: #fff; text-align: center; }

/* band (how) */
.band { padding-block: clamp(1rem, 3vw, 2.25rem); }
.band h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin-bottom: 2.5rem; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.steps li { display: flex; flex-direction: column; gap: .9rem; }
.steps .num { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(245,242,236,.35); color: var(--accent); font-weight: 600; }
.steps p { font-size: 1.1rem; max-width: 22ch; }

/* why */
.why { padding-block: clamp(3rem, 7vw, 5.5rem); }
.points { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.4rem); }
.points li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem 1.5rem; }
.points li::before { content: ""; display: block; width: 26px; height: 3px; border-radius: 3px; background: var(--accent); margin-bottom: 1rem; }
.points h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.points p { color: var(--muted); }

/* free / model */
.money { text-align: center; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.money h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.money p { color: var(--muted); max-width: 54ch; margin: .8rem auto 0; }

/* category eyebrow + big-idea statement */
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .04em; color: var(--accent); margin-bottom: .9rem; }
.bigidea { text-align: center; padding-block: clamp(2.75rem, 7vw, 5rem); border-top: 1px solid var(--line); }
.bigidea h2 { font-size: clamp(1.7rem, 4vw, 2.55rem); max-width: 20ch; margin: 0 auto; line-height: 1.12; }
.bigidea p { color: var(--muted); max-width: 52ch; margin: 1.1rem auto 0; }
.footer__tag { color: var(--paper); font-weight: 600; }

/* cta */
.cta { padding-block: clamp(1rem, 3vw, 2.25rem); }
.cta h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.cta__lede { color: rgba(255,255,255,.9); margin-top: .6rem; }
.cta__form { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.8rem; }
.cta__form input { font: inherit; padding: .72em 1.1em; border-radius: 10px; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.12); color: #fff; width: min(320px, 80vw); }
.cta__form input::placeholder { color: rgba(255,255,255,.7); }
.cta__form input:focus { outline: none; border-color: #fff; background: rgba(255,255,255,.2); }
.cta__msg { min-height: 1.4em; margin-top: .9rem; font-size: .95rem; color: #fff; font-weight: 600; }
.cta__alt { margin-top: 1.4rem; font-size: .92rem; color: rgba(255,255,255,.85); }
.cta__alt a { text-decoration: underline; text-underline-offset: 3px; }

/* footer */
.footer { background: var(--ink); color: rgba(245,242,236,.6); padding-block: 2.5rem; }
.footer__inner { display: flex; flex-direction: column; gap: .9rem; max-width: 62ch; }
.footer .brand { color: var(--paper); }
.footer p { font-size: .85rem; }
.footer__legal { color: rgba(245,242,236,.4); }
.footer__notes { padding-left: 1.2rem; display: flex; flex-direction: column; gap: .5rem; margin: .2rem 0; }
.footer__notes li { font-size: .76rem; line-height: 1.5; color: rgba(245,242,236,.55); }
.footer__notes a { color: rgba(245,242,236,.85); text-decoration: underline; text-underline-offset: 2px; }
.footer__notes a:hover { color: #fff; }

/* footnote markers */
sup { line-height: 0; }
sup a { color: var(--accent); text-decoration: none; font-weight: 600; }
sup a:hover { text-decoration: underline; }

/* entrance: nothing animates on scroll. On load, the app feed populates like
   notifications arriving — the app "finding your money." Everything else is just present. */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .feed .fcard { opacity: 0; animation: popin .5s cubic-bezier(.2,.7,.25,1.3) forwards; }
  .feed .fcard:nth-child(1) { animation-delay: .35s; }
  .feed .fcard:nth-child(2) { animation-delay: .52s; }
  .feed .fcard:nth-child(3) { animation-delay: .69s; }
  .feed .fcard:nth-child(4) { animation-delay: .86s; }
}
@keyframes popin { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: none; } }

/* responsive */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 1.4rem; }
  .steps li { flex-direction: row; align-items: center; }
  .points { grid-template-columns: 1fr; }
}

/* readability: bump small content type (no content under ~13px) */
.eyebrow { font-size: .95rem; }
.footer p { font-size: .95rem; }
.footer__notes li { font-size: .9rem; }
.phone__saved { font-size: .82rem; }
.fcard__sub { font-size: .9rem; }
.fcard__rec { font-size: .85rem; }
.phone__note { font-size: .9rem; }

/* theme toggle button */
.theme-toggle { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.theme-toggle:hover { background: var(--card); color: var(--accent); border-color: var(--accent); }
.theme-toggle .i-moon { display: none; }
.theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }

/* ---------- dark mode (home page) ---------- */
:root { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0f1a16;
  --card:  #17241f;
  --ink:   #e9f1ee;
  --muted: #9fb2ab;
  --line:  #2a3a33;
  --accent: #1ab598;
  --accent-2: #149a80;
}
/* components that used --ink as a dark surface, retuned for a dark page */
:root[data-theme="dark"] .nav { background: rgba(15,26,22,.85); }
:root[data-theme="dark"] .panel--dark { background: var(--card); color: var(--ink); }
:root[data-theme="dark"] .footer { background: #0b1310; color: rgba(233,241,238,.6); }
:root[data-theme="dark"] .footer .brand,
:root[data-theme="dark"] .footer__tag { color: var(--ink); }
:root[data-theme="dark"] .footer rect { fill: var(--ink); }
:root[data-theme="dark"] .footer__notes li { color: rgba(233,241,238,.5); }
:root[data-theme="dark"] .footer__notes a { color: rgba(233,241,238,.85); }
:root[data-theme="dark"] .btn--solid:hover { background: var(--accent); color: #06120e; }

/* ---------- accessibility (WCAG 2.1 AA) ---------- */
:root { --accent-text: #0a5d51; }                          /* accessible teal for small text on light */
:root[data-theme="dark"] {
  --accent: #0E7C6C; --accent-2: #0A5D51;                  /* keep accent dark so white text on it passes */
  --accent-text: #2bbfa3;                                  /* brighter teal for small text on dark */
}
.eyebrow { color: var(--accent-text); }
sup a { color: var(--accent-text); }
.footer__legal { color: rgba(245,242,236,.6); }            /* was .4 (failed contrast) */
:root[data-theme="dark"] .footer__notes li { color: rgba(233,241,238,.66); }
:root[data-theme="dark"] .btn--solid:hover { color: #fff; }

/* visible keyboard focus (WCAG 2.4.7) */
a:focus-visible, button:focus-visible, input:focus-visible, .theme-toggle:focus-visible {
  outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 4px;
}

/* skip link (WCAG 2.4.1) */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--ink); color: var(--paper); padding: .7em 1.1em; border-radius: 0 0 8px 0; font-weight: 600; text-decoration: none; }
.skip-link:focus { left: 0; }

/* honor reduced-motion */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
