/* Ovlo site styles. Tokens match the app. */
/* Fonts: self-hosted Latin subsets. The fallback faces are Arial, size-adjusted to the
   web font metrics so the swap from fallback to web font moves nothing. */
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("/fonts/BricolageGrotesque-800.woff2") format("woff2");
}
@font-face {
  font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/Geist-variable.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/fonts/GeistMono-500.woff2") format("woff2");
}
/* Fallback faces: Arial, width-matched to the web fonts (ratios measured on real text in Chrome).
   Bricolage has an optical-size axis and gets narrower as it grows, so the hero headline picks a
   fallback per viewport band to match clamp(46px, 6.2vw, 84px). */
@font-face {
  font-family: "Bricolage Fallback"; font-weight: 800;
  src: local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 98.50%; ascent-override: 94.42%; descent-override: 27.41%; line-gap-override: 0%;
}
@font-face {
  font-family: "Bricolage Fallback H1 S"; font-weight: 800;
  src: local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 98.00%; ascent-override: 94.90%; descent-override: 27.55%; line-gap-override: 0%;
}
@font-face {
  font-family: "Bricolage Fallback H1 M"; font-weight: 800;
  src: local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 96.80%; ascent-override: 96.07%; descent-override: 27.89%; line-gap-override: 0%;
}
@font-face {
  font-family: "Bricolage Fallback H1 L"; font-weight: 800;
  src: local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 94.50%; ascent-override: 98.41%; descent-override: 28.57%; line-gap-override: 0%;
}
@font-face {
  font-family: "Bricolage Fallback H1 XL"; font-weight: 800;
  src: local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 92.85%; ascent-override: 100.16%; descent-override: 29.08%; line-gap-override: 0%;
}
@font-face {
  font-family: "Geist Fallback"; font-weight: 100 500;
  src: local("Arial"), local("ArialMT");
  size-adjust: 91.40%; ascent-override: 109.96%; descent-override: 32.28%; line-gap-override: 0%;
}
@font-face {
  font-family: "Geist Fallback"; font-weight: 600 900;
  src: local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 89.70%; ascent-override: 112.04%; descent-override: 32.89%; line-gap-override: 0%;
}

:root {
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --border: #E3E6EB;
  --border-strong: #D3D7DE;
  --ink: #14171F;
  --secondary: #3A4150;
  --muted: #687082;
  --subtle: #EEF0F3;
  --accent: #0B7A6E;
  --accent-ink: #FFFFFF;
  --radius: 14px;
  --radius-lg: 20px;
  --font: "Geist", "Geist Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Bricolage Grotesque", "Bricolage Fallback", var(--font);
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: 20px;
  --max: 1040px;
  --narrow: 680px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.1; }
h1, .display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.035em;
}
h2 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: clamp(28px, 4.5vw, 40px);
}
h3 { font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
ul, ol { margin: 0; padding-left: 22px; }
li + li { margin-top: 6px; }
strong { font-weight: 600; }
time, .mono { font-family: var(--font-mono); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute; left: var(--gutter); top: -60px;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px;
  z-index: 20; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: var(--narrow); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.01em;
}
.brand svg { width: 28px; height: 28px; }
.nav { display: none; gap: 4px; margin-left: 8px; }
.nav a {
  color: var(--secondary); text-decoration: none; font-weight: 500; font-size: 15px;
  padding: 8px 12px; border-radius: 10px;
}
.nav a:hover { background: var(--subtle); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.menu-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--border); background: var(--surface);
  border-radius: 12px; color: var(--ink); cursor: pointer; padding: 0;
}
.menu-button svg { width: 20px; height: 20px; }
.mobile-nav { display: none; border-top: 1px solid var(--border); background: var(--bg); }
.mobile-nav.open { display: block; }
.mobile-nav .wrap { display: flex; flex-direction: column; padding-top: 8px; padding-bottom: 12px; }
.mobile-nav a {
  color: var(--ink); text-decoration: none; font-weight: 500; padding: 12px 8px;
  border-radius: 10px; min-height: 44px; display: flex; align-items: center;
}
.mobile-nav a:hover { background: var(--subtle); }

@media (min-width: 760px) {
  .nav { display: flex; }
  .menu-button { display: none; }
  .mobile-nav { display: none !important; }
}

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: var(--radius);
  font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color 120ms ease, transform 120ms ease;
}
.button:active { transform: translateY(1px); }
.button.primary { background: var(--ink); color: #fff; }
.button.primary:hover { background: #2A2F3B; }
.button.accent { background: var(--accent); color: var(--accent-ink); }
.button.accent:hover { background: #096B60; }
.button.secondary { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.button.secondary:hover { background: var(--subtle); }
.button.small { min-height: 40px; padding: 0 16px; font-size: 15px; }

/* Hero: layout and the animated phone are in hero.css */
/* GUARD: the four Bricolage fallback faces below are tuned to the hero H1 font-size,
   clamp(46px, 6.2vw, 84px) in hero.css, and to these viewport bands (46px up to 742px wide,
   46-62px to 1000px, 62-84px to 1354px, 84px above). Bricolage narrows as it grows, so if the
   H1 size, its letter-spacing or these breakpoints change, re-measure the width ratios against
   Arial Bold and update the size-adjust values, or the layout shift on font swap comes back. */
.hero h1 { font-family: "Bricolage Grotesque", "Bricolage Fallback H1 S", var(--font); }
@media (min-width: 743px) { .hero h1 { font-family: "Bricolage Grotesque", "Bricolage Fallback H1 M", var(--font); } }
@media (min-width: 1001px) { .hero h1 { font-family: "Bricolage Grotesque", "Bricolage Fallback H1 L", var(--font); } }
@media (min-width: 1355px) { .hero h1 { font-family: "Bricolage Grotesque", "Bricolage Fallback H1 XL", var(--font); } }
.hero { padding: 40px 0 24px; }
.hero .lede { color: var(--secondary); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 860px) { .hero { padding: 56px 0 40px; } }

/* Store badges */
.stores {
  margin-top: 16px; display: none; gap: 10px; flex-wrap: wrap;
}
.stores.open { display: flex; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); font-size: 14px; line-height: 1.2;
  cursor: default;
}
.store svg { width: 22px; height: 22px; flex: none; color: var(--ink); }
.store b { display: block; color: var(--ink); font-weight: 600; font-size: 15px; }
.store .soon {
  margin-left: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 3px 7px; border-radius: 999px;
}

/* Sections */
.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-head { max-width: 40ch; margin-bottom: 28px; }
.section-head p { color: var(--secondary); margin-top: 12px; font-size: 18px; }
@media (min-width: 860px) { .section { padding: 80px 0; } }

.steps { display: grid; gap: 16px; padding: 0; list-style: none; }
.step {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; display: grid; gap: 10px;
}
.step .num {
  width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-family: var(--font-mono); font-size: 15px; font-weight: 500;
}
.step p { color: var(--secondary); }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.features { display: grid; gap: 14px; }
.feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px; display: grid; gap: 8px; align-content: start;
}
.feature .icon {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--subtle); color: var(--accent); margin-bottom: 4px;
}
.feature .icon svg { width: 22px; height: 22px; }
.feature p { color: var(--secondary); font-size: 16px; }
.feature .note { color: var(--muted); font-size: 14px; }
@media (min-width: 620px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.privacy-note {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; display: grid; gap: 12px; max-width: 720px;
}
.privacy-note p { color: var(--secondary); }

/* Document pages */
.doc { padding: 40px 0 72px; }
.doc h1 { font-size: clamp(34px, 6vw, 52px); }
.doc .meta { color: var(--muted); margin-top: 12px; font-size: 15px; }
.doc h2 { font-size: 24px; margin-top: 40px; }
.doc h3 { margin-top: 24px; }
.doc p, .doc ul, .doc ol { margin-top: 14px; color: var(--secondary); }
.doc li { color: var(--secondary); }
.doc strong { color: var(--ink); }
.callout {
  margin-top: 24px; padding: 16px 18px; border-radius: var(--radius);
  background: #FFF6E5; border: 1px solid #F2D9A6; color: #5A4300;
}
.callout strong { color: inherit; }

details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0 18px; margin-top: 10px;
}
details summary {
  cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px;
  color: var(--ink);
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--muted); font-weight: 500; }
details[open] summary::after { content: "–"; }
details > :not(summary) { padding-bottom: 18px; }
details p + p { margin-top: 10px; }

/* 404 */
.lost { padding: 72px 0 96px; text-align: center; }
.lost svg { width: min(100%, 420px); height: auto; margin: 0 auto 24px; display: block; }
.lost h1 { font-size: clamp(34px, 6vw, 56px); }
.lost p { color: var(--secondary); margin: 14px auto 28px; max-width: 36ch; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0 48px; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.site-footer a { color: var(--secondary); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .copy { margin-left: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
