/* The Edward Foundation — site styles */

:root {
  /* palette: taken from the dove logo, plus a marigold for giving */
  --cobalt: #1b5fad;
  --cobalt-deep: #134a8a;
  --navy: #0c2340;
  --ink: #16263d;
  --muted: #4a5b72;
  --white: #ffffff;
  --mist: #eef4fb;
  --sky: #d7e6f7;
  --marigold: #f6b91a;
  --marigold-deep: #e0a300;
  --line: #d9e3ef;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;

  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;

  --shadow-card: 0 18px 40px -18px rgba(12, 35, 64, 0.35);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--cobalt); text-underline-offset: 3px; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.08;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.9rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 750; }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 60ch; }

:focus-visible { outline: 3px solid var(--marigold); outline-offset: 3px; border-radius: 6px; }
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: var(--r-sm);
}
.skip:focus { top: 16px; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* placeholder marker so unfinished details are easy to spot */
.ph {
  background: #fff3c4; color: #6b4a00; border: 1px dashed #d79d00;
  padding: 0 6px; border-radius: 6px; font-weight: 600;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px;
  border-radius: var(--r-pill); border: 2px solid transparent;
  font: 700 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
  touch-action: manipulation;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-give { background: var(--marigold); color: var(--navy); }
.btn-give:hover { background: var(--marigold-deep); }
.btn-blue { background: var(--cobalt); color: var(--white); }
.btn-blue:hover { background: var(--cobalt-deep); }
.btn-ghost { border-color: var(--line); color: var(--navy); background: var(--white); }
.btn-ghost:hover { border-color: var(--cobalt); color: var(--cobalt); }
.btn-ghost-light { border-color: rgba(255,255,255,.4); color: var(--white); }
.btn-ghost-light:hover { border-color: var(--white); }

/* ---------- header: floating pill ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding: 14px var(--gutter) 0;
}
.nav-pill {
  max-width: var(--wrap); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 8px 8px 8px 14px;
  box-shadow: 0 10px 30px -20px rgba(12,35,64,.5);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand img { width: 44px; height: 44px; }
.brand span { font-family: var(--font-display); font-weight: 800; font-size: 1.08rem; line-height: 1.05; letter-spacing: -0.01em; }
.brand small { display: block; font-weight: 600; font-size: .78rem; color: var(--cobalt); letter-spacing: 0; }

.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 10px 18px; border-radius: var(--r-pill);
  color: var(--ink); text-decoration: none; font-weight: 600;
  transition: background-color .2s ease, color .2s ease;
}
.nav-links a:hover { background: var(--mist); color: var(--cobalt); }
.nav-links a[aria-current="page"] { background: var(--navy); color: var(--white); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.menu-btn {
  display: none; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--white); color: var(--navy); cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-btn svg { width: 22px; height: 22px; }

@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .nav-links {
    position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% + 8px);
    flex-direction: column; gap: 2px;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: 10px; box-shadow: var(--shadow-card);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { padding: 14px 18px; font-size: 1.1rem; }
  .brand span { font-size: 1rem; }
}
@media (max-width: 420px) {
  .brand span { display: none; }
  .nav-actions .btn-give { padding-inline: 16px; }
}

/* ---------- home hero ---------- */
/* deep blue panel runs up behind the floating nav and stops part-way down the photo cards */
.hero {
  margin-top: -90px; padding: calc(90px + clamp(48px, 7vw, 92px)) 0 0;
  text-align: center; position: relative; isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0 0 clamp(200px, 20vw, 270px); z-index: -1;
  border-radius: 0 0 clamp(28px, 4vw, 56px) clamp(28px, 4vw, 56px);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 44px),
    radial-gradient(70% 60% at 50% 0%, rgba(62,159,242,.35), transparent 70%),
    linear-gradient(180deg, var(--navy) 0%, var(--cobalt-deep) 100%);
}
.hero h1 { max-width: 15ch; margin-inline: auto; color: var(--white); }
.hero .lede { color: #cfdcf0; }
.hero h1 .underline {
  background-image: linear-gradient(var(--marigold), var(--marigold));
  background-size: 100% .16em; background-position: 0 92%; background-repeat: no-repeat;
}
.hero .lede { margin: 0 auto 32px; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* photo strip: the "proof" cards */
.proof {
  display: grid; grid-template-columns: 1fr .82fr 1.15fr .82fr 1fr;
  align-items: end; gap: clamp(10px, 1.6vw, 22px);
  margin-top: clamp(48px, 7vw, 84px);
  padding-bottom: clamp(56px, 8vw, 100px);
  text-align: left;
}
.proof > * { border-radius: var(--r-lg); overflow: hidden; }
.proof figure { margin: 0; position: relative; box-shadow: var(--shadow-card); background: var(--sky); }
.proof figure img { width: 100%; height: 100%; object-fit: cover; }
.proof .p1 { aspect-ratio: 3/4; transform: translateY(-36px); }
.proof .p3 { aspect-ratio: 4/5; }
.proof .p5 { aspect-ratio: 3/4; transform: translateY(-36px); }
.proof figcaption {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  background: rgba(255,255,255,.94); color: var(--navy);
  border-radius: var(--r-md); padding: 10px 14px; font-size: .9rem; font-weight: 600; line-height: 1.35;
}
.tile {
  padding: clamp(18px, 2vw, 26px); display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  min-height: 260px;
}
.tile .big { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.3rem, 1.9vw, 1.75rem); line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 8px; }
.tile p { margin: 0; font-size: .95rem; line-height: 1.45; }
.tile svg { width: 34px; height: 34px; }
.tile-gold { background: var(--marigold); color: var(--navy); transform: translateY(-110px); }
.tile-white { background: var(--white); color: var(--navy); transform: translateY(-80px); box-shadow: var(--shadow-card); }
.tile-white svg, .tile-white .big { color: var(--cobalt); }

@media (max-width: 900px) {
  .proof { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .proof > * { transform: none !important; }
  .proof .p3 { grid-column: 1 / -1; aspect-ratio: 16/10; order: -1; }
  .proof .p1, .proof .p5 { aspect-ratio: auto; min-height: 220px; }
  .tile { min-height: 0; }
}

/* ---------- sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-mist { background: var(--mist); }
.section-navy { background: var(--navy); color: #d6e2f1; }
.section-navy h2, .section-navy h3 { color: var(--white); }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.reverse > :first-child { order: 0; } }

.photo-stack { position: relative; padding: 0 0 48px 48px; }
.photo-stack img { border-radius: var(--r-lg); box-shadow: var(--shadow-card); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.photo-stack img + img {
  position: absolute; left: 0; bottom: 0; width: 46%; aspect-ratio: 1;
  border: 6px solid var(--white);
}
.section-mist .photo-stack img + img { border-color: var(--mist); }

.pull {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  line-height: 1.25; color: var(--cobalt); border-left: 4px solid var(--marigold);
  padding-left: 20px; margin: 28px 0;
}

/* journey: a real sequence, so numbered */
.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.journey li {
  counter-increment: step; position: relative;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--r-lg); padding: 28px 24px;
}
.journey li::before {
  content: counter(step);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--marigold); color: var(--navy);
  font: 800 1.15rem/1 var(--font-display); margin-bottom: 18px;
}
.journey h3 { font-size: 1.25rem; margin-bottom: 8px; }
.journey p { margin: 0; font-size: .98rem; }
@media (max-width: 960px) { .journey { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .journey { grid-template-columns: 1fr; } }

/* project cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }
.card {
  display: flex; flex-direction: column; background: var(--white);
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line);
  text-decoration: none; color: inherit;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.card:hover { border-color: var(--cobalt); box-shadow: var(--shadow-card); }
.card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body p { color: var(--muted); margin: 0; }
.card-link { margin-top: auto; padding-top: 14px; font-weight: 700; color: var(--cobalt); display: inline-flex; align-items: center; gap: 6px; }
.card-link svg { width: 18px; height: 18px; transition: transform .2s ease; }
.card:hover .card-link svg { transform: translateX(3px); }

/* big give band */
.give-band {
  position: relative; overflow: hidden;
  background: var(--cobalt); color: var(--white);
  border-radius: clamp(24px, 3vw, 40px);
  padding: clamp(40px, 7vw, 88px) clamp(24px, 6vw, 80px);
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center;
}
.give-band h2 { color: var(--white); }
.give-band p { color: #dce8f7; max-width: 52ch; }
.give-band .dove {
  position: absolute; right: -60px; bottom: -80px; width: 360px; opacity: .1;
  filter: brightness(0) invert(1); pointer-events: none;
}
.give-band .actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; position: relative; }
@media (max-width: 800px) { .give-band { grid-template-columns: 1fr; } }

/* ---------- inner page hero ---------- */
.page-hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 64px); text-align: center; position: relative; }
.page-hero::before {
  content: ""; position: absolute; inset: -120px 0 auto; height: 560px; z-index: -1;
  background: radial-gradient(55% 60% at 50% 30%, var(--mist), rgba(238,244,251,0) 70%);
}
.page-hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); max-width: 18ch; margin-inline: auto; }
.page-hero .lede { margin-inline: auto; }
.crumb { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--r-pill); background: var(--white); border: 1px solid var(--line); font-weight: 600; font-size: .9rem; color: var(--cobalt); margin-bottom: 20px; }
.crumb img { width: 20px; height: 20px; }

/* ---------- projects page ---------- */
.project { padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--line); }
.project:first-of-type { border-top: 0; }
.project-photos { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; aspect-ratio: 5/4; }
.project-photos img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-md); }
.project-photos img:first-child { grid-row: 1 / -1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 20px 0 0; }
.chips li { background: var(--mist); color: var(--navy); border-radius: var(--r-pill); padding: 6px 14px; font-weight: 600; font-size: .92rem; }

.gallery { columns: 4 240px; column-gap: 14px; }
.gallery button {
  display: block; width: 100%; margin: 0 0 14px; padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: var(--r-md); overflow: hidden; break-inside: avoid;
}
.gallery img { width: 100%; transition: transform .35s ease; }
.gallery button:hover img { transform: scale(1.04); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 92vh; }
.lightbox::backdrop { background: rgba(8, 22, 42, .88); }
.lightbox img { max-height: 86vh; width: auto; margin: auto; border-radius: var(--r-md); }
.lightbox-close {
  position: fixed; top: 16px; right: 16px; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: var(--white); color: var(--navy); cursor: pointer; display: grid; place-items: center;
}
.lightbox-close svg { width: 22px; height: 22px; }

/* ---------- about page ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .values { grid-template-columns: 1fr; } }
.value { background: var(--white); border-radius: var(--r-lg); padding: 30px 28px; border: 1px solid var(--line); }
.value .icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--mist); color: var(--cobalt); margin-bottom: 18px; }
.value .icon svg { width: 26px; height: 26px; }
.value p { color: var(--muted); margin: 0; }
.prose { max-width: 66ch; }
.prose p { font-size: 1.1rem; }

/* ---------- forms (contact + donate) ---------- */
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow-card); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label, .legend { font-weight: 700; color: var(--navy); font-size: .98rem; }
.field .hint { font-size: .88rem; color: var(--muted); }
.field input, .field textarea, .field select {
  font: inherit; color: var(--ink); background: var(--white);
  border: 1.5px solid #b9c8da; border-radius: var(--r-sm);
  padding: 12px 14px; min-height: 48px; width: 100%;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 4px rgba(27,95,173,.18); }
.field [aria-invalid="true"] { border-color: #c0392b; }
.error { color: #b02a1e; font-size: .9rem; font-weight: 600; min-height: 0; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; } }
.req { color: #b02a1e; }

.notice { border-radius: var(--r-md); padding: 16px 18px; font-weight: 600; margin-top: 16px; }
.notice[hidden] { display: none; }
.notice-ok { background: #e6f5ec; color: #155c34; border: 1px solid #a9dcbc; }
.notice-info { background: #fff6dc; color: #6b4a00; border: 1px solid #f1d27a; }

.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; }
.contact-list .icon { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--mist); color: var(--cobalt); display: grid; place-items: center; }
.contact-list .icon svg { width: 22px; height: 22px; }
.contact-list strong { display: block; color: var(--navy); }

/* donate selector */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--mist); padding: 6px; border-radius: var(--r-pill); margin-bottom: 22px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; text-align: center; padding: 12px; border-radius: var(--r-pill); font-weight: 700; color: var(--muted); transition: background-color .2s ease, color .2s ease; }
.seg input:checked + span { background: var(--white); color: var(--navy); box-shadow: 0 4px 12px -6px rgba(12,35,64,.4); }
.seg input:focus-visible + span { outline: 3px solid var(--marigold); outline-offset: 2px; }

.amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
@media (max-width: 480px) { .amounts { grid-template-columns: 1fr 1fr; } }
.amounts label { position: relative; }
.amounts input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.amounts span {
  display: grid; place-items: center; min-height: 64px; border-radius: var(--r-md);
  border: 2px solid var(--line); font: 800 1.35rem/1 var(--font-display); color: var(--navy);
  transition: border-color .2s ease, background-color .2s ease;
}
.amounts input:hover + span { border-color: var(--cobalt); }
.amounts input:checked + span { border-color: var(--cobalt); background: var(--cobalt); color: var(--white); }
.amounts input:focus-visible + span { outline: 3px solid var(--marigold); outline-offset: 2px; }
.other-amount { position: relative; }
.other-amount .cur { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 700; color: var(--muted); }
.other-amount input { padding-left: 30px; }
.give-summary { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--navy); margin: 8px 0 18px; }
.btn-wide { width: 100%; min-height: 56px; font-size: 1.08rem; }

.side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.side-list li { display: flex; gap: 14px; }
.side-list svg { flex: none; width: 24px; height: 24px; color: var(--cobalt); margin-top: 2px; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: #b9c9de; padding: clamp(56px, 7vw, 88px) 0 32px; margin-top: clamp(64px, 9vw, 120px); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand img { width: 150px; filter: brightness(0) invert(1); margin-bottom: 18px; }
.footer-brand p { max-width: 40ch; }
.site-footer h4 { color: var(--white); font-size: 1.05rem; margin-bottom: 14px; letter-spacing: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: #dfe8f4; text-decoration: none; }
.site-footer a:hover { color: var(--marigold); text-decoration: underline; }
.footer-base { border-top: 1px solid rgba(255,255,255,.12); margin-top: 48px; padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .92rem; }
.site-footer .ph { font-size: .85em; }

/* ---------- one orchestrated entrance on the home hero ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .lede, .hero-ctas { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .hero .lede { animation-delay: .08s; }
  .hero-ctas { animation-delay: .16s; }
  .proof > * { animation: deal .8s cubic-bezier(.2,.7,.2,1) both; }
  .proof > :nth-child(1) { animation-delay: .25s; }
  .proof > :nth-child(2) { animation-delay: .32s; }
  .proof > :nth-child(3) { animation-delay: .39s; }
  .proof > :nth-child(4) { animation-delay: .46s; }
  .proof > :nth-child(5) { animation-delay: .53s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes deal { from { opacity: 0; translate: 0 40px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; scroll-behavior: auto !important; }
}
