/* ===========================================================
   Teacher A's House of Learning — Laoag City Branch
   MOTION + DEPTH LAYER        added 2026-09-19 · 3D pass same day

   Purely additive. styles.css owns the palette and the layout;
   nothing here changes either. If this file fails to load the
   page still renders exactly as it did before.

   The vocabulary is taken from the client's OWN artwork — the
   teacher cards and the Kids-in-Action collages are built from
   soft organic blobs in cream / sage / gold / soft blue, with
   hand-drawn hearts and leaves. So the site moves the same way:
   slow, warm, rounded. Nothing snaps, nothing flashes.

   THE 3D MODEL (§15 onward). Two transforms per element, kept on
   two different nodes on purpose:
     · the OUTER node owns the scroll entrance and is transitioned
     · the INNER node owns continuous parallax and pointer tilt and
       is written every frame, so it must NOT be transitioned
   Putting both on one node makes every rAF write fight a running
   transition and the card judders. Keep them apart.

   Every effect below is switched off wholesale by the
   prefers-reduced-motion block at the foot of the file.
   =========================================================== */

/* ---------------------------------------------------------- 1. scroll progress */
.scroll-progress {
  position: fixed; inset: 0 auto auto 0; z-index: 300;
  height: 3px; width: 100%;
  transform: scaleX(var(--sp, 0)); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--sage-600), var(--gold) 65%, var(--gold-200));
  pointer-events: none; will-change: transform;
}

/* ---------------------------------------------------------- 2. ambient blobs
   Decorative only: aria-hidden in the markup, no hit area, and
   heavily blurred at low opacity under the content. */
.blobs {
  position: absolute; inset: 0; overflow: hidden;
  pointer-events: none; z-index: 0; border-radius: inherit;
}
.blobs + * { position: relative; z-index: 1; }

.blob { position: absolute; border-radius: 50%; filter: blur(46px); opacity: .5; will-change: transform; }
.blob-1 { width: 38vmax; height: 38vmax; left: -10vmax; top: -12vmax;
          background: radial-gradient(circle at 34% 34%, rgba(125,144,116,.50), rgba(125,144,116,0) 70%);
          animation: drift-a 34s ease-in-out infinite; }
.blob-2 { width: 30vmax; height: 30vmax; right: -8vmax; top: -6vmax;
          background: radial-gradient(circle at 60% 40%, rgba(185,137,71,.38), rgba(185,137,71,0) 70%);
          animation: drift-b 41s ease-in-out infinite; }
.blob-3 { width: 26vmax; height: 26vmax; right: 12%; bottom: -12vmax;
          background: radial-gradient(circle at 44% 50%, rgba(169,195,212,.48), rgba(169,195,212,0) 70%);
          animation: drift-c 47s ease-in-out infinite; }
.blob-4 { width: 22vmax; height: 22vmax; left: 26%; bottom: -10vmax;
          background: radial-gradient(circle at 50% 50%, rgba(225,193,152,.34), rgba(225,193,152,0) 70%);
          animation: drift-d 38s ease-in-out infinite; }

@keyframes drift-a { 0%,100% { transform: translate3d(0,0,0) scale(1); }
  33% { transform: translate3d(5vmax,3vmax,0) scale(1.09); } 66% { transform: translate3d(2vmax,6vmax,0) scale(.96); } }
@keyframes drift-b { 0%,100% { transform: translate3d(0,0,0) scale(1); }
  40% { transform: translate3d(-6vmax,4vmax,0) scale(1.12); } 70% { transform: translate3d(-2vmax,1vmax,0) scale(.94); } }
@keyframes drift-c { 0%,100% { transform: translate3d(0,0,0) scale(1); }
  45% { transform: translate3d(-4vmax,-5vmax,0) scale(1.08); } 75% { transform: translate3d(3vmax,-2vmax,0) scale(.97); } }
@keyframes drift-d { 0%,100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(4vmax,-4vmax,0) scale(1.1); } }

.section { position: relative; }
.section > .wrap { position: relative; z-index: 1; }
.section--cream2 .blob, .section--green .blob { opacity: .32; filter: blur(60px); }

/* ---------------------------------------------------------- 3. reveal on scroll */
.reveal { will-change: opacity, transform; }
.reveal, [data-anim] {
  opacity: 0;
  transition: opacity .7s cubic-bezier(.22,.61,.36,1),
              transform .7s cubic-bezier(.22,.61,.36,1),
              filter .7s cubic-bezier(.22,.61,.36,1);
  transition-delay: calc(var(--i, 0) * 85ms);
}
[data-anim="up"]    { transform: translate3d(0, 26px, 0); }
[data-anim="left"]  { transform: translate3d(-30px, 0, 0); }
[data-anim="right"] { transform: translate3d(30px, 0, 0); }
[data-anim="scale"] { transform: scale(.94); }
[data-anim="blur"]  { transform: translate3d(0, 18px, 0); filter: blur(7px); }
[data-anim="rise"]  { transform: translate3d(0, 40px, 0) scale(.97); }
.reveal.in, [data-anim].in { opacity: 1; transform: none; filter: none; }

/* ---------------------------------------------------------- 4. hero entrance */
.hero .hero-grid > div > *, .hero .hero-media > * {
  animation: hero-in .85s cubic-bezier(.22,.61,.36,1) both;
  animation-delay: calc(var(--d, 0) * 1ms);
}
.hero .eyebrow { --d: 60; }  .hero h1 { --d: 150; }
.hero .hero-lede { --d: 250; } .hero .hero-actions { --d: 350; } .hero .hero-trust { --d: 450; }
.hero .hero-media > *:nth-child(1) { --d: 260; }
.hero .hero-media > *:nth-child(2) { --d: 380; }
.hero .hero-media > *:nth-child(3) { --d: 470; }
@keyframes hero-in { from { opacity: 0; transform: translate3d(0,24px,0) scale(.985); } to { opacity: 1; transform: none; } }

/* The hero photo wall sits in real perspective and drifts as the
   page scrolls — each card on its own Z plane, so it reads as
   depth rather than as three sliding rectangles. */
.hero-media { perspective: 1400px; perspective-origin: 50% 45%; }
.hero-media .photo-card {
  transform-style: preserve-3d;
  transform:
    translate3d(0, calc(var(--py, 0) * 1px), 0)
    rotateX(calc(var(--py, 0) * .035deg))
    rotateY(calc(var(--pyr, 0) * 1deg));
  transition: box-shadow .5s ease;
}
.hero-media .photo-card:hover { box-shadow: var(--shadow-lg); }
.hero-media .photo-card img { transition: transform .7s cubic-bezier(.22,.61,.36,1); }
.hero-media .photo-card:hover img { transform: scale(1.035); }

/* ---------------------------------------------------------- 5. header */
.site-header { transition: box-shadow .3s ease, background-color .3s ease; }
.site-header .wrap { transition: min-height .3s cubic-bezier(.22,.61,.36,1), padding-block .3s ease; }
.site-header .brand img { transition: width .3s cubic-bezier(.22,.61,.36,1), height .3s cubic-bezier(.22,.61,.36,1); }
body.scrolled .site-header { background: rgba(250,247,242,.97); box-shadow: 0 6px 24px rgba(51,55,46,.09); }
body.scrolled .site-header .wrap { min-height: 62px; padding-block: 6px; }
body.scrolled .site-header .brand img { width: 40px; height: 40px; }

.nav a { position: relative; transition: color .2s ease, background-color .2s ease; }
.nav a::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 4px; height: 2px;
  background: var(--gold); border-radius: 2px;
  transform: scaleX(0); transform-origin: 50% 50%;
  transition: transform .28s cubic-bezier(.22,.61,.36,1);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------------------------------------------------------- 6. buttons */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .26s cubic-bezier(.34,1.56,.64,1), box-shadow .26s ease,
              background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 32%, rgba(255,255,255,.38) 50%, transparent 68%);
  transform: translateX(-120%); transition: transform .75s cubic-bezier(.22,.61,.36,1);
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn-ghost::after, .btn-white::after {
  background: linear-gradient(105deg, transparent 32%, rgba(125,144,116,.14) 50%, transparent 68%);
}
.btn-msg { background: var(--sage); color: #fff; box-shadow: var(--shadow-sm); }
.btn-msg:hover { background: var(--sage-700); color: #fff; box-shadow: 0 6px 18px rgba(125,144,116,.38), var(--shadow); }
.btn-msg svg { width: 1.2em; height: 1.2em; }
.section--green .btn-msg { background: #fff; color: var(--sage-800); }
.section--green .btn-msg:hover { background: #fff; color: var(--sage-900); box-shadow: 0 8px 22px rgba(0,0,0,.18); }

/* ---------------------------------------------------------- 7. cards */
.card, .why, .room, .step, .info-card {
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .34s cubic-bezier(.22,.61,.36,1), box-shadow .34s ease, border-color .34s ease;
}
.card::before, .why::before, .room::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.42) 50%, transparent 62%);
  transform: translateX(-130%); transition: transform .85s cubic-bezier(.22,.61,.36,1);
}
.card:hover::before, .why:hover::before, .room:hover::before { transform: translateX(130%); }
.card:hover, .why:hover, .room:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--sage-300); }
.card-icon { transition: transform .38s cubic-bezier(.34,1.56,.64,1), box-shadow .38s ease; }
.card:hover .card-icon { transform: translateY(-2px) scale(1.09) rotate(-3deg); box-shadow: var(--shadow-sm); }
.card:hover .card-link svg { transform: translateX(3px); }

/* Programme cards sit in perspective and tip toward the pointer. */
.cards { perspective: 1600px; }
.card { transform-style: preserve-3d; }
.cards .card:hover {
  transform:
    translateY(-6px)
    rotateX(calc(var(--ty, 0) * -4deg))
    rotateY(calc(var(--tx, 0) * 4deg));
}

/* ---------------------------------------------------------- 8. facts strip */
.facts .fact { overflow: hidden; }
.facts .fact strong { display: block; transition: transform .6s cubic-bezier(.22,.61,.36,1); }
.facts .fact:hover strong { transform: translateY(-2px); }
.facts.in .fact { animation: fact-in .7s cubic-bezier(.22,.61,.36,1) both; }
.facts.in .fact:nth-child(1) { animation-delay: 0s; }
.facts.in .fact:nth-child(2) { animation-delay: .09s; }
.facts.in .fact:nth-child(3) { animation-delay: .18s; }
.facts.in .fact:nth-child(4) { animation-delay: .27s; }
@keyframes fact-in { from { opacity: 0; transform: translate3d(0,18px,0); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------- 9. values ribbon */
.ribbon {
  background: var(--sage-800); color: #EAF0E6;
  padding-block: 16px; overflow: hidden; position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ribbon-track { display: flex; width: max-content; animation: ribbon 34s linear infinite; }
.ribbon:hover .ribbon-track, .ribbon:focus-within .ribbon-track { animation-play-state: paused; }
.ribbon-group { display: flex; align-items: center; flex: none; }
.ribbon-item {
  display: inline-flex; align-items: center; gap: 18px; padding-inline: 22px;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(.95rem, 1.9vw, 1.28rem);
  letter-spacing: .13em; text-transform: uppercase; white-space: nowrap;
}
.ribbon-item:nth-child(even) { color: var(--gold-200); }
.ribbon-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; opacity: .8; }
@keyframes ribbon { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } }

/* ===========================================================
   10. KIDS IN ACTION — the 3D photo wall
   -----------------------------------------------------------
   ⚠️ This was a CSS multi-column masonry and it had to change.
   Columns re-fragment every time a lazily-loaded image lands, so
   tiles kept jumping between columns mid-scroll, which in turn
   made Chrome re-evaluate lazy-loading and paint alt text in the
   gap. That is the "images appear and disappear" bug.

   The fix is a plain grid where EVERY tile's height is known
   before a single byte of image arrives: each figure carries an
   inline `--ar` (its true aspect ratio) and the media box uses it.
   Nothing reflows, so nothing thrashes. Keep it that way — do not
   put `columns` back, and do not drop the inline --ar.
   =========================================================== */
#kids { perspective: 1600px; perspective-origin: 50% 42%; }
.action-grid {
  display: grid; gap: 26px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  transform-style: preserve-3d;
}
/* The five collages are three different shapes, so a row of them
   never bottoms out level. Rather than crop the client's artwork
   to force a tidy grid, the columns are deliberately stepped —
   the stagger makes the uneven bottoms read as a composed wall
   instead of an accident, and it is fixed at every width, so
   nothing moves once the page has laid out. */
.action-grid > *:nth-child(3n+2) { margin-top: 38px; }
.action-grid > *:nth-child(3n)   { margin-top: 76px; }

@media (max-width: 1000px) {
  .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .action-grid > *:nth-child(3n+2), .action-grid > *:nth-child(3n) { margin-top: 0; }
  .action-grid > *:nth-child(2n) { margin-top: 44px; }
}
@media (max-width: 620px) {
  .action-grid { grid-template-columns: 1fr; }
  .action-grid > * { margin-top: 0 !important; }
}

.action-shot {
  margin: 0; transform-style: preserve-3d; cursor: zoom-in;
  /* entrance only — transitioned. Parallax lives on .shot-inner. */
  opacity: 0;
  transform: translate3d(0, 64px, 0) translateZ(-220px) rotateX(22deg);
  transition: opacity .9s cubic-bezier(.22,.61,.36,1), transform .9s cubic-bezier(.22,.61,.36,1);
  transition-delay: calc(var(--i, 0) * 110ms);
}
.action-shot.in { opacity: 1; transform: none; }

.shot-inner {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  transform-style: preserve-3d; will-change: transform;
  /* written every frame — a transition here would fight the rAF loop */
  transform:
    translate3d(0, calc(var(--py, 0) * 1px), 0)
    rotateX(calc(var(--rx, 0) * 1deg))
    rotateY(calc(var(--ry, 0) * 1deg))
    scale(var(--sc, 1));
  transition: box-shadow .4s ease, border-color .4s ease;
}
.action-shot:hover .shot-inner, .action-shot:focus-visible .shot-inner {
  box-shadow: 0 30px 70px rgba(51,55,46,.24), var(--shadow-lg);
  border-color: var(--gold-200);
}

/* The media box reserves its exact height from --ar before the
   image loads. This is what stops the flicker. */
.shot-media { position: relative; aspect-ratio: var(--ar, 1); overflow: hidden; background: var(--cream-2); }
.shot-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: translateZ(0) scale(var(--imgs, 1));
  transition: transform .9s cubic-bezier(.22,.61,.36,1);
}
.action-shot:hover .shot-media img { --imgs: 1.06; }

/* A soft light that tracks the pointer across the tile. */
.shot-glare {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
              rgba(255,255,255,.38), rgba(255,255,255,0) 60%);
  transition: opacity .35s ease;
}
.action-shot:hover .shot-glare { opacity: 1; }

.action-shot figcaption {
  padding: 15px 18px 17px; font-size: .9rem; color: var(--ink-2);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  position: relative; z-index: 4; background: #fff;
  transform: translateZ(28px);
}
.action-shot .zoom-hint {
  width: 31px; height: 31px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--sage-100); color: var(--sage-700);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), background-color .3s ease, color .3s ease;
}
.action-shot .zoom-hint svg { width: 15px; height: 15px; }
.action-shot:hover .zoom-hint { transform: scale(1.16) rotate(8deg); background: var(--gold); color: #fff; }

/* the sixth tile — closes the wall and points at Facebook */
.action-more {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 28px 26px 26px;
  background: linear-gradient(160deg, var(--sage-100), var(--cream-2));
  border: 1px solid var(--sage-200); border-radius: var(--radius-lg);
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm);
  transform-style: preserve-3d;
  opacity: 0; transform: translate3d(0, 64px, 0) translateZ(-220px) rotateX(22deg);
  transition: opacity .9s cubic-bezier(.22,.61,.36,1), transform .9s cubic-bezier(.22,.61,.36,1),
              box-shadow .4s ease, border-color .4s ease;
  transition-delay: calc(var(--i, 0) * 110ms);
}
.action-more.in { opacity: 1; transform: none; }
.action-more.in:hover { transform: translateY(-8px) scale(1.015); box-shadow: var(--shadow-lg); border-color: var(--sage-300); color: var(--ink); }
.action-more-icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: #fff; color: var(--sage-700); margin-bottom: 4px;
  transition: transform .38s cubic-bezier(.34,1.56,.64,1);
}
.action-more:hover .action-more-icon { transform: scale(1.1) rotate(-5deg); }
.action-more-icon svg { width: 22px; height: 22px; }
.action-more strong { font-family: var(--display); font-size: 1.08rem; line-height: 1.25; }
.action-more > span:not(.action-more-icon):not(.action-more-go) { font-size: .92rem; color: var(--ink-2); }
.action-more-go {
  margin-top: 6px; display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--display); font-weight: 700; font-size: .93rem; color: var(--sage-700);
}
.action-more-go svg { width: 16px; height: 16px; transition: transform .25s ease; }
.action-more:hover .action-more-go svg { transform: translateX(4px); }

/* ---------------------------------------------------------- 10b. lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 400;
  display: grid; place-items: center; padding: clamp(14px, 4vw, 40px);
  background: rgba(38,42,34,.84);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; perspective: 1600px;
  transition: opacity .32s ease, visibility .32s;
}
.lightbox[data-open="true"] { opacity: 1; visibility: visible; }
.lightbox-figure {
  margin: 0; max-width: min(92vw, 880px); max-height: 88vh;
  display: flex; flex-direction: column; gap: 12px;
  transform: scale(.9) translateY(18px) rotateX(10deg);
  transition: transform .45s cubic-bezier(.22,.61,.36,1);
}
.lightbox[data-open="true"] .lightbox-figure { transform: none; }
.lightbox-figure img {
  max-height: 76vh; width: auto; margin-inline: auto;
  border-radius: var(--radius-lg); box-shadow: 0 34px 90px rgba(0,0,0,.5); background: var(--cream);
}
.lightbox-cap { color: #F1F3EE; font-size: .93rem; text-align: center; font-family: var(--display); font-weight: 600; }
.lb-btn {
  position: absolute; z-index: 2; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.14); color: #fff; cursor: pointer;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: background-color .22s ease, transform .22s ease, border-color .22s ease;
}
.lb-btn:hover { background: rgba(255,255,255,.28); transform: scale(1.08); border-color: rgba(255,255,255,.5); }
.lb-btn svg { width: 21px; height: 21px; }
.lb-close { top: clamp(12px,3vw,26px); right: clamp(12px,3vw,26px); }
.lb-prev  { left: clamp(8px,2vw,26px);  top: 50%; transform: translateY(-50%); }
.lb-next  { right: clamp(8px,2vw,26px); top: 50%; transform: translateY(-50%); }
.lb-prev:hover, .lb-next:hover { transform: translateY(-50%) scale(1.08); }
body.lb-open { overflow: hidden; }
@media (max-width: 620px) {
  .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; }
  .lb-prev:hover, .lb-next:hover { transform: scale(1.08); }
}

/* ===========================================================
   11. OUR TEAM — the four of them, treated as the headline
   -----------------------------------------------------------
   These are the people a parent is handing their child to, so
   they get the most deliberate motion on the page: a rotating
   halo, a pointer-tracked 3D tilt with the photo and the
   nameplate on separate Z planes, and a spotlight that follows
   the cursor across the whole band.
   =========================================================== */
#team {
  perspective: 1800px; perspective-origin: 50% 40%; overflow: hidden;
  padding-block: clamp(64px, 8vw, 110px);
  background:
    radial-gradient(1200px 520px at 50% -10%, rgba(185,137,71,.11), transparent 62%),
    radial-gradient(900px 480px at 8% 112%, rgba(125,144,116,.16), transparent 60%),
    linear-gradient(180deg, var(--cream-2), var(--cream) 55%, var(--cream-3));
}
#team .wrap { position: relative; z-index: 2; }
#team .sec-head h2 { font-size: clamp(1.8rem, 4vw, 2.75rem); }

/* cursor spotlight across the band */
.team-spot {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  background: radial-gradient(620px circle at var(--sx, 50%) var(--sy, 40%),
              rgba(185,137,71,.18), rgba(185,137,71,0) 62%);
  transition: opacity .5s ease;
}
#team:hover .team-spot { opacity: 1; }

/* On a wide screen the four of them break out past the 1140 wrap —
   they are the reason a parent chooses this centre, so they get more
   room than anything else on the page. */
.team-grid {
  display: grid; gap: 34px 28px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  transform-style: preserve-3d;
}
@media (min-width: 1280px) {
  .team-grid { width: calc(100vw - 80px); max-width: 1320px; margin-inline: calc(50% - min(50vw - 40px, 660px)); }
}
@media (max-width: 1040px) { .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .team-grid { grid-template-columns: 1fr; max-width: 380px; margin-inline: auto; } }

.member {
  position: relative; margin: 0; background: none; border: 0; box-shadow: none; overflow: visible;
  transform-style: preserve-3d;
  opacity: 0; transform: translate3d(0, 70px, 0) translateZ(-260px) rotateY(24deg) rotateX(10deg);
  transition: opacity 1s cubic-bezier(.22,.61,.36,1), transform 1s cubic-bezier(.22,.61,.36,1);
  transition-delay: calc(var(--i, 0) * 130ms);
}
.member.in { opacity: 1; transform: none; }

/* A turning halo behind each portrait — always on, not a hover
   trick, so the row glows even in a screenshot. */
.member-halo {
  position: absolute; inset: -22px -18px 22% -18px; z-index: 0; pointer-events: none;
  border-radius: 34px;
  background: conic-gradient(from 0deg,
    rgba(185,137,71,.62), rgba(169,195,212,.48), rgba(125,144,116,.58),
    rgba(225,193,152,.55), rgba(185,137,71,.62));
  filter: blur(22px); opacity: .62;
  animation: halo 20s linear infinite;
  animation-delay: calc(var(--i, 0) * -4s);
  transition: opacity .5s ease;
}
@keyframes halo { to { transform: rotate(360deg); } }
.member:hover .member-halo { opacity: 1; }

/* and a settled glow directly under the card */
.member::after {
  content: ""; position: absolute; left: 12%; right: 12%; bottom: -6px; height: 26px;
  background: radial-gradient(60% 100% at 50% 0%, rgba(51,55,46,.24), transparent 72%);
  filter: blur(9px); z-index: 0; pointer-events: none;
  transition: opacity .45s ease, transform .45s ease;
}
.member:hover::after { transform: translateY(7px) scaleX(1.06); }

.member-inner {
  position: relative; z-index: 1;
  border-radius: 22px; overflow: hidden;
  background: #fff;
  border: 1px solid var(--gold-200);
  box-shadow: 0 2px 4px rgba(51,55,46,.06), 0 18px 44px rgba(51,55,46,.14);
  transform-style: preserve-3d; will-change: transform;
  transform:
    translate3d(0, calc(var(--py, 0) * 1px), 0)
    rotateX(calc(var(--rx, 0) * 1deg))
    rotateY(calc(var(--ry, 0) * 1deg))
    scale(var(--sc, 1));
  transition: box-shadow .45s ease, border-color .45s ease;
}
.member:hover .member-inner {
  box-shadow: 0 40px 90px rgba(51,55,46,.3), 0 0 0 1px var(--gold-200);
  border-color: var(--gold);
}

/* A very slow idle rise, so the row is alive before anyone touches
   it. This uses the independent `translate` property rather than
   `transform` on purpose: `transform` is already occupied by the
   pointer tilt and the scroll parallax, and animating a margin here
   would force layout on every frame. `translate` composes with
   `transform` and stays on the compositor. */
.member.in .member-inner {
  animation: member-float 9s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -2.2s);
}
.member:hover .member-inner { animation-play-state: paused; }
@keyframes member-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }

.member-photo { position: relative; overflow: hidden; aspect-ratio: 1; background: var(--cream-2); }
.member-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scale(var(--imgs, 1)); transition: transform 1s cubic-bezier(.22,.61,.36,1);
}
.member:hover .member-photo img { --imgs: 1.07; }
.member-photo::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  box-shadow: inset 0 0 0 0 var(--gold); transition: box-shadow .45s ease;
}
.member:hover .member-photo::after { box-shadow: inset 0 0 0 3px var(--gold-200); }

.member-glare {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%),
              rgba(255,255,255,.46), rgba(255,255,255,0) 58%);
  transition: opacity .4s ease;
}
.member:hover .member-glare { opacity: 1; }

.member-body {
  position: relative; z-index: 4; text-align: center;
  padding: 20px 16px 26px;
  background: linear-gradient(180deg, #fff, var(--cream));
  transform: translateZ(40px);
}
.member-body h3 { font-size: clamp(1.06rem, 1.5vw, 1.2rem); margin: 0 0 5px; }
.member-role {
  font-size: .73rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--gold-dark); margin: 0;
}
.member-body::after {
  content: ""; position: absolute; left: 50%; bottom: 15px; height: 2px; width: 26px;
  background: var(--gold-200); border-radius: 2px; transform: translateX(-50%);
  transition: width .5s cubic-bezier(.22,.61,.36,1), background-color .5s ease;
}
.member:hover .member-body::after { width: 58px; background: var(--gold); }

/* the program head leads the row */
.member--lead .member-inner { border-color: var(--gold); }
.member--lead .member-halo { opacity: .82; }
.member--lead .member-photo::after { box-shadow: inset 0 0 0 2px var(--gold-200); }

/* ---------------------------------------------------------- 12. floating buttons */
.fab { transition: transform .28s cubic-bezier(.34,1.56,.64,1), box-shadow .28s ease; }
.fab:hover { transform: translateY(-3px) scale(1.06); }
.fab-msg { position: relative; }
.fab-msg::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  border: 2px solid var(--sage);
  animation: fab-ping 2.6s cubic-bezier(.22,.61,.36,1) 2.5s 4; pointer-events: none;
}
@keyframes fab-ping {
  0% { transform: scale(1); opacity: .7; }
  70%,100% { transform: scale(1.55); opacity: 0; }
}

/* ===========================================================
   13. WHAT PARENTS SAY
   -----------------------------------------------------------
   ⚠️ This was `columns: 3 300px`. The quotes run from 287 to 849
   characters, so the columns could not balance and the section
   read as a ragged waterfall with a hole in one column — that is
   the "all over the place" report.

   It is now an even grid. Every card is the same height; the long
   ones are clamped with a fade and open in place. No word is
   removed — render_schema.py asserts each review string is visible
   on the page, and CSS clamping keeps the text in the DOM.
   =========================================================== */
.quotes {
  display: grid; gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  columns: auto;            /* unset the old masonry */
  align-items: stretch;
  perspective: 1600px;
}
@media (max-width: 980px) { .quotes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .quotes { grid-template-columns: 1fr; } }

.quote {
  display: flex; flex-direction: column; margin: 0;
  transform-style: preserve-3d;
  transition: transform .4s cubic-bezier(.22,.61,.36,1), box-shadow .4s ease, border-color .4s ease;
}
.quote:hover {
  transform:
    translateY(-6px)
    rotateX(calc(var(--ty, 0) * -3.5deg))
    rotateY(calc(var(--tx, 0) * 3.5deg));
  box-shadow: var(--shadow-lg); border-color: var(--gold-200);
}

/* the clamp: ~9 lines, with the last one fading out */
.quote-body { position: relative; overflow: hidden; transition: max-height .55s cubic-bezier(.22,.61,.36,1); }
.quote-body[data-clamped="true"] { max-height: 15.2em; }
.quote-body[data-clamped="true"]::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 4.2em; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--quote-bg, #fff) 82%);
}
.quote:nth-child(4n+2) { --quote-bg: var(--sage-50); }
.quote:nth-child(4n+4) { --quote-bg: var(--blue-100); }
.quote-body[data-clamped="false"] { max-height: 200em; }
.quote-body[data-clamped="false"]::after { opacity: 0; }

.quote-more {
  align-self: flex-start; margin-top: 12px; padding: 0;
  background: none; border: 0; cursor: pointer;
  font-family: var(--display); font-weight: 700; font-size: .88rem;
  color: var(--sage-700); display: inline-flex; align-items: center; gap: 6px;
}
.quote-more:hover { color: var(--gold-dark); }
.quote-more svg { width: 14px; height: 14px; transition: transform .3s ease; }
.quote-more[aria-expanded="true"] svg { transform: rotate(180deg); }
.quote figcaption { margin-top: auto; }

/* ---------------------------------------------------------- 14. small polish */
.sec-head .eyebrow::before { transition: width .7s cubic-bezier(.22,.61,.36,1) .15s; }
.sec-head.reveal .eyebrow::before, .sec-head[data-anim] .eyebrow::before { width: 0; }
.sec-head.in .eyebrow::before { width: 22px; }
:where(section[id], div[id]) { scroll-margin-top: 86px; }

/* ---------------------------------------------------------- 15. reduced motion
   One switch. Everything above becomes static, and nothing that
   was revealed on scroll can stay hidden. */
@media (prefers-reduced-motion: reduce) {
  .scroll-progress { display: none; }
  .blob, .member-halo, .ribbon-track { animation: none !important; }
  .member.in .member-inner { animation: none !important; translate: none !important; }
  .member::after { display: none !important; }
  .reveal, [data-anim] { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  .hero .hero-grid > div > *, .hero .hero-media > *, .facts.in .fact {
    animation: none !important; opacity: 1 !important; transform: none !important;
  }
  .hero-media .photo-card, .shot-inner, .member-inner { transform: none !important; }
  .action-shot, .action-more, .member { opacity: 1 !important; transform: none !important; transition: none !important; }
  .btn::after, .card::before, .why::before, .room::before,
  .shot-glare, .member-glare, .team-spot { display: none !important; }
  .fab-msg::before { animation: none !important; opacity: 0 !important; }
  .card:hover, .why:hover, .room:hover, .quote:hover,
  .action-more.in:hover, .btn:hover, .fab:hover { transform: none !important; }
  .quote-body[data-clamped="true"] { max-height: none; }
  .quote-body[data-clamped="true"]::after { display: none; }
  .quote-more { display: none; }
  .sec-head.in .eyebrow::before, .sec-head .eyebrow::before { width: 22px; transition: none; }
}
