/* ============================================================
   Medicine Tirzepatide — MiniMax Colorful Cards
   Aesthetic: Bold color-blocked cards on crisp cool-white #FFFFFF
   Fonts: Outfit (display) + Sora (body)
   ============================================================ */

/* ── Design tokens ─────────────────────────────────────────── */
:root {
  --primary:       #1456F0;
  --primary-50:    #E8EFFE;
  --primary-900:   #0A2C82;
  --secondary:     #EA5EC1;
  --accent:        #12B8A6;
  --card-violet:   #7C5CFC;
  --card-amber:    #FF9F1C;
  --neutral-50:    #FFFFFF;
  --neutral-200:   #E5E7EB;
  --neutral-500:   #45515E;
  --neutral-900:   #181E25;
  --bg:            #FFFFFF;
  --surface:       #FFFFFF;
  --surface-alt:   #F4F7FE;
  --text:          #181E25;
  --text-muted:    #45515E;
  --success:       #15803D;
  --warning:       #B45309;
  --danger:        #DC2626;

  --max-width:     75rem;
  --container-px:  clamp(1.1rem, 3.5vw, 2.25rem);
  --radius-card:   22px;
  --radius-btn:    9999px;
  --radius-chip:   16px;
  --shadow-card:   0 12px 32px -8px rgba(44, 30, 116, 0.16);
  --shadow-hover:  0 18px 40px -8px rgba(44, 30, 116, 0.22);

  --font-display:  'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:     'Sora', system-ui, -apple-system, sans-serif;

  --h1: clamp(2.1rem, 4.2vw, 3.4rem);
  --h2: clamp(1.6rem, 3vw, 2.3rem);
  --h3: 1.35rem;
  --body: 1.0625rem;
  --small: 0.875rem;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: var(--body);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
ul, ol { padding-left: 1.5rem; }
li { margin-bottom: 0.35rem; }

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--text);
}
h1 { font-size: var(--h1); font-weight: 800; }
h2 { font-size: var(--h2); font-weight: 700; }
h3 { font-size: var(--h3); font-weight: 600; }
h4 { font-size: 1.125rem; font-weight: 600; }

p { margin-bottom: 1.1rem; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

/* ── Layout helpers ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

/* ── Site header ────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease-out;
}
.site-header.scrolled { border-bottom-color: var(--neutral-200); }

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 3.75rem;
}

.site-brand {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-brand:hover { color: var(--primary); }

/* Pill nav */
.site-nav { display: none; }
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-nav a {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-btn);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 180ms ease-out, color 180ms ease-out;
}
.site-nav a:hover { background: var(--surface-alt); color: var(--text); }
.site-nav a.active {
  background: var(--primary);
  color: #fff;
}

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.25rem;
  height: 2.25rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.375rem;
  border-radius: 8px;
  transition: background 180ms ease-out;
}
.nav-toggle:hover { background: var(--surface-alt); }
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 200ms ease-out, opacity 200ms ease-out;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  background: var(--surface);
  border-bottom: 1px solid var(--neutral-200);
  padding: 1rem var(--container-px) 1.5rem;
}
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-nav a {
  display: block;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 180ms ease-out, color 180ms ease-out;
}
.mobile-nav a:hover { background: var(--surface-alt); color: var(--text); }
.mobile-nav a.active { background: var(--primary-50); color: var(--primary); }

@media (min-width: 768px) {
  .site-nav { display: block; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-btn);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 180ms ease-out, box-shadow 180ms ease-out, background 180ms ease-out;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(20, 86, 240, 0.28);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(20, 86, 240, 0.38), 0 0 0 4px rgba(124, 92, 252, 0.15);
}
.btn-secondary {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-secondary:hover {
  transform: translateY(-1px);
  background: var(--primary-50);
}

/* ── Hero section ──────────────────────────────────────────── */
.hero {
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
.hero-text { max-width: 46ch; }
.hero-text h1 { margin-bottom: 1rem; }
.hero-text .subheadline {
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  line-height: 1.6;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.hero-figure {
  width: 100%;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.hero-figure img { width: 100%; border-radius: var(--radius-card); }

@media (min-width: 768px) {
  .hero-inner {
    grid-template-columns: 46ch 1fr;
    gap: 3.5rem;
  }
}

/* ── Topic card row ─────────────────────────────────────────── */
.topic-cards {
  padding: clamp(1.5rem, 4vw, 3rem) 0;
}
.topic-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  border-radius: var(--radius-card);
  border: 1px solid var(--neutral-200);
  padding: 1.6rem;
  box-shadow: var(--shadow-card);
  transition: transform 180ms ease-out, box-shadow 180ms ease-out;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* Card accent families */
.card--primary  { background: rgba(20,  86, 240, 0.06); }
.card--primary::before  { background: var(--primary); }
.card--primary .card-eyebrow  { color: var(--primary); }

.card--secondary { background: rgba(234, 94, 193, 0.07); }
.card--secondary::before { background: var(--secondary); }
.card--secondary .card-eyebrow { color: var(--secondary); }

.card--teal { background: rgba(18, 184, 166, 0.07); }
.card--teal::before { background: var(--accent); }
.card--teal .card-eyebrow { color: var(--accent); }

.card--violet { background: rgba(124, 92, 252, 0.07); }
.card--violet::before { background: var(--card-violet); }
.card--violet .card-eyebrow { color: var(--card-violet); }

.card--amber { background: rgba(255, 159, 28, 0.08); }
.card--amber::before { background: var(--card-amber); }
.card--amber .card-eyebrow { color: var(--warning); }

.card-eyebrow {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.card h3 { margin-bottom: 0.65rem; font-size: 1.15rem; }
.card p { font-size: 0.9375rem; color: var(--text-muted); margin-bottom: 1rem; }
.card .card-link {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--primary);
  transition: gap 180ms ease-out;
}
.card .card-link:hover { text-decoration: underline; }

/* ── Content sections ───────────────────────────────────────── */
.content-section {
  padding: clamp(2rem, 5vw, 4rem) 0;
}
.content-section + .content-section {
  border-top: 1px solid var(--neutral-200);
}
.section-alt {
  background: var(--surface-alt);
  padding: clamp(2rem, 5vw, 4rem) 0;
}
.section-alt + .section-alt { border-top: 1px solid rgba(229, 231, 235, 0.6); }

.content-body { max-width: 70ch; }
.content-body h2 { margin-bottom: 1rem; }
.content-body h3 { margin-bottom: 0.75rem; margin-top: 1.5rem; }
.content-body p { margin-bottom: 1rem; }
.content-body ul, .content-body ol { margin-bottom: 1rem; }
.content-body li { margin-bottom: 0.4rem; }
.content-body strong { color: var(--text); }

/* ── Callout chips ──────────────────────────────────────────── */
.callout {
  border-radius: var(--radius-chip);
  border-left: 4px solid var(--primary);
  background: var(--primary-50);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
}
.callout--amber { border-left-color: var(--card-amber); background: rgba(255, 159, 28, 0.08); }
.callout--teal { border-left-color: var(--accent); background: rgba(18, 184, 166, 0.07); }
.callout--danger { border-left-color: var(--danger); background: rgba(220, 38, 38, 0.06); }

/* ── Citation superscripts ─────────────────────────────────── */
sup a {
  font-family: var(--font-display);
  font-size: 0.7em;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 0.05em 0.2em;
  border-radius: 3px;
  transition: background 140ms ease-out;
}
sup a:hover { background: var(--primary-50); }

/* ── FAQ accordion ──────────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; }

.faq-item {
  border-radius: 14px;
  border: 1px solid var(--neutral-200);
  overflow: hidden;
  background: var(--surface);
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 1.1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  transition: background 180ms ease-out;
}
.faq-question:hover { background: var(--surface-alt); }
.faq-question[aria-expanded="true"] { background: var(--primary-50); color: var(--primary); }
.faq-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 200ms ease-out;
}
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-answer {
  display: none;
  padding: 0 1.25rem 1.1rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.faq-answer.open { display: block; }

/* ── References list ────────────────────────────────────────── */
.references-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.references-list li {
  padding: 1rem 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--neutral-200);
  background: var(--surface);
  font-size: 0.9rem;
  line-height: 1.6;
}
.references-list li:target {
  border-color: var(--primary);
  background: var(--primary-50);
}
.references-list .ref-num {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--primary);
  margin-right: 0.5rem;
}
.references-list a { color: var(--primary); text-decoration: underline; }
.references-list a:hover { text-decoration: none; }

/* ── Dosage table ───────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin-bottom: 1.25rem; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
th, td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--neutral-200);
}
th {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  background: var(--surface-alt);
  color: var(--text);
}
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-alt); }

/* ── Chart wrapper ──────────────────────────────────────────── */
.chart-wrap {
  background: var(--surface);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
}
.chart-title {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Contact form ───────────────────────────────────────────── */
.contact-form { max-width: 540px; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--neutral-200);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 180ms ease-out;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 86, 240, 0.12);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-disclaimer {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* ── Page hero (inner pages) ────────────────────────────────── */
.page-hero {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  background: var(--surface-alt);
  border-bottom: 1px solid var(--neutral-200);
}
.page-hero .eyebrow { margin-bottom: 0.6rem; }
.page-hero h1 { margin-bottom: 0.9rem; }
.page-hero .subheadline {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 62ch;
  line-height: 1.6;
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--neutral-200); }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--neutral-900);
  color: rgba(255, 255, 255, 0.72);
  padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
  margin-top: clamp(3rem, 6vw, 5rem);
}
.footer-disclaimer {
  font-size: 0.9rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1.75rem;
  margin-bottom: 2.5rem;
  max-width: 60ch;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 2.5rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}
.footer-col-heading {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 0.9rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 140ms ease-out;
}
.footer-col a:hover { color: rgba(255, 255, 255, 0.95); }
.footer-copyright {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
}

/* ── Tippy customization ────────────────────────────────────── */
.tippy-box[data-theme~='citation'] {
  background: var(--neutral-900);
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  line-height: 1.5;
  max-width: 320px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.tippy-box[data-theme~='citation'] .tippy-arrow { color: var(--neutral-900); }

/* ── 404 page ───────────────────────────────────────────────── */
.not-found {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem var(--container-px);
}
.not-found-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 800;
  color: var(--primary-50);
  line-height: 1;
  margin-bottom: 0.75rem;
}
.not-found h1 { font-size: var(--h2); margin-bottom: 0.75rem; }
.not-found p { color: var(--text-muted); max-width: 40ch; margin-bottom: 2rem; }

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

/* ── Utility: section spacing ───────────────────────────────── */
.pt-section { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.pb-section { padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.mb-sm { margin-bottom: 0.75rem; }
.mb-md { margin-bottom: 1.5rem; }
.mb-lg { margin-bottom: 2.5rem; }

/* ── About / contact prose ──────────────────────────────────── */
.prose { max-width: 68ch; }
.prose h2 { margin-top: 2rem; margin-bottom: 0.75rem; }
.prose h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; }
.prose p { margin-bottom: 1rem; }
.prose ol { margin-bottom: 1rem; }
.prose li { margin-bottom: 0.4rem; }
