/*
Theme Name: EMPF Legacy Archive
Theme URI: https://promisenow.org/
Author: ALMA Group
Description: Closure-first bilingual legacy archive for El Monte Promise Foundation.
Version: 1.1.5
Text Domain: empf-legacy
*/

:root {
  --ink: #173d48;
  --teal: #08677a;
  --teal-dark: #054b5a;
  --olive: #899e21;
  --coral: #f15a3c;
  --gold: #dfa322;
  --paper: #fbfaf5;
  --mist: #eef5f4;
  --white: #fff;
  --line: rgba(23, 61, 72, 0.16);
  --shadow: 0 20px 60px rgba(15, 58, 67, 0.13);
  --radius: 26px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  padding: .8rem 1rem; background: var(--ink); color: white;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.site-header {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 245, .94);
  backdrop-filter: blur(14px);
}
.nav-wrap {
  width: min(var(--max), calc(100% - 40px)); margin: 0 auto;
  min-height: 78px; display: flex; align-items: center; gap: 26px;
}
.brand { display: flex; align-items: center; gap: 15px; color: var(--ink); text-decoration: none; }
.brand-logo { width: 112px; height: auto; }
.brand small { max-width: 96px; color: #5c737a; font-size: .69rem; line-height: 1.25; letter-spacing: .08em; text-transform: uppercase; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: .91rem; font-weight: 700; }
.site-nav a:hover, .site-nav a:focus { color: var(--coral); }
.language-switch {
  display: inline-flex; padding: 4px; border-radius: 999px;
  background: var(--mist); border: 1px solid var(--line);
}
.language-switch button {
  border: 0; border-radius: 999px; padding: 7px 10px; cursor: pointer;
  color: var(--ink); background: transparent; font-weight: 800; font-size: .78rem;
}
.language-switch button[aria-pressed="true"] { color: white; background: var(--teal); }
.menu-toggle { display: none; margin-left: auto; border: 0; background: transparent; font: inherit; font-weight: 800; }

.closure-strip { padding: 9px 20px; color: white; text-align: center; font-size: .84rem; background: var(--ink); }

/* Defensive shell reset: retained Elementor content may remain active during migration,
   but the previous Elementor header/footer must never appear with this theme. */
.hfe-site-header,
.hfe-site-footer,
[data-elementor-type="header"],
[data-elementor-type="footer"] { display: none !important; }

.hero {
  overflow: hidden; position: relative;
  background:
    radial-gradient(circle at 12% 12%, rgba(137,158,33,.19), transparent 30%),
    radial-gradient(circle at 88% 78%, rgba(241,90,60,.12), transparent 28%);
}
.hero::after {
  content: ""; position: absolute; inset: auto -110px -160px auto;
  width: 420px; height: 420px; border: 70px solid rgba(8,103,122,.05); border-radius: 50%;
}
.hero-grid {
  position: relative; z-index: 1; width: min(var(--max), calc(100% - 40px));
  margin: 0 auto; padding: clamp(56px, 8vw, 104px) 0;
  display: grid; grid-template-columns: 1.04fr .84fr; align-items: center; gap: clamp(38px, 7vw, 92px);
}
.eyebrow { margin: 0 0 16px; color: var(--coral); font-size: .79rem; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.hero h1 { margin: 0 0 22px; max-width: 760px; font-family: Georgia, serif; font-size: clamp(2.6rem, 5.6vw, 5.3rem); line-height: .98; letter-spacing: -.045em; }
.hero h1 em { color: var(--olive); font-style: normal; }
.hero-copy { max-width: 690px; font-size: clamp(1rem, 1.4vw, 1.16rem); }
.hero-copy p { margin: 0 0 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  min-height: 48px; padding: 12px 19px; border-radius: 999px;
  border: 1px solid var(--teal); text-decoration: none; font-weight: 850;
}
.button.primary { color: white; background: var(--teal); }
.button.primary:hover { background: var(--teal-dark); }
.button.secondary { color: var(--teal); background: rgba(255,255,255,.68); }
.hero-media { position: relative; }
.closure-poster {
  width: min(100%, 470px); margin: auto; border: 10px solid white;
  border-radius: 30px; box-shadow: var(--shadow); aspect-ratio: 4/5; object-fit: cover;
}
.closure-poster[hidden] { display: none; }
.media-note {
  position: absolute; right: -22px; bottom: 32px; max-width: 210px;
  padding: 14px 16px; border-radius: 16px; color: white; background: var(--ink);
  font-size: .84rem; box-shadow: var(--shadow);
}

.section { padding: clamp(64px, 8vw, 108px) 0; }
.section.alt { background: var(--mist); }
.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.section-head { display: grid; grid-template-columns: .76fr 1fr; gap: 48px; align-items: end; margin-bottom: 42px; }
.section-head h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(2.2rem, 4.6vw, 4.1rem); line-height: 1.05; letter-spacing: -.035em; }
.section-head p { margin: 0; max-width: 660px; font-size: 1.05rem; }

.impact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.impact-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.impact-card strong { display: block; color: var(--olive); font-family: Georgia, serif; font-size: 2.9rem; line-height: 1; }
.impact-card span { display: block; margin-top: 10px; font-weight: 750; }

.report-feature { display: grid; grid-template-columns: .78fr 1.12fr; align-items: center; gap: clamp(36px, 6vw, 80px); }
.report-cover { border-radius: 20px; box-shadow: var(--shadow); border: 8px solid white; }
.report-feature h2 { margin: 0 0 16px; font-family: Georgia, serif; font-size: clamp(2.3rem, 4.3vw, 4rem); line-height: 1.04; }
.report-feature p { font-size: 1.08rem; }
.report-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 25px; }

.resource-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.resource-card { padding: 30px; border-radius: var(--radius); background: white; border: 1px solid var(--line); }
.resource-card .grade { color: var(--coral); font-size: .74rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.resource-card h3 { margin: 8px 0 12px; font-family: Georgia, serif; font-size: 1.8rem; }
.grade-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.grade-links a { padding: 7px 10px; border-radius: 9px; background: var(--mist); text-decoration: none; font-size: .82rem; font-weight: 800; }

.timeline { position: relative; display: grid; gap: 18px; max-width: 920px; margin: auto; }
.timeline::before { content: ""; position: absolute; left: 77px; top: 10px; bottom: 10px; width: 2px; background: rgba(137,158,33,.45); }
.timeline-item { position: relative; display: grid; grid-template-columns: 62px 1fr; gap: 34px; }
.timeline-year { color: var(--olive); font-weight: 900; text-align: right; }
.timeline-copy { padding: 0 0 20px; }
.timeline-copy::before { content: ""; position: absolute; left: 71px; top: 7px; width: 14px; height: 14px; border: 4px solid var(--paper); border-radius: 50%; background: var(--coral); }
.timeline-copy h3 { margin: 0 0 5px; font-size: 1.03rem; }
.timeline-copy p { margin: 0; }

.publication-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.publication-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 17px 18px; border: 1px solid var(--line); border-radius: 13px;
  background: white; color: var(--ink); text-decoration: none; font-weight: 750;
}
.publication-list a::after { content: "PDF ↗"; color: var(--coral); font-size: .73rem; letter-spacing: .08em; }

.archive-note { padding: 30px; border-radius: var(--radius); color: white; background: var(--teal-dark); }
.archive-note h2 { margin-top: 0; font-family: Georgia, serif; font-size: 2rem; }

.social-legacy { padding-top: 0; }
.social-panel {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr);
  align-items: center; gap: clamp(30px, 6vw, 74px);
  padding: clamp(30px, 5vw, 54px); border: 1px solid var(--line);
  border-radius: var(--radius); background: linear-gradient(135deg, white, var(--mist));
  box-shadow: var(--shadow);
}
.social-panel h2 { margin: 0 0 14px; font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; }
.social-panel p:last-child { margin-bottom: 0; }
.social-links { display: grid; gap: 10px; }
.social-links a {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 13px;
  min-height: 58px; padding: 11px 16px; border: 1px solid var(--line); border-radius: 13px;
  color: var(--ink); background: white; text-decoration: none; font-weight: 800;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.social-links a:hover, .social-links a:focus-visible { border-color: var(--teal); box-shadow: 0 7px 18px rgba(15, 58, 67, .11); transform: translateY(-1px); outline: none; }
.social-links svg { width: 28px; height: 28px; color: var(--teal); fill: currentColor; stroke: currentColor; stroke-width: 1.8; }
.social-links svg circle, .social-links svg rect { fill: none; }
.social-links a:nth-child(2) svg path,
.social-links a:nth-child(3) svg path,
.social-links a:nth-child(3) svg rect,
.social-links a:nth-child(3) svg circle { fill: currentColor; stroke: none; }
.external-mark { color: var(--coral); font-size: 1.2rem; }

.content-frame { max-width: 960px; }
.page-heading { margin-bottom: 34px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.page-heading h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(2.25rem, 5vw, 4rem); line-height: 1.05; }
.legacy-content { font-size: 1.04rem; }
.legacy-content > :first-child { margin-top: 0; }
.legacy-content iframe, .legacy-content embed, .legacy-content object { width: 100%; max-width: 100%; }
.legacy-content img { height: auto; }

.roadmap-page { min-height: 60vh; padding: clamp(46px, 6vw, 78px) 0 86px; background: white; }
.roadmap-page > article { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.roadmap-heading { max-width: 760px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.roadmap-heading .eyebrow { margin-bottom: 8px; }
.roadmap-heading h1 { margin: 0; color: #57631e; font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif; font-size: clamp(2.6rem, 5.8vw, 5.1rem); line-height: .98; letter-spacing: -.045em; text-transform: uppercase; }
.roadmap-translation-note { max-width: 760px; margin: 18px 0 0; padding: 12px 15px; border-left: 4px solid var(--gold); background: #fff9e8; color: #36535b; font-size: .92rem; line-height: 1.5; }
.roadmap-translation-note p { margin: 0; }
.empf-translation-bridge { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.roadmap-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(250px, .72fr); align-items: start; gap: clamp(36px, 6vw, 78px); margin-top: 34px; }
.roadmap-copy { min-width: 0; color: #52602c; font-size: clamp(.98rem, 1.35vw, 1.08rem); line-height: 1.5; }
.roadmap-copy > :first-child { margin-top: 0; }
.roadmap-copy h2, .roadmap-copy h3, .roadmap-copy h4, .roadmap-copy h5 { margin: 2rem 0 .7rem; color: #603f33; font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif; font-size: clamp(1rem, 1.55vw, 1.24rem); line-height: 1.25; text-transform: uppercase; }
.roadmap-copy ul, .roadmap-copy ol { margin: .45rem 0 1.3rem; padding-left: 1.45rem; }
.roadmap-copy li { margin: .18rem 0; }
.roadmap-copy p { margin: .7rem 0; }
.roadmap-copy a { color: #b84f34; font-weight: 750; text-underline-offset: 3px; }
.roadmap-copy a:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.roadmap-art { position: sticky; top: 118px; align-self: start; }
.roadmap-art img { width: 100%; height: auto; object-fit: contain; }
.roadmap-pagination { display: flex; justify-content: space-between; gap: 16px; margin-top: 46px; padding-top: 25px; border-top: 1px solid var(--line); }

.site-footer { padding: 36px 0; color: #dce9e9; background: #102f38; }
.footer-grid { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.site-footer p { margin: 0; max-width: 680px; font-size: .88rem; }
.site-footer a { color: white; }

[data-lang="es"] { display: none !important; }
body.lang-es [data-lang="en"] { display: none !important; }
body.lang-es [data-lang="es"] { display: revert !important; }

.report-page-body { background: #e7eeed; }
.report-toolbar { position: sticky; top: 78px; z-index: 30; padding: 12px 0; border-bottom: 1px solid var(--line); background: rgba(251,250,245,.95); }
.report-toolbar .container { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.report-toolbar p { margin: 0; font-size: .88rem; font-weight: 800; }
.report-stack { width: min(760px, calc(100% - 28px)); margin: 26px auto 70px; display: grid; gap: 18px; }
.report-stack figure { margin: 0; }
.report-stack img { width: 100%; border-radius: 8px; box-shadow: 0 8px 28px rgba(15,58,67,.18); background: white; }
.report-stack figcaption { padding-top: 5px; color: #60767a; font-size: .76rem; text-align: center; }

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .site-nav { display: none; position: absolute; inset: 78px 0 auto; padding: 20px; flex-direction: column; align-items: flex-start; background: var(--paper); border-bottom: 1px solid var(--line); }
  .site-nav.open { display: flex; }
  .site-nav .language-switch { margin-top: 5px; }
  .hero-grid, .report-feature, .section-head, .social-panel { grid-template-columns: 1fr; }
  .roadmap-layout { grid-template-columns: minmax(0, 1fr) minmax(220px, .55fr); gap: 34px; }
  .hero-media { max-width: 520px; }
  .media-note { right: -5px; }
  .section-head { gap: 18px; }
}

@media (max-width: 680px) {
  .nav-wrap { width: min(100% - 28px, var(--max)); min-height: 70px; }
  .brand-logo { width: 92px; }
  .brand small { display: none; }
  .site-nav { inset-block-start: 70px; }
  .closure-strip { font-size: .75rem; }
  .hero-grid, .container { width: min(100% - 28px, var(--max)); }
  .hero-grid { padding-top: 46px; gap: 34px; }
  .hero h1 { font-size: clamp(2.55rem, 14vw, 4rem); }
  .closure-poster { border-width: 6px; border-radius: 22px; }
  .media-note { position: static; max-width: none; margin: 12px 8px 0; }
  .impact-grid, .resource-grid, .publication-list { grid-template-columns: 1fr; }
  .impact-card { padding: 22px; }
  .timeline::before { left: 57px; }
  .timeline-item { grid-template-columns: 45px 1fr; gap: 27px; }
  .timeline-copy::before { left: 51px; }
  .footer-grid, .report-toolbar .container { align-items: flex-start; flex-direction: column; }
  .report-toolbar { top: 70px; }
  .roadmap-page > article { width: min(100% - 28px, var(--max)); }
  .roadmap-heading h1 { font-size: clamp(2.35rem, 12vw, 3.6rem); }
  .roadmap-layout { display: flex; flex-direction: column-reverse; margin-top: 26px; }
  .roadmap-art { position: static; width: min(82%, 360px); margin: 0 auto 10px; }
  .roadmap-pagination { align-items: stretch; flex-direction: column; }
  .roadmap-pagination .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
