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

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --navy:      #0f1f35;
  --navy-mid:  #1c3554;
  --teal:      #1a9e8c;
  --teal-dark: #127a6b;
  --teal-glow: rgba(26, 158, 140, 0.15);
  --light:     #f4f6f8;
  --white:     #ffffff;
  --text:      #1a1a2e;
  --muted:     #5c6878;
  --border:    #dde3eb;

  /* Chart color tokens */
  --color-text-primary:   #1a1a2e;
  --color-text-secondary: #5c6878;
  --color-text-tertiary:  #8a96a3;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── Layout ── */
.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 2rem;
}

section { padding: 5.5rem 0; }

/* ── Navbar ── */
.navbar {
  background: var(--navy);
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.01em;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  color: rgba(255,255,255,0.65);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  border-bottom-color: var(--teal);
}

/* ── Hero ── */
.hero {
  background: var(--navy);
  background-image:
    radial-gradient(ellipse at 70% 50%, rgba(26,158,140,0.12) 0%, transparent 60%),
    linear-gradient(160deg, #0f1f35 0%, #1c3554 100%);
  padding: 9rem 2rem 8rem;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 59px,
    rgba(255,255,255,0.025) 60px
  ),
  repeating-linear-gradient(
    90deg,
    transparent,
    transparent 59px,
    rgba(255,255,255,0.025) 60px
  );
  pointer-events: none;
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 1.2rem;
}

.hero-subtitle {
  font-size: 1rem;
  font-weight: 300;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.06em;
  margin-bottom: 2.8rem;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  background: transparent;
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.85rem 2.4rem;
  border: 2px solid var(--teal);
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
}

.btn:hover {
  background: var(--teal);
  color: var(--white);
}

/* ── Section headings ── */
h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1.4rem;
  line-height: 1.2;
}

.section-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.6rem;
}

/* ── About ── */
.about { background: var(--white); }

.about p {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.85;
}

/* ── Organization ── */
.organizations { background: var(--light); }

.org-feature {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 5px solid var(--teal);
  padding: 2.2rem 2.5rem;
  border-radius: 0 4px 4px 0;
  max-width: 640px;
}

.org-feature h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: 0.6rem;
}

.org-feature p {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Connect / Social ── */
.connect { background: var(--navy); }

.connect h2 { color: var(--white); }

.connect .section-label { color: var(--teal); }

.connect > .container > p {
  color: rgba(255,255,255,0.5);
  font-weight: 300;
  margin-bottom: 2.2rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: rgba(255,255,255,0.06);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.8rem 1.6rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 3px;
  transition: background 0.2s, border-color 0.2s;
}

.social-link:hover {
  background: var(--teal);
  border-color: var(--teal);
}

.social-link i { font-size: 1.1rem; }

/* ── Page Hero (inner pages) ── */
.page-hero {
  background: var(--navy);
  background-image: linear-gradient(160deg, #0f1f35 0%, #1c3554 100%);
  padding: 5.5rem 2rem 4.5rem;
  color: var(--white);
  border-bottom: 3px solid var(--teal);
}

.page-hero .section-label { color: var(--teal); margin-bottom: 0.8rem; }

.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* ── Advocacy intro ── */
.advocacy-intro { background: var(--white); }

.advocacy-intro p {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.85;
}

/* ── Advocacy areas ── */
.advocacy-areas { background: var(--light); }

.area-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.area-list li {
  background: var(--white);
  border-left: 4px solid var(--teal);
  padding: 0.9rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 0 3px 3px 0;
  letter-spacing: 0.01em;
}

.area-note {
  margin-top: 1.8rem;
  font-size: 0.88rem;
  font-weight: 300;
  font-style: italic;
  color: var(--muted);
}

/* ── Orgs on advocacy page ── */
.orgs-section { background: var(--white); }

/* ── Publication hero (writings index) ── */
.pub-hero {
  background: var(--navy);
  background-image: linear-gradient(160deg, #0f1f35 0%, #1c3554 100%);
  padding: 5.5rem 2rem 4.5rem;
  color: var(--white);
  border-bottom: 3px solid var(--teal);
}

.pub-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.pub-desc {
  font-size: 1rem;
  font-weight: 300;
  color: rgba(255,255,255,0.6);
  max-width: 560px;
  line-height: 1.7;
}

/* ── Publication feed ── */
.pub-feed {
  background: var(--white);
  padding: 4rem 0 6rem;
}

.pub-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 2rem;
}

.post-card {
  padding: 2.8rem 0;
  border-bottom: 1px solid var(--border);
}

.post-card:first-child { padding-top: 0; }
.post-card:last-child { border-bottom: none; }

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.post-type {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}

.post-dot { color: var(--border); font-size: 0.8rem; }

.post-date {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
}

.post-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  color: var(--navy);
}

.post-title a {
  transition: color 0.2s;
}

.post-title a:hover { color: var(--teal); }

.post-excerpt {
  font-size: 1rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1.1rem;
}

.post-read {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--teal);
  transition: color 0.2s;
}

.post-read:hover { color: var(--teal-dark); }

/* ── Individual article ── */
.article-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 3.5rem 2rem 6rem;
}

.article-back {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 2.5rem;
  transition: color 0.2s;
}

.article-back:hover { color: var(--teal); }

.article-header { margin-bottom: 2.5rem; }

.article-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--navy);
  margin: 0.75rem 0 0.6rem;
}

.article-subhead {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
  font-style: italic;
}

.article-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0 0;
}

.article-body p {
  font-size: 1.1rem;
  line-height: 1.9;
  color: #2c2c3a;
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.article-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  margin: 2.5rem 0 1rem;
}

.article-body h2::after { display: none; }

.article-body blockquote {
  border-left: 3px solid var(--teal);
  margin: 2rem 0;
  padding: 0.5rem 0 0.5rem 1.5rem;
  font-style: italic;
  color: var(--muted);
}

.article-footer {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* ── Chart embed ── */
.chart-embed {
  background: var(--light);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  padding: 1.4rem 1.5rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 3px 3px 0;
  overflow: hidden;
}

/* ── Chart placeholder ── */
.chart-placeholder {
  background: var(--light);
  border: 1px dashed var(--border);
  border-left: 4px solid var(--teal);
  padding: 1.5rem 1.5rem 1.5rem 1.2rem;
  margin: 2rem 0;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
  border-radius: 0 3px 3px 0;
}

.chart-label {
  display: inline-block;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-right: 0.6rem;
}

/* ── Sources & footnotes ── */
.article-sources-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
  display: block;
}

.article-sources {
  font-size: 0.85rem !important;
  color: var(--muted) !important;
  line-height: 1.6 !important;
  font-style: italic;
  margin-bottom: 2rem !important;
}

.footnotes {
  list-style: none;
  counter-reset: footnote;
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.footnotes li {
  counter-increment: footnote;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.65;
  padding: 0.4rem 0 0.4rem 1.8rem;
  position: relative;
}

.footnotes li::before {
  content: counter(footnote) ".";
  position: absolute;
  left: 0;
  font-weight: 600;
  color: var(--teal);
}

.footnotes li a {
  color: var(--teal);
  font-size: 0.78rem;
  margin-left: 0.3rem;
}

sup a {
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
}

/* ── Footer ── */
footer {
  background: #080f1a;
  color: rgba(255,255,255,0.3);
  font-size: 0.82rem;
  text-align: center;
  padding: 2rem;
  letter-spacing: 0.04em;
}

/* ── Hamburger button (hidden on desktop) ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.8);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Responsive ── */
@media (max-width: 720px) {

  /* Navbar */
  .navbar {
    padding: 0 1.5rem;
    position: relative;
  }

  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--navy);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 0.5rem 0 1.2rem;
    gap: 0;
    z-index: 99;
  }

  .nav-links.open { display: flex; }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 0.85rem 1.5rem;
    font-size: 0.85rem;
    border-bottom: none;
  }

  .nav-links a.active { color: var(--white); }

  /* Hero */
  .hero { padding: 5.5rem 1.5rem 4.5rem; }
  .hero-subtitle { letter-spacing: 0.03em; }

  /* Sections */
  section { padding: 3rem 0; }
  .container { padding: 0 1.25rem; }

  /* Page heroes */
  .page-hero { padding: 3.5rem 1.25rem 3rem; }
  .pub-hero   { padding: 3.5rem 1.25rem 3rem; }

  /* Org feature card */
  .org-feature { padding: 1.5rem; }

  /* Focus areas */
  .area-list { grid-template-columns: 1fr; }

  /* Social links */
  .social-links { flex-direction: column; }
  .social-link  { justify-content: center; }

  /* Writings */
  .pub-feed     { padding: 2.5rem 0 4rem; }
  .pub-container { padding: 0 1.25rem; }
  .post-title   { font-size: 1.3rem; }
  .post-card    { padding: 2rem 0; }

  /* Article */
  .article-wrap { padding: 2rem 1.25rem 4rem; }
  .article-body p { font-size: 1rem; }
}
