/*
  HerMetrics landing site.

  The palette is the app's dark theme (apps/mobile/lib/theme.ts): one accent,
  four phase tints that carry no verdict, and surfaces lifted by tone rather
  than outlined. System fonts only — the page makes no request to anyone but
  Apple's App Store when the badge is tapped, and says so in the footer.
*/

:root {
  --bg: #0A0A0B;
  --surface: #161618;
  --surface-alt: #222226;
  --border: rgba(255, 255, 255, 0.08);
  --text: #FAFAFA;
  --muted: #A1A1AA;
  --accent: #A78BFA;
  --accent-soft: #241B3D;
  --on-accent: #0A0A0B;
  --calm: #6EE7A8;
  --caution: #E5B567;
  --rose: #B4557A;
  --sky: #4A90C2;
  --gold: #C9A227;
  --teal: #2DD4BF;
  --radius: 20px;
  --radius-sm: 12px;
  --measure: 62ch;
  --gutter: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { color-scheme: dark; scroll-behavior: smooth; }

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

img, svg { display: block; max-width: 100%; }

a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.015em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); letter-spacing: -0.02em; }
h3 { font-size: 1.15rem; }
p { margin: 0; }
p + p { margin-top: 1em; }

.muted { color: var(--muted); }
.eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.wrap {
  width: min(100% - 2 * var(--gutter), 1080px);
  margin-inline: auto;
}

/* ---- header --------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand .mark { width: 34px; height: auto; color: var(--accent); }
.site-nav { display: flex; gap: 1.25rem; align-items: center; font-size: 0.95rem; }
.site-nav a { color: var(--muted); }
.site-nav a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 640px) { .site-nav .optional { display: none; } }

/* ---- buttons --------------------------------------------------------- */

.store-badge { display: inline-block; line-height: 0; }
.store-badge img { height: 54px; width: auto; }
.store-badge:hover { text-decoration: none; opacity: 0.92; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.4rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 1rem;
}
.button:hover { text-decoration: none; filter: brightness(1.05); }
.button.secondary { background: var(--surface-alt); color: var(--text); }

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

section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
section + section { border-top: 1px solid var(--border); }
.section-intro { max-width: var(--measure); }
.section-intro p { margin-top: 1rem; color: var(--muted); font-size: 1.08rem; }

/* ---- hero ------------------------------------------------------------ */

.hero { padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 6vw, 4rem); border-top: 0; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.hero-copy p.lead { margin-top: 1.25rem; font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--muted); max-width: 34ch; }
.hero-cta { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; }
.hero-cta .note { font-size: 0.9rem; color: var(--muted); }
.hero-phone { justify-self: center; }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-phone { order: 2; margin-top: 1.5rem; }
}

/* ---- phone frame ----------------------------------------------------- */

.phone {
  width: min(100%, 300px);
  padding: 10px;
  border-radius: 46px;
  background: #000;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.10),
    0 30px 60px -20px rgba(0, 0, 0, 0.8),
    0 0 80px -30px rgba(167, 139, 250, 0.35);
}
.phone img { border-radius: 36px; width: 100%; height: auto; }
.phone.small { width: min(100%, 260px); border-radius: 40px; }
.phone.small img { border-radius: 31px; }

/* ---- pillars --------------------------------------------------------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.pillar {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.pillar .phone { align-self: center; margin-top: 0.5rem; }
.pillar h3 { display: flex; align-items: center; gap: 0.6rem; font-size: 1.25rem; }
.pillar h3::before {
  content: "";
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--dot, var(--accent));
  flex: none;
}
.pillar p { color: var(--muted); }
.pillar.cycle { --dot: var(--rose); }
.pillar.fuel { --dot: var(--gold); }
.pillar.train { --dot: var(--teal); }
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr; } }

/* ---- the join -------------------------------------------------------- */

.join {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
}
.join .inputs { display: grid; gap: 0.75rem; }
.chip {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.9rem 1.1rem;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--dot, var(--accent));
}
.chip b { white-space: nowrap; }
.chip span { color: var(--muted); }
.chip.cycle { --dot: var(--rose); }
.chip.fuel { --dot: var(--gold); }
.chip.train { --dot: var(--teal); }
.chip.energy { --dot: var(--sky); }
.join .arrow {
  color: var(--muted);
  font-size: 2rem;
  line-height: 1;
  text-align: center;
}
.answer {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: grid;
  gap: 0.9rem;
}
.answer .verdict { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; }
.answer p { color: var(--muted); }
.answer .quote {
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding-left: 0.9rem;
  font-style: italic;
}
.join-note { margin-top: 1.5rem; max-width: var(--measure); color: var(--muted); }
@media (max-width: 820px) {
  .join { grid-template-columns: 1fr; }
  .join .arrow { transform: rotate(90deg); }
}

/* ---- two columns (safety / privacy, benefits) ------------------------ */

.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.card { background: var(--surface); border-radius: var(--radius); padding: 1.5rem; }
.card h3 { margin-bottom: 0.75rem; }
.card ul { margin: 0; padding-left: 1.1rem; color: var(--muted); display: grid; gap: 0.6rem; }
.card li::marker { color: var(--accent); }
.card.tone-calm { box-shadow: inset 4px 0 0 var(--calm); }
.card.tone-accent { box-shadow: inset 4px 0 0 var(--accent); }
@media (max-width: 720px) { .cols { grid-template-columns: 1fr; } }

.benefits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.benefit { background: var(--surface); border-radius: var(--radius); padding: 1.5rem; }
.benefit h3 { margin-bottom: 0.5rem; }
.benefit p { color: var(--muted); }
@media (max-width: 720px) { .benefits { grid-template-columns: 1fr; } }

/* ---- faq ------------------------------------------------------------- */

.faq { margin-top: 2rem; max-width: var(--measure); display: grid; gap: 0.5rem; }
details {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0 1.25rem;
}
summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 0;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-weight: 700; font-size: 1.2rem; flex: none; }
details[open] summary::after { content: "–"; }
details p { padding-bottom: 1.1rem; color: var(--muted); }

/* ---- closing + footer ------------------------------------------------ */

.closing { text-align: center; }
.closing .wrap { max-width: 640px; }
.closing p { margin-top: 1rem; color: var(--muted); }
.closing .hero-cta { justify-content: center; }

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2.5rem 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .wrap { display: grid; gap: 1.25rem; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-footer .links a { color: var(--muted); }
.site-footer .links a:hover { color: var(--text); }
.site-footer .fine { max-width: var(--measure); }

/* ---- legal pages ----------------------------------------------------- */

.legal { padding-block: 3rem 5rem; }
.legal .wrap { max-width: 46rem; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.legal h2 { font-size: 1.3rem; margin-top: 2.2rem; }
.legal h3 { font-size: 1.05rem; margin-top: 1.5rem; }
.legal p, .legal li { color: var(--muted); }
.legal p + p, .legal ul { margin-top: 0.8rem; }
.legal strong { color: var(--text); }
.legal table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.95rem; }
.legal th, .legal td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.legal th { color: var(--text); }
.legal .ff-scroll { overflow-x: auto; }
.legal hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

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