/* ==========================================================================
   Hmong English School — "The Valley Classroom"
   Editorial soul · conversion skeleton · indigo provenance.
   All design tokens live in :root below. Change colors/spacing here only.
   ========================================================================== */

:root {
  /* Palette — sampled from the school's own photos */
  --paper: #FAF7F0;      /* warm off-white, like uncoated magazine stock */
  --ink: #1F241F;        /* green-black, from chalkboard shadows */
  --green: #3E5C3F;      /* valley green — accents, kickers */
  --chalkboard: #33574A; /* the Support / donation-tiers chalkboard panel */
  --indigo: #2B3A55;     /* batik banner blue */
  --indigo-deep: #222E44;
  --red: #B0442F;        /* Miss Ha's dress — CTAs only */
  --red-dark: #983A27;
  --gold: #C9A24B;       /* terrace gold — hairlines, stars, decorative only */
  --gold-ink: #8A6A24;   /* darker gold for TEXT on light backgrounds (AA contrast) */
  --gold-bright: #E8CD8D;/* lighter gold for TEXT on dark backgrounds */
  --scrim: 20, 24, 15;   /* rgb for photo overlay gradients */

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Newsreader", Georgia, serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* chalk button colors (soft pastels — legible on chalkboard green / photo) */
  --chalk-white: #F3EEE2;
  --chalk-sky: #AEC9DA;
  --chalk-rose: #E6AAB5;
  /* hand-drawn rounded-rect stroke, roughened with turbulence — a chalk box */
  --chalk-frame: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 64' preserveAspectRatio='none'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.035' numOctaves='3' seed='5' result='n'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='n' scale='4'/%3E%3C/filter%3E%3Crect x='4' y='4' width='192' height='56' rx='16' ry='16' fill='none' stroke='%23fff' stroke-width='2.2' vector-effect='non-scaling-stroke' filter='url(%23c)'/%3E%3C/svg%3E");

  /* handwritten chalk caption font (photo captions on the taped snapshots) */
  --font-chalk: "Caveat", "Segoe Script", "Bradley Hand", cursive;

  --measure: 62ch;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --nav-h: 72px;

  /* One drop of handcraft: an indigo dye-mottle texture (inline SVG, ~600B) */
  --mottle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.017' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.16'/%3E%3C/svg%3E");
}

/* ---------- base ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 1.2rem;
}

h2 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h3 { font-size: 1.35rem; font-weight: 600; }

p { margin: 0 0 1.15rem; }

a { color: var(--green); text-decoration-color: rgba(201, 162, 75, 0.65); text-underline-offset: 3px; transition: color .2s ease; }
a:hover { color: var(--red); }

section { scroll-margin-top: calc(var(--nav-h) - 8px); }

/* ---------- shared atoms ---------- */

.kicker {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 1rem;
}
.kicker--gold { color: var(--gold); }
.kicker--chalk { color: rgba(250, 247, 240, 0.78); }
.kicker--onimage {
  position: absolute;
  left: var(--pad);
  bottom: 1.2rem;
  color: #fff;
  margin: 0;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}

/* ---------- chalk chip buttons (every CTA on the site) ---------- */
/* Label in a chalk hand, framed by a roughened hand-drawn outline. The chalk
   COLOR (set by a modifier) drives both the text and the outline via currentColor. */
.btn-chalk {
  position: relative;
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--chalk-white);
  text-decoration: none;
  padding: 0.82rem 1.5rem;
  border-radius: 16px;
  background: rgba(20, 24, 15, 0.24);   /* subtle chalkboard tint so chalk reads on the photo */
  border: 1px solid transparent;         /* becomes the outline in no-mask browsers */
  transition: background .2s ease, transform .2s ease, filter .2s ease;
}
.btn-chalk::before {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  -webkit-mask: var(--chalk-frame) center / 100% 100% no-repeat;
          mask: var(--chalk-frame) center / 100% 100% no-repeat;
  pointer-events: none;
}
.btn-chalk:hover { background: rgba(20, 24, 15, 0.36); filter: brightness(1.08); }
.btn-chalk:active { transform: translateY(1px); }

.chalk-white { color: var(--chalk-white); }
.chalk-sky   { color: var(--chalk-sky); }
.chalk-rose  { color: var(--chalk-rose); }

.btn-chalk--sm { font-size: 0.74rem; letter-spacing: 0.06em; padding: 0.52rem 1.1rem; border-radius: 13px; }

/* filled variant: a solid chalkboard-green chip so it reads on cream/light backgrounds */
.btn-chalk--fill { background: var(--chalkboard); }
.btn-chalk--fill:hover { background: var(--chalkboard); filter: brightness(1.12); }

/* browsers without CSS mask: fall back to a plain currentColor border */
@supports not ((-webkit-mask: url("a")) or (mask: url("a"))) {
  .btn-chalk { border-color: currentColor; }
  .btn-chalk::before { display: none; }
}

.prose {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.dropcap::first-letter {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 3.4em;
  line-height: 0.82;
  float: left;
  padding: 0.06em 0.12em 0 0;
  color: var(--green);
}

.divider {
  border: 0;
  width: 6rem;
  border-top: 1px solid var(--gold);
  margin: clamp(3rem, 7vw, 5.5rem) auto;
}

.finelink a, .finelink-strong {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
}
.finelink-strong { color: var(--gold); }

/* ---------- nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: var(--nav-h);
  padding-inline: var(--pad);
  background-color: var(--chalkboard);
  /* chalk-residue: faint eraser glows + a wiped streak + fine chalk grain */
  background-image:
    radial-gradient(90% 220% at 14% 12%, rgba(255,255,255,0.06), transparent 60%),
    radial-gradient(80% 220% at 84% 88%, rgba(255,255,255,0.045), transparent 60%),
    linear-gradient(96deg, transparent 26%, rgba(255,255,255,0.028) 42%, transparent 56%),
    var(--mottle);
  color: var(--paper);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
  transition: height .3s ease, box-shadow .3s ease;
}

.nav__brand {
  display: flex;
  align-items: center;
  margin-right: auto;
  text-decoration: none;
}
.nav__brand img {
  height: 42px;
  width: auto;
  display: block;
  transition: height .3s ease;
}

.nav__links { display: flex; gap: 1.4rem; }
.nav__links a {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
  padding-block: 6px;
  /* stitch-dash underline appears on the active section */
  background-image: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 11px);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 2px;
  transition: background-size .25s ease;
}
.nav__links a:hover,
.nav__links a.is-active { background-size: 100% 2px; }

.nav__ctas { display: flex; align-items: center; gap: 0.6rem; }

.nav.is-scrolled {
  height: 56px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
}
.nav.is-scrolled .nav__brand img { height: 34px; }

.nav__burger {
  display: none;
  background: none;
  border: 0;
  padding: 10px 4px;
  cursor: pointer;
}
.nav__burger span {
  display: block;
  width: 26px;
  height: 2px;
  background: currentColor;
  margin: 6px 0;
  transition: transform .25s ease, opacity .25s ease;
  color: inherit;
}
.nav__burger.is-open span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__burger.is-open span:last-child { transform: translateY(-4px) rotate(-45deg); }

.menu {
  position: fixed;
  inset: 0;
  z-index: 48; /* above the WhatsApp FAB (45), below the nav (50) */
  background: var(--paper);
  display: grid;
  place-items: center;
}
.menu[hidden] { display: none; }
.menu nav { display: grid; gap: 0.4rem; }
.menu nav a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 2.8rem);
  font-weight: 300;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 1rem;
}
.menu nav a small {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-ink);
}
.menu nav a:hover { color: var(--red); }

.menu__ctas { display: flex; gap: 0.9rem; margin-top: 2.4rem; }
/* the menu sits on cream, so give the chips a chalkboard fill to read against it */
.menu__ctas .btn-chalk { background: var(--chalkboard); }
.menu__ctas .btn-chalk:hover { background: var(--chalkboard); filter: brightness(1.12); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  color: #fff;
}

.hero__slides, .hero__slide { position: absolute; inset: 0; }

.hero__slide {
  opacity: 0;
  transition: opacity 1.5s ease;
}
.hero__slide.is-active { opacity: 1; }

.hero__slide img, .hero__slide picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero__slide picture img { height: 100svh; min-height: 560px; }

/* documentary-restraint Ken Burns: a barely-there settle, active slide only */
.hero__slide.is-active img { animation: settle 8s ease-out forwards; }
@keyframes settle {
  from { transform: scale(1.035); }
  to   { transform: scale(1); }
}

.hero__scrim {
  position: absolute;
  inset: 0;
  /* two layers: darken the bottom AND the left, so the lower-left text zone
     stays legible on bright slides while the upper-right photo stays open */
  background:
    linear-gradient(to right, rgba(var(--scrim), 0.70) 0%, rgba(var(--scrim), 0.34) 34%, rgba(var(--scrim), 0.04) 62%, rgba(var(--scrim), 0) 78%),
    linear-gradient(to top, rgba(var(--scrim), 0.80) 0%, rgba(var(--scrim), 0.42) 30%, rgba(var(--scrim), 0.12) 58%, rgba(var(--scrim), 0.06) 78%, rgba(var(--scrim), 0.16) 100%);
}

.hero__lockup {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  bottom: clamp(4.5rem, 12vh, 7.5rem);
  max-width: 46rem;
}

.hero__lockup .kicker--gold {
  color: var(--gold-bright); /* brighter than the page gold so it survives warm slides */
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.hero__lockup h1 {
  font-size: clamp(2.5rem, 6.5vw, 5rem);
  margin: 0 0 0.9rem;
  text-wrap: balance;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.42);
}

.hero__sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-style: italic;
  opacity: 0.94;
  margin-bottom: 0.5rem;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.48);
}

.hero__meta {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  color: rgba(250, 247, 240, 0.9);
  margin: 0 0 1.5rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

/* rating badge — sky-blue chalk chip pinned top-right of the hero */
.hero__badge {
  position: absolute;
  top: calc(var(--nav-h) + 1rem);
  right: var(--pad);
  z-index: 3;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--chalk-sky);
  text-decoration: none;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  background: rgba(20, 24, 15, 0.30);
}
.hero__badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  -webkit-mask: var(--chalk-frame) center / 100% 100% no-repeat;
          mask: var(--chalk-frame) center / 100% 100% no-repeat;
  pointer-events: none;
}
.hero__badge:hover { color: var(--chalk-sky); filter: brightness(1.1); }
.hero__badge-short { display: none; }
@supports not ((-webkit-mask: url("a")) or (mask: url("a"))) {
  .hero__badge { border: 1px solid currentColor; }
  .hero__badge::before { display: none; }
}

.hero__ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 1.1rem; }

.hero__dashes {
  position: absolute;
  right: var(--pad);
  bottom: 1.6rem;
  display: none; /* shown by JS only when the slideshow actually rotates */
  gap: 7px;
}
.hero__dashes.is-on { display: flex; }

.hero__pause {
  position: absolute;
  left: var(--pad);
  bottom: 1.1rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(20, 24, 15, 0.35);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease;
}
.hero__pause:hover { background: rgba(20, 24, 15, 0.6); }
.hero__dashes span {
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.35);
  transition: background .4s ease;
}
.hero__dashes span.is-active { background: var(--gold); }

.hero__cue {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #fff;
  animation: cue 3s ease-in-out infinite;
}
.hero__cue-text {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}
.hero__cue-arrow {
  width: 11px;
  height: 11px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
@keyframes cue {
  0%, 100% { opacity: 0.5; translate: 0 -3px; }
  50% { opacity: 0.95; translate: 0 3px; }
}

/* ---------- chapters ---------- */

.chapter { padding-block: clamp(3rem, 8vw, 6rem); }
.chapter--flush { padding-top: 0; }

.break {
  position: relative;
  margin: 0 0 clamp(2.5rem, 6vw, 4.5rem);
  height: clamp(320px, 58vh, 560px);
}
.break img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.break::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(var(--scrim), .45), transparent 45%);
}
.break .kicker--onimage { z-index: 1; }

.statrow {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0;
  max-width: var(--measure);
  margin: 2.2rem auto;
  padding: 0 var(--pad);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--green);
}
.statrow li { padding-inline: 1.3rem; }
.statrow li + li { border-left: 1px solid var(--gold); }

.diptych {
  display: grid;
  grid-template-columns: 38fr 46fr;
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: end;
  max-width: 68rem;
  margin: 2.5rem auto 0;
  padding-inline: var(--pad);
}

figure { margin: 0; }
figcaption {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.92rem;
  color: rgba(31, 36, 31, 0.72);
  padding-top: 0.6rem;
}

.sdg {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: rgba(31, 36, 31, 0.72);
  margin-top: 2.6rem;
}
.sdg span { color: var(--green); font-weight: 600; }

/* ---------- miss ha ---------- */

.storygrid {
  display: grid;
  grid-template-columns: 38fr 54fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--pad);
  align-items: start;
}
.storygrid__portrait { position: sticky; top: calc(var(--nav-h) + 1rem); }
.storygrid__portrait img { border-radius: 3px; }
.storygrid .prose { padding-inline: 0; margin-inline: 0; }

.pullquote {
  margin: 2rem 0;
  padding-left: 1.6rem;
  border-left: 2px solid var(--gold);
}
.pullquote p {
  font-family: var(--font-display);
  font-weight: 340;
  font-style: italic;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  line-height: 1.35;
  color: var(--indigo);
}
.pullquote cite {
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-ink);
}

.signature {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 340;
  font-size: 1.2rem;
  color: var(--green);
}

/* ---------- classroom strip ---------- */

.strip {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--pad);
  padding: 2.5rem var(--pad) 1rem;
  -webkit-overflow-scrolling: touch;
}
.strip figure {
  flex: 0 0 auto;
  scroll-snap-align: start;
}
.strip img {
  height: clamp(240px, 44vh, 400px);
  width: auto;
  border-radius: 3px;
}
.strip figcaption { max-width: 34ch; }
/* in the horizontal scroller the snaps keep a fixed height, image drives the width */
.strip .snap { flex: 0 0 auto; }
.strip .snap img { height: clamp(240px, 42vh, 380px); width: auto; }

/* ---------- volunteer ---------- */

.volgrid {
  display: grid;
  grid-template-columns: 58fr 38fr;
  gap: clamp(2rem, 5vw, 4rem);
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--pad);
  align-items: start;
}
.volgrid .prose { padding-inline: 0; margin-inline: 0; }
.volgrid__ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.6rem 0 1rem; }

.factbox {
  border: 1px solid rgba(62, 92, 63, 0.45);
  border-radius: 4px;
  padding: 1.6rem 1.5rem;
  background: #F2F3EC;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}
.factbox h3 {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 1rem;
}
.factbox ul { list-style: none; margin: 0; padding: 0; font-size: 1rem; }
.factbox li { padding: 0.7rem 0; }
.factbox li + li { border-top: 1px solid rgba(62, 92, 63, 0.22); }
.factbox li span {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin-bottom: 0.15rem;
}

.reviews { max-width: 76rem; margin: clamp(3rem, 7vw, 5rem) auto 0; padding-inline: var(--pad); }
.reviews .kicker { text-align: center; }
.reviews__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}
.reviews__row blockquote {
  margin: 0;
  padding: 1.5rem 1.4rem;
  background: #fff;
  border-radius: 4px;
  border-top: 2px solid var(--gold);
  box-shadow: 0 1px 10px rgba(31, 36, 31, 0.05);
}
.reviews__row p {
  font-size: 0.98rem;
  line-height: 1.6;
}
.reviews__row cite {
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green);
}
.reviews .finelink { text-align: center; }

/* ---------- trekking ---------- */

/* the trekking section already carries the valley photo (.section--valley);
   the trekhero is just the centred quote band floating over it */
.trekhero {
  display: grid;
  place-items: center;
  min-height: clamp(320px, 56vh, 520px);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.trekhero p {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 18px rgba(0,0,0,0.45);
  padding-inline: var(--pad);
  margin: 0;
}

.trektrio {
  display: grid;
  grid-template-columns: 44fr 30fr 44fr;
  gap: clamp(1rem, 2.5vw, 1.8rem);
  align-items: start;
  max-width: 76rem;
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  padding-inline: var(--pad);
}

/* trek itineraries: chalk tabs + panels (one shows at a time; both show with no JS) */
.treks {
  max-width: 72rem;
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  padding-inline: var(--pad);
}
.treks__title {
  font-family: var(--font-display);
  font-weight: 340;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 0 0 1.1rem;
}
.treks__tabs { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1.5rem; }
.treks__tab { cursor: pointer; opacity: 0.5; transition: opacity .2s ease, filter .2s ease; }
.treks__tab.is-active { opacity: 1; }
.treks__panel { max-width: var(--measure); }
.treks__panel + .treks__panel { margin-top: 1rem; }  /* spacing when both show (no JS) */
.treks__panel p { margin: 0 0 0.9rem; line-height: 1.6; }
.treks .treks__route {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 0.7rem;
}
.treks > p:last-child { margin-top: 0.4rem; }

/* ---------- homestay ---------- */

.homestay { margin-top: clamp(3rem, 7vw, 5.5rem); scroll-margin-top: calc(var(--nav-h) - 8px); }
.homestay__inner {
  max-width: 76rem;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3.8rem) var(--pad);
  background-color: #ECEAE5;
  background-image: var(--mottle);
  border-radius: 6px;
  display: grid;
  grid-template-columns: 54fr 40fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
@media (min-width: 900px) {
  .homestay { padding-inline: var(--pad); }
}
.homestay .prose { padding-inline: 0; margin-inline: 0; }
.homestay h2 { color: var(--indigo); }

.homestay__photos { display: grid; gap: 1.2rem; }

.rooms { margin-top: 1.4rem; }
.rooms summary {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--indigo);
  cursor: pointer;
  padding: 0.6rem 0;
}
.rooms summary:hover { color: var(--red); }
.rooms__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-top: 0.8rem;
}

/* ---------- support / donation tiers (chalkboard) ---------- */

.chalkboard {
  background-color: var(--chalkboard);
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(255,255,255,0.045), transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(255,255,255,0.035), transparent 50%),
    var(--mottle);
  color: var(--paper);
  padding: clamp(3.5rem, 9vw, 6.5rem) 0;
  margin-top: clamp(3rem, 8vw, 6rem);
}
.chalkboard__inner {
  max-width: 70rem;
  margin-inline: auto;
  padding-inline: var(--pad);
}
.chalkboard h2 { color: var(--paper); max-width: 22ch; }
.chalkboard p { max-width: var(--measure); }
.chalkboard a:not(.btn-chalk):not(.give) { color: var(--gold-bright); }

.chalkboard__grid {
  display: grid;
  grid-template-columns: 58fr 36fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
  margin: 2rem 0;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 2.5rem;
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.5;
}
.checklist li {
  break-inside: avoid;
  padding: 0.55rem 0 0.55rem 2rem;
  position: relative;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.85em;
  height: 0.85em;
  border: 1.5px solid rgba(250,247,240,0.7);
  border-radius: 2px;
  transform: rotate(-2deg); /* hand-drawn check squares */
}
.checklist li:nth-child(even)::before { transform: rotate(2.5deg); }

.chalkboard__pin { transform: rotate(1.6deg); }
.chalkboard__pin img {
  border: 6px solid #fff;
  border-radius: 2px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}
.chalkboard__pin figcaption { color: rgba(250,247,240,0.75); }

.chalkboard__footnote {
  font-style: italic;
  color: rgba(250,247,240,0.8);
  margin-top: 1.6rem;
}

/* simplified support: a big free-school statement + one large donate button */
.support__big {
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  line-height: 1.05;
  max-width: 16ch;
  margin-bottom: 0.7rem;
}
.support__lead {
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  line-height: 1.45;
  max-width: 42ch;
  color: rgba(250, 247, 240, 0.92);
  margin-bottom: 1.7rem;
}
.support__cta { margin: 0 0 2.4rem; }
.btn-chalk--lg { font-size: 0.95rem; padding: 1.05rem 2.2rem; letter-spacing: 0.08em; border-radius: 18px; }

/* support kid collage: a symmetrical grid of uniform-cropped taped photos */
.support-collage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.4rem, 3vw, 2.6rem);
  align-items: start;
  max-width: 64rem;
  margin: 2.4rem auto 3rem;
  padding-inline: var(--pad);
}
.support-collage .snap img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; }
@media (max-width: 760px) {
  .support-collage { grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
}

/* donation tiers: each a chalk-hairline card that links to GoFundMe */
.give-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(0.8rem, 2vw, 1.1rem);
  margin: 2.4rem 0;
}
.give {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.3rem 1.35rem 1.15rem;
  border: 1px solid rgba(250, 247, 240, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--paper);
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.give:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(250, 247, 240, 0.6);
}
.give:focus-visible {
  outline: 2px solid var(--chalk-sky);
  outline-offset: 3px;
}
.give__amount {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 3.5vw, 2.1rem);
  line-height: 1;
  color: var(--gold-bright);
}
.give__label {
  flex: 1 1 auto;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  line-height: 1.4;
  color: rgba(250, 247, 240, 0.9);
}
.give__cue {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(250, 247, 240, 0.55);
  transition: color .2s ease;
}
.give__cue::after { content: " \2192"; }
.give:hover .give__cue { color: var(--gold-bright); }

/* ---------- alternating section backgrounds ---------- */

/* chalkboard-green section (reuses the Support panel treatment) */
.section--board {
  background-color: var(--chalkboard);
  background-image:
    radial-gradient(ellipse at 18% 8%, rgba(255,255,255,0.05), transparent 55%),
    radial-gradient(ellipse at 88% 92%, rgba(255,255,255,0.04), transparent 50%),
    var(--mottle);
  color: var(--paper);
}
/* dimmed Sa Pa valley photo behind the text (generalises .trekhero) */
.section--valley {
  background-color: #2A3324;
  background-image:
    linear-gradient(rgba(20,24,15,0.58), rgba(20,24,15,0.58)),
    url("../img/valley-terraces-960.jpg");
  background-size: cover;
  background-position: center;
  color: var(--paper);
}
@supports (background-image: image-set(url("i.webp") type("image/webp"))) {
  .section--valley {
    background-image:
      linear-gradient(rgba(20,24,15,0.58), rgba(20,24,15,0.58)),
      image-set(url("../img/valley-terraces-960.webp") type("image/webp"),
                url("../img/valley-terraces-960.jpg") type("image/jpeg"));
  }
}
@media (min-width: 900px) and (hover: hover) {
  .section--valley { background-attachment: fixed; }
}

/* text flips to chalk-cream on the dark (board + valley) sections */
.section--board h2, .section--valley h2,
.section--board h3, .section--valley h3 { color: var(--paper); }
.section--board p, .section--valley p { color: var(--paper); }
.section--board .kicker, .section--valley .kicker { color: var(--chalk-white); }
.section--board .dropcap::first-letter,
.section--valley .dropcap::first-letter { color: var(--gold-bright); }
.section--board .pullquote p, .section--valley .pullquote p { color: var(--paper); }
.section--board .pullquote cite, .section--valley .pullquote cite,
.section--board .signature, .section--valley .signature { color: var(--gold-bright); }
.section--board .statrow, .section--valley .statrow { color: var(--chalk-white); }
.section--board .sdg, .section--valley .sdg { color: rgba(250,247,240,0.8); }
.section--board .sdg span, .section--valley .sdg span { color: var(--gold-bright); }
.section--board .finelink a, .section--valley .finelink a { color: var(--gold-bright); }

/* light inset cards restyled to read on the dark board (factbox + reviews) */
.section--board .factbox {
  background: rgba(255,255,255,0.06);
  border-color: rgba(250,247,240,0.28);
}
.section--board .factbox h3 { color: var(--chalk-white); }
.section--board .factbox li + li { border-top-color: rgba(250,247,240,0.18); }
.section--board .factbox li span { color: var(--gold-bright); }
.section--board .reviews__row blockquote {
  background: rgba(255,255,255,0.06);
  border-top-color: var(--gold-bright);
  box-shadow: none;
}
.section--board .reviews__row cite,
.section--valley .reviews__row cite { color: var(--gold-bright); }

/* ---------- taped snapshots + collage ---------- */

/* a photo taped to the board: the bare photo, a chalk box drawn around it, a
   strip of tape, a slight tilt, and a hand-written caption below. The chalk box
   and caption use currentColor: chalk-white on the dark sections, ink on cream. */
.snap {
  display: block;
  position: relative;
  color: rgba(38, 42, 34, 0.72);
  transform: rotate(-1.6deg);
  transition: transform .25s ease;
}
.snap:nth-child(even) { transform: rotate(1.8deg); }
.snap:nth-child(3n)    { transform: rotate(-0.7deg); }
.snap:hover { transform: rotate(0deg) scale(1.02); }
.snap picture { position: relative; display: block; }
.snap img { display: block; width: 100%; height: auto; box-shadow: 0 12px 26px rgba(0,0,0,0.45); }
/* the hand-drawn chalk box around the photo, same roughened frame as the buttons */
.snap picture::after {
  content: "";
  position: absolute;
  left: -6px; right: -6px; top: -6px; bottom: -6px;
  background: currentColor;
  -webkit-mask: var(--chalk-frame) center / 100% 100% no-repeat;
          mask: var(--chalk-frame) center / 100% 100% no-repeat;
  opacity: 0.9;
  pointer-events: none;
}
/* a strip of "tape" across the top */
.snap::before {
  content: "";
  position: absolute;
  top: -0.6rem;
  left: 50%;
  width: 3.6rem;
  height: 1.15rem;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(226,208,150,0.42);
  box-shadow: 0 1px 3px rgba(0,0,0,0.16);
  z-index: 2;
}
.snap figcaption {
  font-family: var(--font-chalk);
  font-style: normal;
  font-size: 1.32rem;
  line-height: 1.15;
  color: inherit;
  text-align: center;
  padding: 0.55rem 0.3rem 0;
}
/* on the dark board/valley/chalkboard sections the chalk box + caption go chalk-white */
.section--board .snap, .section--valley .snap, .chalkboard .snap { color: var(--chalk-white); }

/* collage: a relaxed scatter of snaps */
.collage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(1.5rem, 3.5vw, 2.8rem);
  align-items: start;
  max-width: 70rem;
  margin: 2.6rem auto 0;
  padding-inline: var(--pad);
}

/* spread: photos flank the reading column (a stack on each side) so you can
   see them while you read; collapses to text-then-photos on narrow screens */
.spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 31rem) minmax(0, 1fr);
  gap: clamp(1.4rem, 2.6vw, 2.5rem);
  align-items: start;
  max-width: 84rem;
  margin: 2.4rem auto 0;
  padding-inline: var(--pad);
}
.spread .prose { max-width: none; margin-inline: 0; padding-inline: 0; }
.spread__col { display: flex; flex-direction: column; gap: clamp(1.4rem, 2.4vw, 2.4rem); }
.spread__col .snap { width: 100%; }
@media (max-width: 1080px) {
  .spread { grid-template-columns: 1fr; gap: 1.6rem; max-width: 36rem; }
  .spread .prose { order: -1; }
  .spread__col { flex-direction: row; flex-wrap: wrap; gap: 1rem; }
  .spread__col .snap { flex: 1 1 42%; }
}

/* mask fallback: no chalk frame, plain hairline instead */
@supports not ((-webkit-mask: url("a")) or (mask: url("a"))) {
  .snap picture::after { display: none; }
  .snap picture { outline: 2px solid currentColor; outline-offset: 4px; }
}

/* ---------- faq ---------- */

.faq {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.faq details {
  border-bottom: 1px solid rgba(62, 92, 63, 0.28);
}
.faq summary {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  padding: 1.1rem 2rem 1.1rem 0;
  cursor: pointer;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.3rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--gold);
  transition: transform 0.25s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq summary:hover { color: var(--red); }
.faq details p { padding-bottom: 1.2rem; color: rgba(31, 36, 31, 0.86); }

/* ---------- farewell + footer ---------- */

.farewell { margin-top: clamp(3rem, 8vw, 6rem); }

.farewell__image {
  position: relative;
  height: clamp(380px, 70vh, 640px);
}
.farewell__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.farewell__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(var(--scrim), 0.55), rgba(var(--scrim), 0.12) 55%);
}
.farewell__line {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.footer {
  background-color: var(--indigo-deep);
  background-image: var(--mottle);
  color: rgba(250, 247, 240, 0.9);
  padding: clamp(3rem, 7vw, 5rem) var(--pad) 2rem;
}
.footer a { color: var(--paper); }
.footer a:hover { color: var(--gold); }
.footer h3 {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  max-width: 76rem;
  margin-inline: auto;
}
.footer .btn-chalk { margin: 0.4rem 0 1rem; }
.footer__contactline { font-family: var(--font-ui); font-size: 0.92rem; }
.footer__small { font-size: 0.95rem; color: rgba(250, 247, 240, 0.72); }
.footer__legal {
  max-width: 76rem;
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(250, 247, 240, 0.18);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  line-height: 1.6;
  color: rgba(250, 247, 240, 0.65);
}

/* ---------- whatsapp fab ---------- */

.fabs {
  position: fixed;
  right: max(1.1rem, env(safe-area-inset-right));
  bottom: max(1.1rem, env(safe-area-inset-bottom));
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: opacity .3s ease, visibility .3s;
}
.fabs.is-hidden { opacity: 0; visibility: hidden; }

.fab {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 3px 12px rgba(0,0,0,0.26);
  transition: transform .2s ease;
}
.fab:hover { transform: scale(1.08); color: #fff; }
.fab--whatsapp { background: #25D366; }
.fab--facebook { background: #1877F2; }
.fab--instagram { background: #E1306C; }
.fab--gofundme { background: var(--red); }  /* red heart = donate */

/* speed-dial toggle — only used on phones (see media query) */
.fabs__toggle { display: none; }

/* ---------- reveal on scroll ---------- */

/* reveal-on-scroll only ever hides content after the exact code that
   un-hides it has executed: main.js adds .reveal-armed right before it
   starts observing. If main.js fails to load, everything stays visible. */
.reveal-armed .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease-out, transform .6s ease-out;
}
.reveal-armed .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .nav__links, .nav__ctas { display: none; }
  /* the burger only appears once main.js has wired it (html.nav-js) —
     a no-JS visitor never sees a dead button */
  .nav-js .nav__burger { display: block; }

  .storygrid, .volgrid, .homestay__inner, .chalkboard__grid { grid-template-columns: 1fr; }
  .storygrid__portrait, .factbox { position: static; }
  .trektrio { grid-template-columns: 1fr 1fr; }
  .trektrio figure:last-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  body { font-size: 1.05rem; }
  .hero__lockup .kicker { font-size: 0.62rem; letter-spacing: 0.09em; }

  /* three hero buttons: "Come Teach" full width, then the shorter two share a row */
  .hero__ctas { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .hero__ctas .btn-chalk { text-align: center; padding-inline: 0.4rem; }
  .hero__ctas .btn-chalk:first-child { grid-column: 1 / -1; }

  /* badge: keep pinned top-right but use the short text so it never overflows */
  .hero__badge { top: calc(var(--nav-h) + 0.6rem); font-size: 0.64rem; padding: 0.45rem 0.8rem; }
  .hero__badge-full { display: none; }
  .hero__badge-short { display: inline; }

  /* social bubbles collapse into a tap-to-expand speed dial so they don't
     cover the hero buttons; collapsed = just the toggle at the bottom corner */
  .fabs__toggle {
    display: grid;
    place-items: center;
    order: 99;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    background: var(--chalkboard);
    color: var(--paper);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
  }
  .fabs__plus { transition: transform .25s ease; }
  .fabs.is-open .fabs__plus { transform: rotate(135deg); }
  .fabs .fab { display: none; }
  .fabs.is-open .fab { display: grid; }

  .diptych { grid-template-columns: 1fr; }
  .trektrio { grid-template-columns: 1fr; }
  .rooms__pair { grid-template-columns: 1fr; }

  /* collages: one column of taped photos, calmer tilt so nothing overflows */
  .collage { grid-template-columns: 1fr; gap: 1.5rem; }
  .collage .snap { max-width: 22rem; margin-inline: auto; }
  .snap { transform: rotate(-0.8deg); }
  .snap:nth-child(even) { transform: rotate(0.8deg); }
  .snap:nth-child(3n) { transform: rotate(0deg); }

  /* full-bleed image breakout: photos escape the text measure on phones */
  .diptych, .trektrio { padding-inline: 0; }
  .diptych figcaption, .trektrio figcaption { padding-inline: var(--pad); }
  .homestay { padding-inline: 0; }
  .homestay__inner { border-radius: 0; }

  .hero__dashes { display: none; }
}

/* ---------- language switcher (EN / FR) ---------- */
.lang { position: relative; flex: none; font-family: var(--font-ui); }
.lang__toggle {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.4rem 0.62rem;
  border-radius: 12px;
  background: rgba(20, 24, 15, 0.24);
  color: var(--paper);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .2s ease;
}
.lang__toggle::-webkit-details-marker { display: none; }
.lang__toggle::marker { content: ""; }
.lang__toggle:hover { background: rgba(20, 24, 15, 0.38); }
.lang__flag {
  display: block;
  width: 20px;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
}
.lang__code { text-transform: uppercase; }
.lang__caret { opacity: 0.8; transition: transform .2s ease; }
.lang[open] .lang__caret { transform: rotate(180deg); }
.lang__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 172px;
  padding: 0.35rem;
  background: var(--paper);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.30);
  display: grid;
  gap: 2px;
  z-index: 60;
}
.lang__opt {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1;
}
.lang__opt:hover { background: rgba(51, 87, 74, 0.10); }
.lang__opt[aria-current="page"] { font-weight: 700; }
.lang__opt[aria-current="page"]::after {
  content: "\2713";
  margin-left: auto;
  color: var(--green);
  font-weight: 700;
}
.lang__opt .lang__flag { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14); }
.lang__toggle:focus-visible,
.lang__opt:focus-visible {
  outline: 2px solid var(--chalk-sky);
  outline-offset: 2px;
}
@media (max-width: 360px) {
  .lang__code { display: none; }
}

/* ---------- motion & print ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__slide { transition: none; }
  .hero__slide.is-active img { animation: none; }
  .hero__cue { animation: none; }
  .reveal-armed .reveal { opacity: 1; transform: none; transition: none; }
  .trekhero, .section--valley { background-attachment: scroll; }
}
