/* ============================================================
   Amir Institute — css/index.css
   Page stylesheet for index.html. Loaded AFTER css/site.css,
   so anything here intentionally overrides the shared base.
   ============================================================ */
/* ════════ LAYOUT — wide container, capped reading measure ════════
   The shell goes near-full-width so the page fills large screens, but prose
   inside single-column blocks is capped around 64-72 characters, because a
   paragraph running the full 1760px is unreadable. Grids take the extra room;
   text does not.                                                              */
:root{ --maxw:1760px; --pad:clamp(20px,4.2vw,72px); --measure:66ch; }
.wrap{max-width:var(--maxw);padding-left:var(--pad);padding-right:var(--pad)}

/* centred section intros */
.sec-head{max-width:860px}
.sec-head p,.sec-head .lede{max-width:70ch;margin-left:auto;margin-right:auto}

/* prose inside two-column splits must not run the full column */
.split>div p,.split>div .feat li,
.prev-grid>div>p,.sup-grid>div>p,
.diff-head>p,.diff-head>.lede,
.gb-side p,.gblock>div>p,
.subbrand-card p,.dot-card p,.person p{max-width:var(--measure)}
.diff-head>.lede,.diff-head>p{max-width:62ch;justify-self:end}

/* wide blocks scale with the container instead of staying pinned narrow */
.real-list{max-width:1280px}
.punch{max-width:1040px}
.statband .inner{max-width:none}
.week-rail{max-width:1560px;margin-left:auto;margin-right:auto}
.week-foot{max-width:1560px;margin-left:auto;margin-right:auto}
.ev-grid,.svc-grid,.give-grid,.dots{max-width:none}

/* the contact form is shorter than the card column beside it - let it track
   the scroll instead of leaving a tall empty well on the right */
@media (min-width:1041px){
  .cform{position:sticky;top:112px}
}

/* mosaic rows must grow with the viewport or tiles go letterbox-thin */
.mosaic{grid-auto-rows:clamp(160px,11.5vw,260px)}
.mosaic-sec{padding-top:clamp(60px,7.5vw,108px)}

/* a touch more air between columns once there is room for it */
@media (min-width:1500px){
  .hero-grid{grid-template-columns:minmax(0,1.12fr) minmax(0,.88fr);gap:76px}
  .split,.prev-grid,.school-grid{gap:78px}
  .cgrid,.sup-grid{gap:70px}
  .clinic-card{gap:66px}
  .phero-grid{gap:66px}
  .hero h1{max-width:15ch}
  .hero p.lede{max-width:56ch}
}
/* the type scale was tuned for a 1200px shell - lift it for the wider one */
@media (min-width:1500px){
  body{font-size:17.5px}
  h1{font-size:clamp(3.4rem,3.6vw,4.7rem)}
  h2{font-size:clamp(2.5rem,2.5vw,3.3rem)}
  h3{font-size:clamp(1.5rem,1.5vw,1.85rem)}
  .lede{font-size:1.24rem}
  .stat-n{font-size:2.8rem}
  .stat-l{font-size:.9rem}
  .dot-card p,.svc p,.give p{font-size:.98rem}
  .pill span{font-size:.95rem}
  .pill strong{font-size:1.05rem}
  .need span{font-size:.94rem}
  .day-card p{font-size:.9rem}
}
@media (min-width:1900px){
  body{font-size:18px}
  .sec{padding-top:124px;padding-bottom:124px}
  .hero-inner{padding-top:120px}
}
/* ═══ QUICK LINKS — the row a school site lives on ═══ */
.quick{position:relative;z-index:6;margin-top:-58px}
.quick .inner{display:grid;grid-template-columns:repeat(4,1fr);gap:0;overflow:hidden;
  background:#fff;border:1px solid var(--line);border-radius:var(--r-xl);box-shadow:var(--shadow-lg)}
.qk{display:flex;gap:15px;align-items:center;padding:26px 24px;border-right:1px solid var(--line);
  transition:.22s;background:#fff}
.qk:last-child{border-right:0}
.qk:hover{background:var(--cream)}
.qk:hover .qk-ic{background:var(--green-800);color:var(--gold-light);transform:translateY(-2px)}
.qk-ic{width:48px;height:48px;border-radius:14px;background:var(--green-100);color:var(--green-700);
  display:grid;place-items:center;flex:none;transition:.22s}
.qk-ic svg{width:24px;height:24px}
.qk b{display:block;font-size:1rem;color:var(--ink);line-height:1.25}
.qk span{display:block;font-size:.84rem;color:var(--muted);margin-top:3px;line-height:1.4}
@media (max-width:1040px){.quick{margin-top:-30px}.quick .inner{grid-template-columns:repeat(2,1fr)}
  .qk:nth-child(2){border-right:0}.qk:nth-child(1),.qk:nth-child(2){border-bottom:1px solid var(--line)}}
@media (max-width:620px){.quick .inner{grid-template-columns:1fr}
  .qk{border-right:0;border-bottom:1px solid var(--line)}.qk:last-child{border-bottom:0}}

/* index: the quick-link card overlaps the hero; the numbers sit below it as
   their own band rather than fusing into one confusing slab */
.statband.numbers{margin-top:0;padding-top:clamp(42px,5vw,66px)}
.statband.numbers .inner{box-shadow:none;background:transparent;border:0;
  border-top:1px solid var(--line);border-radius:0;padding-top:8px}
.statband.numbers .stat{border-right:1px solid var(--line)}
.statband.numbers .stat:last-child{border-right:0}
@media (max-width:1040px){
  .statband.numbers .stat:nth-child(2){border-right:0}
}

/* single-column hero: copy over photograph, nothing floating on top of it */
.hero-grid{grid-template-columns:minmax(0,1fr)}
.hero-copy{max-width:min(760px,62%)}
.hero h1{max-width:14ch}
.hero-inner{padding-top:clamp(74px,9vw,128px);padding-bottom:clamp(116px,12vw,164px)}
@media (min-width:1500px){
  .hero-grid{grid-template-columns:minmax(0,1fr)}
  .hero h1{max-width:13ch}
}
@media (max-width:1040px){ .hero-copy{max-width:none} }
/* ════════════════ COMMUNITY LIFE — cards, panels, activities ════════════════
   Palette is inherited from :root (forest #07382D, sage #8DAA93, ivory #FAF8F0,
   sand #EADFCB, gold #C9972E, deep green #2E3A2F). Montserrat throughout.
   Progress lives in a JS variable for the page session only — no storage,
   no accounts, no child data.                                               */
.commlife{background:var(--ivory);scroll-margin-top:150px}
@media (max-width:1040px){.commlife{scroll-margin-top:120px}}

/* ── passport ── */
.passport{display:flex;align-items:center;gap:clamp(16px,2.4vw,34px);flex-wrap:wrap;
  background:#fff;border:1px solid var(--line);border-radius:var(--r-xl);
  padding:clamp(20px,2.4vw,28px) clamp(22px,2.6vw,34px);box-shadow:var(--shadow-sm);
  max-width:1000px;margin:0 auto clamp(38px,4.5vw,58px)}
.passport-h{flex:none}
.passport-h b{display:block;font-size:1.02rem;color:var(--ink);line-height:1.25}
.passport-h span{display:block;font-size:.84rem;color:var(--muted);margin-top:3px}
.stamps{display:flex;gap:10px;flex-wrap:wrap;flex:1;min-width:0}
.stamp{display:flex;flex-direction:column;align-items:center;gap:7px;min-width:84px;flex:1}
.stamp-disc{width:50px;height:50px;border-radius:50%;display:grid;place-items:center;
  border:2px dashed var(--sage);color:var(--sage);background:var(--ivory);
  transition:transform .3s cubic-bezier(.3,1.4,.5,1),background .3s,border-color .3s,color .3s}
.stamp-disc svg{width:24px;height:24px}
.stamp.got .stamp-disc{border-style:solid;border-color:var(--gold);
  background:var(--gold);color:#2E3A2F}
.stamp.pop .stamp-disc{transform:scale(1.18)}
.stamp-l{font-size:.74rem;font-weight:700;letter-spacing:.04em;color:var(--muted);text-align:center;line-height:1.3}
.stamp.got .stamp-l{color:var(--ink)}
.passport-reset{flex:none;background:none;border:0;font:inherit;font-size:.84rem;font-weight:700;
  color:var(--green-700);cursor:pointer;padding:12px 10px;border-radius:9px;min-height:44px}
.passport-reset:hover{background:var(--green-100)}
.passport-note{flex-basis:100%;font-size:.8rem;color:var(--muted);margin:0}

/* ── cards ── */
.clgrid{display:grid;grid-template-columns:repeat(2,1fr);gap:clamp(20px,2.4vw,30px);
  max-width:1280px;margin:0 auto}
.clcard{background:#fff;border:1px solid var(--line);border-radius:var(--r-xl);overflow:hidden;
  display:flex;flex-direction:column;
  transition:transform .25s ease,box-shadow .25s ease}
.clcard:hover,.clcard:focus-within{transform:translateY(-3px);box-shadow:var(--shadow)}
.clfig{position:relative;background:var(--sand);aspect-ratio:3/2;overflow:hidden}
.clfig img{width:100%;height:100%;object-fit:cover;display:block}
.clbadge{position:absolute;left:16px;top:16px;background:rgba(250,248,240,.95);
  color:var(--ink);border:1px solid rgba(7,56,45,.14);border-radius:999px;
  padding:7px 15px;font-size:.76rem;font-weight:800;letter-spacing:.04em;
  box-shadow:0 4px 14px rgba(7,56,45,.12)}
.clbody{padding:clamp(22px,2.4vw,30px);display:flex;flex-direction:column;flex:1}
.clbody h3{font-size:1.28rem;margin-bottom:9px}
.clbody p{font-size:.96rem;line-height:1.62;margin-bottom:18px;flex:1}
.act-toggle{align-self:flex-start;min-height:44px}
.act-toggle .chev{width:15px;height:15px;transition:transform .25s}
.act-toggle[aria-expanded="true"] .chev{transform:rotate(180deg)}

/* ── expanding activity panel ── */
.actpanel{border-top:1px solid var(--line);background:var(--ivory);
  padding:clamp(22px,2.4vw,30px)}
.actpanel[hidden]{display:none}
.act-h{font-size:1.02rem;font-weight:800;color:var(--ink);margin:0 0 4px}
.act-sub{font-size:.88rem;color:var(--muted);margin:0 0 18px;line-height:1.5}
.act-step{font-size:.74rem;font-weight:800;letter-spacing:.13em;text-transform:uppercase;
  color:var(--gold-dark);display:block;margin-bottom:9px}
.chips{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:18px}
.chip-btn{font:inherit;font-size:.9rem;font-weight:600;min-height:44px;padding:10px 18px;
  border-radius:999px;border:1.5px solid var(--line);background:#fff;color:var(--ink);
  cursor:pointer;transition:.18s}
.chip-btn:hover{border-color:var(--sage);background:var(--green-100)}
.chip-btn[aria-pressed="true"]{background:var(--green-800);border-color:var(--green-800);color:#fff}
.act-out{background:#fff;border:1px solid var(--line);border-left:4px solid var(--gold);
  border-radius:var(--r);padding:20px 22px;margin-bottom:16px}
.act-out p{margin:0 0 10px}
.act-out p:last-child{margin-bottom:0}
.act-out .big{font-size:1.1rem;line-height:1.5;color:var(--ink);font-weight:600}
.act-out .hint{font-size:.9rem;color:var(--body)}
.act-row{display:flex;gap:10px;flex-wrap:wrap}
.act-row .btn{min-height:44px}
.act-note{font-size:.84rem;color:var(--muted);margin:14px 0 0;line-height:1.55}

/* ── breathing ring (state-driven, never free-running) ── */
.breath{display:flex;flex-direction:column;align-items:center;gap:16px;padding:10px 0 4px}
.ring-wrap{width:188px;height:188px;display:grid;place-items:center;position:relative}
.ring-bg{position:absolute;inset:0;border-radius:50%;border:2px dashed var(--sage);opacity:.5}
.ring{width:84px;height:84px;border-radius:50%;
  background:radial-gradient(circle at 42% 38%,#BBD0BE,var(--sage));
  display:grid;place-items:center;
  transition:transform var(--bt,3s) cubic-bezier(.45,.05,.55,.95)}
.ring svg{width:38px;height:38px;color:#07382D;opacity:.72}
.breath-word{font-size:1.1rem;font-weight:700;color:var(--ink);min-height:1.6em;text-align:center}
.breath-count{font-size:.86rem;color:var(--muted)}
@media (prefers-reduced-motion:reduce){
  .ring{transition:none}
}

/* ── rhythm maker ── */
.beats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:16px;max-width:420px}
.beat{aspect-ratio:1;border-radius:var(--r);border:2px dashed var(--sage);background:#fff;
  display:grid;place-items:center;font-size:.8rem;font-weight:800;color:var(--muted);
  text-align:center;padding:6px;transition:.2s;line-height:1.2}
.beat.set{border-style:solid;border-color:var(--green-700);background:var(--green-100);color:var(--green-800)}
.beat.on{background:var(--gold);border-color:var(--gold);color:#2E3A2F;transform:scale(1.06)}
@media (prefers-reduced-motion:reduce){.beat{transition:none}.beat.on{transform:none;outline:3px solid var(--gold-dark)}}
.pads{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:18px;max-width:420px}
.pad{font:inherit;font-size:.92rem;font-weight:800;min-height:54px;border-radius:var(--r);
  border:1.5px solid var(--line);background:#fff;color:var(--ink);cursor:pointer;transition:.16s}
.pad:hover{background:var(--sand);border-color:var(--sage)}
.pad:active{transform:scale(.96)}
.sound-row{display:flex;align-items:center;gap:9px;font-size:.86rem;color:var(--body);margin-top:14px}
.sound-row input{width:18px;height:18px;accent-color:var(--green-800)}
.sound-row label{cursor:pointer;min-height:44px;display:flex;align-items:center}

/* ── decorative accents: play once after interaction, then settle ── */
.accent{position:absolute;pointer-events:none;opacity:0;transition:opacity .4s}
.accent.go{opacity:1}
.accent-steam{right:14%;top:8%;width:52px;height:62px;color:#FAF8F0}
.accent-steam path{stroke-dasharray:44;stroke-dashoffset:44}
.accent.go .accent-steam path,.accent-steam.go path{animation:steam 2.6s ease-out forwards}
@keyframes steam{to{stroke-dashoffset:-44}}
.accent-sun{right:9%;top:9%;width:54px;height:54px;color:#C9972E}
.accent.go.accent-sun{animation:sungrow .9s cubic-bezier(.3,1.3,.5,1) forwards}
@keyframes sungrow{from{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}
.accent-ring{right:10%;top:12%;width:62px;height:62px;color:#8DAA93}
.accent.go.accent-ring circle{animation:ringpulse 2.2s ease-out forwards}
@keyframes ringpulse{from{r:6;opacity:.9}to{r:28;opacity:0}}
.accent-spark{right:8%;top:10%;width:66px;height:66px;color:#C9972E}
.accent.go.accent-spark g>*{animation:spark 1.5s ease-out forwards}
.accent.go.accent-spark g>*:nth-child(2){animation-delay:.18s}
.accent.go.accent-spark g>*:nth-child(3){animation-delay:.36s}
@keyframes spark{0%{transform:scale(0);opacity:0}45%{transform:scale(1);opacity:1}100%{transform:scale(.7);opacity:0}}

/* ── one-time entrance ──
   Scoped to .js-anim, which JS adds to <html> on boot. Without JS the cards
   are simply visible — nothing is hidden behind an animation that may never
   run. */
.js-anim .cl-in{opacity:0;transform:translateY(12px)}
.js-anim .cl-in.shown{opacity:1;transform:none;
  transition:opacity .45s ease,transform .45s cubic-bezier(.2,.7,.3,1)}

@media (prefers-reduced-motion:reduce){
  .js-anim .cl-in,.js-anim .cl-in.shown{opacity:1;transform:none;transition:none}
  .clcard:hover,.clcard:focus-within{transform:none}
  .accent,.accent.go{animation:none!important;opacity:1}
  .stamp-disc{transition:none}
}

@media (max-width:900px){
  .clgrid{grid-template-columns:1fr}
  .passport{flex-direction:column;align-items:flex-start}
  .stamps{width:100%}
}
@media (max-width:420px){
  .stamp{min-width:68px}
  .stamp-disc{width:44px;height:44px}
  .stamp-l{font-size:.68rem}
  .pads,.beats{grid-template-columns:repeat(2,1fr)}
}

.sr-live{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* card titles are <h3> so the heading order never skips a level;
   these keep the compact card look that <h4> used to give them */
.svc h3,.dot-card h3,.give h3,.person h3,.ev-body h3,.pt h3{
  font-weight:700;letter-spacing:-.005em;line-height:1.3}
.svc h3{font-size:1.06rem}.dot-card h3{font-size:1.04rem}
.give h3{font-size:1.02rem}.person h3{font-size:1.04rem}
.ev-body h3{font-size:1.08rem}.pt h3{font-size:1rem}

/* footer column titles and small card titles are <h3> for correct heading
   order; these keep the small-caps label look they had as <h4> */
.ftr h3{color:#fff;font-size:.82rem;letter-spacing:.14em;text-transform:uppercase;
  margin-bottom:18px;font-weight:700}
.hours-card h3{color:#fff;font-size:1.02rem;margin-bottom:16px;font-weight:700;letter-spacing:0}
.tr h3{font-size:1.06rem;margin-bottom:7px;font-weight:700;letter-spacing:-.005em}

/* ════════════════ PARTNERS ════════════════
   One row that never stops. The thirteen tiles are rendered twice inside
   .plogo-track and the track is translated by exactly -50%, so the second
   copy arrives in the first copy's starting position and the loop has no
   seam. The duplicate is aria-hidden, so a screen reader hears thirteen
   partners, not twenty-six.

   The logos arrive in wildly different shapes, so each sits on its own
   white tile at a fixed height — that is what makes thirteen unrelated
   marks read as one row. Names stay visible, because a logo nobody
   recognises tells a parent nothing. */
.partners{background:var(--cream);padding:clamp(34px,4vw,54px) 0;
  border-bottom:1px solid var(--line)}
.partners-h{font-size:.78rem;font-weight:800;letter-spacing:.17em;text-transform:uppercase;
  color:var(--muted);text-align:center;margin:0 0 clamp(22px,2.6vw,32px)}

.plogo-viewport{overflow:hidden;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent);
  mask-image:linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent)}
.plogo-track{display:flex;width:max-content;animation:plogo-scroll 46s linear infinite}
.plogo-viewport:hover .plogo-track,
.plogo-viewport:focus-within .plogo-track{animation-play-state:paused}
@keyframes plogo-scroll{from{transform:translateX(0)}to{transform:translateX(-50%)}}

.plogos{display:flex;list-style:none;margin:0;padding:0;
  gap:clamp(12px,1.4vw,20px);padding-right:clamp(12px,1.4vw,20px)}
.plogo{flex:0 0 auto;width:clamp(146px,12vw,182px);
  display:flex;flex-direction:column;align-items:center;gap:9px}
.plogo img{width:100%;height:78px;object-fit:contain;background:#fff;
  border:1px solid var(--line);border-radius:var(--r-sm);padding:12px 14px;
  filter:opacity(.9);transition:filter .25s ease,box-shadow .25s ease}
.plogo:hover img,.plogo:focus-within img{filter:none;box-shadow:var(--shadow-sm)}
.plogo-name{font-size:.69rem;line-height:1.35;text-align:center;color:var(--muted);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  min-height:2.7em}

/* Motion off: the row stops where it is and becomes a plain horizontal
   scroller. Nothing is hidden behind the animation. */
@media (prefers-reduced-motion:reduce){
  .plogo-track{animation:none;width:auto}
  .plogo-viewport{overflow-x:auto;-webkit-mask-image:none;mask-image:none}
  .plogo-track>ul[aria-hidden="true"]{display:none}
  .plogo img{transition:none}
}
@media (max-width:620px){
  .plogo{width:136px}
  .plogo img{height:64px}
}


/* ════════════════ RESULTS BAND ════════════════
   Sits straight under the stats. Stats say what the school IS; this says
   what it DID, which is the part a donor is reading for. */
.resultband{background:var(--green-900);color:#fff;padding:clamp(26px,3vw,40px) 0;
  border-top:1px solid rgba(255,255,255,.1)}
.resultband .inner{display:grid;grid-template-columns:repeat(4,1fr);
  gap:clamp(14px,2vw,30px);max-width:1180px;margin:0 auto;text-align:center}
.res b{display:block;font-size:clamp(1.5rem,3vw,2.15rem);font-weight:800;
  color:var(--gold-light);line-height:1.1;letter-spacing:-.02em}
.res span{display:block;font-size:.84rem;line-height:1.4;color:rgba(255,255,255,.84);
  margin-top:6px}
.res-note{text-align:center;font-size:.82rem;color:rgba(255,255,255,.62);
  margin:clamp(16px,2vw,24px) 0 0}
.res-note a{color:var(--gold-light);text-decoration:underline;font-weight:600}
.stat-word{letter-spacing:-.01em}
@media (max-width:760px){
  .resultband .inner{grid-template-columns:repeat(2,1fr);gap:22px}
}

/* ── time and place on each community event card ── */
.cl-meta{margin:0 0 18px;display:grid;gap:7px;border-top:1px solid var(--line);
  padding-top:15px}
.cl-meta>div{display:flex;gap:10px;align-items:baseline}
.cl-meta dt{font-size:.71rem;font-weight:800;letter-spacing:.1em;text-transform:uppercase;
  color:var(--muted);min-width:64px}
.cl-meta dd{margin:0;font-size:.92rem;color:var(--ink);font-weight:600}
.cl-meta dd.todo{color:var(--gold-dark);font-weight:700}
.cl-meta.is-empty{border-top:0;padding-top:0;margin:0}

/* ── partner row: one line, moving continuously ──
   Two identical lists sit side by side and the track slides exactly one
   list width, so the loop is seamless rather than snapping back. The
   second copy is aria-hidden, or a screen reader would read every
   partner twice. The animation pauses on hover and on keyboard focus,
   and stops altogether if the visitor asked for reduced motion — in
   which case the row becomes an ordinary horizontal scroller. */
.plogo-viewport:hover .plogo-track,

/* Motion off: the row stops where it is and becomes a plain scroller the
   reader can push themselves. Nothing is hidden behind the animation. */
