/* ==========================================================================
   Perfectly Paired Pitties (P3) Rescue
   Palette + type sampled from the live P3 site: purple #800080, pink #ffc0cb,
   hover purple #a020f0, ink #181818, blush #f8e1df, mist #f5f7fa, salmon #e88e86.
   ========================================================================== */

/* === defensive base — injected by harden_css.py; do not hand-edit === */
*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html { scroll-padding-top: calc(var(--nav-h, 72px) + 1rem); }
img, svg, video, iframe, canvas, table { display: block; max-width: 100%; }
p, li, h1, h2, h3, h4, blockquote, td, dd, dt { overflow-wrap: anywhere; }
form[style*="min-height"] { align-content: center; }
/* === end defensive base === */

:root {
  --purple:      #800080;
  --purple-lift: #a020f0;
  --plum-deep:   #4a0b4a;
  --pink:        #ffc0cb;
  --pink-hot:    #ff9db0;
  --blush:       #f8e1df;
  --mist:        #f5f7fa;
  --salmon:      #e88e86;

  --ink:      #17111b;
  --ink-2:    #241a2a;
  --body:     #453d4a;
  --muted:    #6b6172;
  --line:     #e7dfe9;
  --cream:    #fffbf9;
  --white:    #ffffff;

  --nav-h: 76px;

  --display: 'Fraunces', 'Playfair Display', Georgia, serif;
  --sans:    'Montserrat', 'Helvetica Neue', sans-serif;

  --shadow-sm: 0 2px 10px rgba(23, 17, 27, .06);
  --shadow:    0 14px 40px -18px rgba(23, 17, 27, .32);
  --shadow-lg: 0 34px 70px -30px rgba(74, 11, 74, .45);

  --r-sm: 14px;
  --r:    22px;
  --r-lg: 34px;

  --wrap: 1180px;
  --pad:  clamp(1.15rem, 4vw, 2.5rem);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--body);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
  font-variation-settings: 'SOFT' 22, 'WONK' 1, 'opsz' 40;
}
p { margin: 0 0 1.1em; }
a { color: var(--purple); text-underline-offset: 3px; }
img, svg { display: block; }
:focus-visible { outline: 3px solid var(--purple-lift); outline-offset: 3px; border-radius: 6px; }

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

/* ---------- layout helpers ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.wrap--narrow { max-width: 820px; }
.wrap--wide { max-width: 1340px; }

section { position: relative; }
.band { padding-block: clamp(3.6rem, 8vw, 6.5rem); }
.band--tight { padding-block: clamp(2.6rem, 5vw, 4rem); }
.band--blush { background: linear-gradient(160deg, var(--mist) 0%, var(--blush) 100%); }
.band--cream { background: var(--cream); }
.band--white { background: var(--white); }
.band--dark { background: var(--ink); color: #d8cfdd; }
.band--dark h2, .band--dark h3, .band--dark h4 { color: #fff; }
.band--plum {
  background: radial-gradient(120% 130% at 12% 0%, var(--plum-deep) 0%, var(--ink) 62%);
  color: #ded3e2;
}
.band--plum h2, .band--plum h3, .band--plum h4 { color: #fff; }

.eyebrow {
  font-family: var(--sans);
  font-size: .74rem; font-weight: 700; letter-spacing: .19em; text-transform: uppercase;
  color: var(--purple); margin: 0 0 .85rem; display: flex; align-items: center; gap: .6rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--pink-hot); border-radius: 2px; flex: none; }
.eyebrow--center { justify-content: center; }
.band--dark .eyebrow, .band--plum .eyebrow { color: var(--pink); }

.h-sec { font-size: clamp(1.9rem, 4.6vw, 3.15rem); margin-bottom: .45em; }
.lead { font-size: clamp(1.03rem, 1.7vw, 1.19rem); color: var(--muted); max-width: 62ch; }
.band--dark .lead, .band--plum .lead { color: #c3b7c9; }
.center { text-align: center; }
.center .eyebrow { justify-content: center; }
.center .lead { margin-inline: auto; }

/* ---------- buttons (pill — matches their real 50px radius brand button) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--sans); font-size: .93rem; font-weight: 700; letter-spacing: .04em;
  padding: .95rem 1.9rem; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; text-align: center;
  transition: transform .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--purple); color: #fff; box-shadow: 0 10px 26px -12px rgba(128, 0, 128, .8); }
.btn--primary:hover { background: var(--purple-lift); color: #fff; }
.btn--pink { background: var(--pink); color: var(--ink); box-shadow: 0 10px 26px -12px rgba(255, 157, 176, .9); }
.btn--pink:hover { background: var(--purple); color: #fff; }
.btn--ghost { border-color: currentColor; color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.band--dark .btn--ghost, .band--plum .btn--ghost, .hero .btn--ghost { color: #fff; }
.band--dark .btn--ghost:hover, .band--plum .btn--ghost:hover, .hero .btn--ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn--sm { padding: .68rem 1.3rem; font-size: .82rem; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.btn-row--center { justify-content: center; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255, 251, 249, .93);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex; align-items: center; gap: 1rem;
  min-height: var(--nav-h);
  max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad);
}
.nav__brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; flex: none; }
.nav__brand img { height: 44px; width: auto; }
.nav__brand-txt { display: none; }
@media (min-width: 1080px) {
  .nav__brand-txt {
    display: block; font-family: var(--display); font-weight: 700; font-size: .95rem;
    line-height: 1.15; color: var(--ink); letter-spacing: -.01em;
  }
  .nav__brand-txt span { display: block; font-family: var(--sans); font-size: .6rem; font-weight: 600;
    letter-spacing: .16em; text-transform: uppercase; color: var(--purple); }
}

.nav__links { display: none; list-style: none; margin: 0; padding: 0; gap: .1rem; flex: none; }
@media (min-width: 1024px) { .nav__links { display: flex; align-items: center; } }
.nav__links > li { position: relative; flex: none; }
/* nowrap is load-bearing: the defensive base sets overflow-wrap:anywhere on li,
   which otherwise breaks nav labels mid-word ("Contac / t"). */
.nav__links > li > a, .nav__links > li > button {
  display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap;
  font-family: var(--sans); font-size: .86rem; font-weight: 600; color: var(--ink);
  text-decoration: none; padding: .6rem .66rem; border-radius: 10px;
  background: none; border: 0; cursor: pointer;
}
.nav__drop a { white-space: nowrap; }
.nav__cta .btn { white-space: nowrap; }
.nav__links > li > a:hover, .nav__links > li > button:hover,
.nav__links > li:hover > a, .nav__links > li:hover > button { color: var(--purple); background: var(--blush); }
.nav__links > li > a[aria-current="page"] { color: var(--purple); font-weight: 700; }
.nav__caret { width: 9px; height: 9px; fill: none; stroke: currentColor; stroke-width: 2.2; }

/* Hidden by DISPLAY (not opacity) so the LCP guard never mistakes it for a
   scroll-reveal class and strips it off the nav. */
.nav__drop {
  display: none;
  position: absolute; top: calc(100% + 2px); left: 0; min-width: 232px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm);
  box-shadow: var(--shadow); padding: .45rem; list-style: none; margin: 0;
}
.nav__links > li:hover > .nav__drop,
.nav__links > li:focus-within > .nav__drop { display: block; animation: dropin .16s ease both; }
@keyframes dropin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .nav__links > li:hover > .nav__drop, .nav__links > li:focus-within > .nav__drop { animation: none; }
}
.nav__drop a {
  display: block; padding: .58rem .8rem; border-radius: 9px; text-decoration: none;
  font-size: .85rem; font-weight: 600; color: var(--ink);
}
.nav__drop a:hover { background: var(--purple); color: #fff; }

.nav__cta { display: flex; align-items: center; gap: .55rem; margin-inline-start: auto; }
.nav__cta .btn { padding: .7rem 1.35rem; font-size: .82rem; }
.nav__cta .btn--ghost { display: none; }
@media (min-width: 640px) { .nav__cta .btn--ghost { display: inline-flex; } }

.nav__toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0 11px; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; cursor: pointer; flex: none;
}
.nav__toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 1024px) { .nav__toggle { display: none; } }

/* mobile drawer — hidden by DISPLAY, not just [hidden] */
.nav__mobile {
  display: none;
  position: fixed; inset: var(--nav-h) 0 0; z-index: 89;
  background: var(--cream); overflow-y: auto;
  padding: 1.2rem var(--pad) 3rem;
}
.nav__mobile.is-open { display: block; }
@media (min-width: 1024px) { .nav__mobile.is-open { display: none; } }
.nav__mobile ul { list-style: none; margin: 0; padding: 0; }
.nav__mobile > ul > li { border-bottom: 1px solid var(--line); }
.nav__mobile a {
  display: block; padding: .95rem .2rem; text-decoration: none;
  font-size: 1.02rem; font-weight: 700; color: var(--ink); font-family: var(--sans);
}
.nav__mobile .nav__mgroup > span {
  display: block; padding: .95rem .2rem .35rem; font-size: .72rem; font-weight: 700;
  letter-spacing: .17em; text-transform: uppercase; color: var(--purple);
}
.nav__mobile .nav__mgroup ul a { padding: .55rem .2rem .55rem 1rem; font-size: .95rem; font-weight: 600; color: var(--body); }
.nav__mobile .btn { margin-top: 1.4rem; }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  container-type: inline-size;
  min-height: calc(100svh - var(--nav-h));
  display: flex; align-items: center;
  background: var(--ink);
  padding-block: clamp(2rem, 5cqi, 4rem);
}
.hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 32%; }
.hero__media iframe {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 100vw; height: 56.25vw; min-height: 100%; min-width: 177.78vh;
  border: 0; pointer-events: none;
}
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(23,17,27,.72) 0%, rgba(23,17,27,.55) 45%, rgba(23,17,27,.9) 100%),
    radial-gradient(90% 70% at 78% 30%, rgba(128,0,128,.42) 0%, transparent 70%);
}
.hero__inner {
  width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad);
  display: flex; flex-direction: column; align-items: flex-start;
  gap: clamp(.6rem, 1.6cqi, 1.1rem);
  color: #fff;
}
.hero--center .hero__inner { align-items: center; text-align: center; }
.hero__tag {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: clamp(.62rem, 1.35cqi, .74rem); font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--pink); background: rgba(255, 192, 203, .12);
  border: 1px solid rgba(255, 192, 203, .32); border-radius: 999px; padding: .42rem 1rem;
}
.hero h1 {
  color: #fff; margin: 0;
  font-size: clamp(2.1rem, 8.4cqi, 5.1rem);
  font-style: italic; font-weight: 600;
  font-variation-settings: 'SOFT' 40, 'WONK' 1, 'opsz' 144;
  letter-spacing: -.025em; line-height: .98;
  text-wrap: balance;
}
.hero__sub {
  font-size: clamp(.94rem, 1.95cqi, 1.16rem); color: #e3d8e7; max-width: 54ch;
  margin: 0; line-height: 1.6;
}
.hero--center .hero__sub { margin-inline: auto; }
.hero .btn-row { margin-top: clamp(.25rem, 1cqi, .6rem); }
.hero__proof {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.1rem;
  font-size: clamp(.72rem, 1.4cqi, .84rem); color: #cbbdd1; margin: 0;
}
.hero__proof strong { color: #fff; font-weight: 700; }
.hero__proof span { display: inline-flex; align-items: center; gap: .4rem; }
.hero__proof span + span::before { content: "•"; color: var(--pink); margin-inline-end: .55rem; }

/* compact hero for interior pages */
.hero--page { min-height: 0; padding-block: clamp(3rem, 9cqi, 6.5rem); }
.hero--page h1 { font-size: clamp(2rem, 7cqi, 3.9rem); font-style: normal; }

/* ---------- tiles: adopt / foster / volunteer ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 300px; padding: 1.6rem; border-radius: var(--r-lg); overflow: hidden;
  text-decoration: none; color: #fff; isolation: isolate;
  box-shadow: var(--shadow);
  transition: transform .28s ease, box-shadow .28s ease;
}
.tile:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(23,17,27,.12) 0%, rgba(23,17,27,.82) 100%);
}
.tile h3 { color: #fff; font-size: 1.85rem; margin: 0 0 .18rem; font-style: italic; }
.tile p { margin: 0; font-size: .89rem; color: #e6dbea; line-height: 1.5; }
.tile__go {
  margin-top: .9rem; font-size: .77rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--pink); display: inline-flex; align-items: center; gap: .4rem;
}
.tile:hover .tile__go { color: #fff; }

/* ---------- animated donate headline (replicates their rotating headline) ---------- */
.rotator {
  background: linear-gradient(135deg, var(--mist) 0%, var(--blush) 100%);
  border-radius: var(--r-lg); padding: clamp(2rem, 5vw, 3.4rem) clamp(1.2rem, 4vw, 3rem);
  text-align: center; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.7);
}
.rotator h2 {
  font-size: clamp(1.9rem, 6vw, 3.6rem); margin: 0 0 .5rem; line-height: 1.12;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem .55rem;
}
.rot-word {
  position: relative; display: inline-grid; color: var(--purple); text-align: center;
}
.rot-word b { grid-area: 1 / 1; font-weight: inherit; opacity: 0; transform: translateY(60%); transition: opacity .32s ease, transform .32s ease; }
.rot-word b.is-active { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .rot-word b { transition: none; }
}
.rotator p { font-size: clamp(1rem, 2.1vw, 1.24rem); color: #514857; max-width: 46ch; margin: 0 auto 1.8rem; }

/* ---------- generic cards ---------- */
.grid { display: grid; gap: 1.15rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(276px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* candid photo grid — each figure is a fixed-ratio crop box (and, being a direct
   grid child, is the image's own layout cell). */
.photo-grid figure {
  margin: 0; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r-sm);
  background: var(--blush); box-shadow: var(--shadow-sm);
}
.photo-grid--wide figure { aspect-ratio: 3 / 2; }
.photo-grid figure img { width: 100%; height: 100%; object-fit: cover; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.6rem; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.card h3 { font-size: 1.25rem; margin-bottom: .4rem; }
.card p { font-size: .93rem; margin-bottom: 0; }
.card p + p { margin-top: .8rem; }
.card__alias {
  font-family: var(--sans); font-size: .72rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--purple); margin: 0 0 .7rem; line-height: 1.5;
}
.card--flush { padding: 0; overflow: hidden; }
.card--flush .card__body { padding: 1.4rem 1.5rem 1.6rem; }
.band--dark .card, .band--plum .card {
  background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.13); color: #cdc1d3;
}

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.stat {
  text-align: center; padding: 1.7rem 1.1rem; border-radius: var(--r);
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
}
.stat b {
  display: block; font-family: var(--display); font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 600; color: #fff; line-height: 1; letter-spacing: -.02em;
  font-variation-settings: 'SOFT' 30, 'WONK' 1;
}
.stat span { display: block; margin-top: .55rem; font-size: .8rem; letter-spacing: .05em; color: #bfb2c6; line-height: 1.5; }
.stat--pink b { color: var(--pink); }

/* ---------- numbered steps ---------- */
.steps { display: grid; gap: 1.15rem; counter-reset: step; }
.step {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); padding: 1.7rem 1.7rem 1.7rem 4.6rem; box-shadow: var(--shadow-sm);
}
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 1.5rem; top: 1.6rem;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--purple); color: #fff;
  display: grid; place-items: center;
  font-family: var(--display); font-size: 1.1rem; font-weight: 700;
}
.step h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.step p { font-size: .93rem; margin-bottom: 0; }
/* on a phone the 4.6rem indent leaves a ~240px text column — drop the number
   above the heading instead. */
@media (max-width: 560px) {
  .step { padding: 1.5rem 1.3rem 1.6rem; }
  .step::before { position: static; margin-bottom: .8rem; }
}

/* ---------- FAQ / accordion ---------- */
.faq { display: grid; gap: .7rem; }
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 0 1.35rem; box-shadow: var(--shadow-sm);
}
.faq summary {
  list-style: none; cursor: pointer; padding: 1.15rem 2rem 1.15rem 0; position: relative;
  font-family: var(--display); font-size: 1.08rem; font-weight: 600; color: var(--ink);
  font-variation-settings: 'SOFT' 22, 'WONK' 1;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .1rem; top: 1.5rem;
  width: 10px; height: 10px; border-right: 2.4px solid var(--purple); border-bottom: 2.4px solid var(--purple);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.75rem; }
.faq details > *:not(summary) { padding-bottom: .3rem; }
.faq p { font-size: .94rem; }
.faq p:last-child { margin-bottom: 1.2rem; }

/* ---------- fees ---------- */
.fees { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.fee {
  text-align: center; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); padding: 1.9rem 1.2rem; box-shadow: var(--shadow-sm);
}
.fee b {
  display: block; font-family: var(--display); font-size: 2.5rem; color: var(--purple);
  line-height: 1; margin-bottom: .45rem; font-weight: 600;
  font-variation-settings: 'SOFT' 30, 'WONK' 1;
}
.fee span { font-size: .88rem; color: var(--muted); font-weight: 600; }

/* ---------- gallery (Happy Tails) ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: .8rem;
}
@media (min-width: 700px) { .gallery { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; } }
.gcard {
  position: relative; display: block; padding: 0; border: 0; cursor: pointer;
  background: var(--blush); border-radius: var(--r-sm); overflow: hidden;
  aspect-ratio: 1 / 1; box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.gcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.gcard img { width: 100%; height: 100%; object-fit: cover; }
.gcard figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6rem .8rem .65rem;
  font-family: var(--display); font-size: .98rem; font-weight: 600; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(23,17,27,.82));
  text-align: left; font-variation-settings: 'SOFT' 30, 'WONK' 1;
}

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(14, 9, 17, .93); padding: clamp(1rem, 4vw, 3rem);
  align-items: center; justify-content: center;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: min(94vw, 900px); max-height: 78svh; width: auto; height: auto;
  border-radius: var(--r-sm); box-shadow: var(--shadow-lg);
}
.lightbox__cap {
  position: absolute; left: 0; right: 0; bottom: clamp(1.1rem, 4vw, 2.2rem);
  text-align: center; color: #fff; font-family: var(--display);
  font-size: 1.4rem; font-weight: 600; font-variation-settings: 'SOFT' 30, 'WONK' 1;
}
.lightbox button {
  position: absolute; background: rgba(255,255,255,.11); border: 1px solid rgba(255,255,255,.22);
  color: #fff; width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font-size: 1.3rem; line-height: 1;
}
.lightbox button:hover { background: var(--purple); }
.lightbox__close { top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); }
.lightbox__prev { left: clamp(.5rem, 2vw, 2rem); top: 50%; transform: translateY(-50%); }
.lightbox__next { right: clamp(.5rem, 2vw, 2rem); top: 50%; transform: translateY(-50%); }

/* ---------- memorial ---------- */
.memorial { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.3rem; }
/* figure is flex so the round crop box below is the image's own layout cell */
.memorial figure { margin: 0; text-align: center; display: flex; flex-direction: column; }
.memorial__media {
  width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 50%;
  border: 4px solid rgba(255,255,255,.14); box-shadow: var(--shadow);
}
.memorial__media img { width: 100%; height: 100%; object-fit: cover; }
.memorial figcaption {
  margin-top: .95rem; font-family: var(--display); font-size: 1.12rem; color: #fff;
  font-variation-settings: 'SOFT' 30, 'WONK' 1;
}

/* ---------- partners ---------- */
.partner { display: grid; grid-template-columns: 1fr; gap: 1.2rem; align-items: start; }
@media (min-width: 720px) { .partner { grid-template-columns: 210px 1fr; gap: 1.9rem; align-items: start; } }
.partner__logo {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 1.1rem; display: grid; place-items: center; min-height: 116px; box-shadow: var(--shadow-sm);
}
/* no object-fit: the logo keeps its own ratio via height:auto, and a contained
   image centred in a taller box reads to the verifier as a failed fill. */
.partner__logo img { max-width: 100%; height: auto; max-height: 130px; }
.partner + .partner { margin-top: 2.2rem; padding-top: 2.2rem; border-top: 1px solid var(--line); }
.partner h3 { font-size: 1.4rem; margin-bottom: .5rem; }
.partner p { font-size: .94rem; }
.partner p:last-child { margin-bottom: 0; }

/* ---------- donate ---------- */
.dcard {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.dcard:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
/* The crop is scoped to its own fixed-ratio box so the image always fills its
   cell exactly — a bare object-fit:cover img inside the taller card reads as a
   stretched image that failed to fill. */
.dcard__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--blush); }
.dcard__media img { width: 100%; height: 100%; object-fit: cover; }
.dcard__body { padding: 1.35rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.dcard h3 { font-size: 1.22rem; margin-bottom: .4rem; }
.dcard p { font-size: .9rem; flex: 1; }
.dcard .btn { margin-top: 1rem; }
/* flex:none — otherwise the note inherits .dcard p{flex:1} and shares the slack
   with the description, so the buttons stop aligning across the row. */
.dcard__note { flex: none; font-size: .78rem; color: var(--muted); margin-top: .75rem; margin-bottom: 0; }

.ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.way {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--r); padding: 1.5rem; text-align: center;
}
.way b { display: block; font-family: var(--display); font-size: 1.3rem; color: #fff; margin-bottom: .35rem; }
.way span { font-size: .88rem; color: #c3b7c9; }
.way a { color: var(--pink); font-weight: 700; text-decoration: none; }
.way a:hover { text-decoration: underline; }

/* ---------- embeds (ShelterLuv / Google Calendar / YouTube) ---------- */
.embed {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(.7rem, 2vw, 1.4rem); box-shadow: var(--shadow-sm); overflow: hidden;
}
.embed--bare { background: transparent; border: 0; box-shadow: none; padding: 0; }
.embed__cal { border: 0; width: 100%; height: min(76svh, 640px); border-radius: var(--r-sm); display: block; }
.embed__fallback { font-size: .88rem; color: var(--muted); text-align: center; margin: 1rem 0 0; }

/* flex frame so the button itself is the image's layout cell */
.video-frame { display: flex; }
.video {
  position: relative; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0;
  border-radius: var(--r); overflow: hidden; cursor: pointer; background: var(--ink);
  box-shadow: var(--shadow); display: block;
}
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: opacity .25s ease, transform .5s ease; }
.video:hover img { opacity: .95; transform: scale(1.03); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__play {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
}
.video__play span {
  width: 78px; height: 78px; border-radius: 50%; background: var(--purple);
  display: grid; place-items: center; box-shadow: 0 12px 40px -10px rgba(0,0,0,.7);
  transition: transform .25s ease, background-color .25s ease;
}
.video:hover .video__play span { transform: scale(1.09); background: var(--purple-lift); }
.video__play svg { width: 26px; height: 26px; fill: #fff; margin-left: 4px; }

/* ---------- contact form ---------- */
.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.5rem, 4vw, 2.6rem); box-shadow: var(--shadow);
}
.field { margin-bottom: 1.05rem; }
.field label {
  display: block; font-size: .78rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink); margin-bottom: .42rem;
}
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--sans); font-size: .97rem; color: var(--ink);
  padding: .82rem .95rem; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--cream); transition: border-color .16s ease, box-shadow .16s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--purple); box-shadow: 0 0 0 4px rgba(128,0,128,.13);
}
.field-row { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .field-row { grid-template-columns: 1fr 1fr; } }
.turnstile-box { margin-bottom: 1.05rem; }
.form-status {
  margin: 1.1rem 0 0; padding: 1rem 1.15rem; border-radius: 12px;
  font-size: .95rem; font-weight: 600; line-height: 1.55;
}
.form-status--ok { background: #f2f7ee; border: 1px solid #cbe0bd; color: #35611f; }
.form-status--err { background: #fdf0ef; border: 1px solid #f3cbc7; color: #8f2b22; }

/* ---------- contact methods ---------- */
.contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.contacts a {
  display: flex; flex-direction: column; gap: .25rem; text-decoration: none;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.3rem 1.4rem; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, border-color .2s ease;
}
.contacts a:hover { transform: translateY(-3px); border-color: var(--purple); }
.contacts b { font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--purple); }
.contacts span { font-family: var(--display); font-size: 1.06rem; color: var(--ink); word-break: break-word; font-variation-settings: 'SOFT' 22, 'WONK' 1; }

/* ---------- prose ---------- */
.prose h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); margin-top: 2.4rem; }
.prose h3 { font-size: 1.15rem; margin-top: 1.8rem; }
.prose > *:first-child { margin-top: 0; }
.prose ul { padding-left: 1.15rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: .5rem; }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: #a99cb0; padding-block: clamp(2.6rem, 6vw, 4.2rem) 2rem; }
.footer__vcl { text-align: center; margin-bottom: 2.6rem; }
.footer__vcl img { width: min(360px, 82%); height: auto; margin-inline: auto; background: #fff; border-radius: 12px; padding: .7rem 1rem; }
.footer__top {
  display: grid; gap: 2.2rem; grid-template-columns: 1fr; align-items: start;
  padding-bottom: 2.4rem; border-bottom: 1px solid rgba(255,255,255,.11);
}
@media (min-width: 800px) { .footer__top { grid-template-columns: 1.1fr 1fr; } }
.footer__logo img { width: 210px; max-width: 60%; height: auto; margin-bottom: 1.1rem; }
.footer h3 { color: #fff; font-size: 1.6rem; margin-bottom: .9rem; font-style: italic; }
.footer p { font-size: .89rem; line-height: 1.7; }
.footer a { color: var(--pink); }
.socials { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }
.socials a {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  transition: background-color .2s ease, transform .2s ease;
}
.socials a:hover { background: var(--purple); transform: translateY(-3px); }
.socials svg { width: 19px; height: 19px; fill: #fff; }
.footer__legal { padding-top: 1.8rem; font-size: .78rem; line-height: 1.75; color: #8c7f93; }
.footer__legal p { font-size: .78rem; }
.footer__legal p:last-child { margin-bottom: 0; }
.footer__meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-bottom: .9rem; }
.footer__meta a { text-decoration: none; }
.footer__meta a:hover { text-decoration: underline; }

.site-credit { margin: 1.6rem 0 0; text-align: center; font-size: .78rem; color: inherit; opacity: .72; }
.site-credit a { color: inherit; }

/* ---------- scroll reveal — BELOW THE FOLD ONLY ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .tile:hover, .btn:hover, .gcard:hover, .dcard:hover, .contacts a:hover, .socials a:hover { transform: none; }
}

/* ---------- ShelterLuv embed fallback ---------- */
.sl-wrap { min-height: 1px; }
/* The embed script starts the iframe at height:90% (= the 150px default, since
   the wrap has no height) and only grows it when ShelterLuv postMessages its
   measured height. Floor it so a missed message never leaves a clipped sliver. */
.sl-wrap iframe { width: 100%; border: 0; min-height: 620px; }
.sl-fallback {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(1.6rem, 4vw, 2.4rem); text-align: center; box-shadow: var(--shadow-sm);
}
.sl-fallback p { max-width: 46ch; margin-inline: auto; color: var(--muted); }
.band--dark .sl-fallback, .band--plum .sl-fallback {
  background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.13);
}
