/* =====================================================
   JAHDEP — Journal of Applied Human Development
   and Economic Policy
   A publication of EHHD Foundation
===================================================== */

:root {
  --brand: #8b1e2d;
  --brand-dark: #6b1620;
  --brand-tint: rgba(139, 30, 45, 0.07);
  --ink: #1b2233;
  --muted: #5c6478;
  --muted-2: #7c8497;
  --paper: #faf8f4;
  --surface: #ffffff;
  --line: #e6e1d8;
  --line-2: #ece7de;
  --gold: #a9822f;
  --ok: #2f7a4f;
  --container: 1120px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Source Serif 4', 'Georgia', serif;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 16px;
}

h1 { font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.25; }
h3 { font-size: 1.25rem; line-height: 1.35; }

p { margin: 0 0 16px; color: var(--muted); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(calc(100% - 40px), var(--container));
  margin: 0 auto;
}

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

ul.plain { list-style: none; margin: 0; padding: 0; }

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

/* ---------- Top strip ---------- */
.top-strip {
  background: var(--ink);
  color: rgba(255,255,255,0.75);
  font-size: 0.82rem;
}
.top-strip .container {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; flex-wrap: wrap; gap: 6px;
}
.top-strip a { color: #fff; font-weight: 600; }
.top-strip a:hover { text-decoration: underline; }

/* ---------- Nav ---------- */
.site-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.nav-panel {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 16px 0;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink); flex-shrink: 0;
}
.brand:hover { text-decoration: none; }
.brand-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.brand-text strong {
  display: block; font-family: 'DM Serif Display', serif; font-size: 1.15rem; letter-spacing: 0.5px;
}
.brand-text span {
  display: block; font-size: 0.72rem; color: var(--muted-2); letter-spacing: 0.4px;
}

.nav-links {
  display: flex; gap: 26px; flex-wrap: wrap;
}
.nav-links a {
  color: var(--ink); font-size: 0.92rem; font-weight: 600;
}
.nav-links a:hover { color: var(--brand); text-decoration: none; }
.nav-links a.is-active { color: var(--brand); }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  width: 40px; height: 40px; align-items: center; justify-content: center;
  cursor: pointer;
}
.nav-toggle span {
  display: block; width: 18px; height: 2px; background: var(--ink); margin: 3px 0;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 8px; font-weight: 700; font-size: 0.9rem;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Mobile menu ---------- */
.mobile-menu { position: fixed; inset: 0; z-index: 100; display: none; }
.mobile-menu.is-open { display: block; }
.mobile-menu-backdrop { position: absolute; inset: 0; background: rgba(20,20,25,0.5); }
.mobile-menu-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(84vw, 340px);
  background: var(--surface); padding: 22px; display: flex; flex-direction: column; gap: 22px;
  overflow-y: auto;
}
.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; }
.mobile-close { background: none; border: none; font-size: 1.3rem; cursor: pointer; }
.mobile-links { display: flex; flex-direction: column; gap: 4px; }
.mobile-links a { padding: 12px 4px; border-bottom: 1px solid var(--line-2); color: var(--ink); font-weight: 600; }

/* ---------- Page hero ---------- */
.page-hero {
  padding: 64px 0 52px;
  background:
    radial-gradient(700px 320px at 90% -10%, var(--brand-tint), transparent 60%),
    var(--surface);
  border-bottom: 1px solid var(--line);
}
.breadcrumbs {
  display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.82rem; color: var(--muted-2);
  margin-bottom: 18px; font-weight: 600;
}
.breadcrumbs a { color: var(--muted-2); }
.breadcrumbs span:last-child { color: var(--brand); }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-tint); color: var(--brand-dark);
  border: 1px solid rgba(139,30,45,0.18);
  padding: 7px 14px; border-radius: 999px; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.6px; text-transform: uppercase; margin-bottom: 18px;
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

.page-hero .lead { font-size: 1.08rem; max-width: 760px; color: var(--muted); }
.acronym-tag {
  display: inline-block; font-family: 'DM Serif Display', serif; font-size: 1.3rem;
  color: var(--brand); letter-spacing: 2px; margin-bottom: 6px;
}

/* ---------- Status / fact strip ---------- */
.fact-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: var(--surface); margin-top: 34px;
}
.fact {
  padding: 20px 22px; border-right: 1px solid var(--line);
}
.fact:last-child { border-right: none; }
.fact-label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--muted-2); font-weight: 700; margin-bottom: 6px;
}
.fact-value { font-weight: 700; color: var(--ink); font-size: 0.98rem; }
.fact-value.tba { color: var(--gold); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 760px; margin: 0 auto 40px; }
.section-head.center { text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--brand); font-weight: 700; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 12px;
}
.eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--brand); display: inline-block; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 28px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.scope-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 8px;
}
.scope-chip {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; font-weight: 600; font-size: 0.92rem; color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.scope-chip::before { content: '§'; color: var(--brand); font-weight: 700; }

/* ---------- Role / board cards ---------- */
.role-card {
  border: 1px solid var(--line); background: var(--surface); border-radius: 14px;
  padding: 26px; display: flex; flex-direction: column; gap: 10px;
}
.role-card h3 { margin-bottom: 0; }
.role-tba {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  background: rgba(169,130,47,0.12); color: var(--gold);
  border: 1px solid rgba(169,130,47,0.3);
  padding: 5px 12px; border-radius: 999px; font-size: 0.76rem; font-weight: 800;
  letter-spacing: 0.5px; text-transform: uppercase;
}

/* ---------- Numbered process list ---------- */
.process-list { counter-reset: step; display: flex; flex-direction: column; gap: 18px; }
.process-step {
  display: grid; grid-template-columns: 46px 1fr; gap: 18px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 20px 22px;
}
.process-num {
  counter-increment: step;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.process-num::before { content: counter(step, decimal-leading-zero); }
.process-step h3 { margin-bottom: 6px; font-size: 1.08rem; }
.process-step p:last-child { margin-bottom: 0; }

/* ---------- Ethics accordion-style blocks ---------- */
.ethic-block {
  border-left: 3px solid var(--brand); background: var(--surface);
  border-radius: 0 12px 12px 0; padding: 20px 24px; border-top: 1px solid var(--line);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.ethic-block h3 { font-size: 1.05rem; margin-bottom: 8px; }
.ethic-block p:last-child { margin-bottom: 0; }
.ethic-list { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Notice / callout ---------- */
.notice {
  border: 1px dashed rgba(169,130,47,0.5); background: rgba(169,130,47,0.06);
  border-radius: 12px; padding: 18px 22px; color: var(--ink); font-size: 0.94rem;
}
.notice strong { color: var(--gold); }
.notice.brand { border: 1px dashed rgba(139,30,45,0.4); background: var(--brand-tint); }
.notice.brand strong { color: var(--brand); }

/* ---------- Table ---------- */
.info-table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.info-table th, .info-table td {
  text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 0.94rem;
}
.info-table th { width: 34%; background: var(--surface); color: var(--muted-2); font-weight: 700; text-transform: uppercase; font-size: 0.74rem; letter-spacing: 0.5px; }
.info-table td { background: #fff; color: var(--ink); }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: none; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff; border-radius: 18px; padding: 44px; text-align: center;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255,255,255,0.85); max-width: 640px; margin-left: auto; margin-right: auto; }
.cta-banner .btn-row { justify-content: center; }
.cta-banner .btn-primary { background: #fff; color: var(--brand-dark); }
.cta-banner .btn-primary:hover { background: rgba(255,255,255,0.88); }
.cta-banner .btn-ghost { border-color: rgba(255,255,255,0.5); color: #fff; }
.cta-banner .btn-ghost:hover { border-color: #fff; }

/* ---------- Footer ---------- */
footer { background: var(--ink); color: rgba(255,255,255,0.7); padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
footer h4 { color: #fff; font-family: 'Inter', sans-serif; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 14px; }
footer p { color: rgba(255,255,255,0.62); font-size: 0.92rem; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: rgba(255,255,255,0.72); font-size: 0.92rem; }
.footer-links a:hover { color: #fff; }
footer .brand-text strong { color: #fff; }
footer .brand-text span { color: rgba(255,255,255,0.55); }
.footer-bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 0.82rem; color: rgba(255,255,255,0.5);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-actions .btn { display: none; }
  .nav-toggle { display: flex; }
  .grid-2, .grid-3, .scope-grid { grid-template-columns: 1fr; }
  .fact-strip { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(2) { border-right: none; }
  .fact:nth-child(1), .fact:nth-child(2) { border-bottom: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .fact-strip { grid-template-columns: 1fr; }
  .fact { border-right: none !important; border-bottom: 1px solid var(--line); }
  .fact:last-child { border-bottom: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .process-step { grid-template-columns: 1fr; }
  .cta-banner { padding: 30px 22px; }
}
