/*
 * Vibe landing page.
 *
 * Plain CSS, no build step, no JavaScript anywhere on the page — the FAQ uses
 * native <details>. Keeps the page a few tens of kB against the app's 2 MB
 * React-Native-Web bundle, which is the whole reason this lives outside the
 * Expo build.
 *
 * The palette mirrors constants/Theme.ts in the app. Those accents were chosen
 * to clear WCAG AA 4.5:1 on the light surfaces used here — if you change one,
 * change it in both places and re-check the contrast.
 */

:root {
  /* Peach carries the brand, plum carries the interface — peach is 1.65:1 on
     white and can't hold button text. Mirrors constants/Theme.ts. */
  --primary: #8a4b6b;
  --primary-dark: #6b3852;
  --background: #fff5ee;
  --surface: #ffffff;
  --surface-alt: #fff0e6;
  --surface-warm: #fbdcc6;
  --text: #2c2c2c;
  --text-secondary: #5a5a5a;
  --text-light: #6b6b6b;
  --text-warm: #7a5c4f;
  --border: #f0ddd0;
  --peach: #f6be9b;
  --coral: #e8836f;

  --menstruation: #a6533a;
  --menstruation-bg: #fde8e0;
  --recovery: #4b763d;
  --recovery-bg: #eaf3e8;
  --energy: #297475;
  --pms: #88569f;
  --pre-period: #996424;

  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1080px;
  --shadow: 0 1px 2px rgba(44, 44, 44, 0.04), 0 8px 24px rgba(44, 44, 44, 0.06);
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family:
    ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
}

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 12px 20px;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus {
  left: 0;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}
.wrap-narrow {
  max-width: 720px;
}

.muted {
  color: var(--text-light);
}
.xs {
  font-size: 12px;
}

/* ─── Header ────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 245, 238, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  /* Matches the 44px minimum used everywhere else, including the app. */
  min-height: 44px;
  padding-right: 8px;
  font-weight: 700;
  font-size: 19px;
  color: var(--text);
  text-decoration: none;
}
.brand img {
  border-radius: 8px;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.site-header nav a {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
}
.site-header nav a:hover {
  background: var(--surface-alt);
  color: var(--text);
}
.nav-cta {
  background: var(--primary);
  color: #fff !important;
}
.nav-cta:hover {
  background: var(--primary-dark) !important;
}

@media (max-width: 640px) {
  .site-header {
    position: static;
  }
  .header-inner {
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--peach);
}
.btn-ghost:hover {
  background: var(--surface-alt);
}
.btn-lg {
  min-height: 56px;
  font-size: 17px;
  padding: 14px 34px;
}

/* ─── Hero ──────────────────────────────────────────────────── */
.hero {
  padding: 72px 0 64px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-warm);
}
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.1rem, 5.2vw, 3.3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.lead {
  margin: 0 0 28px;
  font-size: 19px;
  color: var(--text-secondary);
  max-width: 46ch;
}
.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cta-note {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--text-light);
}

/* ─── Phone mock ────────────────────────────────────────────── */
.phone-wrap {
  display: flex;
  justify-content: center;
}
.phone {
  width: 300px;
  border-radius: 38px;
  background: #2a2124;
  padding: 10px;
  box-shadow: 0 24px 60px rgba(107, 56, 82, 0.22);
}
.phone-screen {
  background: var(--background);
  border-radius: 30px 30px 0 0;
  padding: 20px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card {
  background: var(--surface);
  border-radius: 14px;
  padding: 14px;
}
.hero-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-card-emoji {
  font-size: 34px;
}
.hero-card-phase {
  font-size: 17px;
  font-weight: 700;
}
.hero-card-day {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}
.hero-card-tip {
  margin: 8px 0 0;
  font-size: 13px;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.45;
}
.prediction {
  background: var(--surface-warm);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-warm);
}
.qa-head {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}
.qa-q {
  font-size: 13px;
  font-weight: 600;
}
.qa-a {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 2px;
}
.quick-row {
  display: flex;
  gap: 8px;
}
.quick {
  flex: 1;
  background: var(--surface);
  border-radius: 12px;
  padding: 12px 4px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.quick span {
  font-size: 19px;
}
.phone-tabs {
  background: var(--surface);
  border-radius: 0 0 30px 30px;
  display: flex;
  padding: 10px 6px 16px;
}
.tab {
  flex: 1;
  text-align: center;
  font-size: 15px;
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tab i {
  font-style: normal;
  font-size: 8.5px;
  font-weight: 600;
}
.tab.active {
  color: var(--primary);
}

@media (max-width: 900px) {
  .hero {
    padding: 48px 0;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .lead {
    max-width: none;
  }
}

/* ─── Sections ──────────────────────────────────────────────── */
.section {
  padding: 72px 0;
}
.section-alt {
  background: var(--surface-alt);
}
.section-warm {
  background: var(--surface-warm);
}
.section h2 {
  margin: 0 0 14px;
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.section-lead {
  margin: 0 0 36px;
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 62ch;
}

/* ─── Privacy list ──────────────────────────────────────────── */
.privacy-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.privacy-list li {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  border-left: 4px solid var(--coral);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.privacy-list strong {
  font-size: 16px;
}
.privacy-list span {
  font-size: 15px;
  color: var(--text-secondary);
}

/* ─── Features ──────────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.feature-icon {
  font-size: 30px;
  display: block;
  margin-bottom: 10px;
}
.feature h3 {
  margin: 0 0 8px;
  font-size: 19px;
}
.feature p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15.5px;
}
.feature-quiet {
  background: var(--surface-alt);
  box-shadow: none;
}

/* ─── Parents ───────────────────────────────────────────────── */
.parents-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 48px;
  align-items: start;
}
.parents-grid h2,
.parents-grid p {
  color: var(--text-warm);
}
.parents-grid p {
  font-size: 16.5px;
}
.parents-grid .muted {
  font-size: 14.5px;
  opacity: 0.85;
}
.parent-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.parent-points li {
  background: rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--text-warm);
}

@media (max-width: 820px) {
  .parents-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ─── FAQ ───────────────────────────────────────────────────── */
details {
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  overflow: hidden;
}
summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 48px;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--primary);
  line-height: 1;
  flex-shrink: 0;
}
details[open] summary::after {
  content: "\2212";
}
details[open] summary {
  border-bottom: 1px solid var(--border);
}
details p {
  margin: 0;
  padding: 16px 20px;
  color: var(--text-secondary);
  font-size: 16px;
}

/* ─── Legal pages ───────────────────────────────────────────── */
.legal h1 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  margin: 0 0 8px;
  letter-spacing: -0.015em;
}
.legal h2 {
  font-size: 1.15rem;
  margin: 34px 0 10px;
}
.legal p,
.legal li {
  color: var(--text-secondary);
  font-size: 16.5px;
}
.legal ul {
  padding-left: 22px;
}
.legal li {
  margin-bottom: 8px;
}
.legal em {
  font-style: normal;
  font-weight: 600;
  color: var(--text);
}
.legal-summary {
  background: var(--surface);
  border-left: 4px solid var(--coral);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 26px 0 10px;
}
.legal-summary p {
  margin: 0;
}
.legal-summary strong {
  color: var(--text);
}

/* ─── Final CTA + footer ────────────────────────────────────── */
.final-cta {
  text-align: center;
}
.final-cta p {
  color: var(--text-secondary);
  margin: 0 0 26px;
}

.site-footer {
  background: var(--primary);
  color: #fff;
  padding: 36px 0 28px;
}
.site-footer .muted {
  color: rgba(255, 255, 255, 0.72);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.site-footer nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}
.site-footer nav a:hover {
  background: rgba(255, 255, 255, 0.14);
  text-decoration: underline;
}
.footer-fine {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-fine p {
  margin: 0;
  font-size: 13.5px;
  max-width: 62ch;
}
.footer-fine em {
  font-style: normal;
  font-weight: 600;
}
