/* ============================================================
   PRIORITY FIVE INITIATIVE — Design Tokens
   Five interconnected thematic areas, one shared strategy.
   Signature motif: the fan of five wedges wrapped around a
   shared globe, echoing PFI's mark.
   ============================================================ */

:root {
  /* Brand palette — extracted from the PFI mark:
     blue (refugees/youth wedges), green (climate wedge),
     indigo (AI + education wedges), white, near-black ink */
  --blue: #1E7FE0;
  --blue-deep: #0D47A1;
  --green: #43A047;
  --green-deep: #1B5E20;
  --indigo: #2C3A9E;
  --indigo-deep: #1A237E;
  --indigo-light: #8C97E8;

  /* Neutrals */
  --ink: #12213B;
  --ink-soft: #3C4A63;
  --cloud: #FAFAF8;
  --mist: #EFF3F6;
  --white: #FFFFFF;
  --line: #E1E6EA;

  /* Type */
  --font-display: 'Montserrat', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  /* Rhythm */
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --shadow-soft: 0 10px 30px rgba(18, 33, 59, 0.08);
  --shadow-hover: 0 18px 40px rgba(18, 33, 59, 0.14);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cloud);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-weight: 800; }
h2 { font-weight: 700; }
h3 { font-weight: 700; }

p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: inherit; text-decoration: none; }

img, svg { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-deep);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 20px;
  height: 3px;
  border-radius: 4px;
  background: var(--indigo);
  display: inline-block;
}

section { position: relative; }
.section-pad { padding: 96px 0; }
@media (max-width: 720px) { .section-pad { padding: 64px 0; } }

.section-alt { background: var(--mist); }

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 3px solid var(--indigo-light);
  outline-offset: 3px;
}
.btn-primary {
  background: var(--blue-deep);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(13, 71, 161, 0.32);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(13, 71, 161, 0.42); background: #0A3980; }

.btn-outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}
.btn-outline:hover { background: var(--white); color: var(--blue-deep); transform: translateY(-3px); }

.btn-outline-dark {
  background: transparent;
  border-color: var(--blue);
  color: var(--blue);
}
.btn-outline-dark:hover { background: var(--blue); color: var(--white); transform: translateY(-3px); }

.btn-green { background: var(--green); color: var(--white); box-shadow: 0 8px 20px rgba(46,125,50,0.3); }
.btn-green:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(46,125,50,0.4); }

.btn-block { width: 100%; }

/* -------------------- Nav -------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--container);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
}
.brand .mark { width: 54px; height: 54px; flex-shrink: 0; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-weight: 600;
  font-size: 0.96rem;
}
.nav-links a {
  position: relative;
  padding: 6px 0;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0%;
  height: 3px;
  border-radius: 3px;
  background: var(--indigo);
  transition: width 0.25s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-cta .btn { padding: 11px 22px; font-size: 0.92rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 26px; height: 3px; background: var(--ink); border-radius: 3px; transition: 0.25s; }

@media (max-width: 900px) {
  .nav-links { position: fixed; top: 68px; left: 0; right: 0; background: var(--white);
    flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 24px 20px;
    border-bottom: 1px solid var(--line); transform: translateY(-130%); opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease; box-shadow: var(--shadow-soft); }
  .nav-links.open { transform: translateY(0); opacity: 1; }
  .nav-links li { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}

/* -------------------- Hero -------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--cloud) 0%, var(--white) 100%);
  color: var(--ink);
  padding: 76px 0 100px;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--indigo-deep); margin-bottom: 20px;
}
.hero h1 {
  color: var(--ink);
  font-size: clamp(2.2rem, 4vw, 3.3rem);
  margin-bottom: 22px;
}
.hero p.lead {
  color: var(--ink-soft);
  font-size: 1.12rem;
  max-width: 520px;
  margin-bottom: 34px;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

/* Hero photo — large image, left column, organic backdrop */
.hero-photo {
  position: relative;
}
.hero-photo::before {
  content: "";
  position: absolute;
  inset: -22px -18px auto auto;
  width: 78%;
  height: 88%;
  background: linear-gradient(135deg, var(--blue) 0%, var(--green) 55%, var(--indigo) 100%);
  border-radius: 42% 58% 61% 39% / 45% 40% 60% 55%;
  opacity: 0.16;
  z-index: 0;
}
.hero-photo-frame {
  position: relative;
  z-index: 1;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  aspect-ratio: 4 / 4.2;
  max-height: 560px;
}
@media (max-width: 900px) {
  .hero-photo-frame { aspect-ratio: 16/11; max-height: 420px; }
}
.hero-photo-frame img,
.hero-photo-frame svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-photo-caption {
  position: absolute;
  left: 20px; bottom: 20px;
  z-index: 2;
  background: rgba(18, 33, 59, 0.72);
  backdrop-filter: blur(6px);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
}

/* parallax layers inside hero illustration */
.parallax-layer { transition: transform 0.1s linear; will-change: transform; }

/* -------------------- Priority Fan (signature motif) -------------------- */
.trail-wrap {
  position: relative;
  padding: 60px 0 10px;
}
.trail-svg { width: 100%; height: auto; display: block; }
.trail-dot { transition: transform 0.4s ease; transform-origin: center; }

/* Five thematic-area cards arranged in the fan grid */
.trail-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
  z-index: 2;
}
.trail-track .card:nth-child(2) { transform: translateY(38px); }
.trail-track .card:nth-child(3) { transform: translateY(-6px); }
.trail-track .card:nth-child(4) { transform: translateY(-6px); }
.trail-track .card:nth-child(5) { transform: translateY(38px); }

@media (max-width: 1100px) {
  .trail-track { grid-template-columns: repeat(2, 1fr); }
  .trail-track .card:nth-child(2), .trail-track .card:nth-child(3),
  .trail-track .card:nth-child(4), .trail-track .card:nth-child(5) { transform: none; }
}
@media (max-width: 620px) {
  .trail-track { grid-template-columns: 1fr; }
}

/* -------------------- Cards -------------------- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 38px 32px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }

.card-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
}
.icon-blue { background: rgba(30, 127, 224, 0.1); }
.icon-green { background: rgba(67, 160, 71, 0.1); }
.icon-indigo { background: rgba(44, 58, 158, 0.12); }

.card h3 { margin-bottom: 10px; }
.card .card-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; margin-top: 10px;
  transition: gap 0.2s ease;
}
.card .card-link:hover { gap: 10px; }
.card-link.c-blue { color: var(--blue); }
.card-link.c-green { color: var(--green); }
.card-link.c-indigo { color: var(--indigo-deep); }

/* -------------------- About -------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } }

.pillar-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.pillar-list li { display: flex; gap: 14px; align-items: flex-start; font-weight: 600; color: var(--ink); }
.pillar-list .dot {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
}

/* -------------------- Stats -------------------- */
.stats-section { background: var(--ink); color: var(--white); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  text-align: center;
}
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
.stat .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  color: var(--indigo-light);
  line-height: 1;
}
.stat .label { margin-top: 10px; font-size: 0.92rem; color: rgba(255,255,255,0.75); font-weight: 600; }

/* -------------------- Testimonials -------------------- */
.testi-wrap { max-width: 760px; margin: 0 auto; text-align: center; position: relative; }
.testi-slide { display: none; animation: fadeIn 0.5s ease; }
.testi-slide.active { display: block; }
.testi-quote { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; color: var(--ink); line-height: 1.5; }
.testi-person { margin-top: 22px; font-weight: 700; color: var(--blue-deep); }
.testi-role { color: var(--ink-soft); font-size: 0.92rem; }
.testi-dots { display: flex; justify-content: center; gap: 10px; margin-top: 30px; }
.testi-dots button {
  width: 10px; height: 10px; border-radius: 50%; border: none; background: var(--line);
  cursor: pointer; transition: background 0.2s ease, transform 0.2s ease;
}
.testi-dots button.active { background: var(--indigo); transform: scale(1.3); }

/* -------------------- CTA band -------------------- */
.cta-band {
  background: linear-gradient(120deg, var(--green-deep), var(--green) 60%, #388E3C);
  color: var(--white);
  text-align: center;
  padding: 90px 0;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { color: var(--white); font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.cta-band-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* -------------------- Footer -------------------- */
.footer { background: var(--ink); color: rgba(255,255,255,0.82); padding: 70px 0 30px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; color: var(--white); font-size: 1.1rem; margin-bottom: 14px; }
.footer h4 { color: var(--white); font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 18px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.footer a { color: rgba(255,255,255,0.75); transition: color 0.2s ease; }
.footer a:hover { color: var(--indigo-light); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; flex-wrap: wrap; gap: 14px; font-size: 0.88rem; color: rgba(255,255,255,0.6); }
.socials { display: flex; gap: 12px; }
.socials a {
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center; transition: background 0.2s ease, transform 0.2s ease;
}
.socials a:hover { background: var(--indigo); transform: translateY(-3px); }
.socials svg { width: 17px; height: 17px; }

.newsletter-inline { display: flex; gap: 10px; margin-top: 14px; }
.newsletter-inline input {
  flex: 1; padding: 12px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06); color: var(--white); font-family: var(--font-body);
}
.newsletter-inline input::placeholder { color: rgba(255,255,255,0.5); }
.newsletter-inline button {
  border-radius: 999px; border: none; background: var(--indigo-light); color: var(--indigo-deep);
  font-weight: 700; padding: 0 20px; cursor: pointer; transition: transform 0.2s ease;
}
.newsletter-inline button:hover { transform: translateY(-2px); }

/* -------------------- Page hero (inner pages) -------------------- */
.page-hero {
  padding: 70px 0 60px;
  background: linear-gradient(120deg, var(--blue-deep), var(--blue));
  color: var(--white);
  text-align: left;
}
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 3.6vw, 2.9rem); }
.breadcrumb { font-size: 0.85rem; color: rgba(255,255,255,0.7); margin-bottom: 16px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }

/* -------------------- Programs page -------------------- */
.program-block { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; padding: 90px 0; }
.program-block.reverse { direction: rtl; }
.program-block.reverse > * { direction: ltr; }
@media (max-width: 900px) {
  .program-block { grid-template-columns: 1fr; padding: 60px 0; }
  .program-block.reverse { direction: ltr; }
}
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 26px; }
.tag {
  padding: 8px 16px; border-radius: 999px; font-size: 0.85rem; font-weight: 700;
  background: var(--mist); color: var(--ink-soft);
}
.gallery-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 28px; }
@media (max-width: 760px) { .gallery-strip { grid-template-columns: repeat(2, 1fr); } }
.gallery-item { border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 1/1; }

/* Process flow */
.process-flow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 50px; }
.process-step { flex: 1; min-width: 150px; text-align: center; }
.process-badge {
  width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--white);
}
.process-arrow { color: var(--line); flex: 0 0 auto; font-size: 1.6rem; }
@media (max-width: 760px) { .process-flow { flex-direction: column; } .process-arrow { transform: rotate(90deg); } }

/* -------------------- Forms -------------------- */
.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 8px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 16px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); font-family: var(--font-body); font-size: 0.98rem;
  background: var(--cloud); transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(21,101,192,0.12); background: var(--white);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 10px; }
.form-success {
  display: none; background: rgba(46,125,50,0.08); border: 1.5px solid var(--green);
  color: var(--green-deep); border-radius: var(--radius-sm); padding: 16px 20px; font-weight: 600; margin-top: 18px;
}
.form-success.show { display: block; animation: fadeIn 0.4s ease; }

/* Partner grid */
.partner-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 760px) { .partner-grid { grid-template-columns: repeat(2, 1fr); } }
.partner-tile {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 26px 18px; text-align: center; font-weight: 700; transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.partner-tile:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }

/* Donate */
.donate-card {
  background: linear-gradient(135deg, var(--blue-deep), var(--indigo-deep) 65%, var(--indigo));
  border-radius: var(--radius-lg);
  padding: 48px;
  color: var(--white);
  text-align: center;
}
.donate-card p { color: rgba(255,255,255,0.85); }
.donate-amounts { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 26px 0; }
.amount-btn {
  padding: 14px 22px; border-radius: 999px; border: 2px solid rgba(255,255,255,0.55); background: transparent;
  color: var(--white); font-weight: 800; font-family: var(--font-display); cursor: pointer; transition: all 0.2s ease;
}
.amount-btn.active, .amount-btn:hover { background: var(--white); color: var(--blue-deep); border-color: var(--white); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-item { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 26px; }
.contact-item .ci-icon {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.map-frame { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft); border: 1px solid var(--line); }

/* -------------------- Reveal animation -------------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.float { animation: floatY 5s ease-in-out infinite; }

/* -------------------- Utility -------------------- */
.center { text-align: center; }
.max-w { max-width: 640px; margin: 0 auto; }
.mt-40 { margin-top: 40px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--indigo-deep); color: var(--white);
  padding: 12px 20px; z-index: 200; font-weight: 700; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }
