/*
 * Offscreen — public static site
 * Styling mirrors the mobile app's design language.
 * Tokens are copied verbatim from code/frontend/src/theme/tokens.ts so the
 * marketing pages and the app read as one product.
 *
 * Fonts: the app uses platform system fonts (no bundled/Google typefaces). On
 * web the app resolves to Georgia (serif) + system-ui (sans), so we replicate
 * those exact stacks here — no Google Fonts <link> is needed and pages stay
 * lightweight.
 */

:root {
  /* colors — from tokens.ts */
  --bg: #f3efe6;
  --surface: #fffdf8;
  --border: #e4ddd0;
  --text: #1c1915;
  --muted: #6f6860;
  --primary: #1f4f3f;
  --primary-text: #ffffff;
  --primary-muted: #b7d3cb;
  --selected: #e7f1ee;

  /* type — serif display + system sans, matching tokens.fonts (web) */
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;

  /* fontSize scale — from tokens.ts */
  --fs-sm: 13px;
  --fs-md: 16px;
  --fs-lg: 20px;
  --fs-xl: 28px;
  --fs-xxl: 36px;

  /* spacing — from tokens.ts */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-xxl: 48px;

  /* radius — from tokens.ts */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--fs-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--sp-xl) var(--sp-lg) var(--sp-xxl);
}

/* ---------- Links ---------- */
a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ---------- Masthead (brand header) ---------- */
.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-xs);
  padding-bottom: var(--sp-lg);
  margin-bottom: var(--sp-xl);
  border-bottom: 1px solid var(--border);
}

.masthead .wordmark {
  width: 100%;
  max-width: 260px;
  height: auto;
}

.masthead .slogan {
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--fs-sm);
  letter-spacing: 0.3px;
  color: var(--muted);
  margin: 0;
}

.backlink {
  display: inline-block;
  margin-bottom: var(--sp-lg);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--primary);
}
.backlink:hover {
  text-decoration: none;
  opacity: 0.75;
}

/* ---------- Headings & text ---------- */
h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: var(--fs-xl);
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 var(--sp-sm);
}

h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: var(--fs-lg);
  line-height: 1.25;
  color: var(--text);
  margin: var(--sp-xl) 0 var(--sp-sm);
}

h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: var(--fs-lg);
  color: var(--text);
  margin: 0 0 var(--sp-xs);
}

p {
  margin: 0 0 var(--sp-md);
  color: var(--muted);
  font-size: var(--fs-md);
  line-height: 1.55;
}

p strong {
  color: var(--text);
  font-weight: 600;
}

.subtitle {
  color: var(--muted);
  font-size: var(--fs-md);
  line-height: 1.5;
  margin: 0 0 var(--sp-lg);
}

.kicker {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--sp-sm);
}

.muted {
  color: var(--muted);
}

.updated {
  color: var(--muted);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-lg);
}

/* ---------- Landing hero ---------- */
.hero {
  padding: var(--sp-lg) 0 var(--sp-xl);
  text-align: center;
}

.hero .wordmark {
  width: 100%;
  max-width: 340px;
  height: auto;
  margin: 0 auto var(--sp-md);
  display: block;
}

.hero h1 {
  font-size: var(--fs-xxl);
  line-height: 1.15;
  margin: var(--sp-sm) 0 var(--sp-md);
}

.hero .purpose {
  color: var(--muted);
  font-size: var(--fs-md);
  line-height: 1.6;
  max-width: 52ch;
  margin: 0 auto var(--sp-lg);
}

/* ---------- Status pill / badges ---------- */
.pill {
  display: inline-block;
  background: var(--selected);
  border: 1px solid var(--primary-muted);
  border-radius: var(--r-pill);
  padding: 6px 16px;
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--primary);
}

.hero .pill {
  margin-bottom: var(--sp-md);
}

/* ---------- Pill buttons ---------- */
.btn {
  display: inline-block;
  background: var(--primary);
  color: var(--primary-text);
  font-family: var(--sans);
  font-size: var(--fs-md);
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--r-pill);
  border: 1px solid var(--primary);
}
.btn:hover {
  text-decoration: none;
  opacity: 0.9;
}
.btn.ghost {
  background: transparent;
  color: var(--primary);
}

/* ---------- Cards / panels ---------- */
.panel,
.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  margin: var(--sp-lg) 0;
}

.callout {
  border-left: 4px solid var(--primary);
}
.callout p {
  margin: 0 0 var(--sp-sm);
}
.callout p:last-child {
  margin-bottom: 0;
}

/* Section rhythm */
.section {
  padding: var(--sp-lg) 0;
}
.section > .kicker {
  margin-bottom: var(--sp-md);
}

/* ---------- Hero photo ---------- */
.photo {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  margin: var(--sp-lg) 0;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center 35%;
  background: var(--border);
}

/* ---------- Plain link lists ---------- */
.links {
  list-style: none;
  padding: 0;
  margin: var(--sp-lg) 0 0;
}
.links li {
  margin-bottom: var(--sp-md);
  font-size: var(--fs-md);
}

/* ---------- Footer ---------- */
.footer {
  margin-top: var(--sp-xxl);
  border-top: 1px solid var(--border);
  padding-top: var(--sp-lg);
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--sp-sm);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-md);
}

.footer-links li {
  display: flex;
  align-items: center;
  margin: 0;
}

.footer-links a {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--muted);
}
.footer-links a:hover {
  color: var(--primary);
}

/* '·' dividers between footer links, like the app */
.footer-links li + li::before {
  content: "·";
  color: var(--muted);
  margin-right: var(--sp-sm);
}

.footer .fine {
  color: var(--muted);
  font-size: var(--fs-sm);
  margin: 0;
}

/* ---------- Opt-in phone mockup ---------- */
.phone {
  max-width: 340px;
  margin: var(--sp-lg) 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: var(--sp-xl) var(--sp-lg);
  box-shadow: 0 14px 28px rgba(42, 34, 22, 0.12);
}

.phone h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: var(--fs-lg);
  margin: 0 0 var(--sp-xs);
}

.phone .lead {
  color: var(--muted);
  margin: 0 0 var(--sp-md);
}

.phone .field {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  color: var(--muted);
  margin: var(--sp-md) 0;
  background: var(--bg);
}

.phone .cta {
  background: var(--primary);
  color: var(--primary-text);
  text-align: center;
  border-radius: var(--r-pill);
  padding: 14px;
  font-weight: 600;
}

.phone .consent {
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--muted);
  margin-top: var(--sp-md);
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .page {
    padding: var(--sp-lg) var(--sp-md) var(--sp-xl);
  }
  .hero h1 {
    font-size: var(--fs-xl);
  }
  h1 {
    font-size: var(--fs-xl);
  }
}
