/* Literacy International site styles. Mobile first; wider layouts are added in the media queries. */

:root {
  --navy: #0b3a6e;
  --navy-dark: #072849;
  --teal: #0097b8;
  --teal-dark: #007a96;
  --green: #18773d;
  --ink: #1d2733;
  --muted: #55606e;
  --line: #dde3ea;
  --bg-soft: #f3f6f9;
  --white: #fff;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(11, 58, 110, 0.08);
  --heading: "Oswald", "Arial Narrow", sans-serif;
  --body: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--body); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--white); }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { font-family: var(--heading); font-weight: 500; line-height: 1.2; color: var(--navy); margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid #f1c914; outline-offset: 2px; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--white); color: var(--navy); padding: 10px 16px; border-radius: 6px; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* Buttons */
.btn { display: inline-block; font-family: var(--heading); font-size: 1.05rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; text-align: center; padding: 12px 26px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; transition: background-color 0.15s, color 0.15s, border-color 0.15s; }
.btn-primary { background: var(--teal-dark); color: var(--white); }
.btn-primary:hover { background: var(--navy); color: var(--white); }
.btn-outline { border-color: currentColor; color: var(--white); background: transparent; }
.btn-outline:hover { background: var(--white); color: var(--navy); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--bg-soft); color: var(--navy); }
.btn-donate { background: var(--green); color: var(--white); padding: 9px 18px; }
.btn-donate:hover { background: #12602f; color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--navy); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15); }
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font-family: var(--heading); font-size: 1.15rem; letter-spacing: 0.02em; margin-right: auto; }
.brand:hover { color: var(--white); }
.brand img { width: 44px; height: 44px; }
.brand span { display: none; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: transparent; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 6px; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 20px; height: 2px; background: var(--white); position: relative; transition: transform 0.2s; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }
.site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy-dark); padding: 8px 0 16px; }
.nav-open .site-nav { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 12px 20px; color: var(--white); text-decoration: none; font-family: var(--heading); font-size: 1.1rem; letter-spacing: 0.04em; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #8fdcf0; }
@media (min-width: 480px) { .brand span { display: inline; } }
@media (min-width: 980px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; position: static; background: none; padding: 0; margin-left: auto; }
  .site-nav ul { display: flex; gap: 4px; }
  .site-nav a { padding: 8px 12px; font-size: 1rem; border-bottom: 2px solid transparent; }
  .site-nav a[aria-current="page"] { color: var(--white); border-bottom-color: var(--teal); }
  .brand { margin-right: 0; }
  .site-header .btn-donate { margin-left: 12px; }
}

/* Sections */
.section { padding: 56px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 760px; margin-bottom: 32px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow { font-family: var(--heading); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.9rem; color: var(--teal-dark); margin-bottom: 8px; }
.lead { font-size: 1.15rem; color: var(--muted); }
@media (min-width: 768px) { .section { padding: 80px 0; } }

/* Page header (inner pages) */
.page-hero { background: linear-gradient(135deg, var(--navy) 0%, #0f4c8a 60%, var(--teal-dark) 100%); color: var(--white); padding: 56px 0 48px; }
.page-hero h1 { color: var(--white); margin-bottom: 0.3em; }
.page-hero p { color: rgba(255, 255, 255, 0.88); font-size: 1.15rem; max-width: 720px; margin: 0; }
.page-hero .eyebrow { color: #8fdcf0; }
.page-hero-image { position: relative; padding: 0; min-height: 320px; display: flex; align-items: flex-end; }
.page-hero-image > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(7, 40, 73, 0.92) 0%, rgba(7, 40, 73, 0.35) 70%, rgba(7, 40, 73, 0.2) 100%); }
.page-hero-image .container { position: relative; z-index: 1; padding-top: 120px; padding-bottom: 40px; }
@media (min-width: 768px) { .page-hero-image { min-height: 420px; } }

/* Home hero */
.hero { position: relative; color: var(--white); min-height: min(78vh, 720px); display: flex; align-items: center; overflow: hidden; background: var(--navy-dark); }
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 40, 73, 0.9) 0%, rgba(7, 40, 73, 0.65) 55%, rgba(7, 40, 73, 0.3) 100%); }
.hero .container { position: relative; z-index: 1; padding-top: 64px; padding-bottom: 64px; }
.hero h1 { color: var(--white); font-size: clamp(2.6rem, 8vw, 4.6rem); letter-spacing: 0.01em; margin-bottom: 0.25em; }
.hero p { font-size: clamp(1.1rem, 2.4vw, 1.3rem); max-width: 620px; color: rgba(255, 255, 255, 0.92); margin-bottom: 1.6em; }
.hero .eyebrow { color: #8fdcf0; }

/* Impact numbers */
.stats { background: var(--teal-dark); color: var(--white); padding: 40px 0; }
.stats-heading { color: var(--white); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.14em; text-align: center; margin-bottom: 24px; opacity: 0.9; }
.stats-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
.stat { text-align: center; display: flex; flex-direction: column; }
.stat-number { font-family: var(--heading); font-size: clamp(2.4rem, 7vw, 3.6rem); font-weight: 600; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.98rem; opacity: 0.92; }
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } .stat + .stat { border-left: 1px solid rgba(255, 255, 255, 0.3); } .stats { padding: 52px 0; } }

/* Cards and grids */
.grid { display: grid; gap: 24px; }
@media (min-width: 640px) { .grid-2, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: 0.2em; }
.card-meta { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.8em; }
.card-body p:last-child { margin-bottom: 0; }
a.card { color: inherit; text-decoration: none; }
a.card:hover img { transform: scale(1.04); }
a.card:hover h3 { color: var(--teal-dark); }
.card-link { margin-top: auto; padding-top: 12px; font-weight: 600; color: var(--teal-dark); }

/* Approach */
.approach-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
@media (min-width: 900px) { .approach-grid { grid-template-columns: repeat(3, 1fr); } }
.approach-card { background: var(--white); border-radius: var(--radius); border-top: 4px solid var(--teal); padding: 26px 24px; box-shadow: var(--shadow); }
.approach-card p { margin: 0; color: var(--muted); }
.approach-term { display: inline-block; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--green); margin-bottom: 8px; }

/* Events */
.event-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .event-grid { grid-template-columns: repeat(2, 1fr); } }
.event-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: grid; }
@media (min-width: 560px) { .event-card { grid-template-columns: 200px 1fr; } }
.event-flyer { display: block; background: var(--bg-soft); }
.event-flyer img { width: 100%; height: 100%; object-fit: cover; object-position: top; max-height: 340px; }
@media (min-width: 560px) { .event-flyer { align-self: start; padding: 16px 0 16px 16px; background: none; } .event-flyer img { max-height: none; height: auto; border-radius: 6px; } }
.event-body { padding: 22px 22px 26px; }
.event-date { font-weight: 700; color: var(--green); margin-bottom: 6px; }
.event-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 20px; font-size: 0.97rem; }
.event-facts dt { font-weight: 700; color: var(--navy); }
.event-facts dd { margin: 0; }

/* Call to action */
.cta { background: var(--navy); color: var(--white); padding: 56px 0; }
.cta h2 { color: var(--white); }
.cta p { color: rgba(255, 255, 255, 0.86); margin: 0; max-width: 640px; }
.cta-inner { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
@media (min-width: 768px) { .cta-inner { flex-direction: row; align-items: center; justify-content: space-between; } }

/* Trust strip */
.trust { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .trust { grid-template-columns: 1fr 1fr; } }
.trust-seal { display: flex; gap: 20px; align-items: center; }
.trust-seal img { width: 110px; flex-shrink: 0; }
.infographic { border-radius: var(--radius); box-shadow: var(--shadow); }

/* Split (text + image) */
.split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } }
.split img { border-radius: var(--radius); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--teal); }
.timeline > li { position: relative; padding: 0 0 28px 28px; }
.timeline > li::before { content: ""; position: absolute; left: -10px; top: 6px; width: 17px; height: 17px; border-radius: 50%; background: var(--white); border: 3px solid var(--teal); }
.timeline-year { font-family: var(--heading); font-size: 1.4rem; color: var(--navy); }
.timeline ul { margin: 4px 0 0; padding-left: 18px; color: var(--muted); }
.timeline ul li { margin-bottom: 4px; }

/* Criteria */
.criteria { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
@media (min-width: 640px) { .criteria { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .criteria { grid-template-columns: repeat(3, 1fr); } }
.criteria li { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.criteria h3 { font-size: 1.2rem; margin-bottom: 0.3em; }
.criteria p { margin: 0; color: var(--muted); }

/* Give */
.give-grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .give-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .give-grid { grid-template-columns: repeat(4, 1fr); } }
.give-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.give-card-action { margin-top: auto; padding-top: 20px; }
.give-card h3 { margin-bottom: 0.3em; }
.give-card p { margin: 0; }
.campaigns { display: grid; gap: 24px; }
@media (min-width: 768px) { .campaigns { grid-template-columns: 1fr 1fr; } }
.campaign { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; text-align: center; border-top: 4px solid var(--green); }
.campaign p { color: var(--muted); }

/* Contact */
.contact-grid { display: grid; gap: 24px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.3fr; } }
.contact-card { background: var(--bg-soft); border-radius: var(--radius); padding: 28px; }
.contact-card h2 { font-size: 1.6rem; }
.contact-card address { font-style: normal; margin-bottom: 1em; }
.map { width: 100%; min-height: 360px; border: 0; border-radius: var(--radius); }

/* Article (project pages) */
.article { font-size: 1.08rem; }
.article h2 { margin-top: 1.6em; font-size: 1.8rem; }
.article h2:first-child { margin-top: 0; }
.article blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--teal); color: var(--muted); font-style: italic; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 1.6em 0; }
@media (min-width: 768px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: var(--bg-soft); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery a:hover img { transform: scale(1.04); }
.project-logo { width: 96px; height: 96px; border-radius: 50%; background: var(--white); padding: 6px; margin-bottom: 16px; }

/* Footer */
.site-footer { background: var(--navy-dark); color: rgba(255, 255, 255, 0.82); font-size: 0.97rem; }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: #8fdcf0; }
.footer-grid { display: grid; gap: 36px; padding-top: 56px; padding-bottom: 40px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.brand-footer { margin-bottom: 14px; }
.brand-footer span { display: inline; }
.footer-about p { max-width: 380px; }
.footer-seal { display: inline-block; }
.footer-heading { color: var(--white); font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 14px; }
.footer-links, .footer-social { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a, .footer-social a { text-decoration: none; }
.footer-links a:hover, .footer-social a:hover { text-decoration: underline; }
.site-footer address { font-style: normal; margin-bottom: 16px; }
.footer-social { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 18px 0; font-size: 0.88rem; }
.footer-bottom p { margin: 0; }

/* Utilities */
.center { text-align: center; }
.mt-2 { margin-top: 24px; }
.muted { color: var(--muted); }
.gallery-wide { grid-template-columns: 1fr; }
@media (min-width: 768px) { .gallery-wide { grid-template-columns: repeat(2, 1fr); } }
.gallery-wide a { aspect-ratio: auto; }
.gallery-wide img { height: auto; }
.labs { margin: 1.6em 0; }
.labs .card { margin: 0; }
.event-ended { font-weight: 600; color: var(--muted); margin: 0; }

/* Growth charts (Impact page): last year in gray, this year in navy. Each card has its own
   zero-based scale; --h on each column is that year's value as a share of the card's larger value. */
.growth-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
@media (min-width: 768px) { .growth-grid { grid-template-columns: repeat(3, 1fr); } }
.growth-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px 20px; }
.growth-label { font-family: var(--body); font-size: 1.05rem; font-weight: 700; color: var(--navy); margin: 0 0 2px; }
.growth-delta { font-family: var(--heading); font-size: 1.6rem; font-weight: 500; color: var(--green); line-height: 1.2; margin: 0 0 18px; }
.growth-chart { display: flex; justify-content: center; align-items: flex-end; gap: 32px; height: 170px; border-bottom: 1px solid var(--line); margin-bottom: 48px; }
.growth-col { position: relative; width: 96px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.growth-bar { width: 24px; height: calc(var(--h) * 0.8); border-radius: 4px 4px 0 0; order: 2; }
.growth-bar.is-prev, .growth-key.is-prev { background: #7f8d9c; }
.growth-bar.is-now, .growth-key.is-now { background: var(--navy); }
.growth-cap { order: 1; font-size: 0.92rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.growth-year { position: absolute; top: 100%; margin-top: 8px; font-size: 0.82rem; line-height: 1.3; color: var(--muted); text-align: center; width: 100%; }
.growth-col::after { content: attr(data-tip); position: absolute; left: 50%; top: 0; transform: translate(-50%, -110%); background: var(--navy-dark); color: var(--white); font-size: 0.85rem; padding: 4px 8px; border-radius: 4px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.12s; }
.growth-col:hover::after { opacity: 1; }
.growth-legend { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 20px 0 0; font-size: 0.92rem; color: var(--muted); }
.growth-legend-item { display: inline-flex; align-items: center; gap: 8px; }
.growth-key { display: inline-block; width: 12px; height: 12px; border-radius: 2px; }
.growth-table { margin-top: 16px; }
.growth-table summary { cursor: pointer; color: var(--teal-dark); font-weight: 600; }
.growth-table table { width: 100%; max-width: 640px; border-collapse: collapse; margin-top: 12px; font-size: 0.97rem; }
.growth-table th, .growth-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.growth-table td { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.strategy-steps { padding-left: 1.2em; }
.strategy-steps li { margin-bottom: 6px; }
/* Growth cards on phones: one compact row per card (label and growth left, chart right). */
@media (max-width: 767px) {
  .growth-grid { gap: 12px; }
  .growth-card { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center; padding: 16px 16px 4px; }
  .growth-label { grid-column: 1; grid-row: 1; align-self: end; font-size: 0.98rem; }
  .growth-delta { grid-column: 1; grid-row: 2; align-self: start; font-size: 1.3rem; margin: 0; }
  .growth-chart { grid-column: 2; grid-row: 1 / span 2; height: 112px; gap: 10px; margin-bottom: 40px; }
  .growth-col { width: 58px; }
  .growth-cap { font-size: 0.8rem; margin-bottom: 4px; }
  .growth-year { font-size: 0.72rem; margin-top: 6px; }
}

/* Donation form panel (Home and Give): text on the left, Fundraise Up element on the right. */
.give-panel { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .give-panel { grid-template-columns: 1fr 1fr; gap: 56px; } }
.give-panel-text h2 { margin-bottom: 0.3em; }
.give-points { list-style: none; margin: 0; padding: 0; }
.give-points li { position: relative; padding-left: 28px; margin-bottom: 8px; }
.give-points li::before { content: "\2713"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 700; }
.give-panel-form { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 4px solid var(--green); padding: 28px; min-height: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.give-panel-label { font-family: var(--heading); font-size: 1.25rem; color: var(--navy); margin: 0 0 14px; text-align: center; }
/* Large green Donate buttons; the Fundraise Up launcher stays rendered but off-screen. */
.btn-lg { font-size: 1.25rem; padding: 16px 40px; }
.fu-launcher { position: absolute; left: -10000px; top: 0; width: 220px; height: 70px; overflow: hidden; }
