/* =========================================================
   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 a.btn-primary, .nav a.btn-primary:hover { color: var(--white); border-bottom-color: transparent; }

.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 {
  position: relative;
  padding: 110px 0 96px;
  overflow: hidden;
  background: var(--white);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.97) 0%, rgba(255,255,255,0.9) 38%, rgba(255,255,255,0.35) 62%, rgba(255,255,255,0) 80%);
  z-index: 1;
}
.hero .container { position: relative; z-index: 2; }
.hero-content { max-width: 560px; }
.hero h1 { margin-bottom: 0.5em; }
.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

/* Expertise */
.expertise-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; margin-top: 40px; }
.expertise-item { text-align: center; }
.expertise-item svg { width: 40px; height: 40px; color: var(--maroon); margin: 0 auto 16px; display: block; }
.expertise-item h3 { font-size: 1rem; margin-bottom: 8px; }
.expertise-item p { font-size: 0.88rem; margin: 0; }

/* 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: left; }
.team-card-header { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.team-avatar {
  width: 63px; height: 81px;
  flex-shrink: 0;
  border-radius: 6px;
  background: var(--gray-light);
  margin: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 1.1rem;
  overflow: hidden;
}
.team-avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-card .role { color: var(--maroon); font-size: 0.88rem; font-weight: 600; margin-top: 2px; }
.team-specialties { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 7px; }
.team-specialties li { position: relative; padding-left: 18px; font-size: 0.92rem; color: var(--charcoal); }
.team-specialties li::before { content: "\2022"; position: absolute; left: 0; color: var(--maroon); font-weight: 700; }

/* Team groups + carousel */
.team-group { display: grid; grid-template-columns: 0.8fr 1.6fr; gap: 40px; align-items: start; }
.team-group-title { font-size: clamp(2rem, 3.4vw, 2.6rem); color: var(--maroon); margin-bottom: 14px; }
.team-group > .team-carousel { min-width: 0; position: relative; }
.carousel-arrow {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.8);
  background: transparent;
  color: var(--maroon);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.carousel-arrow:hover { border-color: var(--maroon); }
.carousel-arrow svg { width: 18px; height: 18px; }
.team-carousel .carousel-arrow {
  position: absolute;
  top: 38%;
  transform: translateY(-50%);
  z-index: 3;
}
.team-carousel .carousel-arrow--prev { left: 8px; }
.team-carousel .carousel-arrow--next { right: 8px; }
.team-carousel-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.team-carousel-track::-webkit-scrollbar { display: none; }
.team-mini-card {
  flex: 0 0 160px;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
  display: block;
  border: 2px solid var(--gray-light);
  border-radius: 10px;
  transition: var(--transition);
}
.team-mini-card:hover {
  box-shadow: 0 4px 8px rgba(43,47,51,0.1), 0 16px 32px rgba(43,47,51,0.16);
  transform: translateY(-4px) scale(1.03);
}
.team-mini-card .team-mini-photo {
  width: 100%;
  aspect-ratio: 7/9;
  background: var(--gray-light);
  margin-bottom: 0;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}
.team-mini-card .team-mini-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-mini-card .team-mini-info { padding: 12px; }
.team-mini-card h4 { font-size: 0.95rem; margin: 0 0 2px; transition: var(--transition); }
.team-mini-card .role { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }

.field-partners-photo {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--gray-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  text-align: center;
}
.field-partners-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Team bio page */
.bio-header { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center; }
.bio-photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 7/9; background: var(--gray-light); }
.bio-photo img { width: 100%; height: 100%; object-fit: cover; }
.bio-back { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 20px; }
.bio-back:hover { color: var(--maroon); }
.team-credentials { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; margin: 0; padding-top: 16px; border-top: 1px solid var(--gray-light); }

/* Project list */
.project-meta { color: var(--text-muted); font-size: 0.85rem; margin: 8px 0 16px; }
.project-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.project-list li { position: relative; padding-left: 18px; font-size: 0.92rem; color: var(--charcoal); line-height: 1.5; }
.project-list li::before { content: "\2022"; position: absolute; left: 0; color: var(--maroon); font-weight: 700; }

/* 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); }

/* Photo page header (Team) */
.page-header--photo {
  position: relative;
  overflow: hidden;
  background: var(--charcoal);
  border-bottom: none;
}
.page-header--photo .hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.page-header--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20,10,12,0.82) 0%, rgba(20,10,12,0.55) 55%, rgba(20,10,12,0.3) 100%);
  z-index: 1;
}
.page-header--photo .container { position: relative; z-index: 2; }
.page-header--photo h1,
.page-header--photo .lede { color: var(--white); }
.page-header--photo .breadcrumb,
.page-header--photo .breadcrumb a { color: rgba(255,255,255,0.75); }
.page-header--photo .breadcrumb a:hover { color: var(--white); }

/* Responsive */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .expertise-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .team-group { grid-template-columns: 1fr; }
  .bio-header { grid-template-columns: 160px 1fr; }
}

@media (max-width: 720px) {
  .nav { position: fixed; top: 76px; left: 0; right: 0; background: var(--white); flex-direction: column; align-items: flex-start; padding: 24px; gap: 4px; transform: translateX(100%); transition: transform 220ms ease; box-shadow: 0 12px 24px rgba(0,0,0,0.08); }
  .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; }
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 88px 0 64px; }
  .hero::after { background: rgba(255,255,255,0.94); }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 36px; }
  .section { padding: 56px 0; }
  .bio-header { grid-template-columns: 1fr; text-align: center; }
  .bio-photo { max-width: 200px; margin: 0 auto; }
  .team-mini-card { flex-basis: 130px; }
}
