/* SoFedUp website. Tokens match docs/DESIGN.md (Fresh lime + dark pill nav + Poppins).
   Layout: phone-first single column; a floating dark pill header (like the app's nav),
   a hero with a phone mock and Cosmo, then short bands. Light look only, like the app at launch. */
:root {
  --bg: #f2f3f5;
  --card: #ffffff;
  --surface: #eceef1;
  --line: #e6e8eb;
  --ink: #15171a;
  --ink2: #33373d;
  --muted: #6f747b;
  --lime: #b8e04a;
  --lime2: #9acd32;
  --lime-soft: #e9f6c8;
  --lime-pale: #f5fbe6;
  --green: #5f8f1c;
  --coin: #fdb813;
  --bad: #d93d33;
  --bad-bg: #fbeae7;
  --on-dark: #ffffff;
  --on-dark-muted: #a9aeb5;
  --font: 'Poppins', ui-rounded, 'Segoe UI', system-ui, -apple-system, sans-serif;
  --sh1: 0 1px 2px rgba(28, 33, 29, 0.04), 0 2px 10px rgba(28, 33, 29, 0.04);
  --sh2: 0 2px 6px rgba(28, 33, 29, 0.05), 0 10px 30px rgba(28, 33, 29, 0.08);
  --max: 1120px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--lime2); outline-offset: 3px; border-radius: 8px; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- header: floating dark pill ---------- */
body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--bg);
}
.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 9;
  padding-block: 12px;
}
.pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--on-dark);
  border-radius: 36px;
  padding: 8px 8px 8px 22px;
  min-height: 60px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { height: 26px; width: auto; }
.pill nav { display: flex; gap: 4px; margin-left: auto; }
.pill nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--on-dark-muted);
  padding: 10px 14px;
  border-radius: 22px;
}
.pill nav a:hover { color: var(--on-dark); background: rgba(255, 255, 255, 0.08); }
.lang {
  flex: 0 0 auto;
  font: 600 14px/1 var(--font);
  color: var(--ink);
  background: var(--lime);
  border: 0;
  border-radius: 22px;
  height: 44px;
  min-width: 56px;
  padding: 0 16px;
  cursor: pointer;
}
.lang:hover { background: var(--lime2); }
.pill .spacer { flex: 1; }
@media (max-width: 720px) {
  .pill nav { display: none; }
  .brand img { height: 22px; }
}

/* ---------- shared type ---------- */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}
.h2 { font-size: clamp(28px, 4.4vw, 42px); font-weight: 700; }
.lede { font-size: clamp(17px, 2vw, 19px); color: var(--ink2); max-width: 34em; }
.section { padding-block: clamp(56px, 9vw, 104px); }
.section-head { display: grid; gap: 12px; max-width: 40em; margin-bottom: 36px; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(28px, 6vw, 72px) clamp(48px, 8vw, 96px); overflow-x: clip; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.hero-copy { display: grid; gap: 20px; min-width: 0; }
.hero h1 { font-size: clamp(40px, 4.6vw, 60px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; }
.hero h1 span { display: block; }
.hero h1 .soft { color: var(--muted); font-weight: 700; }
@media (min-width: 861px) { .hero h1 span { white-space: nowrap; } }
.soon {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
}
.chip svg { width: 18px; height: 18px; }
.chip.dark { background: var(--ink); color: var(--on-dark); border-color: var(--ink); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.fine { font-size: 13px; color: var(--muted); }

/* phone mock */
.hero-visual { position: relative; justify-self: end; width: min(100%, 340px); min-width: 0; }
.phone {
  position: relative;
  background: var(--bg);
  border: 10px solid var(--ink);
  border-radius: 44px;
  box-shadow: var(--sh2), 0 30px 60px rgba(28, 33, 29, 0.16);
  padding: 22px 14px 92px;
  overflow: hidden;
}
.phone-top { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px 12px; }
.phone-top b { font-size: 22px; letter-spacing: -0.02em; }
.phone-top span { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.budget {
  background: var(--card);
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: var(--sh1);
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.budget-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.budget-row b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: 4px; background: var(--surface); overflow: hidden; }
.bar i { display: block; height: 100%; width: 72%; background: var(--lime2); border-radius: 4px; }
.meal {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  background: var(--card);
  border-radius: 18px;
  padding: 10px;
  margin-top: 8px;
  box-shadow: var(--sh1);
}
.meal .well { width: 52px; height: 52px; border-radius: 14px; background: var(--lime-pale); display: grid; place-items: center; }
.meal .well img { width: 38px; height: 38px; }
.meal small { display: block; font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.meal strong { display: block; font-size: 13px; line-height: 1.25; }
.meal em { display: block; font-style: normal; font-size: 11px; color: var(--muted); }
.swap {
  width: 34px; height: 34px; border-radius: 11px; background: var(--surface);
  display: grid; place-items: center;
}
.swap svg { width: 16px; height: 16px; }
.why {
  display: inline-block; margin-top: 4px; font-size: 10px; font-weight: 600;
  background: var(--lime-soft); color: var(--green); border-radius: 8px; padding: 1px 7px;
}
.phone-nav {
  position: absolute;
  left: 12px; right: 74px; bottom: 16px;
  height: 52px; border-radius: 26px; background: var(--ink);
  display: flex; align-items: center; justify-content: space-around; padding: 0 6px;
}
.phone-nav span { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #8a8f96; }
.phone-nav span.on { background: var(--lime); color: var(--ink); }
.phone-nav svg { width: 20px; height: 20px; }
.phone-fab {
  position: absolute; right: 12px; bottom: 16px; width: 52px; height: 52px; border-radius: 50%;
  background: var(--lime); display: grid; place-items: center; color: var(--ink);
}
.phone-fab svg { width: 24px; height: 24px; }
.phone { z-index: 1; }
/* Cosmo stands beside the phone's bottom-left edge, waving; he only touches the bezel. */
.cosmo-hero {
  --cw: clamp(120px, 13vw, 164px);
  position: absolute;
  z-index: 3;
  width: var(--cw);
  height: auto;
  aspect-ratio: 1;
  left: calc(var(--cw) * -0.8);
  bottom: -2%;
  filter: drop-shadow(0 14px 18px rgba(28, 33, 29, 0.2));
}
.example-tag {
  position: absolute; top: -12px; right: 18px; z-index: 4;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  font-size: 11px; font-weight: 600; color: var(--muted); padding: 3px 10px;
}
@media (prefers-reduced-motion: no-preference) {
  .cosmo-hero { animation: bob 3.6s ease-in-out infinite; }
  @keyframes bob { 50% { transform: translateY(-8px); } }
}
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { width: min(76%, 300px); margin: 12px 0 8px auto; justify-self: end; }
  .cosmo-hero { --cw: clamp(92px, 27vw, 128px); }
}

/* ---------- how it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step {
  background: var(--card);
  border-radius: 22px;
  padding: 24px;
  display: grid;
  gap: 10px;
  align-content: start;
  box-shadow: var(--sh1);
}
.step .num {
  width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--lime);
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
.step h3 { font-size: 20px; font-weight: 700; }
.step p { color: var(--ink2); font-size: 15px; }
.step img { width: 64px; height: 64px; justify-self: end; margin-top: 4px; }
@media (max-width: 860px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- savings ---------- */
.savings { background: var(--ink); color: var(--on-dark); }
.savings .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.savings .eyebrow { color: var(--lime); }
.savings .lede { color: var(--on-dark-muted); }
.savings-copy { display: grid; gap: 16px; min-width: 0; }
.reasons { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.reasons li { display: flex; gap: 12px; align-items: center; font-weight: 500; }
.reasons li::before {
  content: ''; flex: 0 0 22px; height: 22px; border-radius: 50%;
  background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315171A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.bars { display: grid; gap: 18px; min-width: 0; }
.bars .row { display: grid; gap: 8px; }
.bars .label { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--on-dark-muted); }
.bars .label b { color: var(--on-dark); font-size: clamp(22px, 3vw, 30px); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.track { height: 14px; border-radius: 7px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.track i { display: block; height: 100%; min-width: 8px; border-radius: 7px; background: var(--lime); }
.bars .note { font-size: 13px; color: var(--on-dark-muted); }
.cosmo-coin { width: 120px; justify-self: end; margin-top: -8px; }
@media (max-width: 860px) { .savings .wrap { grid-template-columns: minmax(0, 1fr); } }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature {
  background: var(--card);
  border-radius: 22px;
  padding: 22px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.feature .well { width: 56px; height: 56px; border-radius: 18px; background: var(--surface); display: grid; place-items: center; }
.feature .well img { width: 42px; height: 42px; }
.feature .well svg { width: 26px; height: 26px; }
.feature h3 { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.feature p { font-size: 15px; color: var(--ink2); }
.feature.safe .well { background: var(--ink); color: var(--lime); }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .features { grid-template-columns: minmax(0, 1fr); } }

/* ---------- safety ---------- */
.safety-box {
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(20px, 3vw, 28px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}
.safety-box h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.safety-box p { color: var(--ink2); font-size: 15px; }
.hidden-list { display: grid; gap: 8px; }
.hidden-item {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  background: var(--bg); border-radius: 14px; padding: 10px 14px; font-size: 14px;
}
.hidden-item span { font-weight: 600; }
.hidden-item em {
  font-style: normal; font-size: 12px; font-weight: 600; color: var(--bad);
  background: var(--bad-bg); border-radius: 10px; padding: 2px 10px; white-space: nowrap;
}
@media (max-width: 760px) { .safety-box { grid-template-columns: minmax(0, 1fr); } }

/* ---------- regions ---------- */
.regions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.region { background: var(--card); border-radius: 22px; padding: 24px; display: grid; gap: 14px; box-shadow: var(--sh1); }
.region h3 { font-size: 20px; font-weight: 700; display: flex; gap: 10px; align-items: center; }
.region dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; font-size: 15px; }
.region dt { color: var(--muted); }
.region dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .regions { grid-template-columns: minmax(0, 1fr); } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--card); border-radius: 18px; padding: 4px 20px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 0; font-weight: 600; font-size: 16px;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--surface);
  display: grid; place-items: center; font-size: 18px; font-weight: 500; line-height: 30px; text-align: center;
}
.faq details[open] summary::after { content: '–'; background: var(--lime); }
.faq details p { padding: 0 0 18px; color: var(--ink2); font-size: 15px; max-width: 62ch; }

/* ---------- closing ---------- */
.closing .card {
  background: var(--lime);
  border-radius: 30px;
  padding: clamp(28px, 5vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}
.closing h2 { font-size: clamp(28px, 4.4vw, 44px); font-weight: 800; }
.closing p { color: var(--ink2); margin-top: 10px; }
.closing img { width: clamp(120px, 18vw, 190px); }
.closing .chip { background: var(--ink); color: var(--on-dark); border-color: var(--ink); margin-top: 18px; }
@media (max-width: 620px) { .closing .card { grid-template-columns: minmax(0, 1fr); } .closing img { justify-self: center; } }

/* ---------- footer ---------- */
.foot { padding-block: 40px 48px; color: var(--muted); font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { text-decoration: none; color: var(--ink2); font-weight: 500; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.foot .mark { height: 22px; width: auto; }
.email { user-select: all; font-weight: 600; color: var(--ink); }

/* ---------- document pages (support, privacy, terms) ---------- */
.doc { padding-block: 32px 72px; }
.doc article {
  background: var(--card);
  border-radius: 26px;
  padding: clamp(22px, 5vw, 56px);
  max-width: 860px;
  margin: 0 auto;
}
.doc h1 { font-size: clamp(32px, 5vw, 46px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 8px; }
.doc .updated { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.doc h2 { font-size: 21px; font-weight: 700; margin: 34px 0 10px; }
.doc h3 { font-size: 17px; font-weight: 600; margin: 22px 0 6px; }
.doc p, .doc li { color: var(--ink2); font-size: 16px; max-width: 68ch; }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol { padding-left: 22px; display: grid; gap: 6px; margin: 10px 0; }
.doc .callout {
  background: var(--lime-pale); border: 1px solid var(--lime-soft); border-radius: 18px;
  padding: 16px 18px; margin: 16px 0; color: var(--ink2);
}
.doc .draft {
  background: var(--surface); border-radius: 14px; padding: 10px 14px; font-size: 14px;
  color: var(--ink2); margin-bottom: 24px;
}
.doc .steps-list li { padding-left: 4px; }
.doc .path { font-weight: 600; color: var(--ink); }
.doc .contact-card {
  display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between;
  background: var(--bg); border-radius: 18px; padding: 18px 20px; margin: 18px 0;
}
.doc .contact-card img { width: 72px; }
.copy {
  font: 600 14px/1 var(--font); height: 40px; padding: 0 16px; border-radius: 20px;
  border: 0; background: var(--ink); color: var(--on-dark); cursor: pointer;
}
.doc .table-wrap { overflow-x: auto; margin: 12px 0; }
.doc table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink2); }
.doc th { color: var(--ink); font-weight: 600; background: var(--bg); }

[hidden] { display: none !important; }
