/* Novo marketing site. Design tokens mirror src/config/colors.ts and
   src/config/typography.ts so the site stays visually consistent with the app. */

@font-face {
  font-family: 'Gelasio';
  font-style: italic;
  font-weight: 500;
  src: local('Gelasio Medium Italic'),
       url('../assets/fonts/gelasio-medium-italic.woff2') format('woff2');
  font-display: swap;
}

:root {
  --background: #F0EBE1;
  --surface: #F5F1EA;
  --cream: #FBF8F2;
  --card: #E8E3DA;
  --card-white: #FFFFFF;

  --sage: #97A28E;
  --sage-light: #EEF2EA;
  --teal: #7BBCB0;
  --teal-light: #EBF5F3;
  --navy: #1A1A2E;

  --gold: #C9A96E;
  --peach: #E4B186;
  --peach-light: #FFEBD2;
  --terracotta: #C4806A;
  --terracotta-light: #FBF0EE;
  --pink: #E8638C;
  --pink-light: #FBF0F4;
  --amber-bg: #FDF5EC;
  --tint-cream: #F5F0E8;
  --purple: #7B6FA0;
  --purple-light: #F0EDF7;

  --text-primary: #2A3A36;
  --text-secondary: #5A7A70;
  --text-muted: #89A39A;
  --text-hint: #B8B0A8;

  --divider: #D4CEC4;
  --error-text: #C24A6E;

  --font-serif: 'Gelasio', Georgia, serif;
  --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  /* Mirrors the WelcomeScreen splash gradient (src/screens/Onboarding/WelcomeScreen.tsx):
     a cream→peach diagonal base with a sage "wordmark" tint layered on top. Sized to the
     page's own box (not a fixed viewport) so it scales cleanly on any screen or page length. */
  background:
    linear-gradient(198.125deg, rgba(240, 235, 225, 0.35) 2.13%, rgba(151, 162, 142, 0.52) 76.97%),
    linear-gradient(10.058deg, var(--cream) 5.5%, var(--peach-light) 94.5%);
  background-size: 100% 100%;
  color: var(--text-primary);
  font-family: var(--font-system);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

img {
  max-width: 100%;
}

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

@media (min-width: 900px) {
  .wrap {
    max-width: 800px;
    padding: 0 32px;
  }
}

@media (min-width: 1400px) {
  .wrap {
    max-width: 880px;
  }
}

/* ── Header ─────────────────────────────────────────────────────────── */

.site-header {
  padding: 36px 0 8px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-link {
  display: inline-flex;
  align-items: center;
}

.logo-link img {
  height: 64px;
  width: auto;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(42, 58, 54, 0.12));
}

@media (min-width: 900px) {
  .logo-link img {
    height: 76px;
  }
}

/* ── Hero ───────────────────────────────────────────────────────────── */

.hero {
  padding: 16px 0 48px;
  text-align: center;
}

@media (min-width: 900px) {
  .hero {
    padding: 24px 0 64px;
  }
}

.hero-logo {
  width: 220px;
  max-width: 70%;
  margin: 0 auto 28px;
  display: block;
}

.tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(30px, 3.5vw, 42px);
  color: var(--sage);
  margin: 0 0 18px;
  letter-spacing: 0.3px;
}

.hero p.lede {
  font-size: clamp(17px, 1.4vw, 19px);
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 36px;
}

/* ── Waitlist form ──────────────────────────────────────────────────── */

.waitlist-card {
  background: var(--card-white);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 440px;
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mode-select {
  border: 0;
  padding: 0;
  margin: 0 0 16px;
}

.mode-select legend {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding: 0;
}

.mode-options {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.mode-option {
  cursor: pointer;
}

.mode-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  outline: none;
}

.mode-option span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--divider);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mode-option input:focus-visible + span {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.platform-select {
  border: 0;
  padding: 0;
  margin: 0 0 16px;
}

.platform-select legend {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding: 0;
}

.optional-tag {
  color: var(--text-hint);
}

.platform-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.platform-option {
  cursor: pointer;
}

.platform-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  outline: none;
}

.platform-option span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px 0 6px;
  border-radius: 999px;
  border: 1px solid var(--divider);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.platform-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
}

.platform-option input:focus-visible + span {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* Every selected pill in the form (mode, device, platform) takes the accent
   of whichever "who is this for" mode is currently active: sage for
   personal, gold for family. Scoped from the shared <form> ancestor via
   :has() so a checked radio in one fieldset can drive pills in the others. */
.waitlist-form:has(input[name="interest"][value="personal"]:checked) .mode-option input:checked + span,
.waitlist-form:has(input[name="interest"][value="personal"]:checked) .platform-option input:checked + span {
  background: var(--sage);
  border-color: var(--sage);
  color: #FFFFFF;
}

.waitlist-form:has(input[name="interest"][value="family"]:checked) .mode-option input:checked + span,
.waitlist-form:has(input[name="interest"][value="family"]:checked) .platform-option input:checked + span {
  background: var(--gold);
  border-color: var(--gold);
  color: #FFFFFF;
}

.email-row {
  display: flex;
  gap: 10px;
}

.email-row input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--divider);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font-system);
}

.email-row input[type="email"]:focus {
  outline: none;
  border-color: var(--teal);
}

.email-row button {
  padding: 13px 22px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--sage);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.email-row button:hover {
  opacity: 0.9;
}

.email-row button:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Button follows the selected mode's accent, same as the pill toggle above it. */
.waitlist-form:has(input[value="family"]:checked) .email-row button {
  background: var(--gold);
}

.form-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--text-hint);
}

.form-message {
  margin: 14px 0 0;
  font-size: 14px;
  display: none;
}

.form-message.visible {
  display: block;
}

.form-message.success {
  color: var(--text-secondary);
}

.form-message.error {
  color: var(--error-text);
}

@media (max-width: 480px) {
  .email-row {
    flex-direction: column;
  }
}

/* ── Feature tabs (mirrors the app's Activity screen period selector) ──── */

.section-heading {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(20px, 2.2vw, 26px);
  color: var(--sage);
  text-align: center;
  margin: 56px 0 20px;
}

.feature-tabs {
  max-width: 560px;
  margin: 0 auto 48px;
}

@media (min-width: 720px) {
  .feature-tabs {
    max-width: 860px;
  }
}

.feature-tabs-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.feature-tabs-row {
  position: relative;
  display: flex;
  gap: 2px;
  background: var(--card-white);
  border-radius: 20px;
  padding: 4px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(42, 58, 54, 0.06);
}

.feature-tabs-row::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 5px);
  border-radius: 16px;
  background: var(--sage);
  transition: transform 0.25s ease, background-color 0.25s ease;
}

#tab-family:checked ~ .feature-tabs-row::before {
  transform: translateX(calc(100% + 2px));
  background: var(--gold);
}

.feature-tab {
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
  padding: 9px 0;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s ease;
}

#tab-personal:checked ~ .feature-tabs-row label[for="tab-personal"],
#tab-family:checked ~ .feature-tabs-row label[for="tab-family"] {
  color: #FFFFFF;
}

.feature-tab-panel {
  display: none;
}

#tab-personal:checked ~ .feature-tabs-panels #panel-personal,
#tab-family:checked ~ .feature-tabs-panels #panel-family {
  display: block;
}

.feature-tab-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 720px) {
  .feature-tab-list {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-flow: dense;
  }

  .feature-tab-list li.wide {
    grid-column: span 2;
  }
}

.feature-tab-list li {
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
}

.tile-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tile-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tile-icon svg {
  display: block;
}

.tile-icon svg [fill="currentColor"] {
  fill: currentColor;
}

.tile-icon svg [stroke="currentColor"] {
  stroke: currentColor;
}

/* Six accent pairs lifted from the app's own palette (matches the onboarding
   "what matters most" screen tints); reused across tiles since only icons,
   not colours, need to stay unique. Assigned so no two tiles sharing a tint
   sit next to each other in the grid. */
.feature-tab-list li.tint-a { background: var(--amber-bg); }
.feature-tab-list li.tint-a .tile-icon { color: var(--sage); }

.feature-tab-list li.tint-b { background: var(--terracotta-light); }
.feature-tab-list li.tint-b .tile-icon { color: var(--terracotta); }

.feature-tab-list li.tint-c { background: var(--pink-light); }
.feature-tab-list li.tint-c .tile-icon { color: var(--pink); }

.feature-tab-list li.tint-d { background: var(--teal-light); }
.feature-tab-list li.tint-d .tile-icon { color: var(--teal); }

.feature-tab-list li.tint-e { background: var(--purple-light); }
.feature-tab-list li.tint-e .tile-icon { color: var(--purple); }

.feature-tab-list li.tint-f { background: var(--tint-cream); }
.feature-tab-list li.tint-f .tile-icon { color: var(--peach); }

.tile-title {
  font-size: 14px;
  color: var(--text-primary);
}

.tile-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ── Content pages (legal / help / support) ────────────────────────── */

.page {
  padding: 24px 0 80px;
}

.page .wrap {
  max-width: 760px;
  background: var(--cream);
  border-radius: var(--radius-xl);
  padding: 32px 24px 48px;
  box-shadow: 0 1px 3px rgba(42, 58, 54, 0.08);
}

@media (min-width: 900px) {
  .page .wrap {
    padding: 48px 56px 64px;
  }
}

.unsub-page {
  padding-left: 24px;
  padding-right: 24px;
}

@media (min-width: 900px) {
  .unsub-page {
    padding-left: 32px;
    padding-right: 32px;
  }
}

.unsub-page .wrap {
  padding: 28px;
}

.page-header h1 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--sage);
  font-size: clamp(28px, 2.6vw, 36px);
  margin: 8px 0 4px;
}

.page-header .updated {
  font-size: 12px;
  color: var(--text-hint);
  margin: 0 0 32px;
}

.page h2 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--teal);
  font-size: 17px;
  margin: 32px 0 10px;
}

.page h2:first-of-type {
  margin-top: 8px;
}

.page p, .page li {
  color: var(--text-primary);
  font-size: 13px;
}

.page ul, .page ol {
  padding-left: 22px;
}

.page li + li {
  margin-top: 6px;
}

.callout {
  background: var(--sage-light);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 20px 0;
  font-size: 13px;
  color: var(--text-primary);
}

.callout.urgent {
  background: var(--peach-light);
}

.callout strong {
  color: var(--terracotta);
}

.helpline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 20px 0 28px;
}

.helpline-card {
  background: var(--card-white);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.helpline-card h3 {
  font-size: 13px;
  margin: 0 0 6px;
  color: var(--text-primary);
}

.helpline-card p {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.helpline-card a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
}

@media (max-width: 520px) {
  .helpline-grid {
    grid-template-columns: 1fr;
  }
}

details.faq {
  border-bottom: 1px solid var(--divider);
  padding: 16px 0;
}

details.faq summary {
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-primary);
  list-style: none;
}

details.faq summary::-webkit-details-marker {
  display: none;
}

details.faq summary::before {
  content: '+';
  display: inline-block;
  width: 18px;
  color: var(--teal);
  font-weight: 700;
}

details.faq[open] summary::before {
  content: '\2212';
}

details.faq p {
  margin: 10px 0 0 18px;
  color: var(--text-secondary);
}

/* ── Unsubscribe page ───────────────────────────────────────────────── */

.unsub-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 24px 0 8px;
}

.unsub-remove-button,
.unsub-cancel-link {
  padding: 13px 22px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-system);
  text-align: center;
  cursor: pointer;
}

.unsub-remove-button {
  border: none;
  background: var(--terracotta);
  color: #FFFFFF;
}

.unsub-remove-button:hover {
  opacity: 0.9;
}

.unsub-remove-button:disabled {
  opacity: 0.6;
  cursor: default;
}

.unsub-cancel-link {
  border: 1px solid var(--divider);
  background: none;
  color: var(--text-secondary);
  text-decoration: none;
}

.unsub-cancel-link:hover {
  background: var(--surface);
}

@media (max-width: 480px) {
  .unsub-actions {
    justify-content: center;
    text-align: center;
  }

  .unsub-remove-button,
  .unsub-cancel-link {
    flex: 1 1 auto;
  }
}

/* ── Footer ─────────────────────────────────────────────────────────── */

.site-footer {
  padding: 32px 0 48px;
  border-top: 1px solid var(--divider);
  margin-top: 40px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-links a:not(:last-child) {
  margin-right: 10px;
}

.footer-links a:not(:last-child)::after {
  content: '|';
  margin-left: 10px;
  color: var(--text-hint);
}

.footer-links a:hover {
  color: var(--teal);
}

.footer-copy {
  font-size: 12px;
  color: var(--text-hint);
}
