/* ==========================================================
   Give Era Foundation — Template 2 (photo-led)
   ========================================================== */

:root {
  --ink: #111a2e;
  --ink-soft: #505a6e;
  --bg: #fffaf2;
  --surface: #ffffff;
  --line: #ece4d6;

  --navy: #14213d;
  --navy-2: #1d2f55;
  --sun: #fcbf49;
  --sun-tint: #fff1d2;
  --coral: #e8553d;
  --coral-dark: #c8412b;
  --leaf: #2a9d8f;

  --radius: 16px;
  --radius-lg: 28px;
  --shadow: 0 2px 4px rgba(17, 26, 46, .05), 0 16px 40px rgba(17, 26, 46, .08);
  --max: 1200px;

  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--coral-dark); text-underline-offset: 3px; }
a:hover { color: var(--navy); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.08;
  margin: 0 0 .5em;
  font-weight: 700;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2.6rem, 6.5vw, 5rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h3 { font-size: 1.35rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.container { width: min(100% - 32px, var(--max)); margin-inline: auto; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

.highlight {
  background: linear-gradient(transparent 62%, var(--sun) 62%, var(--sun) 92%, transparent 92%);
  padding: 0 .08em;
}
.on-dark .highlight { background: none; color: var(--sun); padding: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .9rem 1.6rem; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-coral:hover { background: var(--coral-dark); color: #fff; }
.btn-sun { background: var(--sun); color: var(--navy); }
.btn-sun:hover { background: #f5ad22; color: var(--navy); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--navy); }
.btn-line { border-color: var(--navy); color: var(--navy); }
.btn-line:hover { background: var(--navy); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 250, 242, .94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; }
.brand {
  display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--navy);
  font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em;
}
.brand img { width: 40px; height: 40px; }
.brand span { line-height: 1; }
.brand small {
  display: block; font-family: var(--font-body); font-weight: 600; font-size: .68rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--coral); margin-top: .2rem;
}
.nav-links { display: flex; align-items: center; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: .5rem .9rem; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem;
}
.nav-links a:hover { background: var(--sun-tint); }
.nav-links a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--sun); border-radius: 0; }
.nav-links .btn { margin-left: .6rem; padding: .65rem 1.3rem; color: #fff; box-shadow: none; border-radius: 999px; }
.nav-links .btn:hover { background: var(--coral-dark); }
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; color: var(--ink); }
.nav-toggle svg { width: 28px; height: 28px; display: block; }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: .5rem 16px 1rem; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .85rem 1rem; border-radius: 10px; }
  .nav-links a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--sun); }
  .nav-links .btn { margin: .5rem 0 0; }
}

/* ---------- Sections ---------- */
section { padding: clamp(4rem, 9vw, 7rem) 0; }
.bg-navy { background: var(--navy); color: #fff; }
.bg-navy h2, .bg-navy h3 { color: #fff; }
.bg-navy p { color: rgba(255,255,255,.8); }
.bg-sun { background: var(--sun-tint); }

.kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--coral); margin-bottom: 1rem;
}
.kicker::before { content: ""; width: 28px; height: 3px; background: currentColor; border-radius: 2px; }
.bg-navy .kicker, .on-dark .kicker { color: var(--sun); }

.section-head { max-width: 720px; margin-bottom: 3rem; }
.section-head.center { text-align: center; margin-inline: auto; }
.section-head.center .kicker::after { content: ""; width: 28px; height: 3px; background: currentColor; border-radius: 2px; }
.lead { font-size: 1.2rem; color: var(--ink-soft); }
.bg-navy .lead, .on-dark .lead { color: rgba(255,255,255,.85); }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; min-height: min(88vh, 820px);
  display: flex; align-items: flex-end;
  padding: 0; color: #fff; overflow: hidden; isolation: isolate;
}
.hero > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%;
  z-index: -2;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(20,33,61,.92) 0%, rgba(20,33,61,.7) 45%, rgba(20,33,61,.15) 100%),
    linear-gradient(0deg, rgba(20,33,61,.7) 0%, transparent 40%);
}
.hero-inner { padding: clamp(6rem, 14vw, 10rem) 0 clamp(3rem, 7vw, 5rem); max-width: 760px; }
.hero h1 { color: #fff; }
.hero .lead { color: rgba(255,255,255,.88); max-width: 580px; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-caption {
  position: absolute; right: 16px; bottom: 16px; font-size: .78rem; color: rgba(255,255,255,.7);
  background: rgba(20,33,61,.5); padding: .3rem .7rem; border-radius: 999px;
}

/* Region ribbon */
.ribbon { background: var(--navy); color: #fff; padding: 1.1rem 0; overflow: hidden; }
.ribbon-track {
  display: flex; gap: 2.5rem; white-space: nowrap; width: max-content;
  animation: marquee 40s linear infinite;
  font-family: var(--font-head); font-weight: 700; font-size: 1.15rem;
}
.ribbon-track span { display: inline-flex; align-items: center; gap: 2.5rem; }
.ribbon-track span::after { content: "✦"; color: var(--sun); font-size: .9rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Page hero (interior) */
.page-hero {
  position: relative; color: #fff; isolation: isolate; overflow: hidden;
  padding: clamp(6rem, 14vw, 9rem) 0 clamp(3.5rem, 7vw, 5rem);
}
.page-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(20,33,61,.93) 0%, rgba(20,33,61,.72) 55%, rgba(20,33,61,.35) 100%);
}
.page-hero h1 { color: #fff; font-size: clamp(2.4rem, 5.5vw, 4.2rem); max-width: 820px; }
.page-hero .lead { color: rgba(255,255,255,.88); max-width: 640px; margin: 0; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 880px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .grid-4 { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }

/* ---------- Photo cards ---------- */
.photo-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.photo-card figure { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; }
.photo-card figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.photo-card:hover figure img { transform: scale(1.05); }
.photo-card .body { padding: 1.6rem 1.75rem 1.9rem; flex: 1; display: flex; flex-direction: column; }
.photo-card .body p { color: var(--ink-soft); }
.photo-card .tag {
  position: absolute; top: 1rem; left: 1rem;
  background: var(--sun); color: var(--navy);
  font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  padding: .35rem .8rem; border-radius: 999px;
}
.more { margin-top: auto; font-weight: 700; text-decoration: none; color: var(--navy); }
.more::after { content: " →"; color: var(--coral); }

/* Mosaic */
.mosaic {
  display: grid; gap: 12px;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 180px;
  grid-auto-flow: dense;
}
.mosaic figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--line); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.mosaic figure:hover img { transform: scale(1.05); }
.mosaic figcaption {
  position: absolute; left: 10px; bottom: 10px;
  background: rgba(20,33,61,.8); color: #fff;
  font-size: .78rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px;
  display: inline-flex; align-items: center; gap: .35rem;
}
.mosaic figcaption::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sun); }
.mosaic .tall { grid-row: span 2; }
.mosaic .wide { grid-column: span 2; }
.mosaic .big { grid-column: span 2; grid-row: span 2; }
.mosaic figure.hidden { display: none; }
@media (max-width: 880px) {
  .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
}

/* Filter tabs */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 2rem; }
.filters button {
  font: inherit; font-weight: 700; font-size: .95rem;
  padding: .6rem 1.2rem; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink);
}
.filters button:hover { border-color: var(--navy); }
.filters button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Framed photo */
.framed { position: relative; }
.framed img { border-radius: var(--radius-lg); width: 100%; aspect-ratio: 4 / 3.3; object-fit: cover; box-shadow: var(--shadow); }
.framed::before {
  content: ""; position: absolute; inset: auto -18px -18px auto; width: 70%; height: 70%;
  border-radius: var(--radius-lg); background: var(--sun); z-index: -1;
}
.framed.coral::before { background: var(--coral); inset: -18px auto auto -18px; }
.framed .stamp {
  position: absolute; left: -12px; bottom: 28px;
  background: var(--navy); color: #fff; border-radius: 14px; padding: .8rem 1.1rem;
  font-weight: 700; font-size: .92rem; box-shadow: var(--shadow);
}
.framed .stamp small { display: block; color: var(--sun); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
@media (max-width: 880px) { .framed .stamp { left: 12px; } }

.stack { isolation: isolate; }

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 0 0 1.75rem; }
.checklist li { position: relative; padding-left: 2.1rem; margin-bottom: .8rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: var(--coral) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 62% no-repeat;
}
.bg-navy .checklist li::before { background-color: var(--sun); }

/* Region feature */
.region {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; min-height: 460px;
  display: flex; align-items: flex-end; color: #fff; isolation: isolate;
}
.region img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s ease; }
.region:hover img { transform: scale(1.04); }
.region::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(20,33,61,.95) 0%, rgba(20,33,61,.3) 60%, transparent 100%); }
.region .body { padding: 2rem; }
.region h3 { color: #fff; font-size: 2rem; margin-bottom: .35rem; }
.region p { color: rgba(255,255,255,.88); margin-bottom: 0; }

/* Quote */
.quote { text-align: center; max-width: 880px; margin-inline: auto; }
.quote blockquote {
  margin: 0 0 1.25rem; font-family: var(--font-head); font-weight: 600;
  font-size: clamp(1.6rem, 3.4vw, 2.5rem); line-height: 1.25; letter-spacing: -.015em;
}
.quote blockquote::before { content: "“"; display: block; font-size: 4.5rem; line-height: .6; color: var(--sun); margin-bottom: .75rem; }
.quote cite { font-style: normal; font-weight: 600; color: var(--sun); }

/* Steps */
.steps { counter-reset: step; }
.step { background: var(--surface); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow); position: relative; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--sun); color: var(--navy); font-family: var(--font-head); font-weight: 800; margin-bottom: 1.1rem;
}
.step p { color: var(--ink-soft); margin: 0; }

/* CTA with photo */
.cta-photo {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; color: #fff; isolation: isolate;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 5vw, 4.5rem);
}
.cta-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.cta-photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(232,85,61,.95) 0%, rgba(232,85,61,.82) 50%, rgba(20,33,61,.4) 100%); }
.cta-photo h2 { color: #fff; max-width: 620px; }
.cta-photo p { color: rgba(255,255,255,.92); max-width: 540px; font-size: 1.15rem; margin-bottom: 1.75rem; }
.cta-photo .actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.cta-photo .btn-navy:hover { background: #fff; color: var(--navy); }

/* Program rows */
.program { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding: 3rem 0; }
.program + .program { border-top: 1px solid var(--line); }
.program.flip .framed { order: 2; }
.program .pill {
  display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  padding: .35rem .85rem; border-radius: 999px; background: var(--sun-tint); color: var(--coral-dark); margin-bottom: 1rem;
}
@media (max-width: 880px) {
  .program { grid-template-columns: 1fr; }
  .program.flip .framed { order: 0; }
}

/* Cards (plain) */
.card { background: var(--surface); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow); }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--ink-soft); }
.icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--sun-tint); color: var(--coral); margin-bottom: 1.2rem; flex: none; }
.icon svg { width: 28px; height: 28px; }

/* Team */
.person { text-align: center; }
.avatar {
  width: 112px; height: 112px; border-radius: 50%; margin: 0 auto 1rem; display: grid; place-items: center;
  background: var(--navy); color: var(--sun); font-family: var(--font-head); font-size: 2rem; font-weight: 800;
}
.person .role { color: var(--ink-soft); font-size: .95rem; }

/* ---------- Donate ---------- */
.toggle { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--sun-tint); margin-bottom: 1.5rem; }
.toggle button { border: 0; background: transparent; padding: .6rem 1.3rem; border-radius: 999px; font: inherit; font-weight: 700; color: var(--navy); cursor: pointer; }
.toggle button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-bottom: 1rem; }
.amounts button {
  border: 2px solid var(--line); background: var(--surface); border-radius: var(--radius);
  padding: 1rem .5rem; font: inherit; font-weight: 800; font-size: 1.15rem; color: var(--ink); cursor: pointer;
}
.amounts button:hover { border-color: var(--navy); }
.amounts button[aria-pressed="true"] { border-color: var(--coral); background: #fdeae6; color: var(--coral-dark); }
.impact-note { background: var(--sun-tint); border-radius: var(--radius); padding: 1rem 1.25rem; font-size: .98rem; margin: 1rem 0 1.5rem; min-height: 3.5rem; }

/* ---------- Forms ---------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 1.1rem; }
label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: .4rem; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 12px; padding: .85rem 1rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px var(--sun-tint); }
textarea { min-height: 150px; resize: vertical; }
.form-status { margin-top: 1rem; font-weight: 700; color: var(--leaf); }

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; }
.contact-list strong { display: block; }

details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.4rem; margin-bottom: .75rem; }
summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--coral); }
details[open] summary::after { content: "–"; }
details p { margin: .75rem 0 0; color: var(--ink-soft); }

/* Credits */
.credits { width: 100%; border-collapse: collapse; font-size: .95rem; }
.credits th, .credits td { text-align: left; padding: .8rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.credits th { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.credits img { width: 88px; height: 60px; object-fit: cover; border-radius: 8px; }
.table-wrap { overflow-x: auto; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.75); padding: 4.5rem 0 2rem; font-size: .96rem; }
.site-footer a { color: rgba(255,255,255,.88); text-decoration: none; }
.site-footer a:hover { color: var(--sun); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2rem; }
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand { color: #fff; margin-bottom: 1rem; }
.site-footer h4 { font-family: var(--font-body); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--sun); margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 3rem; padding-top: 1.5rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .88rem;
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.muted { color: var(--ink-soft); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ribbon-track { animation: none; }
  .btn:hover { transform: none; }
  .photo-card:hover figure img, .mosaic figure:hover img, .region:hover img { transform: none; }
}
