/* Water Charity: portfolio landing page */
:root {
  --ink: #04121f;
  --deep: #062038;
  --navy: #0a2c4a;
  --blue: #388fce;        /* logo blue */
  --aqua: #6ec8ff;
  --foam: #e8f4fb;
  --paper: #f6f8f9;
  --text: #0d1b26;
  --muted: #5a6b78;
  --line: rgba(10, 44, 74, .12);
  --on-dark: #eaf4fb;
  --on-dark-muted: rgba(234, 244, 251, .72);
  --radius: 18px;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-weight: 400; margin: 0; line-height: 1.05; }
h1, h2 { font-family: var(--serif); letter-spacing: -.01em; }
em { font-style: italic; }
h1 em, h2 em { color: var(--aqua); }
.section-head h2 em, .approach h2 em, .reach h2 em { color: var(--blue); }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--aqua); outline-offset: 3px; border-radius: 6px; }

.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--blue); margin: 0 0 18px;
}

/* ---------- NAV ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  color: var(--on-dark);
  transition: background .35s ease, padding .35s ease, color .35s ease, box-shadow .35s ease;
}
.nav.scrolled {
  background: rgba(4, 18, 31, .72);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  padding-top: 12px; padding-bottom: 12px;
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: auto; height: 32px; display: inline-block; }
.brand-name { font-family: var(--serif); font-size: 24px; letter-spacing: .01em; }
.nav ul { list-style: none; display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); margin: 0; padding: 0; }
.nav a { text-decoration: none; font-size: 14px; font-weight: 500; opacity: .86; transition: opacity .2s; }
.nav a:hover { opacity: 1; }
.nav-cta { padding: 8px 16px; border: 1px solid rgba(234,244,251,.35); border-radius: 999px; opacity: 1 !important; }
.nav-cta:hover { background: rgba(234,244,251,.12); }
@media (max-width: 720px) {
  .nav li:not(:last-child) { display: none; }
  .brand-name { font-size: 21px; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 100svh; min-height: 100vh;
  display: grid; place-items: center;
  color: var(--on-dark); background: var(--ink);
  overflow: hidden; isolation: isolate;
}
@supports (min-height: 100svh) { .hero { min-height: 100svh; } }
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(800px 600px at 72% 50%, rgba(56,143,206,.16), transparent 65%),
    radial-gradient(900px 600px at 0% 100%, rgba(110,200,255,.08), transparent 60%),
    linear-gradient(180deg, #030b14 0%, #04121f 100%);
}
/* Faint caustic texture so the hero still feels like water when the canvas is off */
.hero-bg::after {
  content: ""; position: absolute; inset: -20%;
  background:
    repeating-radial-gradient(circle at 30% 40%, rgba(110,200,255,.05) 0 2px, transparent 2px 46px),
    repeating-radial-gradient(circle at 75% 65%, rgba(110,200,255,.04) 0 2px, transparent 2px 60px);
  filter: blur(6px);
  animation: drift 40s linear infinite alternate;
}
@keyframes drift { to { transform: translate3d(4%, -3%, 0) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .hero-bg::after { animation: none; } }

/* Looping wet-logo video: black background melts into the hero via screen blending */
.hero-video {
  position: absolute; z-index: -1; pointer-events: none;
  top: 50%; right: max(-2vw, calc((100vw - 1400px) / 2));
  width: min(56vw, 88vh); aspect-ratio: 1;
  transform: translateY(-50%);
  mix-blend-mode: screen;
}
.hero-video video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  /* feather the square edges so the frame never shows */
  -webkit-mask-image: radial-gradient(closest-side, #000 78%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 78%, transparent 100%);
}
@media (max-width: 900px) {
  .hero-video { top: 6%; right: 50%; width: min(92vw, 520px); transform: translateX(50%); opacity: .55; }
  .hero { align-items: end; }
  .hero-inner { padding-bottom: 96px; }
}

.fluid {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1;
  mix-blend-mode: screen;
  /* keep the swirl quiet behind the headline, fuller around the logo */
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.45) 40%, #000 62%);
  mask-image: linear-gradient(90deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.45) 40%, #000 62%);
  opacity: 0; transition: opacity 1.2s ease;
  pointer-events: none;
}
.fluid.on { opacity: 1; }

.hero-inner {
  width: 100%; max-width: var(--max);
  padding: 120px var(--gutter) 120px;
  text-align: left;
}
.hero .eyebrow { color: var(--aqua); }
.hero-inner > * { max-width: 640px; }
.hero h1 {
  font-size: clamp(52px, 8vw, 120px);
  line-height: .95;
  text-shadow: 0 2px 40px rgba(4,18,31,.55);
}
.lede {
  max-width: 560px; margin: 28px 0 0;
  font-size: clamp(17px, 1.6vw, 20px); color: var(--on-dark-muted);
  text-shadow: 0 1px 20px rgba(4,18,31,.8);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.hero-actions.center { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px; border-radius: 999px;
  font-weight: 600; font-size: 15px; text-decoration: none;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease, color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--aqua); color: var(--ink); box-shadow: 0 10px 30px -10px rgba(110,200,255,.6); }
.btn-primary:hover { background: #8fd5ff; }
.btn-ghost { color: var(--on-dark); border: 1px solid rgba(234,244,251,.35); }
.btn-ghost:hover { background: rgba(234,244,251,.1); }

.fx-toggle {
  position: absolute; right: var(--gutter); bottom: 28px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 11px; border-radius: 999px;
  font: 500 12px/1 var(--sans); letter-spacing: .04em;
  color: var(--on-dark-muted); background: rgba(4,18,31,.5);
  border: 1px solid rgba(234,244,251,.16); cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.fx-toggle[hidden] { display: none; }
.fx-toggle:hover { color: var(--on-dark); }
.fx-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 10px var(--aqua); }
.fx-toggle[aria-pressed="false"] .fx-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--on-dark-muted); }

.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1.5px solid rgba(234,244,251,.4); border-radius: 14px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px;
  background: var(--on-dark); border-radius: 2px; animation: cue 2s ease-in-out infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue span { animation: none; } }
@media (max-width: 720px) { .scroll-cue { display: none; } .fx-toggle { left: var(--gutter); right: auto; } }

/* ---------- IMPACT ---------- */
.stats {
  list-style: none; margin: clamp(40px, 6vw, 72px) auto 0; padding: 48px 0 0; max-width: var(--max);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  border-top: 1px solid rgba(234,244,251,.1);
}
.stats li { display: flex; flex-direction: column; gap: 6px; }
.num { font-family: var(--serif); font-size: clamp(44px, 6vw, 84px); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.label { font-size: 14px; color: var(--on-dark-muted); letter-spacing: .02em; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); row-gap: 40px; } }

/* ---------- APPROACH ---------- */
.approach {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(80px, 12vw, 160px) var(--gutter);
  display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 6vw, 96px); align-items: center;
}
.approach-media img { border-radius: var(--radius); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; box-shadow: 0 40px 80px -40px rgba(4,18,31,.45); }
.approach h2 { font-size: clamp(44px, 6vw, 80px); margin-bottom: 28px; }
.approach p:not(.eyebrow) { color: var(--muted); max-width: 520px; }
@media (max-width: 860px) { .approach { grid-template-columns: 1fr; } .approach-media img { aspect-ratio: 4 / 3; } }

/* ---------- SERVICES ---------- */
.services { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(80px, 12vw, 160px); }
.section-head { margin-bottom: 48px; }
.section-head h2 { font-size: clamp(38px, 5vw, 64px); }
.section-sub { color: var(--muted); margin: 16px 0 0; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
/* Tablet / spanned dual-screen: 3 on top, 2 wider below, so nothing is cramped or orphaned */
@media (max-width: 1239px) { .cards { grid-template-columns: repeat(6, 1fr); } .card { grid-column: span 2; } .card:nth-child(n+4) { grid-column: span 3; } }
@media (max-width: 700px) { .cards { grid-template-columns: 1fr; } .card, .card:nth-child(n+4) { grid-column: auto; } }
/* Each card flips over (hover with a mouse, tap on touch, Enter on keyboard) to show its photo */
.card { position: relative; perspective: 1200px; outline: none; cursor: pointer; }
.card-inner { position: relative; height: 100%; transform-style: preserve-3d; transition: transform .75s cubic-bezier(.3,.8,.25,1); }
.card-face { border-radius: var(--radius); -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.card-front {
  position: relative; height: 100%; padding: 28px 24px 30px;
  background: #fff; border: 1px solid var(--line);
  transition: box-shadow .3s ease, border-color .3s;
}
.card-back { position: absolute; inset: 0; overflow: hidden; transform: rotateY(180deg); background: var(--navy); box-shadow: 0 24px 48px -28px rgba(10,44,74,.45); }
.card-back img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .card-back-cap {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 64px 18px 16px;
  font-size: 13px; line-height: 1.4; color: #e6f3fb;
  background: linear-gradient(transparent, rgba(4,18,31,.7) 40%, rgba(4,18,31,.95));
}
.card .card-back-cap strong { display: block; color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.card-back-art { background: var(--navy) url(../img/caustics.jpg) center / cover; display: flex; align-items: center; justify-content: center; }
.card-back-art::before { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(10,44,74,.55), rgba(4,18,31,.85)); }
.card-ico-big { position: relative; width: 96px; height: 96px; margin: -40px 0 0; color: var(--aqua); stroke-width: 1.3; }
.card.flipped .card-inner, .card:focus-visible .card-inner { transform: rotateY(180deg); }
@media (hover: hover) { .card:hover .card-inner { transform: rotateY(180deg); } }
.card:focus-visible .card-back { box-shadow: 0 0 0 3px var(--blue); }
.card-no { font-family: var(--serif); font-size: 22px; color: var(--blue); }
.card h3 { font-family: var(--sans); font-weight: 600; font-size: 18px; margin: 28px 0 10px; line-height: 1.25; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card:first-child .card-front { background: var(--navy); color: var(--on-dark); border-color: transparent; }
.card:first-child .card-front p { color: var(--on-dark-muted); }
.card:first-child .card-no { color: var(--aqua); }

/* ---------- PORTFOLIO ---------- */
.portfolio { background: var(--foam); padding: clamp(80px, 12vw, 160px) var(--gutter); }
.portfolio .section-head, .mosaic { max-width: var(--max); margin-left: auto; margin-right: auto; }
.mosaic {
  display: grid; gap: 14px;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(160px, 18vw, 240px);
  grid-auto-flow: dense;
}
.tile { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--navy); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.tile:hover img { transform: scale(1.04); }
.tile figcaption {
  position: absolute; inset: auto 0 0 0; padding: 40px 18px 16px;
  color: #fff; font-size: 13px; line-height: 1.4;
  background: linear-gradient(transparent, rgba(4,18,31,.82));
}
.tile figcaption strong { display: block; font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.t-big { grid-column: span 2; grid-row: span 2; }
.t-tall { grid-row: span 2; }
.t-wide { grid-column: span 2; }
.t-wide4 { grid-column: 1 / -1; }
.tile.t-mwide img { object-position: 50% 30%; }
.quote {
  margin: 0; display: flex; align-items: center; padding: clamp(24px, 3vw, 44px);
  background: var(--navy); color: var(--on-dark);
}
.quote::before {
  content: ""; position: absolute; inset: 0; opacity: .22;
  background: url(../img/caustics.jpg) center / cover; mix-blend-mode: screen;
}
.quote p { position: relative; margin: 0; font-family: var(--serif); font-size: clamp(22px, 2.3vw, 32px); line-height: 1.2; }
@media (max-width: 760px) {
  .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
}

/* ---------- THE MARK ---------- */
.mark { max-width: var(--max); margin: 0 auto; padding: clamp(80px, 12vw, 160px) var(--gutter); }
.mark-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mark-card { margin: 0; }
.mark-img {
  aspect-ratio: 1; display: grid; place-items: center; padding: 12%;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.mark-img { position: relative; }
.mark-img img { position: absolute; inset: 0; width: 100%; height: 100%; padding: inherit; box-sizing: border-box; object-fit: contain; }
.mark-card figcaption { margin-top: 14px; font-size: 14px; color: var(--muted); }
.mark-card figcaption strong { display: block; color: var(--text); font-size: 15px; font-weight: 600; }
.mark-grid { grid-template-columns: repeat(2, 1fr); }
.mark-evo { grid-column: 1 / -1; }
.mark-grid .mark-img { aspect-ratio: 16 / 10; padding: 8% 12%; }
.evo-row {
  display: flex; align-items: center; justify-content: center; gap: clamp(12px, 3vw, 40px);
  padding: clamp(32px, 5vw, 64px) clamp(16px, 4vw, 56px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.evo-step { flex: 0 1 200px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.evo-step img { width: 100%; max-width: 160px; height: auto; }
.evo-step span { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.evo-arrow { flex: 0 0 auto; width: clamp(24px, 4vw, 56px); height: 1px; background: var(--line); position: relative; margin-bottom: 30px; }
.evo-arrow::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid var(--muted); border-right: 1px solid var(--muted); transform: rotate(45deg); opacity: .5; }
@media (max-width: 760px) {
  .mark-grid { grid-template-columns: 1fr; } .mark-img { aspect-ratio: 4 / 3; }
  .evo-arrow { display: none; }
  .evo-row { gap: 10px; padding: 28px 14px; }
  .evo-step img { max-width: 92px; }
  .evo-step span { font-size: 10px; letter-spacing: .1em; }
}

/* ---------- REACH (map + numbers, right after the hero) ---------- */
.reach {
  background: var(--ink); color: var(--on-dark);
  padding: clamp(72px, 10vw, 140px) var(--gutter) clamp(72px, 10vw, 120px);
  border-top: 1px solid rgba(234,244,251,.06);
}
.reach .section-head, .map-stage { max-width: var(--max); margin-left: auto; margin-right: auto; }
.reach .section-head { text-align: center; margin-bottom: clamp(24px, 4vw, 48px); }
.reach .eyebrow { color: var(--aqua); }
.reach h2 { font-size: clamp(44px, 7vw, 96px); }
.reach h2 em { color: var(--aqua); }
.reach .section-sub { color: var(--on-dark-muted); }
.map-stage { position: relative; }
.map { width: 100%; filter: drop-shadow(0 0 24px rgba(110,200,255,.18)); }
.map-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ml { stroke: rgba(110,200,255,.55); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .6s ease var(--d, .9s); }
.map-stage.in .ml { stroke-dashoffset: 0; }
.map-dot {
  position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 3px rgba(110,200,255,.45), 0 0 16px 4px rgba(110,200,255,.6);
}
.map-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid rgba(110,200,255,.8);
  animation: dot-pulse 2.4s ease-out infinite;
}
@keyframes dot-pulse { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(3.2); opacity: 0; } }

/* Small photos that pop out of their country, then drift gently */
.map-photo {
  position: absolute; z-index: 2; padding: 0; margin: 0; border: 0; background: none; cursor: zoom-in;
  width: clamp(54px, 6.5%, 92px);
  left: var(--x0); top: var(--y0);
  transform: translate(-50%, -50%) scale(.12); opacity: 0;
  transition:
    left 1.1s cubic-bezier(.2,.9,.25,1.15) var(--delay),
    top 1.1s cubic-bezier(.2,.9,.25,1.15) var(--delay),
    transform 1.1s cubic-bezier(.2,.9,.25,1.15) var(--delay),
    opacity .4s ease var(--delay);
}
.map-stage.in .map-photo { left: var(--x); top: var(--y); transform: translate(-50%, -50%) scale(1); opacity: 1; }
.mp-float {
  display: block; position: relative; border-radius: 9px; overflow: hidden; background: var(--navy);
  box-shadow: 0 14px 30px -10px rgba(0,0,0,.8), 0 0 0 1px rgba(234,244,251,.22);
  animation: mp-bob var(--bob, 6s) ease-in-out infinite alternate;
  transition: transform .3s ease, box-shadow .3s ease;
}
.map-photo:nth-of-type(even) .mp-float { animation-direction: alternate-reverse; }
@keyframes mp-bob {
  0% { translate: 0 -3px; rotate: -2deg; }
  50% { translate: 3px 2px; rotate: 1deg; }
  100% { translate: -2px 4px; rotate: 2.5deg; }
}
.mp-float img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.map-photo:hover .mp-float, .map-photo:focus-visible .mp-float {
  transform: scale(1.35); box-shadow: 0 20px 40px -10px rgba(0,0,0,.85), 0 0 0 2px var(--aqua);
}
.map-photo:hover, .map-photo:focus-visible { z-index: 3; outline: none; }
.mp-label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 6px 4px;
  font: 600 9px/1.1 var(--sans); letter-spacing: .03em; color: #fff; text-align: center;
  background: linear-gradient(transparent, rgba(4,18,31,.9));
}
@media (max-width: 760px) {
  .map-stage { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); }
  .map-photo { width: 32px; }
  .mp-float { border-radius: 6px; }
  .mp-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .map-photo { transition: none; left: var(--x); top: var(--y); transform: translate(-50%, -50%); opacity: 1; }
  .mp-float { animation: none; }
  .ml { stroke-dashoffset: 0; transition: none; }
  .map-dot::after { animation: none; }
}


/* ---------- FACTS ---------- */
.facts { position: relative; color: var(--on-dark); background: var(--deep); overflow: hidden; isolation: isolate; }
.facts-bg {
  position: absolute; inset: 0; z-index: -1;
  background: url(../img/world-of-water.jpg) center / cover no-repeat;
  opacity: .16; mix-blend-mode: screen;
}
.facts-inner {
  max-width: var(--max); margin: 0 auto; padding: clamp(80px, 12vw, 160px) var(--gutter);
  display: grid; grid-template-columns: 1fr 3fr; gap: clamp(32px, 6vw, 80px); align-items: start;
}
.facts-drop { margin: 0; position: sticky; top: 110px; }
.facts-drop img { width: 100%; max-width: 300px; border-radius: var(--radius); box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
@media (max-width: 860px) {
  .facts-inner { grid-template-columns: 1fr; }
  .facts-drop { position: static; }
  .facts-drop img { max-width: 180px; }
}
.facts .eyebrow { color: var(--aqua); }
.fact-list { list-style: none; margin: 0; padding: 0; counter-reset: f; }
.fact-list li {
  counter-increment: f;
  font-family: var(--serif); font-size: clamp(30px, 4.2vw, 56px); line-height: 1.12;
  padding: 36px 0 36px clamp(56px, 8vw, 110px); position: relative;
  border-top: 1px solid rgba(234,244,251,.14);
}
.fact-list li:last-child { border-bottom: 1px solid rgba(234,244,251,.14); }
.fact-list li::before {
  content: "0" counter(f); position: absolute; left: 0; top: 46px;
  font: 600 13px/1 var(--sans); letter-spacing: .14em; color: var(--aqua);
}
.fact-list em { color: var(--aqua); }

/* ---------- PHOTO BREAK ---------- */
.photo-break { height: clamp(320px, 60vw, 720px); overflow: hidden; background: var(--ink); }
.photo-break img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 45%; }

/* ---------- SUPPORT ---------- */
.support { background: var(--ink); color: var(--on-dark); padding: clamp(96px, 14vw, 180px) var(--gutter); text-align: center; position: relative; overflow: hidden; }
.support::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(700px 400px at 50% 0%, rgba(56,143,206,.3), transparent 70%);
}
.support-bg {
  position: absolute; inset: 0; opacity: .14; mix-blend-mode: screen;
  background: url(../img/caustics.jpg) center / cover;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%);
}
.support-inner { position: relative; max-width: 680px; margin: 0 auto; }
.paypal {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 36px;
  font-size: 14px; color: var(--on-dark-muted); text-decoration: none;
}
.paypal img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.paypal:hover { color: #fff; }
.support-mark { display: block; width: auto; height: 64px; margin: 0 auto 28px; }
.support h2 { font-size: clamp(44px, 6.5vw, 88px); margin-bottom: 24px; }
.support p { color: var(--on-dark-muted); font-size: 18px; margin: 0 auto; max-width: 520px; }

/* ---------- FOOTER ---------- */
.footer { background: #020b14; color: var(--on-dark-muted); padding: 48px var(--gutter); }
.footer-inner { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer .brand { color: var(--on-dark); }
.social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.social a { text-decoration: none; font-size: 14px; }
.social a:hover { color: #fff; }
.fine { width: 100%; margin: 8px 0 0; font-size: 13px; opacity: .7; }

/* ---------- REVEAL ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .tile img, .card, .btn, .card-inner { transition: none; }
}

/* ---------- LIGHTBOX ---------- */
.mosaic figure.tile { cursor: zoom-in; }
.mosaic figure.tile:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
html.lb-open, html.lb-open body { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; }
.lb[hidden] { display: none; }
.lb-backdrop {
  position: absolute; inset: 0; overflow: hidden;
  background: rgba(3, 14, 26, .55);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  opacity: 0; transition: opacity .35s ease;
}
/* two drifting caustic layers = light moving through water */
.lb-water {
  position: absolute; inset: -25%;
  background: url(../img/caustics.jpg) center / 60% auto repeat;
  mix-blend-mode: screen; opacity: .16; filter: blur(2px);
  animation: lb-drift-a 26s linear infinite alternate;
}
.lb-water.b { background-size: 85% auto; opacity: .10; animation: lb-drift-b 34s linear infinite alternate; }
@keyframes lb-drift-a { to { transform: translate3d(6%, 4%, 0) rotate(4deg) scale(1.06); } }
@keyframes lb-drift-b { to { transform: translate3d(-5%, -6%, 0) rotate(-3deg) scale(1.1); } }
.lb-ripple {
  position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  border: 2px solid rgba(110, 200, 255, .55); opacity: 0; pointer-events: none;
}
.lb-ripple.go { animation: lb-ripple 1.1s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes lb-ripple {
  0% { opacity: .9; transform: scale(.4); box-shadow: 0 0 0 0 rgba(110,200,255,.35); }
  100% { opacity: 0; transform: scale(40); box-shadow: 0 0 0 6px rgba(110,200,255,0); }
}
.lb-stage {
  position: relative; margin: 0; max-width: min(92vw, 1400px); max-height: 88vh;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.lb-img {
  max-width: 100%; max-height: calc(88vh - 70px); width: auto; height: auto;
  border-radius: 14px; box-shadow: 0 40px 120px -20px rgba(0,0,0,.7);
  transform-origin: center; transition: transform .55s cubic-bezier(.2,.8,.2,1), opacity .4s ease;
}
.lb-cap { color: var(--on-dark-muted); font-size: 14px; text-align: center; max-width: 640px; opacity: 0; transition: opacity .4s ease .15s; }
.lb-cap strong { display: block; color: #fff; font-size: 16px; font-weight: 600; }
.lb.in .lb-backdrop, .lb.in .lb-cap { opacity: 1; }
.lb:not(.in) .lb-img { opacity: 0; transform: scale(.97); }
.lb-btn {
  position: absolute; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  font: 400 22px/1 var(--sans); color: #fff;
  background: rgba(4,18,31,.55); border: 1px solid rgba(234,244,251,.22);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background .2s;
}
.lb-btn:hover { background: rgba(56,143,206,.5); }
.lb-close { top: 18px; right: 18px; font-size: 28px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) {
  .lb-prev, .lb-next { top: auto; bottom: 18px; transform: none; }
  .lb-prev { left: calc(50% - 56px); } .lb-next { right: calc(50% - 56px); }
  .lb-img { max-height: calc(80vh - 90px); }
}
@media (prefers-reduced-motion: reduce) {
  .lb-water, .lb-ripple.go { animation: none; }
  .lb-backdrop, .lb-img, .lb-cap { transition: none; }
}
html:not(.js) .map-photo { opacity: 1; left: var(--x); top: var(--y); transform: translate(-50%, -50%); }
html:not(.js) .ml { stroke-dashoffset: 0; }

/* Hero on wide screens: keep the text column and the logo video side by side, never stacked */
@media (min-width: 901px) {
  .hero { --hero-max: 1600px; --text-w: min(600px, 44vw); }
  .hero-inner { max-width: var(--hero-max); }
  .hero-inner > * { max-width: var(--text-w); }
  .hero-video {
    --left: calc(max((100vw - var(--hero-max)) / 2, 0px) + var(--gutter) + var(--text-w) + 1vw);
    left: var(--left); right: auto;
    width: max(320px, min(calc(100vw - var(--left) - var(--gutter) / 2), 86vh, 920px));
  }
}

/* Hero photo under the headline */
.hero-photo {
  position: relative; display: block; width: 100%; margin-top: 36px; padding: 0; border: 0;
  border-radius: 16px; overflow: hidden; cursor: zoom-in; background: var(--navy);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(234,244,251,.14);
  transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .3s;
}
.hero-photo img { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; object-position: 50% 55%; }
.hero-photo-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 10px; text-align: left;
  font: 500 12px/1.3 var(--sans); letter-spacing: .02em; color: rgba(255,255,255,.9);
  background: linear-gradient(transparent, rgba(4,18,31,.8));
}
.hero-photo:hover { transform: translateY(-3px); box-shadow: 0 36px 70px -30px rgba(0,0,0,.95), 0 0 0 2px var(--aqua); }
.hero-photo:focus-visible { outline: 3px solid var(--aqua); outline-offset: 3px; }
@media (min-width: 901px) and (max-height: 820px) { .hero-photo img { aspect-ratio: 16 / 5; } }
@media (prefers-reduced-motion: reduce) { .hero-photo { transition: none; } }

/* Drips canvas over the "Five ways" section (drops only sit outside the cards and heading) */
.services { position: relative; }
.drips { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 2; }

/* Hero photo v2: show the whole photo (no cropping) and size the hero so it all fits */
.hero-photo img { aspect-ratio: 800 / 620; object-position: 50% 50%; }
@media (min-width: 901px) and (max-height: 820px) { .hero-photo img { aspect-ratio: 800 / 620; } }
.hero-photo-cap { padding: 22px 12px 8px; font-size: 11.5px; }
@media (min-width: 901px) {
  .hero-inner { padding-top: 96px; padding-bottom: 56px; }
  .hero h1 { font-size: clamp(52px, min(6.6vw, 11vh), 116px); }
  .hero .lede { margin-top: 20px; }
  .hero .hero-actions { margin-top: 28px; }
  /* photo width follows the space left under the text, so it never gets pushed off screen */
  .hero-photo { width: clamp(260px, calc((100svh - 600px) * 1.29), 520px); margin-top: 32px; }
}
@media (min-width: 901px) and (max-height: 700px) { .hero-photo { width: 240px; } }

/* Card pictograms */
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-ico { width: 46px; height: 46px; flex: none; margin: -4px -6px 0 0; color: var(--blue);
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card-ico .f { fill: currentColor; fill-opacity: .22; }
.card:first-child .card-front .card-ico { color: var(--aqua); }
.card h3 { margin-top: 22px; }

/* The "Five ways" section is a water toy: clicks make water, never select or drag */
.services { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.services svg, .services img { -webkit-user-drag: none; }

/* Text-only map tag (its photo is the one at the top of the page) */
.map-tag { width: auto; }
.map-tag .mp-float { padding: 7px 11px; border-radius: 999px; background: rgba(9,34,56,.92); }
.map-tag .mp-label { position: static; display: block; padding: 0; background: none; font-size: 11px; white-space: nowrap; }
@media (max-width: 760px) { .map-tag .mp-float { padding: 4px 8px; } .map-tag .mp-label { font-size: 9px; } }

/* Glowing "portals": a funnel of light from each country's dot up to its photo */
.portal { opacity: 0; transform: scale(.05); transition: opacity .5s ease var(--pd, .2s), transform 1.1s cubic-bezier(.2,.9,.25,1.05) var(--pd, .2s); }
.map-stage.in .portal { opacity: 1; transform: scale(1); }
.portal .p-glow { filter: blur(9px); opacity: 1; }
.portal .p-body { filter: drop-shadow(0 0 6px rgba(110,200,255,.9)); }
.portal .p-core { stroke: rgba(220,245,255,.95); stroke-width: 1.4; stroke-linecap: round; }
.portal .p-shimmer { stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 6 60; animation: p-flow 2.6s linear infinite; opacity: .75; }
@keyframes p-flow { from { stroke-dashoffset: 66; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .portal { transition: none; opacity: 1; transform: none; } .portal .p-shimmer { animation: none; display: none; } }
html:not(.js) .portal { opacity: 1; transform: none; }

/* Logo section: a field photo on the left, the marks on the right */
@media (min-width: 901px) {
  .mark { display: grid; grid-template-columns: minmax(240px, 0.85fr) 2.4fr; gap: clamp(32px, 4vw, 64px); align-items: start;
    max-width: calc(var(--max) + 240px); }
  .mark-photo { position: sticky; top: 96px; }
}
.mark-photo { margin: 0; }
.mark-photo img { display: block; width: 100%; aspect-ratio: 497 / 752; object-fit: cover; border-radius: var(--radius);
  box-shadow: 0 30px 60px -30px rgba(10,44,74,.5); }
.mark-photo figcaption { margin-top: 12px; font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .mark-photo { margin-bottom: 40px; } .mark-photo img { aspect-ratio: 4 / 3; object-position: 50% 35%; } }

/* Donate section: field photo glowing through the background */
.support-photo { position: absolute; inset: 0; opacity: .15;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 45%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 80% at 50% 45%, #000 30%, transparent 78%); }
.support-photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.8); }

/* Big glossy water buttons with a ripple on hover / tap */
.give { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-top: 44px; }
.btn-water {
  --c1: #7fd6ff; --c2: #2f8fd6; --c3: #0f4f8a;
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 92px; padding: 0 72px; border-radius: 999px;
  font: 600 27px/1 var(--sans); letter-spacing: .01em; color: #fff; text-decoration: none;
  text-shadow: 0 1px 2px rgba(0,30,60,.45);
  background:
    radial-gradient(120% 90% at 50% 120%, rgba(127,214,255,.55), transparent 60%),
    linear-gradient(180deg, var(--c1) 0%, var(--c2) 48%, var(--c3) 100%);
  box-shadow:
    inset 0 2px 1px rgba(255,255,255,.6), inset 0 -6px 14px rgba(0,30,70,.45),
    0 14px 34px -10px rgba(47,143,214,.75), 0 0 0 1px rgba(160,225,255,.35);
  transition: transform .25s ease, box-shadow .25s ease;
}
.btn-water::before {   /* moving caustic light */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35; mix-blend-mode: screen;
  background: url(../img/caustics.jpg) 0 0 / 260px auto; animation: bw-caustic 14s linear infinite;
}
.btn-water::after {    /* glossy top highlight */
  content: ""; position: absolute; left: 8%; right: 8%; top: 5px; height: 42%; border-radius: 999px; z-index: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.05)); pointer-events: none;
}
.btn-water > * { position: relative; z-index: 1; }
.btn-water:hover, .btn-water:focus-visible { transform: translateY(-2px) scale(1.03);
  box-shadow: inset 0 2px 1px rgba(255,255,255,.7), inset 0 -6px 14px rgba(0,30,70,.4),
    0 20px 44px -10px rgba(47,143,214,.9), 0 0 0 1px rgba(190,235,255,.6), 0 0 40px rgba(110,200,255,.35); }
.btn-water:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.btn-water:active { transform: translateY(0) scale(.99); }
.btn-water-alt { --c1: #c9ecff; --c2: #63b6ea; --c3: #23699f; font-size: 22px; min-height: 92px; padding: 0 44px 0 18px; }
.btn-water-alt img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; box-shadow: 0 2px 6px rgba(0,30,60,.35); }
.bw-ripple { position: absolute; z-index: 0; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; pointer-events: none;
  border: 2px solid rgba(255,255,255,.8); background: radial-gradient(circle, rgba(255,255,255,.35), transparent 70%);
  animation: bw-ripple .9s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes bw-ripple { from { transform: scale(.2); opacity: 1; } to { transform: scale(14); opacity: 0; } }
@keyframes bw-caustic { to { background-position: 260px 130px; } }
.contact-link { display: inline-block; margin-top: 30px; color: var(--on-dark-muted); font-size: 15px; }
.contact-link:hover { color: #fff; }
@media (max-width: 520px) { .btn-water { width: 100%; padding: 0 28px; min-height: 80px; font-size: 24px; } .btn-water-alt { padding-left: 14px; font-size: 20px; } }
@media (prefers-reduced-motion: reduce) { .btn-water::before { animation: none; } .bw-ripple { display: none; } .btn-water, .btn-water:hover { transition: none; transform: none; } }

.mark-photo .mark-photo-2 { aspect-ratio: 4 / 3; margin-top: 22px; object-position: 50% 50%; }
.btn-water img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; box-shadow: 0 2px 6px rgba(0,30,60,.35); }
.give .btn-water { padding-left: 20px; padding-right: 60px; }
@media (max-width: 520px) { .give .btn-water { padding: 0 22px 0 14px; font-size: 22px; } .btn-water img { width: 48px; height: 48px; } }
@media (max-width: 900px) { .mark-photo { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; } .mark-photo img, .mark-photo .mark-photo-2 { aspect-ratio: 4 / 3; margin-top: 0; grid-row: 1; } .mark-photo figcaption { grid-row: 2; } }

/* Illustrated backs for cards without a field photo */
.card-back-art { background: var(--navy); display: block; }
.card-back-art::before { content: none; }
.card-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.card-scene .rain line { stroke: rgba(225,243,255,.75); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 9 20; animation: rainfall .9s linear infinite; }
.card-scene .drip { animation: drip 1.6s ease-in infinite; transform-box: fill-box; transform-origin: 50% 0; }
@keyframes rainfall { to { stroke-dashoffset: -29; } }
@keyframes drip { 0% { transform: translateY(0) scale(.6); opacity: 0; } 30% { opacity: 1; transform: translateY(0) scale(1); } 100% { transform: translateY(26px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .card-scene .rain line, .card-scene .drip { animation: none; } }

/* No selection highlighting or dragging anywhere */
*, *::before, *::after { -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: transparent; }
img, svg, video, a { -webkit-user-drag: none; -webkit-touch-callout: none; }
::selection { background: transparent; color: inherit; }
::-moz-selection { background: transparent; color: inherit; }
input, textarea, select, [contenteditable] { -webkit-user-select: text; user-select: text; }


/* "Taken at Water Charity projects" notes */
.photo-note { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 9px 16px 9px 12px;
  border: 1px solid rgba(110,200,255,.35); border-radius: 999px; background: rgba(110,200,255,.08);
  color: var(--blue); font-size: 15px; font-weight: 500; line-height: 1.3; }
.photo-note .pn-ico { width: 20px; height: 20px; flex: none; }
.lb-wc { display: block; margin-top: 6px; color: var(--blue); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.footer .photo-credit { flex-basis: 100%; order: 10; opacity: .75; }
.footer .site-credit { order: 11; font-size: 11px; opacity: .5; margin-top: 0; }
.footer .site-credit a { color: inherit; text-decoration: none; }
.footer .site-credit a:hover { text-decoration: underline; }

/* Clicked card grows and floats above its neighbours */
.card { transition: transform .45s cubic-bezier(.2,.8,.2,1), filter .45s; }
.card.expanded, .card.settling { z-index: 30; }
.card.expanded { filter: drop-shadow(0 30px 50px rgba(4,18,31,.45)); cursor: zoom-out; }
.card.expanded .card-inner { transform: rotateY(180deg); }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }

/* Phones/tablets: logo video at the top of the hero, text sits below it (not over it) */
@media (max-width: 900px) {
  .hero { align-items: start; }
  .hero-video { top: 64px; opacity: .9; }
  .hero-inner { padding-top: calc(64px + min(92vw, 520px) * .93); }
}

/* Phones: "Safe to drink" goes full width so it doesn't leave an empty column beside it */
@media (max-width: 760px) { .mosaic .m-big { grid-column: 1 / -1; grid-row: span 2; } .mosaic .m-big img { object-position: 50% 30%; } }
