/* ==========================================================================
   Paws and Purpose — site stylesheet
   Single stylesheet, no build step. Edit the tokens first; everything else
   is built from them.

   Palette is derived from the brand mark (#123C3A deep teal on cream).
   Contrast-checked for WCAG AA on body text and buttons.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Brand */
  --mark-clay: #B88051;  /* the logo roundel */
  --mark-grey: #8E8479;  /* the logo paw */
  --mark-ink: #453A2A;   /* the logo wordmark */
  --teal-900: #0A2321;
  --teal-800: #123C3A;   /* brand mark colour */
  --teal-700: #1A514C;
  --teal-600: #24665F;
  --teal-200: #C3DAD6;
  --teal-100: #DCEAE7;
  --teal-50: #EFF6F4;

  /* Warm neutrals */
  --cream: #FBF7EF;
  --cream-2: #F5EEE0;
  --sand: #E6DCC7;
  --sand-2: #D8CBB0;
  --white: #FFFFFF;

  /* Ink */
  --ink: #11201E;
  --ink-2: #3C4C48;
  --muted: #5A6B66;   /* 5.3:1 on cream, 4.9:1 on cream-2 — passes AA at small sizes */

  /* Action */
  --clay: #A8451F;
  --clay-dark: #8B3817;
  --clay-soft: #FBEDE6;
  --gold: #C98A2B;

  /* Feedback */
  --ok: #2F6B4F;

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;

  /* Space + shape */
  --wrap: 1160px;
  --wrap-narrow: 760px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(17, 32, 30, 0.06),
    0 6px 18px -12px rgba(17, 32, 30, 0.18);
  --shadow: 0 2px 6px rgba(17, 32, 30, 0.05),
    0 18px 40px -24px rgba(17, 32, 30, 0.28);
  --shadow-lg: 0 30px 70px -32px rgba(17, 32, 30, 0.38);

  --border: 1px solid var(--sand);
  --border-soft: 1px solid rgba(18, 60, 58, 0.12);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. Reset and base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background-color: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg,
video {
  max-width: 100%;
  display: block;
}

img {
  height: auto;
}

a {
  color: var(--teal-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--clay);
}

/* Visible focus everywhere, including inside dark bands */
:focus-visible {
  outline: 3px solid var(--clay);
  outline-offset: 3px;
  border-radius: 4px;
}

.on-dark :focus-visible {
  outline-color: #FFD9A8;
}

::selection {
  background: var(--teal-800);
  color: var(--white);
}

h1,
h2,
h3,
h4 {
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.022em;
  margin: 0 0 0.6em;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 6.2vw, 4.15rem);
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.65rem);
  letter-spacing: -0.03em;
}

h3 {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
}

h4 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 1.1em;
}

p:last-child,
ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0 0 1.1em;
  padding-left: 1.15em;
}

li {
  margin-bottom: 0.4em;
}

strong {
  font-weight: 600;
}

hr {
  border: 0;
  border-top: var(--border);
  margin: 2.5rem 0;
}

/* Utilities */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  transform: translateY(-220%);
  background: var(--teal-800);
  color: var(--white);
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
  color: var(--white);
}

/* --------------------------------------------------------------------------
   3. Layout helpers
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  /* max() keeps the normal gutter everywhere and widens it only on the phones
     and tablets where a notch or a rounded corner would otherwise sit on top
     of the text. */
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.wrap--narrow {
  max-width: var(--wrap-narrow);
}

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.section--tight {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.section--flush-top {
  padding-top: 0;
}

.section--cream {
  background: var(--cream-2);
}

.section--white {
  background: var(--white);
}

.section--teal {
  background: var(--teal-800);
  color: var(--teal-100);
}

.section--teal h2,
.section--teal h3,
.section--teal h4 {
  color: var(--white);
}

.section--teal a {
  color: #FFE0BC;
}

.section--teal .eyebrow {
  color: #F0C79A;
}

.section--teal .lede,
.section--teal p {
  color: #D7E6E3;
}

.section--cream-border {
  border-top: var(--border);
  border-bottom: var(--border);
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay);
  margin: 0 0 0.9rem;
  font-weight: 500;
}

.lede {
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
  color: var(--ink-2);
  line-height: 1.65;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.9rem;
  line-height: 1.6;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.grid {
  display: grid;
  gap: clamp(1.1rem, 2.4vw, 1.75rem);
}

/* Grid and flex children must be allowed to shrink below their content width,
   otherwise a long unbroken string (a placeholder chip, a URL, a table) widens
   the whole column and pushes the page sideways on small screens. */
.grid > *,
.split > *,
.hero__grid > *,
.story > *,
.footer__grid > *,
.form__row > *,
.tiers > *,
.wall > * {
  min-width: 0;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.split--top {
  align-items: start;
}

.stack > * + * {
  margin-top: 1rem;
}

.center {
  text-align: center;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.6rem; }
.mt-2 { margin-top: 1.25rem; }
.mt-3 { margin-top: 2rem; }
.mt-4 { margin-top: 3rem; }

@media (max-width: 960px) {
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .split,
  .split--top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   4. Header and navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 247, 239, 0.92);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: var(--border-soft);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  margin-right: auto;
  flex: 0 1 auto;
}

.brand__mark {
  width: 38px;
  height: 38px;
  flex: none;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand__name {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.02rem;
  color: var(--mark-ink);   /* matches the logo wordmark */
  text-transform: uppercase;
}

.brand__tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav a {
  display: inline-block;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-pill);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
}

.nav a:hover {
  background: var(--teal-50);
  color: var(--teal-800);
}

.nav a[aria-current="page"] {
  color: var(--teal-800);
  background: var(--teal-100);
}

/* The in-menu Donate button keeps the button's own colours. Without this the
   `.nav a` rule above wins on specificity and paints dark ink on clay — about
   1.5:1, which fails contrast badly. */
.nav a.btn,
.nav a.btn:hover,
.nav a.btn:focus-visible {
  color: var(--btn-fg);
}

.nav a.btn:hover {
  background: var(--clay-dark);
}

.site-header__cta {
  margin-left: 0.4rem;
}

/* The in-nav Donate button only exists for the mobile menu */
.nav .btn {
  display: none;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  flex: none;
  padding: 0;
  border-radius: 12px;
  border: var(--border);
  background: var(--white);
  color: var(--teal-800);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* Small phones. The header row has three things to hold — the brand, the menu
   button and the Donate button — and below 400px they no longer fit at full
   size. Shrinking the brand first keeps the menu button at a usable size
   instead of squeezing it to an unclickable sliver. */
@media (max-width: 400px) {
  .site-header__bar {
    gap: 0.5rem;
  }

  .brand {
    gap: 0.45rem;
  }

  .brand__mark {
    width: 32px;
    height: 32px;
  }

  .brand__name {
    font-size: 0.88rem;
    line-height: 1.15;
  }

  .nav-toggle {
    width: 44px;
    height: 44px;
  }

  .site-header__bar .site-header__cta {
    padding-inline: 1rem;
    font-size: 0.9rem;
  }
}

.nav-toggle__close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__close {
  display: block;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .brand__tag {
    display: none;
  }

  .nav {
    position: fixed;
    inset: 74px 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    border-bottom: var(--border);
    padding: 0.75rem var(--gutter) 1.5rem;
    box-shadow: var(--shadow);
    max-height: calc(100vh - 74px);
    /* dvh keeps the open menu above the browser's own toolbar on phones */
    max-height: calc(100dvh - 74px);
    overflow-y: auto;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.95rem 0.5rem;
    border-radius: var(--radius-sm);
    border-bottom: var(--border-soft);
    font-size: 1.05rem;
  }

  .site-header__cta {
    display: none;
  }

  .nav .btn {
    display: inline-flex;
    margin-top: 1.1rem;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */

.btn {
  --btn-bg: var(--clay);
  --btn-fg: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.85rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease), color 0.18s var(--ease);
}

.btn:hover {
  color: var(--btn-fg);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(0);
}

.btn--donate,
.btn--primary {
  --btn-bg: var(--clay);
  --btn-fg: var(--white);
}

.btn--donate:hover,
.btn--primary:hover {
  --btn-bg: var(--clay-dark);
}

.btn--teal {
  --btn-bg: var(--teal-800);
  --btn-fg: var(--white);
}

.btn--teal:hover {
  --btn-bg: var(--teal-900);
}

.btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--teal-800);
  border-color: rgba(18, 60, 58, 0.35);
}

.btn--outline:hover {
  --btn-bg: var(--teal-50);
  --btn-fg: var(--teal-900);
}

.btn--ghost-light {
  --btn-bg: transparent;
  --btn-fg: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn--ghost-light:hover {
  --btn-bg: rgba(255, 255, 255, 0.14);
  --btn-fg: var(--white);
}

.btn--lg {
  font-size: 1.05rem;
  padding: 1rem 1.9rem;
}

.btn--block {
  width: 100%;
}

.btn--sm {
  font-size: 0.86rem;
  padding: 0.5rem 1rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--teal-700);
  text-decoration: none;
  border-bottom: 1px solid var(--teal-200);
  padding-bottom: 2px;
}

.link-arrow::after {
  content: "→";
  transition: transform 0.2s var(--ease);
}

.link-arrow:hover {
  color: var(--clay);
  border-bottom-color: var(--clay);
}

.link-arrow:hover::after {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   6. Cards and panels
   -------------------------------------------------------------------------- */

.card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 2.4vw, 1.85rem);
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.card--flat {
  box-shadow: none;
}

.card--link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.card--link:hover {
  color: inherit;
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card--media {
  padding: 0;
  overflow: hidden;
}

.card--media .card__img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.card--media:hover .card__img {
  transform: scale(1.04);
}

.card__body {
  padding: clamp(1.1rem, 2.2vw, 1.6rem);
}

.card__body > :last-child {
  margin-bottom: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--teal-50);
  color: var(--teal-700);
  border: 1px solid var(--teal-100);
  border-radius: var(--radius-pill);
  padding: 0.28rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pill--clay {
  background: var(--clay-soft);
  border-color: #F0D3C5;
  color: var(--clay-dark);
}

.pill--sand {
  background: var(--cream-2);
  border-color: var(--sand);
  color: var(--ink-2);
}

.note {
  background: var(--cream-2);
  border-left: 4px solid var(--sand-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.95rem 1.15rem;
  font-size: 0.92rem;
  color: var(--ink-2);
}

.note > :last-child {
  margin-bottom: 0;
}

.note--info {
  background: var(--teal-50);
  border-left-color: var(--teal-600);
}

.note--warn {
  background: var(--clay-soft);
  border-left-color: var(--clay);
}

/* --------------------------------------------------------------------------
   7. Placeholders for content the team still has to supply
   -------------------------------------------------------------------------- */

/* Inline gap, e.g. a registration number */
.ph {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: #FFF6E4;
  border: 1px dashed var(--gold);
  border-radius: 6px;
  padding: 0.05em 0.45em;
  color: #7A5514;
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Larger gap, e.g. a whole financial table */
.ph-block {
  border: 1.5px dashed var(--sand-2);
  background: repeating-linear-gradient(
    -45deg,
    #FCF8EE,
    #FCF8EE 10px,
    #F7F1E2 10px,
    #F7F1E2 20px
  );
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  color: var(--ink-2);
}

.ph-block__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8A6520;
  margin: 0 0 0.6rem;
}

.ph-block > :last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%);
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5.5rem);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero h1 {
  margin-bottom: 1rem;
}

.hero__sub {
  font-size: clamp(1.05rem, 1.8vw, 1.32rem);
  color: var(--ink-2);
  max-width: 34rem;
  margin-bottom: 1.6rem;
}

.hero__media {
  position: relative;
}

.hero__img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: kenburns 26s var(--ease) infinite alternate;
}

.hero__badge {
  position: absolute;
  left: clamp(-0.5rem, -1vw, 0rem);
  bottom: clamp(-1rem, -2vw, -0.5rem);
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  box-shadow: var(--shadow);
  max-width: 15rem;
}

.hero__badge strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1.1;
  color: var(--teal-800);
}

.hero__badge span {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
  display: block;
}

@keyframes kenburns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.06);
  }
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
  .hero__media {
    order: -1;
    max-width: 30rem;
  }
  .hero__img {
    aspect-ratio: 4 / 3;
  }
}

/* --------------------------------------------------------------------------
   9. Impact numbers
   -------------------------------------------------------------------------- */

.stats {
  border-top: var(--border-soft);
}

.stat {
  padding-top: 1.5rem;
  border-top: 2px solid var(--teal-800);
}

.stat__num {
  font-size: clamp(2.1rem, 4.4vw, 3rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--teal-800);
  display: flex;
  align-items: baseline;
  gap: 0.1em;
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
}

.stat__label {
  font-weight: 600;
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
}

.stat__src {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.section--teal .stat {
  border-top-color: #7FB2AC;
}

.section--teal .stat__num {
  color: var(--white);
}

.section--teal .stat__src {
  color: #A9C6C2;
}

/* --------------------------------------------------------------------------
   10. Photo wall
   -------------------------------------------------------------------------- */

.wall {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
}

.wall img {
  border-radius: var(--radius-sm);
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
  transition: transform 0.5s var(--ease), box-shadow 0.4s var(--ease);
}

.wall a:hover img {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow);
}

.wall__wide {
  grid-column: span 2;
  grid-row: span 2;
}

.wall__wide img {
  aspect-ratio: 1;
}

.wall--drift img {
  will-change: transform;
}

@media (max-width: 900px) {
  .wall {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 520px) {
  .wall {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --------------------------------------------------------------------------
   11. Marquee (recognition strip)
   -------------------------------------------------------------------------- */

.marquee {
  position: relative;
  overflow: hidden;
  padding-block: 1.4rem;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  gap: 2.75rem;
  animation: marquee 42s linear infinite;
}

.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track {
  animation-play-state: paused;
}

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-2);
  white-space: nowrap;
}

.marquee__item span {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* --------------------------------------------------------------------------
   12. Donation tiers and widget
   -------------------------------------------------------------------------- */

.tiers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.tier {
  text-align: left;
  background: var(--white);
  border: 1.5px solid var(--sand);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}

.tier:hover {
  border-color: var(--teal-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.tier[aria-pressed="true"] {
  border-color: var(--teal-800);
  background: var(--teal-50);
  box-shadow: var(--shadow-sm);
}

.tier__amount {
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--teal-800);
  display: block;
  margin-bottom: 0.35rem;
}

.tier__outcome {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-2);
  display: block;
  margin: 0;
}

@media (max-width: 960px) {
  .tiers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.donate-panel {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(1.35rem, 3vw, 2.25rem);
}

.toggle {
  display: inline-flex;
  background: var(--cream-2);
  border: 1px solid var(--sand);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 4px;
}

.toggle button {
  font: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.toggle button[aria-pressed="true"] {
  background: var(--teal-800);
  color: var(--white);
}

.amounts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.amount {
  font: inherit;
  font-weight: 600;
  background: var(--white);
  border: 1.5px solid var(--sand);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.4rem;
  cursor: pointer;
  color: var(--ink);
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.amount:hover {
  border-color: var(--teal-600);
}

.amount[aria-pressed="true"] {
  border-color: var(--teal-800);
  background: var(--teal-100);
  color: var(--teal-900);
}

@media (max-width: 520px) {
  .amounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.outcome-line {
  background: var(--clay-soft);
  border: 1px solid #F1D6C9;
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  font-size: 0.98rem;
  color: var(--clay-dark);
  margin: 0;
}

.outcome-line strong {
  color: var(--clay-dark);
}

/* Money-goes bars */
.bars {
  display: grid;
  gap: 0.85rem;
}

.bar {
  display: grid;
  grid-template-columns: 9.5rem 1fr 3.5rem;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.92rem;
}

.bar__track {
  background: var(--cream-2);
  border-radius: var(--radius-pill);
  height: 12px;
  overflow: hidden;
}

.bar__fill {
  height: 100%;
  background: var(--teal-700);
  border-radius: var(--radius-pill);
}

.bar__fill--clay {
  background: var(--clay);
}

.bar__fill--sand {
  background: var(--sand-2);
}

.bar__pct {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-2);
  text-align: right;
}

@media (max-width: 620px) {
  .bar {
    grid-template-columns: 1fr auto;
  }
  .bar__track {
    grid-column: 1 / -1;
    order: 3;
  }
}

/* --------------------------------------------------------------------------
   13. Forms
   -------------------------------------------------------------------------- */

.form {
  display: grid;
  gap: 1.05rem;
}

.form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.05rem;
}

@media (max-width: 620px) {
  .form__row {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label,
.field legend {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  padding: 0;
}

.field .hint {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 400;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="url"],
select,
textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--sand);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  width: 100%;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--sand-2);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(36, 102, 95, 0.18);
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.check {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.94rem;
  color: var(--ink-2);
}

.check input {
  width: 20px;
  height: 20px;
  margin: 0.15rem 0 0;
  accent-color: var(--teal-700);
  flex: none;
}

.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

/* Field errors and the submission status ----------------------------------
   Every form on the site ends in a WhatsApp message. The status block below
   is what tells the visitor what happened: nothing sent yet, sent, or
   something needs fixing first. */

.field.is-invalid label {
  color: var(--clay-dark);
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--clay);
  background: #FFFCFA;
}

input[aria-invalid="true"]:focus,
select[aria-invalid="true"]:focus,
textarea[aria-invalid="true"]:focus {
  border-color: var(--clay-dark);
  box-shadow: 0 0 0 3px rgba(168, 69, 31, 0.18);
}

.field-error {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--clay-dark);
}

.form-status {
  display: grid;
  gap: 0.4rem;
  justify-items: start;
  margin: 0;
  padding: 0.9rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  line-height: 1.55;
}

.form-status[data-state="pending"] {
  background: var(--cream-2);
  border-color: var(--sand);
  color: var(--ink-2);
}

.form-status[data-state="error"] {
  background: var(--clay-soft);
  border-color: rgba(168, 69, 31, 0.3);
  color: #7A3315;
}

.form-status[data-state="ok"] {
  background: var(--teal-50);
  border-color: var(--teal-200);
  color: var(--teal-900);
}

.form-status:focus-visible {
  outline: 2px solid var(--teal-600);
  outline-offset: 2px;
}

.form-status__details {
  width: 100%;
}

.form-status__details > summary {
  cursor: pointer;
  font-weight: 600;
}

.form-status__text {
  margin: 0.6rem 0 0;
  padding: 0.7rem 0.8rem;
  max-height: 15rem;
  overflow: auto;
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.form-status__details .btn {
  margin-top: 0.6rem;
}

/* --------------------------------------------------------------------------
   14. Accordion (FAQ) and details
   -------------------------------------------------------------------------- */

.faq {
  display: grid;
  gap: 0.65rem;
}

details.faq__item {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}

details.faq__item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.05rem 1.3rem;
  font-weight: 600;
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

details.faq__item summary::-webkit-details-marker {
  display: none;
}

details.faq__item summary::after {
  content: "";
  width: 12px;
  height: 12px;
  flex: none;
  border-right: 2px solid var(--teal-700);
  border-bottom: 2px solid var(--teal-700);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s var(--ease);
}

details.faq__item[open] summary::after {
  transform: rotate(225deg) translateY(-2px);
}

details.faq__item[open] summary {
  border-bottom: var(--border-soft);
}

.faq__body {
  padding: 1rem 1.3rem 1.25rem;
  color: var(--ink-2);
  font-size: 0.98rem;
}

.faq__body > :last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   15. Timeline
   -------------------------------------------------------------------------- */

.timeline {
  position: relative;
  margin: 0;
  padding: 0 0 0 2rem;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 2px;
  background: var(--teal-200);
}

.timeline li {
  position: relative;
  padding-bottom: 1.9rem;
  margin: 0;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 0.55rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cream);
  border: 3px solid var(--teal-700);
}

.timeline__date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 0.25rem;
}

.timeline__title {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
}

.timeline__text {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.96rem;
}

/* --------------------------------------------------------------------------
   16. Tables
   -------------------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--white);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 34rem;
}

table.data th,
table.data td {
  text-align: left;
  padding: 0.85rem 1.1rem;
  border-bottom: var(--border-soft);
  vertical-align: top;
}

table.data th {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--font-mono);
  font-weight: 500;
  background: var(--cream-2);
}

table.data tr:last-child td {
  border-bottom: 0;
}

/* --------------------------------------------------------------------------
   17. CTA band, trust bar, sticky mobile donate
   -------------------------------------------------------------------------- */

.cta-band {
  background: var(--teal-800);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
  align-items: center;
}

.cta-band h2 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.cta-band p {
  color: #CFE1DE;
  margin-bottom: 0;
}

.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: flex-end;
}

@media (max-width: 800px) {
  .cta-band {
    grid-template-columns: 1fr;
  }
  .cta-band__actions {
    justify-content: flex-start;
  }
}

.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  align-items: center;
  padding: 1.1rem 0;
  border-top: var(--border);
  border-bottom: var(--border);
  font-size: 0.88rem;
  color: var(--ink-2);
}

.trust-bar__item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.trust-bar__item::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal-600);
  flex: none;
}

.mobile-donate {
  display: none;
}

/* Hidden until the user has scrolled past the hero — but only when JavaScript
   is running, so a no-script visitor still gets the buttons. */
html:not(.no-js) .mobile-donate,
html:not(.no-js) .whatsapp-fab {
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

html:not(.no-js) .mobile-donate.is-shown,
html:not(.no-js) .whatsapp-fab.is-shown {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

@media (max-width: 700px) {
  .mobile-donate {
    display: inline-flex;
    position: fixed;
    z-index: 90;
    right: calc(1rem + env(safe-area-inset-right, 0px));
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    box-shadow: var(--shadow);
  }
  .whatsapp-fab {
    bottom: calc(5rem + env(safe-area-inset-bottom, 0px)) !important;
  }
}

.whatsapp-fab {
  position: fixed;
  z-index: 90;
  right: calc(1rem + env(safe-area-inset-right, 0px));
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--white);
  border: var(--border);
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  color: var(--teal-800);
}

.whatsapp-fab svg {
  width: 26px;
  height: 26px;
}

@media (max-width: 900px) {
  .whatsapp-fab {
    display: inline-flex;
  }
}

/* --------------------------------------------------------------------------
   18. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--teal-900);
  color: #B9CFCB;
  padding-block: clamp(2.5rem, 5vw, 4rem)
    calc(1.5rem + env(safe-area-inset-bottom, 0px));
  font-size: 0.94rem;
}

.site-footer h2,
.site-footer h3 {
  color: var(--white);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  font-weight: 500;
  margin-bottom: 1rem;
}

.site-footer a {
  color: #DCEAE7;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: clamp(1.5rem, 4vw, 3rem);
}

@media (max-width: 900px) {
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.footer__brand img {
  width: 42px;
  height: 42px;
}

.footer__brand span {
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 1rem;
  line-height: 1.2;
}

.footer__bottom {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #9BB6B2;
}

.reg-block {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  font-size: 0.84rem;
  line-height: 1.6;
  color: #C7DAD7;
}

.reg-block .ph {
  background: rgba(255, 255, 255, 0.1);
  border-color: #A98C4E;
  color: #F2D9A8;
}

/* --------------------------------------------------------------------------
   19. Page hero (inner pages)
   -------------------------------------------------------------------------- */

.page-hero {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%);
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3.5rem);
  border-bottom: var(--border-soft);
}

.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.2rem;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--teal-700);
  text-decoration: underline;
}

.page-hero__inner {
  max-width: 52rem;
}

/* Story blocks */
.story {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.story + .story {
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.story--flip .story__media {
  order: 2;
}

.story__media img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (max-width: 800px) {
  .story {
    grid-template-columns: 1fr;
  }
  .story--flip .story__media {
    order: 0;
  }
}

.quote {
  border-left: 3px solid var(--clay);
  padding-left: 1.2rem;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.5;
  color: var(--teal-800);
  font-weight: 500;
  margin: 1.5rem 0;
}

.quote cite {
  display: block;
  font-size: 0.85rem;
  font-style: normal;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  margin-top: 0.6rem;
}

/* Contact blocks */
.contact-block {
  scroll-margin-top: 7rem;
}

.contact-block + .contact-block {
  margin-top: 1rem;
}

/* People */
.person img {
  aspect-ratio: 1;
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.person h3 {
  margin-bottom: 0.2rem;
}

.person .role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clay);
  display: block;
  margin-bottom: 0.7rem;
}

/* Thank-you page */
.standalone {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%);
}

.thanks-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(1.75rem, 5vw, 3.25rem);
  max-width: 40rem;
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   20. Scroll reveal
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

/* No JS, or reduced motion: everything is simply visible */
.no-js .reveal,
.no-js .stat__num {
  opacity: 1;
  transform: none;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero__img {
    animation: none;
  }

  .marquee__track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
  }
}

/* --------------------------------------------------------------------------
   21. Landing page motion

   Homepage only, and only while site.js is running. Every rule below is gated
   on .m-anim, which the script puts on <html> the moment it starts and takes
   off again if its setup does not finish. So JavaScript off, a script error,
   and prefers-reduced-motion all land in the same place: the plain stack of
   sections, with every word visible.

   Only opacity, transform and clip-path animate. Nothing here can shift the
   layout mid-scroll, and nothing moves without a scroll or an entry.
   -------------------------------------------------------------------------- */

/* Entrance: fade and rise, staggered by the --m-d delay set in the script */
.m-anim .m-in {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
}

.m-anim .m-in.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--m-d, 0s);
}

/* The paw trail down the right edge, lit from the top as the page scrolls */
.m-anim .m-paws {
  position: fixed;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.8rem;
  /* Clear of the WhatsApp button and the mobile donate button */
  max-height: calc(100vh - 12rem);
  overflow: hidden;
  pointer-events: none;
}

.m-anim .m-paw {
  width: 11px;
  height: 11px;
  flex: none;
  color: var(--teal-700);
  opacity: 0.2;
  transform: scale(0.8) rotate(-14deg);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

/* Offset with a margin, not a transform, so it survives the lit state */
.m-anim .m-paw:nth-child(even) {
  margin-right: 7px;
}

.m-anim .m-paw.is-lit {
  opacity: 0.78;
  transform: scale(1) rotate(0deg);
}

/* Over the dark trust band and the footer, teal on teal would vanish */
.m-anim .m-paws.is-on-dark .m-paw {
  color: #FBF7EF;
  opacity: 0.3;
}

.m-anim .m-paws.is-on-dark .m-paw.is-lit {
  opacity: 0.85;
}

@media (min-width: 901px) {
  .m-anim .m-paws {
    right: 1.1rem;
    gap: 1rem;
  }
  .m-anim .m-paw {
    width: 14px;
    height: 14px;
  }
}

/* Hero photo. .hero__frame is an inert wrapper until the hero pins. */
.m-anim .hero__frame {
  will-change: transform;
}

.m-anim .hero__veil {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(9, 32, 30, 0.3), rgba(9, 32, 30, 0.92));
  opacity: 0;
  pointer-events: none;
}

@media (min-width: 901px) {
  /* Pinned hero: the page holds still while the photo pushes in, then hands
     over to the impact numbers. */
  .m-anim .m-pin {
    height: 176vh;
    padding-block: 0;
    overflow: visible;
  }

  .m-anim .m-pin .hero__grid {
    position: sticky;
    top: 74px;
    height: calc(100vh - 74px);
    align-content: center;
    padding-block: 2rem;
  }

  .m-anim .m-pin .hero__media {
    display: flex;
    align-items: center;
    height: 100%;
  }

  .m-anim .m-pin .hero__frame {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 13rem);
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform-origin: center center;
  }

  .m-anim .m-pin .hero__frame .hero__img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
  }
}

/* What we do: a sideways strip on desktop, a normal swipe on a phone. The
   hint is in the markup with [hidden], so it only ever shows when the
   carousel is actually there. */
.m-anim .m-rail-sec .rail-hint {
  display: none;
}

@media (max-width: 900px) {
  .m-anim .m-rail-sec .wrap {
    padding-inline: 0;
  }

  .m-anim .m-rail-sec .section-head {
    padding-inline: clamp(1.1rem, 5vw, 2rem);
  }

  .m-anim .m-rail-sec .grid--4 {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.9rem;
    width: auto;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-inline: clamp(1.1rem, 5vw, 2rem);
    scroll-padding-inline-start: clamp(1.1rem, 5vw, 2rem);
    scrollbar-width: none;
  }

  .m-anim .m-rail-sec .grid--4::-webkit-scrollbar {
    display: none;
  }

  .m-anim .m-rail-sec .grid--4 > * {
    flex: 0 0 78%;
    scroll-snap-align: start;
  }

  .m-anim .m-rail-sec .quote {
    flex-basis: 84%;
  }

  .m-anim .m-rail-sec .rail-hint {
    display: block;
    padding: 0.9rem clamp(1.1rem, 5vw, 2rem) 0;
    font-size: 0.82rem;
  }
}

@media (min-width: 901px) {
  .m-anim .m-rail-sec {
    height: 270vh;
    padding-block: 0;
  }

  .m-anim .m-rail-sec .wrap {
    position: sticky;
    top: 74px;
    height: calc(100vh - 74px);
    max-width: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(1rem, 3vh, 2.25rem);
    overflow: hidden;
    padding-inline: clamp(1.2rem, 4vw, 3rem);
  }

  .m-anim .m-rail-sec .section-head {
    margin-bottom: 0;
    max-width: 40rem;
  }

  .m-anim .m-rail-sec .grid--4 {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 1.5rem;
    width: max-content;
    will-change: transform;
  }

  .m-anim .m-rail-sec .grid--4 > * {
    flex: 0 0 clamp(17rem, 22vw, 21rem);
  }

  .m-anim .m-rail-sec .card__img {
    aspect-ratio: 16 / 10;
  }

  .m-anim .m-rail-sec .quote {
    flex: 0 0 clamp(20rem, 30vw, 30rem);
    align-self: center;
    margin: 0;
    background: var(--white);
    border: var(--border);
    border-radius: var(--radius);
    padding: clamp(1.25rem, 2.4vw, 1.85rem);
  }
}

/* Stories: each card sticks and the next slides over it, at any width */
.m-anim .m-stack .grid--3 {
  display: block;
  margin-inline: auto;
}

.m-anim .m-stack .grid--3 > * {
  position: sticky;
  margin: 0 0 1rem;
  box-shadow: var(--shadow);
}

.m-anim .m-stack .card__img {
  aspect-ratio: 16 / 10;
}

@media (min-width: 901px) {
  .m-anim .m-stack .grid--3 {
    max-width: 58rem;
  }

  .m-anim .m-stack .grid--3 > * {
    display: grid;
    grid-template-columns: 0.85fr 1fr;
    overflow: hidden;
    margin-bottom: 1.5rem;
  }

  .m-anim .m-stack .grid--3 > * .card__img {
    height: 100%;
    border-radius: 0;
  }

  .m-anim .m-stack .grid--3 > * .card__body {
    padding: clamp(1.25rem, 2.2vw, 1.9rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .m-anim .m-in {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   22. Print
   -------------------------------------------------------------------------- */

@media print {
  .site-header,
  .site-footer,
  .mobile-donate,
  .whatsapp-fab,
  .cta-band {
    display: none;
  }
  body {
    background: #fff;
    font-size: 11pt;
  }
  .card,
  .donate-panel {
    box-shadow: none;
  }

  /* The motion layer unpicks itself on paper: no floating trail, no pinned
     sections, no sideways strip — just the sections stacked. */
  .m-paws,
  .rail-hint {
    display: none !important;
  }

  .m-rail-sec,
  .m-rail-sec .wrap {
    height: auto !important;
    position: static !important;
    overflow: visible !important;
    max-width: none !important;
    display: block !important;
  }

  .m-rail-sec .grid--4 {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1rem !important;
    width: auto !important;
    overflow: visible !important;
    transform: none !important;
  }

  .m-rail-sec .grid--4 > *,
  .m-rail-sec .quote {
    flex: none !important;
    width: auto !important;
  }

  .m-rail-sec .card__img {
    aspect-ratio: 4 / 3 !important;
  }

  .m-stack .grid--3 > * {
    position: static !important;
    box-shadow: none !important;
  }
}
