/* Patientic.app marketing site. Brand palette ported from
   Theme/Colors.swift — peach/lilac/warm-beige/ink. Plus Jakarta Sans
   matches the iOS-side .font(.brand(...)) family. */

:root {
  --bg: #F5F0EB;
  --bg-card: #FFFFFF;
  --ink: #2E2A26;
  --ink-secondary: #6E6E73;
  --ink-tertiary: #8E8E93;
  /* Brand peach kept for hero/icon decoration. For text + CTA fills
     we use --peach-text (darker, WCAG AA on white at normal text).
     Same convention for lilac. */
  --peach: #D87B4A;
  --peach-text: #B85A33;
  --peach-light: #F6B795;
  --lilac: #9B8EC4;
  --lilac-light: #B8A5D6;
  --lilac-text: #6B5A9C;
  --heart: #D08AA8;
  --mint: #6BC5B0;
  --stone: #EAE3DC;
  --shadow: 0 1px 2px rgba(46, 42, 38, 0.05), 0 4px 12px rgba(46, 42, 38, 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--peach-text); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Focus visibility — applies to all interactive elements; keeps
   keyboard nav legible against the warm-beige + white surfaces. */
:focus-visible {
  outline: 2px solid var(--peach-text);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
@media (min-width: 720px) {
  .site-header { padding: 20px 32px; }
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--peach-text);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-logo {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}
.brand-name {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
/* Mobile: header wraps. Brand sits alone on row 1; the full nav
   (Home/Privacy/Terms/Providers/Support + the Login CTA) drops to
   row 2 with a smaller font + tighter gap and spreads across the
   viewport. Those six don't fit on a 375px row alongside the brand,
   but they fit on their own row at 14px/8px gap down to ~420px. */
@media (max-width: 719px) {
  .site-header { flex-wrap: wrap; row-gap: 12px; }
  .site-nav {
    flex-basis: 100%;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
  }
  /* Bump tap targets toward the 44px iOS guideline — bare 14px text
     gave a ~20px hit area which review flagged as tight. 8px vertical
     padding lands the nav-item at ~36px, comfortable for a thumb. */
  .site-nav .nav-item { padding: 8px 4px; }
  .site-nav .nav-cta { padding: 8px 16px; font-size: 13px; }
}
/* Below ~420px the six-element nav row (five links — including Support,
   added in #468 — plus the Login CTA) overflows and clips the CTA.
   Tighten type + spacing so all six stay on one row; vertical padding is
   unchanged, so tap targets stay ~36px. */
@media (max-width: 420px) {
  .site-nav { gap: 3px; }
  /* .nav-item carries its own font-size (15px), so shrink it directly
     rather than via the .site-nav inherited size. */
  .site-nav .nav-item { padding: 8px 2px; font-size: 12px; }
  .site-nav .nav-cta { padding: 8px 10px; font-size: 12px; }
}
.nav-item {
  color: var(--ink-secondary);
  font-weight: 500;
  font-size: 15px;
}
.nav-item.active {
  color: var(--ink);
  font-weight: 600;
}
.nav-item:hover { color: var(--ink); text-decoration: none; }

/* Login CTA in the header. Lilac fill — the secondary brand color —
   so it reads as related-but-distinct from the peach primary CTA in
   the hero. Live link: clicking lands the user on the /login
   "Coming soon" page where we describe what the web app will offer.
   Swap to the real auth flow when the web sign-in surface ships. */
.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--lilac);
  color: white;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.nav-cta:hover { background: var(--lilac-text); color: white; text-decoration: none; }

/* Main content area */
.page {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 20px 48px;
}
@media (min-width: 720px) {
  .page { padding: 24px 32px 64px; }
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding: 48px 0 32px;
}
.hero h1 {
  font-size: clamp(38px, 5.5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  line-height: 1.05;
}
.hero p.lede {
  font-size: 19px;
  color: var(--ink-secondary);
  max-width: 540px;
  margin: 0 0 24px;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
}
.cta.primary {
  background: var(--peach-text);
  color: white;
  font-weight: 700;
}
.cta.primary:hover { background: var(--peach); text-decoration: none; }
.cta.secondary {
  background: white;
  color: var(--ink);
  border: 1px solid var(--stone);
}
.cta.secondary:hover { border-color: var(--ink-tertiary); text-decoration: none; }

@media (max-width: 719px) {
  .hero { padding: 24px 0 24px; }
}

/* Feature grid */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 32px 0;
}
@media (min-width: 720px) {
  .features { grid-template-columns: repeat(3, 1fr); }
}
.feature {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(221,120,80,0.10);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}
.feature h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 6px;
}
.feature p {
  font-size: 14.5px;
  color: var(--ink-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Section headers */
.section-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 56px 0 8px;
}
.section-sub {
  color: var(--ink-secondary);
  font-size: 16px;
  margin: 0 0 24px;
  max-width: 640px;
}

/* "How email works" callout */
.email-callout {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}
@media (min-width: 720px) {
  .email-callout { grid-template-columns: 60px 1fr; align-items: start; }
}
.email-callout .email-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(155,142,196,0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.email-callout h3 {
  font-size: 19px;
  margin: 0 0 8px;
}
.email-callout p {
  font-size: 15px;
  color: var(--ink-secondary);
  margin: 0;
}
.email-callout code {
  background: rgba(46,42,38,0.06);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
}

/* Legal pages (terms / privacy) — generated from markdown */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 0 0;
}
.legal h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.legal h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 36px 0 12px;
}
.legal h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 24px 0 8px;
}
.legal p { margin: 12px 0; color: var(--ink); }
.legal ul, .legal ol { margin: 12px 0; padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal blockquote {
  margin: 20px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--peach);
  background: rgba(221,120,80,0.06);
  border-radius: 0 8px 8px 0;
  color: var(--ink);
}
.legal blockquote p:first-child { margin-top: 0; }
.legal blockquote p:last-child { margin-bottom: 0; }
.legal hr { border: none; border-top: 1px solid var(--stone); margin: 32px 0; }
.legal code {
  background: rgba(46,42,38,0.06);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
}
.legal em { color: var(--ink-secondary); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--stone);
  padding: 24px 32px;
  margin-top: auto;
  font-size: 14px;
  /* Bumped from --ink-tertiary to --ink-secondary so 14px footer
     text clears WCAG AA (4.7:1 on warm beige). */
  color: var(--ink-secondary);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.footer-inner a { color: var(--ink-secondary); }
.footer-inner a:hover { color: var(--ink); }
.footer-sep { color: var(--ink-tertiary); }
