/* ================================================================
   Sepsis Advocate — shared stylesheet
   Mobile-first, fully responsive, UK English
   ================================================================ */

:root {
  --navy: #1d3a5f;
  --navy-deep: #15293f;
  --cream: #f5efe2;
  --cream-soft: #faf6ec;
  --orange: #d8782e;
  --orange-deep: #b9621e;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --line: rgba(29, 58, 95, 0.12);
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 6px;
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --container: 1180px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: #fff; padding: 12px 16px; z-index: 9999;
}
.skip-link:focus { left: 8px; top: 8px; }

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

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0;
  gap: 16px;
  position: relative;
}
.brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--navy);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.nav-list {
  display: flex; gap: 24px; list-style: none; margin: 0; padding: 0;
  align-items: center;
}
.nav-list a {
  color: var(--navy);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease;
}
.nav-list a:hover { text-decoration: none; border-bottom-color: var(--orange); }
.nav-list a.active { border-bottom-color: var(--orange); }
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--navy);
  border-radius: var(--radius);
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  color: var(--navy);
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.1s ease, background 0.15s ease, color 0.15s ease;
  min-height: 48px;
  line-height: 1.2;
  text-align: center;
}
.btn-primary { background: var(--cream); color: var(--navy); }
.btn-primary:hover { background: #fff; text-decoration: none; transform: translateY(-1px); }
.btn-secondary { background: transparent; color: #fff; border: 2px solid var(--cream); }
.btn-secondary:hover { background: var(--cream); color: var(--navy); text-decoration: none; }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-deep); text-decoration: none; transform: translateY(-1px); }
.btn-outline-navy { border: 2px solid var(--navy); color: var(--navy); background: transparent; }
.btn-outline-navy:hover { background: var(--navy); color: #fff; text-decoration: none; }

/* ---------- Hero (homepage navy) ---------- */
.hero {
  background: var(--navy);
  color: #fff;
  padding: clamp(64px, 10vw, 128px) 0;
}
.hero .container { max-width: 980px; }
.eyebrow {
  color: var(--orange);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 28px 0;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(2.4rem, 6.2vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 28px 0;
}
.hero p.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  max-width: 720px;
  color: rgba(255,255,255,0.92);
  margin: 0 0 40px 0;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  background: var(--navy);
  color: #fff;
  padding: clamp(56px, 8vw, 96px) 0;
}
.page-hero .eyebrow { margin-bottom: 16px; }
.page-hero h1 {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.1;
  margin: 0 0 16px 0;
  letter-spacing: -0.02em;
}
.page-hero p.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: rgba(255,255,255,0.9);
  max-width: 720px;
  margin: 0;
}

/* ---------- Long-form article ---------- */
.article {
  padding: clamp(56px, 8vw, 96px) 0;
  background: var(--cream);
}
.article h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--navy);
  margin: 48px 0 16px 0;
  line-height: 1.2;
}
.article h3 {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  color: var(--navy);
  margin: 32px 0 12px 0;
}
.article p { margin: 0 0 20px 0; color: var(--ink); }
.article ul, .article ol { padding-left: 24px; margin: 0 0 24px 0; }
.article li { margin-bottom: 8px; }
.article blockquote {
  border-left: 4px solid var(--orange);
  padding: 4px 0 4px 24px;
  margin: 32px 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--navy);
}
.article a { color: var(--orange-deep); text-decoration: underline; }
.article a:hover { color: var(--orange); }
.article .first-letter::first-letter {
  font-family: var(--serif);
  font-size: 4rem;
  font-weight: 900;
  float: left;
  line-height: 0.9;
  margin: 6px 12px 0 0;
  color: var(--navy);
}

.callout {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);
  padding: 24px 28px;
  border-radius: var(--radius);
  margin: 32px 0;
}
.callout h3 { margin-top: 0; color: var(--navy); }
.callout p:last-child { margin-bottom: 0; }

/* ---------- Mission section ---------- */
.mission {
  background: var(--cream);
  padding: clamp(72px, 10vw, 128px) 0;
  text-align: center;
}
.mission .container { max-width: 820px; }
.section-eyebrow {
  color: var(--navy);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 24px 0;
}
.mission blockquote {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.4;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 24px 0;
}
.mission cite { color: var(--ink-soft); font-style: normal; font-size: 0.95rem; }

/* ---------- Pillar cards ---------- */
.pillars {
  background: var(--cream-soft);
  padding: clamp(72px, 10vw, 120px) 0;
  border-top: 1px solid var(--line);
}
.pillars-head { text-align: center; margin-bottom: 56px; }
.pillars h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--navy);
  margin: 0 0 12px 0;
  line-height: 1.2;
}
.pillars-head p { max-width: 620px; margin: 0 auto; color: var(--ink-soft); }
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.pillar-card {
  background: #fff;
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pillar-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pillar-card h3 {
  font-family: var(--serif);
  color: var(--navy);
  font-size: 1.4rem;
  margin: 0 0 12px 0;
}
.pillar-card p { margin: 0 0 16px 0; color: var(--ink-soft); }
.pillar-card a { font-weight: 600; color: var(--orange-deep); }
.pillar-card a:hover { color: var(--orange); text-decoration: underline; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--navy);
  color: #fff;
  padding: clamp(64px, 8vw, 96px) 0;
  text-align: center;
}
.cta-band h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin: 0 0 16px 0;
  line-height: 1.2;
}
.cta-band p {
  max-width: 600px; margin: 0 auto 32px auto;
  color: rgba(255,255,255,0.88);
  font-size: 1.05rem;
}

/* ---------- Sepsis acronym table ---------- */
.sepsis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 32px 0;
}
.sepsis-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.sepsis-letter {
  font-family: var(--serif);
  font-size: 3rem;
  color: var(--orange);
  font-weight: 900;
  line-height: 1;
  margin: 0 0 8px 0;
}
.sepsis-item h4 { margin: 0 0 8px 0; color: var(--navy); font-family: var(--serif); font-size: 1.2rem; }
.sepsis-item p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Form ---------- */
.form-grid { display: grid; gap: 18px; margin-top: 24px; }
.form-grid label { font-weight: 600; color: var(--navy); margin-bottom: 6px; display: block; }
.form-grid input, .form-grid textarea, .form-grid select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  background: #fff;
  color: var(--ink);
  min-height: 48px;
}
.form-grid textarea { min-height: 140px; resize: vertical; }
.form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
  border-color: var(--orange);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.78);
  padding: 48px 0 32px 0;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-bottom: 32px;
}
.site-footer h4 {
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 12px 0;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: rgba(255,255,255,0.78); }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

/* ---------- Responsive breakpoints ---------- */
@media (min-width: 600px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

@media (max-width: 1023px) {
  .nav-toggle { display: inline-flex; }
  .nav-list {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 20px 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-list.open { max-height: 600px; }
  .nav-list li { width: 100%; border-bottom: 1px solid var(--line); }
  .nav-list li:last-child { border-bottom: none; }
  .nav-list a {
    display: block;
    padding: 14px 0;
    font-size: 1.05rem;
    border-bottom: none;
  }
  .nav-list a:hover, .nav-list a.active { border-bottom: none; color: var(--orange-deep); }
}

@media (max-width: 480px) {
  .container, .container-narrow { padding: 0 20px; }
  .btn { width: 100%; }
  .cta-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
