/* ==========================================================================
   HEART FOR THE HOUSE (heartforthehouse.html)
   Loaded after css/style.css. Colours are sampled from the campaign art:
   the pink heart (Compassion), orange house (Construction) and blue
   chevrons (Changed Lives).
   ========================================================================== */

:root {
  /* Apple's own serif (New York) for the italic accents the booklet uses. */
  --hf-serif:  "New York", ui-serif, "Iowan Old Style", Georgia, serif;
  --hf-grain:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --hf-pink:   #d83c84;
  --hf-orange: #f07818;
  --hf-blue:   #0c60f0;
  --hf-ink:    #0b0b10;
  --hf-grad:   linear-gradient(90deg, var(--hf-pink) 0%, var(--hf-orange) 50%, var(--hf-blue) 100%);
}

/* ---------- Opener ----------
   Three layers: the still, blurred colour field; the house + heart as a
   3D object turning on its vertical axis (js/hfth-3d.js, over a still SVG
   until WebGL is ready); and the serif wordmark resolving in over the top. */

.hf-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: #c7633f;               /* field colour while the image loads */
}

.hf-field {
  position: absolute; inset: 0;
  z-index: -3;
  background: url("../assets/hfth/hero-bg.jpg") center / cover no-repeat;
  animation: hf-fade 1.6s var(--ease-out) backwards;
}

.hf-logo3d {
  position: absolute; inset: 0;
  z-index: -2;
  display: grid; place-items: center;
}
/* A soft focus like the original artwork. The blur is constant, never
   animated: an animated filter is what Safari painted as a white box. */
.hf-logo3d img, .hf-logo3d canvas { filter: blur(2.2vmin); }
.hf-logo3d img {
  width: min(56vh, 66vw); height: auto;
  opacity: 0.4;
}
.hf-logo3d canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
}
.hf-logo3d.is-3d img { display: none; }
.hf-logo3d.is-3d canvas { opacity: 1; animation: hf-logo-in 2.4s var(--ease-out) backwards; }

/* A whisper of grain and a soft vignette so the colour reads as print. */
.hf-hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(20, 8, 20, 0.28) 100%);
  pointer-events: none;
}

.hf-hero-inner {
  position: relative;
  text-align: center;
  padding: 0 var(--pad-x);
}

.hf-wordmark {
  display: block;
  width: min(760px, 84vw);
  height: auto;
  margin: 0 auto;
  /* "backwards", not "both": a filter left on the image after the intro
     made Safari paint it as a white box once the page scrolled. */
  animation: hf-resolve 1.8s var(--ease-out) 0.9s backwards;
}

.hf-dates {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: clamp(22px, 3.4vw, 36px);
  font-size: 13px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase;
  animation: hf-rise 1.2s var(--ease-out) 1.9s backwards;
}
.hf-dates::before, .hf-dates::after {
  content: ""; width: 28px; height: 1px; background: rgba(255, 255, 255, 0.7);
}

.hf-cue {
  position: absolute; left: 50%; bottom: 28px; translate: -50% 0;
  width: 22px; height: 36px; border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  animation: hf-fade 1s ease 2.6s backwards;
}
.hf-cue::after {
  content: ""; position: absolute; left: 50%; top: 7px; translate: -50% 0;
  width: 3px; height: 7px; border-radius: 2px; background: #fff;
  animation: hf-cue 1.8s ease-in-out infinite;
}

@keyframes hf-fade    { from { opacity: 0; } to { opacity: 1; } }
@keyframes hf-logo-in { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes hf-resolve {
  from { opacity: 0; filter: blur(18px); transform: translateY(18px) scale(1.04); }
  to   { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes hf-rise    { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes hf-cue     { 0%, 100% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translateY(10px); } }

/* ---------- The goal ---------- */

.hf-goal { text-align: center; }
.hf-amount {
  display: inline-block;
  margin-top: 6px;
  font-size: clamp(76px, 15vw, 196px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  background: var(--hf-grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  padding: 0 0.04em 0.06em;           /* keep descenders and the $ inside the clip */
}
.hf-goal .lede { max-width: 640px; margin: clamp(18px, 2.4vw, 28px) auto 0; text-wrap: balance; }
.hf-three {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin-top: clamp(28px, 3.4vw, 40px);
}
.hf-three span {
  font-size: 14px; font-weight: 600; padding: 9px 18px; border-radius: 999px; color: #fff;
}
.hf-three span:nth-child(1) { background: var(--hf-pink); }
.hf-three span:nth-child(2) { background: var(--hf-orange); }
.hf-three span:nth-child(3) { background: var(--hf-blue); }

/* ---------- Shared: serif accents, aurora fields, bubble cards ---------- */

.hf-display em {
  font-family: var(--hf-serif);
  font-style: italic; font-weight: 500;
  letter-spacing: -0.025em;
}

/* A pale field with soft colour drifting through it and a fine grain, like
   the booklet's pages. The blobs are soft radial gradients (no filter), and
   only their transform animates. */
.hf-aurora { position: relative; isolation: isolate; overflow: hidden; background: #f7f2f7; }
.hf-aurora::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: var(--hf-grain); opacity: 0.22;
  pointer-events: none;
}
.hf-blobs { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.hf-blobs span {
  position: absolute;
  width: 72vmax; height: 72vmax; border-radius: 50%;
  background: radial-gradient(closest-side, var(--c) 0%, transparent 100%);
  opacity: 0.6;
  animation: hf-drift var(--t, 28s) ease-in-out infinite alternate;
}
.hf-blobs span:nth-child(1) { --c: #ff9ccc; --t: 26s; left: -28vmax; top: -24vmax; }
.hf-blobs span:nth-child(2) { --c: #ffc285; --t: 31s; right: -30vmax; top: 22%; animation-delay: -9s; }
.hf-blobs span:nth-child(3) { --c: #a8ccff; --t: 34s; left: -18vmax; top: 55%; animation-delay: -15s; }
.hf-blobs span:nth-child(4) { --c: #cdb6ff; --t: 29s; right: -20vmax; bottom: -30vmax; animation-delay: -4s; }
@keyframes hf-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(9vmax, 5vmax, 0) scale(1.14); }
  100% { transform: translate3d(-5vmax, 11vmax, 0) scale(0.92); }
}

/* A bubble card: a soft gradient with grain, a glassy top edge and a
   highlight that follows the pointer while the card leans towards it. */
.hf-card {
  --pad: clamp(20px, 2.4vw, 30px);    /* one inset for every card, photo or not */
  position: relative; overflow: hidden; isolation: isolate;
  grid-column: span 2;
  min-height: 220px;
  padding: var(--pad);
  border-radius: 30px;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: var(--tone-ink, #fff);
  background: var(--tone-bg, #fff);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -24px 48px rgba(40, 0, 60, 0.06),
    0 24px 50px -26px rgba(70, 20, 90, 0.45);
  /* The reveal's own transition, kept, plus the lean. */
  transition: opacity 0.9s var(--ease-out) var(--d, 0s), transform 0.9s var(--ease-out) var(--d, 0s);
}
.hf-card.is-tilting {
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-4px);
  transition: transform 0.18s ease-out;
}
.hf-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: var(--hf-grain); opacity: 0.3;
  pointer-events: none;
}
.hf-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(circle at var(--mx, 25%) var(--my, 0%), rgba(255, 255, 255, 0.42), transparent 48%);
  opacity: 0.5; transition: opacity 0.4s ease;
  pointer-events: none;
}
.hf-card.is-tilting::after { opacity: 1; }
.hf-card p {
  margin-top: 10px;
  font-size: 16px; font-weight: 600; line-height: 1.35;
  max-width: 30ch;
  opacity: 0.92;
  text-wrap: pretty;
}

.hf-tone--pink  { --tone-bg: linear-gradient(140deg, #ff8fc8 0%, #e8468f 100%); }
.hf-tone--blush { --tone-bg: linear-gradient(150deg, #ffe6f1 0%, #fbc3dc 100%); --tone-ink: #c22a78; }
.hf-tone--peach { --tone-bg: linear-gradient(150deg, #ffd8a8 0%, #ffad62 100%); --tone-ink: #e2540c; }
.hf-tone--blue  { --tone-bg: linear-gradient(140deg, #4a95ff 0%, #1450e8 100%); }
.hf-tone--sky   { --tone-bg: linear-gradient(150deg, #e2eeff 0%, #bcd6f6 55%, #cfc6f4 100%); --tone-ink: #2949c8; }
.hf-tone--grad  { --tone-bg: linear-gradient(110deg, #f066a8 0%, #ff8a3d 50%, #3d6dff 100%); }
.hf-tone--white { --tone-bg: linear-gradient(160deg, #ffffff 0%, #f3eef6 100%); --tone-ink: var(--ink); }
.hf-tone--red   { --tone-bg: linear-gradient(160deg, #ffffff 0%, #ffe8e6 100%); --tone-ink: #e3241c; }

.hf-num-lg, .hf-num-xl {
  font-weight: 800; letter-spacing: -0.055em; line-height: 0.95;
  font-variant-numeric: tabular-nums;
}
.hf-num-lg { font-size: clamp(42px, 6vw, 84px); }
.hf-num-xl { font-size: clamp(76px, 10vw, 148px); }

/* ---------- The past year: growth in numbers ---------- */

/* The blurred house + heart drifting behind the heading, like the booklet. */
.hf-float {
  position: absolute; z-index: -1;
  top: clamp(10px, 3vw, 50px); right: -3vw;
  width: min(44vw, 580px); aspect-ratio: 1;
  display: grid; place-items: center;
  pointer-events: none;
}
.hf-float img, .hf-float canvas { filter: blur(clamp(10px, 1.5vw, 20px)); }  /* constant, never animated */
.hf-float img { width: 66%; height: auto; opacity: 0.45; }
.hf-float canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.85; animation: hf-fade 1.2s ease backwards; }
.hf-float.is-3d img { display: none; }
.hf-grow .section-head { position: relative; }

.hf-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 18px);
}
.hf-card--wide { grid-column: span 3; }

.hf-card--chart {
  grid-column: span 4;
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: end; gap: 8px;
  min-height: clamp(380px, 34vw, 470px);
  color: #fff;
  --tone-bg: linear-gradient(115deg, #4f63d9 0%, #9b7ae0 30%, #f29ab9 64%, #ffb25e 100%);
}
.hf-chart-copy { position: relative; z-index: 1; }
.hf-chart-copy .hf-num-xl { font-size: clamp(64px, 6.9vw, 100px); }
.hf-chart-copy p { font-size: 17px; max-width: 26ch; }
.hf-bars3d { position: relative; align-self: stretch; min-height: 300px; margin: -10px -10px -14px 0; }
.hf-bars3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; animation: hf-fade 0.8s ease backwards; }
.hf-bar-val, .hf-bar-year {
  position: absolute; left: 0; top: 0;
  white-space: nowrap; pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.hf-bar-val {
  font-family: var(--hf-serif); font-size: clamp(18px, 1.7vw, 24px); font-weight: 600; letter-spacing: -0.02em;
  text-shadow: 0 2px 14px rgba(60, 20, 80, 0.35);
}
.hf-bar-year { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; opacity: 0.95; }
/* Without WebGL: flat bubble bars. */
.hf-bars-still {
  list-style: none; margin: 0; padding: 0;
  position: absolute; inset: 16% 8% 34px;
  display: flex; align-items: flex-end; gap: 7%;
}
.hf-bars-still li {
  flex: 1; height: calc(var(--h) * 100%);
  position: relative; border-radius: 24px;
  /* One wash across the whole chart: each bar shows its slice of it. */
  background: linear-gradient(155deg, #2b7bff 0%, #3d74ff 22%, #ff45a6 50%, #ff7a2c 78%, #ffd23a 100%)
              var(--bx, 0%) 100% / 349% calc(100% / var(--h)) no-repeat;
  box-shadow: inset 0 10px 16px rgba(255, 255, 255, 0.45), inset 0 -12px 20px rgba(40, 0, 60, 0.2);
}
.hf-bars-still li:nth-child(2) { --bx: 50%; }
.hf-bars-still li:nth-child(3) { --bx: 100%; }
.hf-bars-still b { position: absolute; bottom: 100%; left: 50%; translate: -50% -6px; font-family: var(--hf-serif); font-size: 20px; }
.hf-bars-still span { position: absolute; top: 100%; left: 50%; translate: -50% 8px; font-size: 13px; font-weight: 700; }
.hf-bars3d.is-3d .hf-bars-still { display: none; }

/* Photo cards: the picture on top, the figure below it, same inset as the rest. */
.hf-card--photo { padding: 0; justify-content: flex-start; }
.hf-card-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.hf-card--chart + .hf-card--photo .hf-card-img { aspect-ratio: 4 / 3; }
.hf-card-body { padding: var(--pad); margin-top: auto; }

/* Wide photo cards sit side by side: picture left, figure right. */
.hf-card--wide.hf-card--photo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); }
.hf-card--wide .hf-card-img { aspect-ratio: auto; height: 100%; min-height: 240px; }
.hf-card--wide .hf-card-body { align-self: end; }
.hf-card--wide .hf-num-lg { font-size: clamp(42px, 4.6vw, 68px); }

/* Giving, year on year */
.hf-giving {
  margin-top: clamp(44px, 5vw, 70px);
  display: grid; grid-template-columns: minmax(0, 270px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px); align-items: center;
}
.hf-giving-stat .hf-num-lg {
  background: linear-gradient(90deg, #ee4f8f, #ff8a3d);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 0.05em; width: fit-content;
}
.hf-giving-stat p { margin-top: 8px; font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--ink-2); }
.hf-pills { display: grid; gap: 26px; }
.hf-pill-row { display: grid; grid-template-columns: minmax(0, 1fr) 17ch; gap: 20px; align-items: center; }
.hf-pill {
  position: relative; height: 54px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 2px 8px rgba(60, 20, 80, 0.12);
}
.hf-pill::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--pill);
  box-shadow: inset 0 12px 14px -8px rgba(255, 255, 255, 0.75), inset 0 -12px 16px -8px rgba(40, 0, 60, 0.28);
  clip-path: inset(0 100% 0 0 round 999px);
  transition: clip-path 1.9s var(--ease-out) 0.25s;
}
.hf-giving.in .hf-pill::before { clip-path: inset(0 calc((1 - var(--fill)) * 100%) 0 0 round 999px); }
.hf-pill--2024 { --pill: linear-gradient(90deg, #2f5cff 0%, #6aa8ff 60%, #a8e0ff 100%); }
.hf-pill--2025 { --pill: linear-gradient(90deg, #d9a6ef 0%, #ff7aa2 55%, #ff5a5a 100%); }
.hf-pill-year { position: absolute; left: 22px; top: 50%; translate: 0 -50%; font-size: 15px; font-weight: 700; color: #fff; z-index: 1; }
.hf-pill-goal {
  position: absolute; top: -7px; bottom: -7px; left: calc(var(--goal) * 100%);
  width: 2px; border-radius: 2px; background: rgba(30, 20, 50, 0.5);
}
.hf-pill-goal::after {
  content: "Goal"; position: absolute; bottom: 100%; left: 50%; translate: -50% -3px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(30, 20, 50, 0.6);
}
.hf-pill-amt { font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.hf-pill-amt b {
  display: block;
  font-family: var(--hf-serif); font-size: clamp(21px, 2vw, 28px); font-weight: 600; letter-spacing: -0.02em;
  color: var(--ink); font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .hf-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hf-card { --pad: 16px; grid-column: span 1; min-height: 0; }
  .hf-card--chart, .hf-card--feature { grid-column: span 2; }
  .hf-card--chart { --pad: 22px; }
  .hf-card--feature .hf-card-body { --pad: 20px; }
  .hf-card--wide.hf-card--photo { display: flex; }
  .hf-card--wide .hf-card-img { aspect-ratio: 16 / 10; height: auto; min-height: 0; }
  .hf-card--chart { grid-template-columns: 1fr; min-height: 0; }
  .hf-bars3d { min-height: 300px; margin: 6px -6px -10px; }
  .hf-card--chart + .hf-card--photo .hf-card-img { aspect-ratio: 16 / 10; }
  .hf-card p { font-size: 14.5px; }
  .hf-board .hf-num-lg { font-size: clamp(32px, 9vw, 56px); }
  .hf-board .hf-card--feature .hf-num-lg { font-size: clamp(44px, 12vw, 64px); }
  .hf-giving { grid-template-columns: 1fr; }
  .hf-pill-row { grid-template-columns: 1fr; gap: 10px; }
  .hf-float { width: 62vw; right: -14vw; top: 30px; }
}

/* ---------- Our reach online ---------- */

.hf-reach { background: #fff; }
.hf-reach-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 18px);
}
.hf-reach-grid .hf-card { grid-column: auto; min-height: 0; }
.hf-reach-grid .hf-card--photo .hf-card-img { aspect-ratio: 4 / 3; }
.hf-reach-grid .hf-card--compact { min-height: 170px; }
.hf-reach-grid .hf-num-lg { font-size: clamp(28px, 3.4vw, 50px); }
@media (max-width: 900px) {
  .hf-reach-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hf-reach-grid .hf-num-lg { font-size: clamp(26px, 7.4vw, 44px); }
  .hf-reach-grid .hf-card--compact { min-height: 140px; }
}

/* ---------- Since 2019 ---------- */

.hf-since {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(120px, 15vw, 210px) 0;
  background: #0b0b10; color: #fff; text-align: center;
}
.hf-since-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: 0.42; }
.hf-since::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(11, 11, 16, 0.75) 0%, rgba(11, 11, 16, 0.2) 45%, rgba(11, 11, 16, 0.85) 100%);
}
.hf-since-kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255, 255, 255, 0.85); }
.hf-since-num {
  margin-top: clamp(10px, 1.6vw, 22px);
  font-family: var(--hf-serif); font-weight: 500;
  font-size: clamp(44px, 13vw, 210px); line-height: 1; letter-spacing: -0.02em;
  text-transform: uppercase; white-space: nowrap;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, #ff7eb6, #ff9a3c, #ffd36b, #6fb6ff, #b78bff, #ff7eb6) 0 0 / 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: hf-sheen 9s linear infinite;
  padding: 0 0.04em 0.05em;
}
@keyframes hf-sheen { to { background-position: -200% 0; } }

/* ---------- The impact of your generosity ---------- */

.hf-impact { background: #fbf2f4; }
.hf-impact .hf-blobs span:nth-child(2) { --c: #ffb26b; }
.hf-impact-row {
  display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.6fr);
  gap: clamp(24px, 5vw, 80px); align-items: start;
  max-width: 1180px; margin: 0 auto;
  padding: clamp(30px, 4vw, 60px) 0;
}
.hf-impact-row + .hf-impact-row { border-top: 1px solid rgba(60, 20, 60, 0.08); }
.hf-impact-row--flip { grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.75fr); }
.hf-impact-row--flip .hf-impact-icon { order: 2; }
/* The icon stays in view while its list scrolls past. */
.hf-impact-icon {
  position: sticky; top: 110px;
  aspect-ratio: 1; display: grid; place-items: center;
}
.hf-impact-icon img { width: 68%; height: auto; }
.hf-impact-icon canvas { position: absolute; inset: 0; width: 100%; height: 100%; animation: hf-fade 0.8s ease backwards; }
.hf-impact-icon.is-3d img { opacity: 0; }
.hf-impact-name {
  font-family: var(--hf-serif); font-weight: 500;
  font-size: clamp(46px, 7vw, 100px); line-height: 0.92; letter-spacing: -0.035em;
  text-transform: uppercase;
  color: var(--c);
}
.hf-impact-sub {
  margin-top: 14px; max-width: 34ch;
  font-family: var(--hf-serif); font-size: clamp(19px, 1.8vw, 24px); font-weight: 500; line-height: 1.3;
  color: color-mix(in srgb, var(--c) 82%, #000);
}
.hf-impact-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px clamp(24px, 3vw, 44px); margin-top: 26px; }
.hf-impact-lists .hf-items { margin-top: 6px; }
.hf-impact-copy h4 { font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c); }
.hf-items { list-style: none; padding: 0; margin-top: 26px; }
/* Each line: the name and amount, divided by a hairline. No bars sized to
   the amount: they made the smaller gifts look insignificant. */
.hf-items li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--c) 22%, transparent);
  font-size: 15.5px; font-weight: 600; line-height: 1.35; color: var(--ink);
}
.hf-items li b { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .hf-impact-row, .hf-impact-row--flip { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .hf-impact-name { font-size: min(46px, 11vw); }  /* "CONSTRUCTION" fits a 375px phone */
  .hf-impact-row--flip .hf-impact-icon { order: 0; }
  .hf-impact-icon { position: relative; top: 0; width: min(220px, 56vw); }
  .hf-impact-lists { grid-template-columns: 1fr; }
}

/* ---------- The three pillars (dark) ---------- */

.hf-dark { background: var(--hf-ink); color: #fff; }
.hf-dark .eyebrow { color: rgba(255, 255, 255, 0.6); }
.hf-dark .lede { color: rgba(255, 255, 255, 0.72); }

.hf-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  max-width: 1180px;
  margin: 0 auto;
}
.hf-pillar {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #16161d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
}
.hf-pillar:hover { transform: translateY(-8px); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5); }
/* Each icon turns in 3D over a field in its own colour, like the posters;
   the still render underneath shows until WebGL is ready. */
.hf-art {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  display: grid; place-items: center;
  background: radial-gradient(120% 80% at 30% 15%, var(--art-a) 0%, var(--art-b) 70%);
}
.hf-art--heart  { --art-a: #ffc1de; --art-b: #f07ab3; }
.hf-art--house  { --art-a: #ffd9a0; --art-b: #f7a03e; }
.hf-art--arrows { --art-a: #a9dcff; --art-b: #3f8cf5; }
.hf-art img { width: 62%; height: auto; }
/* A light soft focus; constant, never animated (see .hf-logo3d). */
.hf-art img, .hf-art canvas { filter: blur(5px); }
.hf-art canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  animation: hf-fade 0.8s ease backwards;
}
.hf-art.is-3d img { opacity: 0; }
.hf-pillar-body { padding: 22px 24px 26px; }
.hf-pillar-body h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.hf-pillar-body h3::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--dot); flex: none; }
.hf-pillar-body p { margin-top: 8px; color: rgba(255, 255, 255, 0.68); font-size: 15.5px; line-height: 1.6; }

.hf-pillar-amt {
  margin-top: 6px;
  font-size: 28px; font-weight: 700; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--dot) 72%, #fff);
}
/* What each third funds: small tags, tinted by the pillar's colour. */
.hf-funds {
  list-style: none; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 18px;
}
.hf-funds li {
  font-size: 13.5px; font-weight: 600;
  padding: 7px 13px; border-radius: 999px;
  color: #fff;
  background: color-mix(in srgb, var(--dot) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--dot) 45%, transparent);
}

@media (max-width: 900px) {
  .hf-pillars { grid-template-columns: 1fr; max-width: 520px; }
}

/* ---------- Stretch goal: the Brand Next Building ---------- */

.hf-next-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}
.hf-next-copy .title-lg { margin-top: 6px; }
.hf-next-amt {
  margin-top: 14px;
  font-size: clamp(64px, 9vw, 112px);
  font-weight: 700; letter-spacing: -0.055em; line-height: 0.95;
  background: linear-gradient(90deg, var(--hf-orange), var(--hf-blue));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  padding: 0 0.04em 0.06em 0;         /* flush left with the copy */
  width: fit-content;
}
.hf-next-copy p { margin-top: 16px; color: var(--ink-2); font-size: 17px; line-height: 1.65; max-width: 560px; }
.hf-next-copy p:first-of-type { margin-top: 22px; }

/* The two goals as one glossy bar that draws in from the left. */
.hf-stack {
  display: flex; height: 58px; max-width: 560px;
  margin-top: 30px;
  border-radius: 999px; overflow: hidden;
  box-shadow: 0 16px 34px -16px rgba(40, 20, 90, 0.45);
  clip-path: inset(0 100% 0 0 round 999px);
  transition: clip-path 1.6s var(--ease-out) 0.4s;
}
.hf-next-copy.in .hf-stack { clip-path: inset(0 0 0 0 round 999px); }
.hf-stack span {
  flex: var(--w) 1 0;
  display: flex; align-items: center; padding-left: 20px;
  font-size: 16px; font-weight: 700; color: #fff;
  box-shadow: inset 0 12px 14px -8px rgba(255, 255, 255, 0.6), inset 0 -12px 16px -8px rgba(40, 0, 60, 0.3);
}
.hf-stack span:first-child { background: linear-gradient(90deg, #ff7ab5, #e8468f); }
.hf-stack span:last-child  { background: linear-gradient(90deg, #ff9a3d, #c06ad0 45%, #3d6dff); }

.hf-ladder {
  list-style: none; padding: 0;
  margin-top: 18px;
  max-width: 560px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.hf-ladder li {
  display: flex; align-items: baseline; gap: 16px;
  padding: 16px 20px;
  font-size: 15.5px;
}
.hf-ladder li + li { border-top: 1px solid rgba(0, 0, 0, 0.08); background: #f6f6f8; }
.hf-ladder-amt {
  flex: none; min-width: 84px;
  font-size: 22px; font-weight: 700; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.hf-ladder li:first-child .hf-ladder-amt { color: var(--hf-pink); }
.hf-ladder li + li .hf-ladder-amt { color: var(--hf-blue); }

.hf-next-art {
  position: relative;
  margin: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: 0 30px 70px rgba(12, 20, 60, 0.22);
}
.hf-next-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hf-next-art figcaption {
  position: absolute; left: 18px; bottom: 18px;
  padding: 8px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: #fff;
  background: rgba(10, 10, 20, 0.55);
}

@media (max-width: 900px) {
  .hf-next-grid { grid-template-columns: 1fr; max-width: 560px; }
}

/* ---------- Play your part ---------- */

.hf-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  max-width: 1180px; margin: 0 auto;
}
.hf-step {
  position: relative;
  padding: clamp(28px, 3vw, 38px);
  border-radius: var(--radius-card);
  background: var(--white);
  border: 1px solid var(--hairline);
  display: flex; flex-direction: column;
}
.hf-num {
  font-size: clamp(54px, 6vw, 76px); font-weight: 700; letter-spacing: -0.05em; line-height: 1;
  background: var(--hf-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 300% 100%;
  padding-bottom: 0.06em;
}
.hf-step:nth-child(1) .hf-num { background-position: 0% 0; }
.hf-step:nth-child(2) .hf-num { background-position: 50% 0; }
.hf-step:nth-child(3) .hf-num { background-position: 100% 0; }
.hf-step h3 { margin-top: 18px; font-size: 26px; font-weight: 700; letter-spacing: -0.025em; }
.hf-step p { margin-top: 10px; color: var(--ink-2); font-size: 16px; line-height: 1.6; flex: 1; }
.hf-step .btn { margin-top: 22px; align-self: flex-start; }

@media (max-width: 900px) {
  .hf-steps { grid-template-columns: 1fr; max-width: 560px; }
}

/* ---------- Key dates ---------- */

.hf-dates-list {
  list-style: none; margin: 0 auto; padding: 0;
  max-width: 1080px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0;
  position: relative;
}
/* One gradient rule runs behind all three, through the dots. */
.hf-dates-list::before {
  content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px;
  background: var(--hf-grad); border-radius: 2px; opacity: 0.85;
}
.hf-dates-list li { position: relative; padding: 34px clamp(12px, 2vw, 28px) 0 0; }
.hf-dates-list li::before {
  content: ""; position: absolute; left: 0; top: 0;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--dot);
}
.hf-when { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dot); }
.hf-what { margin-top: 8px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.hf-detail { margin-top: 8px; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }
.hf-detail a { color: var(--blue); font-weight: 600; }

@media (max-width: 760px) {
  .hf-dates-list { grid-template-columns: 1fr; gap: 30px; padding-left: 30px; }
  .hf-dates-list::before { left: 7px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background: linear-gradient(180deg, var(--hf-pink), var(--hf-orange), var(--hf-blue)); }
  .hf-dates-list li { padding: 0; }
  .hf-dates-list li::before { left: -30px; top: 2px; }
}

/* ---------- Closing band ---------- */

/* Bookends the opener: the same still colour field, with the three icons
   turning in 3D behind a soft blur (js/hfth-3d.js). Until WebGL is ready,
   or without it, the original blurred trio artwork shows instead. */
.hf-close {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(92vh, 860px);
  display: grid; place-items: center;
  color: #fff; text-align: center;
  padding: clamp(110px, 14vw, 190px) 0;
  background: #c7633f url("../assets/hfth/hero-bg.jpg") center / cover no-repeat;
}
.hf-close-bg { position: absolute; inset: 0; z-index: -2; }
.hf-close-bg img { width: 100%; height: 100%; object-fit: cover; }
.hf-close-bg canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  filter: blur(2.2vmin);              /* constant, never animated (see .hf-logo3d) */
  animation: hf-fade 1.2s ease backwards;
}
.hf-close-bg.is-3d img { display: none; }
.hf-close::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120% 90% at 50% 50%, rgba(20, 8, 20, 0.12) 40%, rgba(20, 8, 20, 0.34) 100%);
}
.hf-close .hf-wordmark-sm { width: min(460px, 76vw); height: auto; margin: 0 auto; display: block; }
.hf-close p { margin-top: 22px; font-size: 13px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(255, 255, 255, 0.85); }
.hf-close .hero-ctas { justify-content: center; margin-top: 34px; }

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  .hf-field, .hf-logo3d.is-3d canvas, .hf-art canvas, .hf-close-bg canvas, .hf-wordmark, .hf-dates, .hf-cue, .hf-cue::after,
  .hf-blobs span, .hf-since-num, .hf-float canvas, .hf-bars3d canvas, .hf-impact-icon canvas { animation: none; }
}
