/* =========================================================
   EDI Photo Stories — shared site stylesheet
   Brand: Cadmium Orange / Deep Charcoal / Ivory Mist / White
   Type:  Satoshi (Latin) + Noto Sans Ethiopic (Amharic)
   ========================================================= */

@import url('https://api.fontshare.com/v2/css?f[]=satoshi@300,400,500,700,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Ethiopic:wght@400;500;700&display=swap');

:root {
  /* --- EDI brand tokens (light) --- */
  --edi-orange: #E98324;
  --edi-orange-dark: #C56A16;
  --edi-charcoal: #1C1C1C;
  --edi-ivory: #F8F7F3;
  --edi-white: #FFFFFF;

  /* --- semantic tokens (light theme) --- */
  --bg: var(--edi-ivory);
  --surface: var(--edi-white);
  --ink: var(--edi-charcoal);
  --ink-soft: #5B5B57;
  --line: #E4E1D6;
  --accent: var(--edi-orange);
  --accent-ink: #FFFFFF;
  --accent-soft: #FCEBDA;
  --shadow: 0 1px 2px rgba(28,28,28,0.05), 0 10px 28px -14px rgba(28,28,28,0.22);
  --rail-w: 30px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141311;
    --surface: #1E1D19;
    --ink: #F3F1EA;
    --ink-soft: #B7B2A4;
    --line: #34322A;
    --accent: #F0954A;
    --accent-ink: #201203;
    --accent-soft: #35281B;
    --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 14px 32px -16px rgba(0,0,0,0.6);
  }
}
:root[data-theme="dark"] {
  --bg: #141311;
  --surface: #1E1D19;
  --ink: #F3F1EA;
  --ink-soft: #B7B2A4;
  --line: #34322A;
  --accent: #F0954A;
  --accent-ink: #201203;
  --accent-soft: #35281B;
  --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 14px 32px -16px rgba(0,0,0,0.6);
}

/* ---------- reset ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding-left: var(--rail-w);
  background: var(--bg);
  color: var(--ink);
  font-family: "Satoshi", "Noto Sans Ethiopic", -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* ---------- brand type scale ---------- */
h1, h2, h3, .display {
  font-family: "Satoshi", "Noto Sans Ethiopic", sans-serif;
  font-weight: 700;
  text-wrap: balance;
  color: var(--ink);
  margin: 0;
}
h1 { font-size: clamp(2.3rem, 6vw, 4.6rem); font-weight: 900; line-height: 1.04; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.85rem); line-height: 1.1; }
h3 { font-size: clamp(1.25rem, 2.6vw, 1.8rem); font-weight: 700; }
p { margin: 0 0 1rem; }
.eyebrow, .kicker {
  font-family: "Satoshi", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.lede { font-size: 1.08rem; color: var(--ink-soft); max-width: 60ch; }
.caption, figcaption { font-size: 0.8rem; color: var(--ink-soft); line-height: 1.45; }

/* ---------- signature EDI rail (per brand guideline "document practice") ---------- */
.edi-rail {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--rail-w);
  background: var(--accent);
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 1.4rem;
}
.edi-rail span {
  display: block;
  transform: rotate(-90deg);
  transform-origin: center;
  white-space: nowrap;
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.28em;
  color: var(--accent-ink);
}

/* ---------- site header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-logo img { display: block; height: 34px; width: auto; }
.site-nav { display: flex; gap: 1.4rem; font-weight: 500; font-size: 0.92rem; }
.site-nav a { color: var(--ink); }
.site-nav a:hover { color: var(--accent); text-decoration: none; }

/* ---------- shared footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  margin-top: 2rem;
}
.site-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.4rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.footer-partners {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.8rem;
}
.footer-partners img { height: 30px; width: auto; opacity: 0.92; }
.footer-partners .lpi-logo { height: 40px; }
.footer-note { font-size: 0.82rem; color: var(--ink-soft); max-width: 70ch; }
.footer-note strong { color: var(--ink); }

/* ---------- containers ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- home: hero ---------- */
.home-hero {
  padding: clamp(2.8rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3rem);
}
.home-hero .eyebrow { margin-bottom: 0.9rem; }
.home-hero h1 { max-width: 15ch; }
.home-hero .lede { margin-top: 1.1rem; }

/* ---------- home: story grid ---------- */
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
  padding: 1rem 0 clamp(3rem, 6vw, 5rem);
}
.story-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}
.story-card:hover { transform: translateY(-3px); }
.story-card a.card-link { color: inherit; text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.story-card .thumb {
  aspect-ratio: 4/3;
  background: var(--accent-soft);
  overflow: hidden;
}
.story-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-card .card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.story-card .card-cat {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent);
}
.story-card h3 { font-size: 1.2rem; }
.story-card p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }
.story-card .card-meta {
  margin-top: auto;
  padding-top: 0.6rem;
  font-size: 0.74rem;
  color: var(--ink-soft);
  font-weight: 500;
}

/* ---------- story page: hero ---------- */
.story-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: clamp(2.2rem, 5vw, 3.6rem) 0 clamp(1.8rem, 4vw, 2.6rem); }
.story-hero .eyebrow { margin-bottom: 0.7rem; }
.story-hero h1 { margin: 0.25rem 0 0.9rem; }
.fact-strip { display: flex; flex-wrap: wrap; gap: 0.5rem 0.65rem; margin-top: 0.9rem; }
.fact-chip {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 0.34rem 0.65rem; border: 1px solid var(--line); border-radius: 3px;
  color: var(--ink-soft); background: var(--bg);
}

/* ---------- timeline (only used where content is a real sequence) ---------- */
.timeline-wrap { padding: 2rem 0 0.4rem; }
.timeline { display: grid; gap: 0.75rem; position: relative; }
.timeline::before { content: ""; position: absolute; top: 7px; left: 4%; right: 4%; height: 1px; background: var(--line); }
.tl-step { display: flex; flex-direction: column; gap: 0.3rem; }
.tl-dot { width: 15px; height: 15px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); z-index: 1; }
.tl-date { font-size: 0.7rem; font-weight: 600; color: var(--ink-soft); }
.tl-label { font-size: 0.85rem; font-weight: 700; }

/* ---------- intro paragraph block ---------- */
.intro { padding: 2rem 0 0.5rem; }
.intro p { font-size: 1.05rem; color: var(--ink-soft); }
.intro strong { color: var(--ink); }

/* ---------- chapters ---------- */
.chapter { padding: clamp(2.2rem, 5vw, 3.2rem) 0; border-top: 1px solid var(--line); }
.chapter-head { max-width: 640px; margin-bottom: 1.5rem; }
.chapter-eyebrow { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.5rem; }
.chapter-num { font-weight: 900; color: var(--accent); }
.chapter-meta { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.chapter h2 { margin-bottom: 0.85rem; }
.chapter p { max-width: 640px; color: var(--ink-soft); }
.chapter p.lede-strong { color: var(--ink); font-size: 1.02rem; }

/* ---------- photo frames + galleries ---------- */
.frame { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow); overflow: hidden; }
.frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
figure { margin: 0; }
figcaption { padding: 0.55rem 0.1rem 0; }

.gallery { margin-top: 1.6rem; display: grid; gap: 1rem; }
.gallery-lead-support { grid-template-columns: 1.4fr 1fr; grid-template-rows: auto auto; }
.gallery-lead-support .lead { grid-row: 1 / 3; aspect-ratio: 4/5; }
.gallery-lead-support .lead img { object-position: top; }
.gallery-lead-support .support { aspect-ratio: 4/3; }
.gallery-two { grid-template-columns: 1fr 1fr; }
.gallery-two .frame { aspect-ratio: 4/3; }
.gallery-triptych { grid-template-columns: 1fr 1fr 1fr; }
.gallery-triptych .frame { aspect-ratio: 3/4; }
.gallery-quad { grid-template-columns: 1fr 1fr; }
.gallery-quad .frame { aspect-ratio: 4/3; }
.gallery-single .frame { aspect-ratio: 16/9; }

/* ---------- compact cadence row (many short chapters, e.g. recurring quarterly events) ---------- */
.cadence-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.2rem;
  align-items: start;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}
.cadence-row:first-child { border-top: none; }
.cadence-row .frame { aspect-ratio: 4/3; }
.cadence-body .chapter-meta { display: block; margin-bottom: 0.35rem; }
.cadence-body h3 { font-size: 1.15rem; margin-bottom: 0.45rem; }
.cadence-body p { font-size: 0.92rem; color: var(--ink-soft); max-width: 56ch; }
@media (max-width: 560px) {
  .cadence-row { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .gallery-lead-support { grid-template-columns: 1fr; }
  .gallery-lead-support .lead { grid-row: auto; aspect-ratio: 4/3; }
  .gallery-triptych { grid-template-columns: 1fr 1fr; }
  .gallery-triptych .frame:first-child { grid-column: 1 / 3; aspect-ratio: 16/9; }
}
@media (max-width: 480px) {
  .gallery-two, .gallery-quad { grid-template-columns: 1fr; }
  :root { --rail-w: 20px; }
  .edi-rail span { font-size: 0.62rem; letter-spacing: 0.2em; }
}

/* ---------- signage / pull-quote blocks ---------- */
.signage {
  margin: 1.7rem 0 0.4rem;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
  padding: 1.1rem 1.3rem;
  max-width: 640px;
}
.signage p { color: var(--ink); font-size: 0.98rem; margin: 0; }
.signage cite { display: block; margin-top: 0.6rem; font-style: normal; font-size: 0.7rem; color: var(--ink-soft); }

.quote-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.5rem 0 0; }
.quote-chip {
  font-style: italic; font-size: 0.9rem; color: var(--accent);
  background: var(--accent-soft); border-radius: 3px; padding: 0.4rem 0.75rem;
}

.way-forward { margin-top: 1.7rem; max-width: 640px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.way-forward-head { padding: 0.85rem 1.2rem; border-bottom: 1px solid var(--line); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.way-forward ol { margin: 0; padding: 0.5rem 1.2rem 1.05rem 1.5rem; }
.way-forward li { padding: 0.4rem 0; color: var(--ink); }

/* ---------- story footer note ---------- */
.story-note { max-width: 640px; margin: 1rem 0 0; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.story-note h3 { font-size: 1rem; margin-bottom: 0.6rem; }
.story-note p { font-size: 0.88rem; color: var(--ink-soft); }
.stamp { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; color: var(--ink-soft); text-transform: uppercase; }

/* ---------- back link ---------- */
.back-link { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 1rem; }
.back-link:hover { color: var(--accent); text-decoration: none; }
