/* =========================================================
   MacroHealth Research Organization — Design System
   Modern minimalist. Brand colors:
   maroon #691C2C · green #2E7D4A · charcoal #2B2F33
   gold #C9A227 · light gray #E5E7EB
   ========================================================= */

:root {
  --maroon: #691C2C;
  --maroon-dark: #4c1420;
  --maroon-tint: #f6e9eb;
  --green: #2E7D4A;
  --green-dark: #21603a;
  --green-tint: #e9f3ee;
  --charcoal: #2B2F33;
  --gold: #C9A227;
  --gold-tint: #faf3e0;
  --gray-light: #E5E7EB;
  --gray-lighter: #f4f5f6;
  --white: #ffffff;
  --text: #2B2F33;
  --text-muted: #666b70;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1160px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(43,47,51,0.06), 0 8px 24px rgba(43,47,51,0.06);
  --transition: 160ms ease;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--maroon); text-decoration: none; }
a:hover { color: var(--maroon-dark); }

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--text); }
.lede { font-size: 1.15rem; color: var(--text-muted); }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 80px 0; }
.section--tight { padding: 56px 0; }
.section--alt { background: var(--gray-lighter); }
.section--dark { background: var(--charcoal); color: var(--white); }
.section--dark h2, .section--dark p { color: var(--white); }
.section--dark .text-muted { color: rgba(255,255,255,0.7); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--maroon);
  margin-bottom: 14px;
}

.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}
.btn-primary { background: var(--maroon); color: var(--white); }
.btn-primary:hover { background: var(--maroon-dark); color: var(--white); }
.btn-outline { background: transparent; color: var(--charcoal); border-color: var(--gray-light); }
.btn-outline:hover { border-color: var(--maroon); color: var(--maroon); }
.btn-ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.4); }
.btn-ghost-light:hover { border-color: var(--white); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--gray-light);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; }
.brand img { height: 34px; width: auto; }
.brand .logo-compact { display: none; height: 30px; }

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav a {
  color: var(--charcoal);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] {
  color: var(--maroon);
  border-bottom-color: var(--maroon);
}
.nav-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--charcoal);
  margin: 5px 0;
  transition: var(--transition);
}

/* Hero */
.hero {
  padding: 96px 0 88px;
  background:
    radial-gradient(1000px 400px at 85% -10%, var(--maroon-tint), transparent 60%),
    var(--white);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { margin-bottom: 0.5em; }
.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero-art {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--maroon) 0%, var(--maroon-dark) 55%, var(--charcoal) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.hero-art img { height: 100%; width: auto; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.92; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; }
.stat .num { font-size: 2.1rem; font-weight: 800; color: var(--maroon); }
.stat .label { font-size: 0.88rem; color: var(--text-muted); margin-top: 4px; }

/* Cards */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 32px;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card .icon-dot {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  font-weight: 800;
  color: var(--white);
}
.icon-dot--maroon { background: var(--maroon); }
.icon-dot--green { background: var(--green); }
.icon-dot--gold { background: var(--gold); }

.audience-card { border-top: 3px solid var(--maroon); }
.audience-card:nth-child(2) { border-top-color: var(--green); }
.audience-card:nth-child(3) { border-top-color: var(--gold); }

/* Process steps */
.steps { counter-reset: step; display: grid; gap: 0; }
.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--gray-light);
}
.step:last-child { border-bottom: none; }
.step-num {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--maroon-tint);
  color: var(--maroon);
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* Tag / pill */
.pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--gray-lighter);
  color: var(--text-muted);
  border: 1px solid var(--gray-light);
}
.pill--maroon { background: var(--maroon-tint); color: var(--maroon); border-color: transparent; }
.pill--green { background: var(--green-tint); color: var(--green-dark); border-color: transparent; }
.pill--gold { background: var(--gold-tint); color: #8a6b13; border-color: transparent; }

/* Placeholder content notice (for template sections) */
.tpl-note {
  border: 1px dashed var(--gray-light);
  background: var(--gray-lighter);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* CTA band */
.cta-band {
  background: var(--maroon);
  color: var(--white);
  border-radius: var(--radius);
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); margin-bottom: 6px; }
.cta-band p { color: rgba(255,255,255,0.85); margin: 0; }

/* Team */
.team-card { text-align: center; }
.team-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--gray-light);
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 1.4rem;
}
.team-card .role { color: var(--maroon); font-size: 0.88rem; font-weight: 600; margin-bottom: 8px; }

/* Resource list */
.resource-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--gray-light);
}
.resource-row:last-child { border-bottom: none; }
.resource-meta { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-light);
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--white);
}
.form-field input:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--maroon);
}
.contact-info-item { display: flex; gap: 16px; margin-bottom: 24px; }
.contact-info-item .dot {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--maroon-tint); color: var(--maroon);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-weight: 800;
}

/* Footer */
.site-footer { background: var(--charcoal); color: rgba(255,255,255,0.75); padding: 64px 0 32px; }
.site-footer a { color: rgba(255,255,255,0.75); }
.site-footer a:hover { color: var(--white); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-grid img { height: 30px; margin-bottom: 14px; filter: brightness(0) invert(1); }
.footer-grid h4 { color: var(--white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; font-size: 0.92rem; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 12px;
}

/* Page header (interior pages) */
.page-header {
  padding: 64px 0 56px;
  background: var(--gray-lighter);
  border-bottom: 1px solid var(--gray-light);
}
.page-header h1 { margin-bottom: 10px; }
.breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--maroon); }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 420px; margin: 0 auto; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav { position: fixed; top: 76px; left: 0; right: 0; bottom: 0; background: var(--white); flex-direction: column; align-items: flex-start; padding: 24px; gap: 4px; transform: translateX(100%); transition: transform 220ms ease; overflow-y: auto; }
  .nav.is-open { transform: translateX(0); }
  .nav a { width: 100%; padding: 14px 4px; border-bottom: 1px solid var(--gray-light); }
  .nav-cta { margin-left: 0; margin-top: 12px; width: 100%; }
  .nav-cta .btn { width: 100%; justify-content: center; }
  .nav-toggle { display: block; }
  .brand img { height: 28px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 36px; }
  .section { padding: 56px 0; }
}
