/* Hearth website — shared styles.

   The palette is the app's own (mobile/src/theme/tokens.ts): a cool linen
   ground, pine for structure, ember used sparingly as the light. Money is set
   in a serif, as it is in the app; everything else is the system sans.

   No external assets, fonts included: a privacy policy that loads Google Fonts
   hands every reader's IP address to Google before they have read a word. */

:root {
  --ground: #f4f6f5;
  --paper: #ffffff;
  --ink: #0b1d22;
  --ink-2: #33484e;
  --muted: #5a6e73;
  --line: #dde5e3;
  --pine: #0e4f52;
  --pine-deep: #0a3a3c;
  --pine-2: #2e6e72;
  --mist: #e8f0ee;
  --mist-line: #cddfdb;
  --ember: #f2884b;
  --ember-tint: #fdebdf;
  --ember-ink: #9a4a1c;
  --moss: #3f8a5c;

  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;

  --r-lg: 22px;
  --r-md: 14px;
  --page: 1120px;
  --gutter: clamp(20px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--pine); text-decoration: underline; text-decoration-color: rgba(14, 79, 82, 0.35); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2.5px solid var(--ember); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; margin: 0; }
p { margin: 0; }
.figure { font-family: var(--serif); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -0.01em; }

.skip { position: absolute; left: -9999px; top: 12px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 12px; }

.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── header ──────────────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(244, 246, 245, 0.86);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-nav .inner {
  max-width: var(--page); margin: 0 auto; padding: 14px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 1.12rem; letter-spacing: -0.01em; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav-links { display: flex; align-items: center; gap: 6px; font-size: 0.94rem; }
.nav-links a { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 999px; }
.nav-links a:hover { background: rgba(14, 79, 82, 0.07); color: var(--ink); }
.nav-links a[aria-current='page'] { color: var(--pine); font-weight: 600; }

/* ── buttons ─────────────────────────────────────────────────────────── */
.store-row { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 11px;
  min-width: 176px; padding: 10px 20px 10px 16px; border-radius: 13px;
  background: var(--ink); color: #fff; text-decoration: none; line-height: 1.15;
  border: 1px solid var(--ink);
}
.store svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.store small { display: block; font-size: 0.7rem; opacity: 0.82; letter-spacing: 0.01em; }
.store b { display: block; font-size: 1.08rem; font-weight: 600; letter-spacing: -0.01em; }
.store:hover { background: #000; }
.store.on-dark { background: #fff; color: var(--ink); border-color: #fff; }
.store.on-dark:hover { background: var(--mist); }
.store[aria-disabled='true'] { cursor: default; }

/* ── landing: hero ───────────────────────────────────────────────────── */
.hero-wrap { position: relative; overflow: hidden; }
.hero-wrap::before {
  /* The hearth: one warm light, behind the phone. */
  content: ''; position: absolute; width: 760px; height: 760px; right: -180px; top: -260px;
  background: radial-gradient(closest-side, rgba(242, 136, 75, 0.2), rgba(242, 136, 75, 0.07) 55%, transparent);
  pointer-events: none;
}
.hero {
  position: relative; max-width: var(--page); margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) var(--gutter) clamp(56px, 8vw, 104px);
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(36px, 6vw, 72px); align-items: center;
}
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 3.9rem); letter-spacing: -0.035em; line-height: 1.04; max-width: 13ch; }
.hero .lead { margin-top: 22px; font-size: clamp(1.06rem, 1.6vw, 1.2rem); color: var(--ink-2); max-width: 36rem; }
.hero .store-row { margin-top: 32px; }
.hero .reassure { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; list-style: none; font-size: 0.92rem; color: var(--muted); }
.hero .reassure li { display: inline-flex; align-items: center; gap: 7px; }
.hero .reassure .icon { width: 17px; height: 17px; color: var(--pine); stroke-width: 2.2; }

.phone {
  justify-self: center; width: min(330px, 100%);
  padding: 13px; border-radius: 46px; background: #0f2a2d;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 40px 80px -28px rgba(10, 58, 60, 0.55), 0 12px 24px -12px rgba(10, 58, 60, 0.3);
}
.screen { border-radius: 34px; background: var(--ground); padding: 22px 16px 18px; overflow: hidden; }
.screen .top { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px; }
.screen .hello { font-size: 0.8rem; color: var(--muted); }
.screen .hh { font-weight: 700; font-size: 1.02rem; letter-spacing: -0.01em; }
.screen .month { font-size: 0.74rem; color: var(--pine); background: var(--mist); border: 1px solid var(--mist-line); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.pane { background: var(--paper); border-radius: 18px; padding: 14px; margin-top: 10px; box-shadow: 0 1px 2px rgba(11, 29, 34, 0.05); }
.pane.lit { box-shadow: inset 0 2px 0 rgba(242, 136, 75, 0.9), 0 1px 2px rgba(11, 29, 34, 0.05); }
.pane .label { font-size: 0.74rem; color: var(--muted); }
.pane .big { font-size: 2rem; line-height: 1.1; margin-top: 2px; }
.pane .sub { font-size: 0.74rem; color: var(--muted); margin-top: 2px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row b { font-size: 0.86rem; font-weight: 600; }
.row .amt { font-size: 0.86rem; }
.meter { height: 6px; border-radius: 999px; background: #e4ebe9; margin-top: 9px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; }
.due { font-size: 0.72rem; font-weight: 600; color: var(--ember-ink); background: var(--ember-tint); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }

/* ── landing: sections ───────────────────────────────────────────────── */
.band-section { padding-block: clamp(64px, 9vw, 112px); }
.band-section + .band-section { border-top: 1px solid var(--line); }
.container { max-width: var(--page); margin: 0 auto; padding-inline: var(--gutter); }
.section-head { max-width: 40rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); letter-spacing: -0.03em; }
.section-head p { margin-top: 14px; font-size: 1.1rem; color: var(--ink-2); }

.features { margin-top: 52px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 48px; row-gap: 44px; }
.feature .glyph { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: var(--pine); background: var(--mist); border: 1px solid var(--mist-line); }
.feature h3 { margin-top: 18px; font-size: 1.12rem; letter-spacing: -0.015em; }
.feature p { margin-top: 8px; color: var(--ink-2); font-size: 0.98rem; }

.privacy-band { background: var(--pine-deep); color: #e6efed; position: relative; overflow: hidden; }
.privacy-band::after { content: ''; position: absolute; left: -200px; bottom: -380px; width: 700px; height: 700px; background: radial-gradient(closest-side, rgba(242, 136, 75, 0.16), transparent); pointer-events: none; }
.privacy-band .container { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.privacy-band h2 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.7rem); letter-spacing: -0.03em; }
.privacy-band .section-head p { color: #c5d6d3; }
.privacy-band a { color: #fff; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding: 18px 0; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.facts li:first-child { border-top: 0; padding-top: 4px; }
.facts .icon { color: var(--ember); width: 24px; height: 24px; margin-top: 2px; }
.facts b { display: block; color: #fff; font-weight: 600; }
.facts span { color: #b9ccc9; font-size: 0.96rem; }

/* ── pricing ─────────────────────────────────────────────────────────── */
.plans { margin: 52px auto 0; max-width: 1040px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px 28px 30px; }
.plan h3 { font-size: 1.12rem; letter-spacing: -0.01em; }
.plan .price { margin-top: 14px; display: flex; align-items: baseline; gap: 6px; }
.plan .price .figure { font-size: 3rem; line-height: 1; font-weight: 600; color: var(--ink); }
.plan .price span { color: var(--muted); font-size: 0.98rem; }
.plan .blurb { margin-top: 10px; color: var(--muted); font-size: 0.94rem; }
@media (min-width: 961px) { .plan .blurb { min-height: 3.2em; } }
.plan ul { list-style: none; margin: 22px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.plan li { display: grid; grid-template-columns: 22px 1fr; gap: 11px; color: var(--ink-2); font-size: 0.97rem; line-height: 1.45; }
.check { width: 22px; height: 22px; }
.check circle { fill: var(--mist); }
.check path { fill: none; stroke: var(--pine); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.plan.featured { background: var(--pine); border-color: var(--pine); color: #fff; box-shadow: 0 30px 60px -30px rgba(10, 58, 60, 0.6); }
.plan.featured h3, .plan.featured .price .figure { color: #fff; }
.plan.featured .price span, .plan.featured .blurb { color: #c1d5d2; }
.plan.featured ul { border-top-color: rgba(255, 255, 255, 0.16); }
.plan.featured li { color: #e8f1ef; }
.plan.featured .check circle { fill: rgba(255, 255, 255, 0.14); }
.plan.featured .check path { stroke: #fff; }
.tag { position: absolute; top: 28px; right: 26px; font-size: 0.78rem; font-weight: 600; padding: 4px 11px; border-radius: 999px; }
.plan.featured .tag { background: var(--ember); color: #3a1706; }
.tag.save { background: var(--ember-tint); color: var(--ember-ink); }
.fine { margin: 28px auto 0; max-width: 46rem; text-align: center; color: var(--muted); font-size: 0.9rem; }

/* ── faq ─────────────────────────────────────────────────────────────── */
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 80px); }
.faq-grid .section-head p a { font-weight: 600; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 20px 2px; font-weight: 600; font-size: 1.04rem; color: var(--ink); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ''; flex: none; width: 11px; height: 11px; margin-top: 6px; border-right: 2px solid var(--pine); border-bottom: 2px solid var(--pine); transform: rotate(45deg); transition: transform 0.2s ease; }
.faq-list details[open] summary::after { transform: rotate(225deg); margin-top: 11px; }
.faq-list details p { padding: 0 2px 22px; color: var(--ink-2); max-width: 40rem; }
@media (prefers-reduced-motion: reduce) { .faq-list summary::after { transition: none; } }

/* ── closing call to action ──────────────────────────────────────────── */
.closing { padding-block: 0 clamp(64px, 9vw, 104px); }
.closing .box {
  position: relative; overflow: hidden; border-radius: 28px; padding: clamp(40px, 6vw, 64px) clamp(24px, 5vw, 64px);
  background: var(--pine); color: #fff; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center;
}
.closing .box::before { content: ''; position: absolute; right: -120px; top: -220px; width: 520px; height: 520px; background: radial-gradient(closest-side, rgba(242, 136, 75, 0.35), transparent); pointer-events: none; }
.closing h2 { position: relative; color: #fff; font-size: clamp(1.7rem, 3.2vw, 2.4rem); letter-spacing: -0.03em; }
.closing p { position: relative; margin-top: 10px; color: #c9dbd8; }
.closing .store-row { position: relative; }

/* ── footer ──────────────────────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--line); background: var(--paper); }
.site-foot .inner { max-width: var(--page); margin: 0 auto; padding: 48px var(--gutter) 36px; display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.site-foot .about p { margin-top: 12px; color: var(--muted); font-size: 0.92rem; max-width: 22rem; }
.site-foot h2 { font-size: 0.92rem; letter-spacing: 0; color: var(--ink); }
.site-foot ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; font-size: 0.93rem; }
.site-foot ul a { color: var(--ink-2); text-decoration: none; }
.site-foot ul a:hover { color: var(--pine); text-decoration: underline; }
.site-foot .legal-line { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--muted); font-size: 0.86rem; }

/* ── documents: privacy, terms, support, deletion ────────────────────── */
.doc-head { max-width: var(--page); margin: 0 auto; padding: clamp(40px, 6vw, 72px) var(--gutter) 0; }
.doc-head h1 { font-size: clamp(2.2rem, 4.6vw, 3.2rem); letter-spacing: -0.035em; }
.doc-head .meta { margin-top: 12px; color: var(--muted); font-size: 0.95rem; }
.doc-head .intro { margin-top: 16px; font-size: 1.12rem; color: var(--ink-2); max-width: 44rem; }

.doc-grid { max-width: var(--page); margin: 0 auto; padding: 40px var(--gutter) clamp(64px, 8vw, 96px); display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.toc { position: sticky; top: 92px; font-size: 0.9rem; }
.toc h2 { font-size: 0.86rem; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.toc ol { list-style: none; margin: 12px 0 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 16px; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--pine); border-left-color: var(--pine); }

.doc { max-width: 46rem; }
.doc section { padding-block: 34px; border-top: 1px solid var(--line); }
.doc section:first-of-type { border-top: 0; padding-top: 0; }
.doc h2 { font-size: 1.45rem; letter-spacing: -0.02em; }
.doc h3 { font-size: 1.04rem; letter-spacing: -0.01em; margin-top: 24px; }
.doc p, .doc li { color: var(--ink-2); }
.doc h2 + p, .doc h2 + ul, .doc h2 + ol, .doc h3 + p, .doc h3 + ul { margin-top: 10px; }
.doc p + p, .doc ul + p, .doc ol + p, .doc p + ul { margin-top: 12px; }
.doc ul, .doc ol { margin-bottom: 0; padding-left: 20px; }
.doc li + li { margin-top: 7px; }
.doc li::marker { color: var(--pine-2); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc .note { color: var(--muted); font-size: 0.93rem; }

.panel { background: var(--mist); border: 1px solid var(--mist-line); border-radius: var(--r-md); padding: 22px 24px; margin-bottom: 34px; }
.panel h2 { font-size: 1.05rem; letter-spacing: -0.01em; }
.panel ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.panel li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--ink); margin: 0; }
.panel li + li { margin-top: 0; }
.panel .check circle { fill: #fff; }
.panel.warm { background: var(--ember-tint); border-color: #f5cdb3; }
.panel.warm h2 { color: var(--ember-ink); }
.panel.warm p { color: var(--ink); margin-top: 8px; }

.steps { list-style: none; counter-reset: step; padding: 0 !important; margin-top: 16px; display: grid; gap: 14px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; margin: 0 !important; }
.steps li::before { content: counter(step); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--pine); color: #fff; font-weight: 600; font-size: 0.92rem; }
.steps li span { padding-top: 5px; }

.contact-card { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 22px; }
.contact-card b { display: block; color: var(--ink); }
.contact-card span { color: var(--muted); font-size: 0.93rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 11px 20px; border-radius: 999px; background: var(--pine); color: #fff; font-weight: 600; font-size: 0.95rem; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--pine-deep); }

/* ── responsive ──────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { max-width: 16ch; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { grid-template-columns: 1fr; max-width: 460px; }
  .privacy-band .container, .faq-grid { grid-template-columns: 1fr; }
  .doc-grid { grid-template-columns: 1fr; padding-top: 28px; }
  .toc { position: static; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; }
  .toc ol { columns: 2; column-gap: 20px; border-left: 0; }
  .toc a { padding-left: 0; border-left: 0; margin-left: 0; }
  .closing .box { grid-template-columns: 1fr; }
  .site-foot .inner { grid-template-columns: 1fr 1fr; }
  .site-foot .about { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .nav-links .wide { display: none; }
  .nav-links a { padding: 8px 9px; }
  .features { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
  .store { flex: 1 1 100%; }
}
