/* Lepo — lepohealth.app
 * One shared visual system, no build step and no external requests.
 */

:root {
  --bg: oklch(0.1798 0.0104 248.41);
  --surface: oklch(0.2231 0.0148 248.49);
  --fg: oklch(0.9465 0.0076 241.67);
  --muted: oklch(0.6761 0.0221 243.56);
  --border: oklch(0.2880 0.0193 245.37);
  --accent: oklch(0.7556 0.2082 146.98);
  --fg-soft: color-mix(in oklch, var(--fg) 6%, transparent);
  --font-display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body: ui-sans-serif, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  --container: 70rem;
  --measure: 42rem;
  --gutter: 2rem;
  --radius: 0.625rem;
  --radius-lg: 1.125rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
picture { display: block; }
a { color: inherit; text-underline-offset: 0.2em; }
button { font: inherit; }
p { text-wrap: pretty; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.75rem, 6vw, 4.75rem); line-height: 1.01; letter-spacing: -0.045em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -0.035em; }
h3 { font-size: 1.375rem; line-height: 1.3; letter-spacing: -0.02em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.container, .wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap { max-width: var(--measure); }
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
/* The sticky nav is 4rem tall and would otherwise cover the top of whatever an
 * anchor link lands on. Section padding hides that at wide viewports but not
 * around 768px, where 8vw of padding is less than the header. */
.section[id] { scroll-margin-top: 4.75rem; }
.section + .section { border-top: 1px solid var(--border); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.lead { max-width: 56ch; margin: 0; color: var(--muted); font-size: 1.1875rem; line-height: 1.55; }
.eyebrow, .caption {
  margin: 0 0 1.25rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.meta, .num { font-family: var(--font-mono); }
.num { font-variant-numeric: tabular-nums; }

/* Shared navigation and footer */
.topnav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}
.topnav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 4rem; gap: 1.5rem; }
.logo { display: inline-flex; align-items: center; gap: 0.625rem; font-family: var(--font-display); font-size: 1.25rem; font-weight: 750; letter-spacing: -0.03em; text-decoration: none; }
/* The app icon, masked to the iOS squircle ratio the share card already uses.
 * The square artwork is never stretched, and the mark carries an empty alt: the
 * word beside it names the link, so describing it again would give the same
 * link two names. 1.75rem is what /brand/logo-96.png is emitted for — three
 * times this is the 96px file, so no display upscales it. */
.logo-mark { width: 1.75rem; height: 1.75rem; border-radius: 22.37%; }
.topnav nav { display: flex; gap: 2rem; }
.topnav nav a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--muted); font-size: 0.875rem; text-decoration: none; white-space: nowrap; }
.nav-action { white-space: nowrap; }
.topnav nav a:hover { color: var(--fg); }
.pagefoot { padding-block: 3.5rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.8125rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-nav a { text-decoration: underline; }
.footer-nav a:hover { color: var(--fg); }

/* Actions */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.6875rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 0.05s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.btn-primary:hover { background: color-mix(in oklch, var(--accent) 88%, black); color: var(--bg); }
.btn-secondary { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--fg); }
.btn-ghost { padding-inline: 0.5rem; background: transparent; color: var(--fg); }
.btn-ghost:hover { background: var(--fg-soft); color: var(--fg); }
.btn-arrow::after { content: "→"; margin-left: 0.5rem; transition: transform 0.15s ease; }
.btn-arrow:hover::after { transform: translateX(2px); }

/* Home hero */
.hero { padding-block: clamp(4.5rem, 10vw, 8.5rem); }
.hero-split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(21.25rem, 1.1fr); gap: clamp(3.5rem, 8vw, 6rem); align-items: center; }
.hero-copy .lead { margin-top: 1.25rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.hero-proof { margin: 1.125rem 0 0; color: var(--muted); font-family: var(--font-mono); font-size: 0.75rem; }
.score-lockup { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: 0.875rem; }
.score-lockup strong { color: var(--accent); font-family: var(--font-display); font-size: clamp(5.25rem, 12vw, 9.25rem); line-height: 0.8; letter-spacing: -0.07em; }
.score-lockup span { color: var(--muted); font-family: var(--font-mono); }
.product-visual { min-width: 0; margin: 0; }
.product-stage {
  position: relative;
  display: grid;
  align-items: end;
  gap: 0.875rem;
  min-height: 37.5rem;
  padding: 2.25rem 1.5rem 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.product-stage::before { content: ""; position: absolute; inset: 18% 15%; background: var(--fg-soft); filter: blur(60px); border-radius: 50%; }
.product-stage > * { position: relative; }
/* One phone and the watch, phone first. The phone gets the width because its
 * breakdown is the thing to read. Both sit on the stage floor: the watch
 * capture is cut below its readiness card, and the floor is what hides the
 * cut, so lifting the watch exposes a half row. */
.stage-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 0.62fr); }
.phone-shot { align-self: end; overflow: hidden; background: var(--bg); border: 1px solid var(--border); border-bottom: 0; border-radius: 1.75rem 1.75rem 0 0; box-shadow: 0 1.75rem 4rem color-mix(in oklch, var(--bg) 72%, transparent); }
.phone-shot img, .watch-shot img { width: 100%; height: auto; }
.watch-shot { align-self: end; overflow: hidden; background: var(--bg); border: 1px solid var(--border); border-radius: 1.75rem / 2.125rem; filter: drop-shadow(0 1.25rem 2.125rem color-mix(in oklch, var(--bg) 76%, transparent)); }
.product-caption { margin: 0.75rem 0 0; color: var(--muted); font-family: var(--font-mono); font-size: 0.6875rem; line-height: 1.5; text-align: center; }

/* Score proof */
.moved { display: grid; grid-template-columns: minmax(13.75rem, 0.72fr) minmax(0, 1.28fr); gap: clamp(3.5rem, 8vw, 6rem); align-items: start; }
.score-summary { position: sticky; top: 6.75rem; }
.score-large { margin-top: 2.125rem; }
.score-large strong { font-size: clamp(6rem, 14vw, 11rem); }
.score-summary .lead { margin-top: 1.375rem; }
.factor-list { border-top: 1px solid var(--border); }
.factor { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.375rem 1.5rem; padding: 1.375rem 0; border-bottom: 1px solid var(--border); }
.factor strong { font-family: var(--font-display); font-size: 1.1875rem; }
.factor-reading { display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; }
.factor-value { color: var(--fg); text-align: right; }
.factor-status { min-width: 4.875rem; padding: 0.1875rem 0.5rem; border: 1px solid var(--border); border-radius: 999px; color: var(--fg); font-family: var(--font-mono); font-size: 0.6875rem; line-height: 1.4; text-align: center; }
.factor-dir { grid-column: 1 / -1; color: var(--muted); font-size: 0.8125rem; }
.example-note { margin: 1.25rem 0 0; color: var(--muted); font-family: var(--font-mono); font-size: 0.6875rem; line-height: 1.6; }

/* Three scores */
.scores { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(3.5rem, 8vw, 6rem); align-items: start; }
.scores-lead { margin-top: 1.25rem; }
.scores-visual { margin-top: 2.5rem; }
.scores-stage { min-height: 31rem; }
.score-entry { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); gap: 0.375rem 1.25rem; padding: 1.75rem 0; border-top: 1px solid var(--border); }
.score-entry:last-child { border-bottom: 1px solid var(--border); }
.score-entry .num { padding-top: 0.45rem; color: var(--accent); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.score-entry p { grid-column: 2; margin: 0.5rem 0 0; color: var(--muted); }
.signals { grid-column: 2; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.signal { padding: 0.25rem 0.625rem; border: 1px solid var(--border); border-radius: 999px; color: var(--fg); font-family: var(--font-mono); font-size: 0.6875rem; line-height: 1.5; }

/* Free and Pro */
.tiers { display: flex; flex-direction: column; gap: 3rem; }
.tier-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.tier { display: flex; flex-direction: column; gap: 1.25rem; padding: 2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.tier-pro { border-color: color-mix(in oklch, var(--accent) 45%, var(--border)); }
.tier-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.tier-price { margin: 0; color: var(--muted); font-family: var(--font-mono); font-size: 0.8125rem; text-align: right; }
.tier-price strong { display: block; color: var(--fg); font-family: var(--font-display); font-size: 1.375rem; letter-spacing: -0.02em; }
.tier-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.tier-list li { display: grid; grid-template-columns: 1.25rem 1fr; gap: 0.75rem; padding: 0.875rem 0; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 0.9375rem; }
.tier-list strong { color: var(--fg); font-weight: 600; }
.tier-list svg { width: 1rem; height: 1rem; margin-top: 0.25rem; color: var(--accent); }
.tier-foot { margin: 0; color: var(--muted); font-family: var(--font-mono); font-size: 0.6875rem; line-height: 1.6; }

/* Principles, name origin, and privacy */
.principles { display: flex; flex-direction: column; gap: 3.5rem; }
.section-intro { max-width: 38ch; }
.feature-mark { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; margin-bottom: 1.25rem; border: 1px solid var(--border); border-radius: 0.625rem; }
.feature-mark svg { width: 1.125rem; height: 1.125rem; }
.feature p { margin: 0.375rem 0 0; color: var(--muted); font-size: 0.9375rem; }
.origin-section { padding-block: clamp(3rem, 6vw, 4.5rem); }
.origin-panel { display: grid; grid-template-columns: minmax(13rem, 0.7fr) minmax(0, 1.3fr); gap: clamp(2.5rem, 8vw, 6rem); align-items: center; }
.origin-entry { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1rem; align-items: baseline; margin: 0; }
.origin-entry dd { margin-inline: 0; }
.origin-word { margin: 0; font-family: var(--font-display); font-size: clamp(3.5rem, 7vw, 5.75rem); font-weight: 750; line-height: 0.9; letter-spacing: -0.06em; }
.origin-meta { margin: 0; color: var(--muted); font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; }
.origin-meaning { grid-column: 1 / -1; margin: 0.5rem 0 0; color: var(--muted); font-family: var(--font-display); font-size: 1.375rem; }
.origin-copy .lead { margin-top: 1rem; }
.origin-provenance { margin: 1rem 0 0; color: var(--muted); font-size: 0.75rem; letter-spacing: 0.04em; }
.privacy-panel { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(3.5rem, 8vw, 6rem); align-items: start; }
.privacy-lead { margin-top: 1.25rem; }
.privacy-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.privacy-list li { display: grid; grid-template-columns: 2rem 1fr; gap: 1rem; padding: 1.125rem 0; border-bottom: 1px solid var(--border); color: var(--muted); }
.privacy-list strong, .privacy-list .num { color: var(--fg); }
.privacy-link { margin-top: 1.125rem; }

/* FAQ and closing */
.faq { max-width: 50rem; }
.faq-list { margin-top: 2.375rem; }
.faq details { border-top: 1px solid var(--border); }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4rem; cursor: pointer; list-style: none; font-family: var(--font-display); font-size: 1.125rem; font-weight: 650; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-family: var(--font-mono); font-size: 1.25rem; }
.faq details[open] summary::after { content: "−"; }
.faq details p { max-width: 65ch; margin: 0 2.5rem 1.375rem 0; color: var(--muted); }
.faq a:hover { color: var(--fg); }
.cta-strip { text-align: center; }
.cta-inner { max-width: 40rem; }
.cta-inner .lead { margin: 1rem auto 2rem; }

/* Privacy, support, and 404 */
.prose { padding-block: clamp(3.5rem, 8vw, 6rem); }
.prose h1 { font-size: clamp(2.75rem, 7vw, 4rem); }
.prose h2 { margin: 3rem 0 0.75rem; font-size: clamp(1.75rem, 4vw, 2.25rem); }
.prose h3 { margin: 2rem 0 0.5rem; font-size: 1.125rem; }
.prose p { margin: 0 0 1.15rem; }
.prose > .lede { margin-top: 1.25rem; color: var(--muted); }
.prose ul { margin: 0 0 1.15rem; padding-left: 1.1rem; }
.prose li { margin-bottom: 0.5rem; }
.prose li::marker { color: var(--muted); }
.prose a { color: var(--fg); }
.prose a:hover { color: var(--accent); }
.prose .caption { margin-top: 3rem; }
.prose > .caption:first-child { margin-top: 0; }
.prose .plain { padding-left: 1rem; border-left: 2px solid var(--border); color: var(--muted); font-size: 0.9375rem; }
code { font-family: var(--font-mono); font-size: 0.9375em; }
.scroller { max-width: 100%; overflow-x: auto; }
.prose table { width: 100%; margin: 0 0 1.5rem; border-collapse: collapse; font-size: 0.9375rem; }
.prose th, .prose td { padding: 0.6rem 0.75rem 0.6rem 0; border-bottom: 1px solid var(--border); vertical-align: top; text-align: left; }
.prose th { color: var(--muted); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; }
.updated { color: var(--muted); font-family: var(--font-mono); font-size: 0.8125rem; }

@media (max-width: 920px) {
  .hero-split, .moved, .scores, .origin-panel, .privacy-panel, .grid-3, .tier-grid { grid-template-columns: 1fr; }
  .hero-split { gap: 3.5rem; }
  .score-summary { position: static; }
  .topnav nav { gap: 1.25rem; }
  .product-stage { width: 100%; max-width: 38.75rem; min-height: 32.5rem; margin-inline: auto; }
  .scores-stage { min-height: 26rem; }
}

/* The section links go away on narrow viewports rather than moving to a
 * second row. Keeping them costs a second sticky row — about 96px of a phone
 * viewport, pinned for the whole scroll — and this is one page that a reader
 * gets through by scrolling. Five links plus the action need about 800px to
 * sit on one line with room to breathe, which is why this breakpoint is above
 * the phone one below. The
 * logo and the TestFlight action stay, so the two things a phone reader
 * actually needs from a fixed header survive. */
@media (max-width: 840px) {
  .topnav nav { display: none; }
}

@media (max-width: 640px) {
  :root { --gutter: 1.25rem; }
  .nav-action { padding-inline: 0.875rem; }
  .hero { padding-block: 3.5rem 4.5rem; }
  .product-stage { min-height: 0; padding: 1.25rem 1rem 0; gap: 0.5rem; }
  .stage-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr); }
  .phone-shot { border-radius: 1.125rem 1.125rem 0 0; }
  .watch-shot { border-radius: 1.125rem / 1.375rem; }
  .score-lockup { flex-wrap: wrap; }
  .factor { grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
  .factor-reading { justify-content: space-between; }
  .factor-value { text-align: left; }
  .factor-dir { grid-column: auto; }
  .score-entry { grid-template-columns: minmax(0, 1fr); }
  .score-entry p, .signals { grid-column: 1; }
  .tier { padding: 1.5rem; }
  .row-between { align-items: flex-start; flex-direction: column; }
  .prose table { min-width: 36rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
