/* Oatline — landing page styles
   Tokens mirror the app's design system (Cherry & Blueberry, July 2026):
   see claude/oatline-ios-color-tokens.md and oatline-typography-system.md.
   Light and dark follow the visitor's system setting. No JavaScript anywhere. */

/* ---------- Fonts ---------- */

@font-face {
  font-family: "Lora";
  src: url("assets/web/fonts/lora-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  --bg-primary: #FAF8F6;
  --bg-secondary: #F0EDE8;
  --bg-tertiary: #DCDBD8;
  --surface-card: #FFFFFF;
  --label-primary: #171310;
  --label-secondary: #5E4C42;
  --label-tertiary: #A9988D;
  --label-on-accent: #FFFFFF;
  --accent: #D72E3B;
  --accent-pressed: #B80416;
  --accent-subtle: #FDE8E9;
  --accent-on-subtle: #B80416;
  --blueberry: #434861;
  --blueberry-subtle: #E9EAF3;
  --separator: #DCDBD8;
  --fill-subtle: #F0EDE8;
  --bezel: #171310;

  --font-heading: "Lora", Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-card: 20px;
  --content: 1100px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #171310;
    --bg-secondary: #211B15;
    --bg-tertiary: #2C241D;
    --surface-card: #211B15;
    --label-primary: #F5F1EC;
    --label-secondary: #C4BCB8;
    --label-tertiary: #A9988D;
    --accent: #F14659;
    --accent-pressed: #D72E3B;
    --accent-subtle: #3A1216;
    --accent-on-subtle: #F14659;
    --blueberry: #8B8DA5;
    --blueberry-subtle: #20243B;
    --separator: #3E332B;
    --fill-subtle: #2C241D;
    --bezel: #2C241D;
  }
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }

html { scroll-padding-top: 24px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--label-primary);
  font-family: var(--font-body);
  font-size: 1.0625rem; /* 17px — .oatBody */
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-weight: 600; font-size: clamp(2.5rem, 5.4vw, 3.75rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }
.lead { font-size: 1.1875rem; color: var(--label-secondary); max-width: 34em; }
.secondary { color: var(--label-secondary); }
.caption { font-size: 0.8125rem; color: var(--label-tertiary); }
.num { font-variant-numeric: tabular-nums; }

a { color: var(--accent-on-subtle); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--blueberry);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: var(--content); margin-inline: auto; padding-inline: 24px; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--surface-card); color: var(--label-primary);
  padding: 10px 16px; border-radius: 999px; z-index: 10;
}
.skip-link:focus { left: 8px; }

/* Light/dark asset swap — see also the end of this file, where the
   img-qualified rules win over component img rules by source order. */

/* ---------- Header ---------- */

.site-header { padding: 20px 0; }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--label-primary);
  font-family: var(--font-heading); font-weight: 600; font-size: 1.3125rem;
}
.brand img { width: 30px; height: 30px; }
.site-nav { display: flex; gap: 26px; }
.site-nav a {
  color: var(--label-secondary); text-decoration: none; font-size: 0.9375rem;
}
.site-nav a:hover { color: var(--label-primary); }
@media (max-width: 660px) { .site-nav { display: none; } }

/* ---------- Buttons & badges ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 13px 26px;
  font-size: 1rem; font-weight: 600; text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--label-on-accent); }
.btn-primary:hover { background: var(--accent-pressed); color: var(--label-on-accent); }
.btn-quiet {
  background: var(--fill-subtle); color: var(--label-primary);
  border-color: var(--separator);
}
.btn-quiet:hover { background: var(--bg-tertiary); color: var(--label-primary); }

.badges { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.badges a { display: inline-flex; border-radius: 10px; }
.badges img { height: 52px; width: auto; display: block; }

/* ---------- Hero ---------- */

.hero { padding: 40px 0 72px; }
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 56px; align-items: center;
}
.hero-copy .badges { margin: 28px 0 12px; }
.hero-visual { display: flex; justify-content: center; }

.phone {
  width: min(340px, 78vw);
  background: var(--bezel);
  border-radius: 52px;
  padding: 13px;
  box-shadow: 0 24px 60px -32px rgba(23, 19, 16, 0.45);
}
.phone img { width: 100%; height: auto; display: block; border-radius: 40px; }
@media (prefers-color-scheme: dark) {
  .phone { box-shadow: none; outline: 1px solid var(--separator); }
}

@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; }
  .hero-copy { text-align: center; }
  .hero-copy .lead { margin-inline: auto; }
  .hero-copy .badges { justify-content: center; }
}

/* ---------- Value strip ---------- */

.strip { border-block: 1px solid var(--separator); }
.strip .wrap {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  padding-block: 30px;
}
.strip h3 { font-size: 1.0625rem; margin-bottom: 0.25em; }
.strip p { margin: 0; font-size: 0.9375rem; color: var(--label-secondary); }
@media (max-width: 720px) {
  .strip .wrap { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------- Feature sections ---------- */

.section { padding-block: 76px; }
.section-alt { background: var(--bg-secondary); }

.kicker {
  display: block;
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--blueberry);
  margin-bottom: 14px;
}

.feature { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.feature.flip .feature-copy { order: 2; }
.feature.flip .feature-visual { order: 1; }
.feature-visual { display: flex; justify-content: center; }

.feature-list { list-style: none; margin: 20px 0 0; padding: 0; }
.feature-list li {
  position: relative; padding-left: 22px; margin-bottom: 12px;
  color: var(--label-secondary);
}
.feature-list li::before {
  content: ""; position: absolute; left: 2px; top: 0.55em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
}
.feature-list strong { color: var(--label-primary); font-weight: 600; }

@media (max-width: 880px) {
  .feature { grid-template-columns: 1fr; gap: 40px; }
  .feature.flip .feature-copy { order: 1; }
  .feature.flip .feature-visual { order: 2; }
}

/* ---------- Photo band ---------- */

.band { line-height: 0; }
.band img { width: 100%; height: clamp(240px, 38vw, 420px); object-fit: cover; display: block; }
.band-caption {
  text-align: center; padding: 18px 24px 0; line-height: 1.5;
  font-family: var(--font-heading); font-size: 1.125rem;
  color: var(--label-secondary);
}

/* ---------- Centered sections (privacy, mac, download) ---------- */

.center-block { max-width: 680px; margin-inline: auto; text-align: center; }
.center-block .feature-list { text-align: left; max-width: 520px; margin-inline: auto; }

/* ---------- Steps ---------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 40px; }
.step { background: var(--surface-card); border: 1px solid var(--separator); border-radius: var(--radius-card); padding: 26px; }
.step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent-subtle); color: var(--accent-on-subtle);
  font-family: var(--font-heading); font-weight: 600; font-size: 1.125rem;
  margin-bottom: 14px;
}
.step h3 { margin-bottom: 0.35em; }
.step p { margin: 0; color: var(--label-secondary); font-size: 0.9688rem; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */

.faq { max-width: 760px; margin-inline: auto; }
.faq details {
  background: var(--surface-card); border: 1px solid var(--separator);
  border-radius: 16px; padding: 4px 22px; margin-bottom: 12px;
}
.faq summary {
  cursor: pointer; list-style: none;
  padding: 14px 28px 14px 0; position: relative;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 2px; top: 50%;
  transform: translateY(-50%);
  color: var(--label-tertiary); font-size: 1.375rem; font-weight: 400;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--label-secondary); margin: 0 0 16px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--separator);
  padding: 40px 0 48px; margin-top: 0;
  font-size: 0.9063rem; color: var(--label-secondary);
}
.site-footer .wrap { display: grid; gap: 18px; }
.footer-row { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.site-footer a { color: var(--label-secondary); }
.site-footer a:hover { color: var(--label-primary); }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--label-primary); font-family: var(--font-heading); font-weight: 600; }
.footer-brand img { width: 22px; height: 22px; }

/* ---------- Legal pages ---------- */

.legal { max-width: 720px; margin-inline: auto; padding-block: 24px 80px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: 0.2em; }
.legal .effective { color: var(--label-tertiary); margin-bottom: 2.2em; }
.legal h2 { font-size: 1.375rem; margin: 1.8em 0 0.5em; }
.legal p, .legal li { color: var(--label-secondary); }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal .summary-card {
  background: var(--accent-subtle); color: var(--accent-on-subtle);
  border-radius: 16px; padding: 18px 22px; margin: 0 0 2em;
}
.legal .summary-card p { color: inherit; margin: 0; font-weight: 500; }

/* ---------- Light/dark asset swap (kept last so it wins by source order) ---------- */

img.light-only { display: block; }
img.dark-only { display: none; }
@media (prefers-color-scheme: dark) {
  img.light-only { display: none; }
  img.dark-only { display: block; }
}
