/* MarginKeeper — site styles. Colors match the app. Light only, like the app screenshots.
   Logical properties (inline/block) are used so right-to-left languages work without extra CSS. */
:root {
  --bg: #f2f2f5;
  --surface: #ffffff;
  --pill: #e4e4e9;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #dcdce1;
  --gold: #eba800;
  --navy: #22244a;
  --navy-soft: #c9cae0;
  --focus: #0071e3;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box }
[hidden] { display: none !important }
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: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased }
img { max-width: 100%; height: auto; display: block }
a { color: inherit }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.022em; text-wrap: balance; margin: 0; line-height: 1.1 }
p { margin: 0 }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px }
.container { max-width: 1040px; margin-inline: auto; padding-inline: 24px }
.muted { color: var(--muted) }
.skip { position: absolute; inset-inline-start: -9999px }
.skip:focus { inset-inline-start: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10 }

/* Header */
.site-header { background: var(--surface); position: sticky; top: 0; z-index: 5; border-block-end: 1px solid var(--line) }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; text-decoration: none }
.brand img { width: 32px; height: 32px; border-radius: 22.5% }
.nav { display: flex; gap: 24px; font-size: 14px }
.nav a { text-decoration: none; color: var(--muted) }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink) }

/* App Store button. Replace with Apple's official badge at launch. */
.store { display: inline-flex; align-items: center; background: #000; color: #fff; text-decoration: none; border-radius: 12px; padding: 10px 20px; line-height: 1.15; font-weight: 600; font-size: 18px }
.store small { display: block; font-size: 11px; font-weight: 400; opacity: .85 }
.store[aria-disabled="true"] { cursor: default }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--muted); padding: 0; margin: 0; list-style: none }
.facts li { display: flex; align-items: center; gap: 6px }
.facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold) }

/* iPhone frame around screenshots */
.phone { background: #0b0b0c; padding: 8px; border-radius: 50px; width: min(280px, 72vw); box-shadow: 0 40px 70px -35px rgba(0,0,0,.55), inset 0 0 0 1.5px #3a3a3e; flex-shrink: 0 }
.phone img { width: 100%; border-radius: 42px }

/* Hero */
.hero { background: var(--surface) }
.hero .container { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding-block: 64px }
.hero-copy { display: grid; gap: 20px; justify-items: start; min-width: 0 }
.hero-copy .tagline { font-size: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #8a6200 }
.hero h1 { font-size: clamp(36px, 5.4vw, 56px); line-height: 1.04 }
.hero .lede { font-size: 19px; color: var(--muted); max-width: 32em }
.hero .phone { justify-self: center }

/* Tools */
.section { padding-block: 72px }
.section-head { text-align: center; display: grid; gap: 8px; margin-block-end: 32px }
.section-head h2 { font-size: clamp(28px, 4vw, 40px) }
.pills { display: grid; grid-template-columns: repeat(4, auto); gap: 10px; justify-content: center; margin-block-end: 40px }
.pill { border: 0; background: var(--pill); color: var(--ink); font: 600 15px var(--font); border-radius: 999px; padding: 11px 20px; cursor: pointer }
.pill[aria-pressed="true"] { background: var(--gold); color: #111 }
.pill.sm { padding: 8px 16px; font-size: 14px }
.stage { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 56px; align-items: center; max-width: 820px; margin-inline: auto }
.stage .desc { display: grid; gap: 16px; min-width: 0 }
.stage h3 { font-size: 30px }
.stage .lead { font-size: 19px; font-weight: 600; color: var(--ink) }
.stage .body, .stage .more, .tariff-extra { display: grid; gap: 12px }
.stage .body p, .stage .more p, .tariff-extra p { color: var(--muted); font-size: 17px }
.stage .more { margin-block-start: 8px }
.stage h4 { font-size: 19px }
.tariff-extra b { color: var(--ink); font-weight: 600 }
.tariff-extra .closing-line { color: var(--ink) }
.subpills { display: flex; gap: 8px; flex-wrap: wrap }

/* Any currency */
.currency .container { max-width: 640px; text-align: center; display: grid; gap: 12px }
.currency h2 { font-size: clamp(28px, 4vw, 40px) }
.currency .primary { font-size: 20px; color: var(--ink) }

/* Closing: privacy + help */
.closing { padding-block-start: 24px }
.closing .container { max-width: 640px; text-align: center; display: grid; gap: 48px }
.closing-block { display: grid; gap: 10px; justify-items: center }
.closing h2 { font-size: clamp(24px, 3.2vw, 30px) }
.closing-links { color: var(--muted); display: flex; gap: 10px; justify-content: center; flex-wrap: wrap }

.badge { display: inline-flex; align-items: center; gap: 8px; justify-self: start; font-weight: 600; font-size: 14px; background: #eaf5ea; color: #1f5e26; border-radius: 999px; padding: 6px 14px }
.email-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center }
.email { font-weight: 600; background: var(--pill); border-radius: 10px; padding: 10px 14px; user-select: all; text-decoration: none }
.copy-btn { border: 0; background: transparent; color: var(--focus); font: 600 14px var(--font); cursor: pointer; padding: 6px }
.text-link { color: var(--focus); text-decoration: none; font-weight: 600; font-size: 15px }
.text-link:hover { text-decoration: underline }

/* Footer */
.site-footer { border-block-start: 1px solid var(--line); font-size: 13px; color: var(--muted) }
.site-footer .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 24px }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap }

/* Document pages (privacy, support) */
.doc { padding-block: 56px 80px }
.doc .container { max-width: 760px }
.doc h1 { font-size: clamp(34px, 5vw, 46px); margin-block-end: 8px }
.doc h2 { font-size: 22px; margin-block: 36px 10px }
.doc p, .doc li { color: #3a3a3c; font-size: 17px }
.doc p + p { margin-block-start: 12px }
.doc ul { padding-inline-start: 22px; display: grid; gap: 6px }
.doc .summary { background: var(--surface); border-radius: 18px; padding: 22px 24px; margin-block: 24px; display: grid; gap: 10px }
.placeholder { background: #fff3cd; border-radius: 4px; padding: 0 4px }
details { background: var(--surface); border-radius: 14px; padding: 16px 20px }
details + details { margin-block-start: 10px }
summary { font-weight: 600; cursor: pointer }
details p { margin-block-start: 10px }

@media (max-width: 760px) {
  .hero .container, .stage { grid-template-columns: 1fr }
  .hero .container { padding-block: 40px; gap: 32px }
  .hero-copy { justify-items: center; text-align: center }
  .facts { justify-content: center }
  .pills { grid-template-columns: repeat(2, auto) }
  .stage { gap: 32px }
  .stage .phone { justify-self: center }
  .nav { gap: 16px }
}
