/* ============================================================
   Lev Pediatrics — shared design system
   Tokens, type, nav, buttons, heart section headers, footer.
   Every page links this file; page-specific styles stay inline.
   ============================================================ */

@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('/fonts/dm-sans.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: italic; font-weight: 400; font-display: swap; src: url('/fonts/dm-sans-italic.woff2') format('woff2'); }

:root {
  /* Brand */
  --rose: #7A4842;          /* AA on cream for body-size text */
  --rose-deep: #5E332E;     /* AAA on cream; headings, links */
  --rose-accent: #96605A;   /* decorative: icons, fills, primary buttons */
  --rose-light: #DEB8B2;
  --rose-tint: #F0DAD4;
  --sage: #5E6A58;
  --sage-light: #C8CFC2;
  --sage-tint: #E8ECE3;
  --cream: #F7F3EF;
  --cream-warm: #F0EAE4;
  --cream-deep: #E8E0D8;
  --ink: #1F1814;
  --ink-soft: #3A2E28;
  --text-medium: #463A34;   /* ~10.5:1 on cream */
  --text-light: #5C504A;    /* ~7.4:1 on cream */
  --line: rgba(31,24,20,0.10);
  --line-soft: rgba(31,24,20,0.06);
  --line-strong: rgba(31,24,20,0.18);
  --danger: #8B2E2E;
  --white: #FFFFFF;

  /* Legacy aliases: older markup and inline styles still reference these */
  --coral: var(--rose-accent);
  --coral-light: var(--rose-light);
  --coral-deep: var(--rose-deep);
  --text-dark: var(--ink);
  --shadow-soft: 0 4px 24px rgba(31,24,20,0.07);
  --shadow-medium: 0 8px 32px rgba(31,24,20,0.10);
  --shadow-hover: 0 16px 48px rgba(31,24,20,0.14);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 44px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--rose-deep); }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
.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; }

/* Layout */
.container { max-width: 1180px; margin: 0 auto; }
section { padding: 96px 48px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 18px 48px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(247, 243, 239, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.nav.scrolled { background: rgba(247, 243, 239, 0.95); box-shadow: 0 6px 24px rgba(31,24,20,0.06); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand .mark { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; flex: none; }
.brand .mark svg { width: 100%; height: 100%; }
.brand .wordmark { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.brand .wordmark em { font-style: normal; color: inherit; }
.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav-links a { text-decoration: none; color: var(--ink-soft); font-size: 0.9375rem; font-weight: 600; transition: color 0.2s ease; }
.nav-links a:hover { color: var(--rose-deep); }
.nav-cta {
  display: inline-block;
  background: var(--rose-accent);
  color: var(--cream) !important;
  padding: 11px 22px;
  border-radius: 999px;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600 !important;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}
.nav-cta:hover { background: var(--rose-deep); color: var(--cream) !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary { background: var(--rose-accent); color: var(--cream); }
.btn-primary:hover { background: var(--rose-deep); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: rgba(31,24,20,0.04); border-color: var(--ink); }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Section headers ("heart headers") ---------- */
.section-head { display: grid; grid-template-columns: 1fr; gap: 60px; align-items: end; margin-bottom: 56px; }
.section-eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.5rem; font-weight: 500; letter-spacing: -0.01em;
  color: var(--ink); margin-bottom: 16px;
}
.section-eyebrow::before {
  content: ''; width: 22px; height: 22px; flex: none;
  background: var(--rose);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
h2.section-title {
  font-weight: 400;
  font-size: 1.75rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 12px;
  text-wrap: balance;
}
h2.section-title em { font-style: normal; color: inherit; }
.section-deck { font-size: 1.0625rem; color: var(--text-medium); max-width: 580px; text-wrap: pretty; }
.section-deck a { color: var(--rose-deep); }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: var(--cream);
  padding: 80px 48px 32px;
}
.footer-grid {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(247,243,239,0.10);
}
.footer-brand .brand .wordmark { color: var(--cream); }
.footer-brand p {
  margin-top: 20px;
  font-size: 0.9375rem;
  color: rgba(247,243,239,0.65);
  line-height: 1.7;
  max-width: 280px;
}
.footer-brand p em { font-style: normal; color: var(--rose-light); }
.footer-emergency {
  margin-top: 20px;
  padding: 14px 16px;
  background: rgba(179, 64, 64, 0.15);
  border-left: 2px solid #C56565;
  border-radius: 4px;
  font-size: 0.8125rem;
  color: rgba(247,243,239,0.85);
}
.footer-emergency a { color: var(--cream); font-weight: 600; text-decoration: none; }
.footer-col h4 {
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--rose-light);
  margin-bottom: 22px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; color: rgba(247,243,239,0.75); font-size: 0.9375rem; }
.footer-col ul a {
  color: rgba(247,243,239,0.75);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}
.footer-col ul a:hover { color: var(--cream); }
.footer-bottom {
  max-width: 1180px; margin: 32px auto 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.75rem; color: rgba(247,243,239,0.5);
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom a { color: rgba(247,243,239,0.7); text-decoration: none; }
.footer-bottom a:hover { color: var(--cream); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ---------- Scroll fade (single quiet idiom) ---------- */
.fade { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade { opacity: 1; transform: none; transition: none; }
}

/* ---------- Sub-page shell (FAQ, pricing detail, legal) ---------- */
.page-shell { max-width: 780px; margin: 0 auto; padding: 150px 24px 96px; }
.prose h1 {
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 16px;
  text-wrap: balance;
}
.prose h1 em { font-style: normal; color: inherit; }
.prose .lede { font-size: 1.125rem; color: var(--text-medium); margin-bottom: 36px; text-wrap: pretty; }
.prose .updated { font-size: 0.8125rem; color: var(--text-light); margin-bottom: 32px; }
.prose h2 { font-weight: 500; font-size: 1.375rem; letter-spacing: -0.01em; color: var(--ink); margin: 40px 0 12px; }
.prose h3 { font-weight: 600; font-size: 1.0625rem; color: var(--ink); margin: 24px 0 8px; }
.prose p, .prose li { font-size: 1rem; color: var(--text-medium); line-height: 1.7; }
.prose p { margin-bottom: 14px; text-wrap: pretty; }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 14px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--rose-deep); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose hr { border: none; border-top: 1px solid var(--line-soft); margin: 32px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 0.9375rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); color: var(--text-medium); }
.prose th { color: var(--ink); font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  section { padding: 72px 28px; }
  .section-head { gap: 40px; margin-bottom: 40px; }
  .nav { padding: 14px 24px; }
  .nav-links { gap: 16px; }
  .nav-links li:not(:last-child) { display: none; }
  .footer { padding: 64px 28px 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .page-shell { padding: 120px 20px 72px; }
}

/* ---------- Sub-page components (FAQ, legal, pricing detail) ---------- */
.page-header { margin-bottom: 40px; }
.page-header .section-eyebrow { font-size: 1.125rem; margin-bottom: 14px; }
.faq-item { border-bottom: 1px solid var(--line-soft); }
.faq-item:first-child { border-top: 1px solid var(--line-soft); }
.faq-question {
  width: 100%; background: none; border: none; text-align: left;
  padding: 22px 44px 22px 0;
  font-family: 'DM Sans', sans-serif; font-size: 1.125rem; font-weight: 500; letter-spacing: -0.01em;
  color: var(--ink); cursor: pointer; position: relative; transition: color 0.2s;
}
.faq-question:hover { color: var(--rose-deep); }
.faq-question::after { content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 300; color: var(--rose-accent); }
.faq-item.open .faq-question::after { content: '\2212'; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-item.open .faq-answer { max-height: 600px; }
.faq-answer-inner { padding: 0 0 22px; font-size: 1rem; line-height: 1.7; color: var(--text-medium); }
.contact-box { background: #fff; border: 1px solid var(--line-soft); border-radius: 20px; padding: 32px; margin-top: 48px; text-align: center; }
.contact-box h3 { font-weight: 400; font-size: 1.375rem; letter-spacing: -0.02em; margin: 0 0 10px; }
.contact-box p { text-align: center; margin-bottom: 6px; }
.contact-box a { color: var(--rose-deep); font-weight: 600; text-decoration: none; }
.contact-box a:hover { text-decoration: underline; }
.highlight-box { background: var(--cream-warm); border-left: 3px solid var(--rose-accent); padding: 18px 22px; border-radius: 0 12px 12px 0; margin: 24px 0; }
.highlight-box p { margin-bottom: 0; }
.shield-icon { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line-soft); padding: 16px 20px; border-radius: 12px; margin: 0 0 28px; font-size: 0.9375rem; color: var(--text-medium); font-weight: 500; }
.shield-icon svg { flex: none; color: var(--rose-accent); }
.last-updated { text-align: center; font-size: 0.8125rem; color: var(--text-light); margin-top: 40px; }
.note-box { background: #fff; border: 1px solid var(--line-soft); border-radius: 12px; padding: 22px 24px; margin-bottom: 40px; font-size: 0.9375rem; line-height: 1.7; color: var(--text-medium); }
.note-box strong { color: var(--ink); }
.pricing-section { margin-bottom: 44px; }
.pricing-section h2 { font-weight: 500; font-size: 1.375rem; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 14px; }
.pricing-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-soft); }
.pricing-table thead th { background: var(--cream-warm); text-align: left; padding: 12px 18px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-light); }
.pricing-table tbody td { padding: 14px 18px; font-size: 0.9375rem; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
.pricing-table tbody tr:last-child td { border-bottom: none; }
.price-col { font-weight: 600; color: var(--rose-deep); white-space: nowrap; }
.desc-col { color: var(--text-medium); font-size: 0.875rem; }
@media (max-width: 600px) {
  .desc-col, .pricing-table thead th:nth-child(2) { display: none; }
  .pricing-table thead th, .pricing-table tbody td { padding: 12px 14px; font-size: 0.875rem; }
}
