/* ============================================================
   YWAM Chiang Mai. Night into Day.
   Vanilla CSS. No frameworks. No CDN.
   Palette phases: night > dusk > dawn > day, driven by
   body[data-phase] which scripts/main.js flips per section.
   ============================================================ */

/* ---------- Fonts (local WOFF2 only) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/Fraunces-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../fonts/Outfit-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; background: none; border: none; cursor: pointer; }

/* ---------- Phase palettes ----------
   Every colour on the page derives from these tokens.
   AA contrast verified per phase:
   night/dusk: ink #f4efe4 on bg, soft #b3bac9
   dawn:       ink #2b1410 on #c96f4a
   day:        ink #241f16 on #faf5ec, soft #5b5344
------------------------------------------------ */
:root {
  --gold:        #e8a13c;
  --gold-deep:   #8a5a10;
  --teal:        #1f6f6b;
  --rose:        #b0384f;
  --indigo:      #3d4a8f;
  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Outfit", system-ui, sans-serif;
  --nav-h: 76px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-phase="night"] {
  --bg:        #0d1220;
  --bg-raise:  #151c2f;
  --ink:       #f4efe4;
  --ink-soft:  #b3bac9;
  --accent:    var(--gold);
  --accent-ink: var(--gold);
  --line:      rgba(244, 239, 228, 0.14);
  cursor: url("images/ywamchiangmai-ywam-chiangmai-cursor-white.svg") 4 4, auto;
}
body[data-phase="dusk"] {
  --bg:        #1c1526;
  --bg-raise:  #261d33;
  --ink:       #f4efe4;
  --ink-soft:  #beb3c9;
  --accent:    var(--gold);
  --accent-ink: var(--gold);
  --line:      rgba(244, 239, 228, 0.14);
  cursor: url("images/ywamchiangmai-ywam-chiangmai-cursor-white.svg") 4 4, auto;
}
body[data-phase="dawn"] {
  --bg:        #c96f4a;
  --bg-raise:  #d47f58;
  --ink:       #2b1410;
  --ink-soft:  #3f1206;
  --accent:    #fff3e4;
  --accent-ink: #3f1206;
  --line:      rgba(43, 20, 16, 0.22);
  cursor: url("images/ywamchiangmai-ywam-chiangmai-cursor-dark.svg") 4 4, auto;
}
body[data-phase="day"] {
  --bg:        #faf5ec;
  --bg-raise:  #fffdf8;
  --ink:       #241f16;
  --ink-soft:  #5b5344;
  --accent:    var(--gold);
  --accent-ink: var(--gold-deep);
  --line:      rgba(36, 31, 22, 0.14);
  cursor: url("images/ywamchiangmai-ywam-chiangmai-cursor-dark.svg") 4 4, auto;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 340;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 1.2s ease, color 1.2s ease;
  overflow-x: hidden;
}

/* Film grain over everything, very faint */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

::selection { background: var(--gold); color: #1c1206; }

:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 200;
  background: var(--gold);
  color: #1c1206;
  padding: 10px 18px;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

section { padding: clamp(5rem, 12vh, 9rem) clamp(1.25rem, 5vw, 4rem); }

/* ---------- Type ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: 1.04;
  letter-spacing: -0.015em;
  font-variation-settings: "SOFT" 40, "WONK" 0, "opsz" 72;
}

h2 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); max-width: 18ch; }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 640;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 1.1rem;
  transition: color 1.2s ease;
}

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 56ch;
  margin-top: 1.2rem;
  transition: color 1.2s ease;
}

.section-head { margin-bottom: clamp(2.5rem, 6vh, 4.5rem); }

.gold {
  background: linear-gradient(120deg, #f5d489 0%, var(--gold) 55%, #d07f28 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.95rem 2rem;
  border-radius: 999px;
  font-weight: 560;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out),
              background-color 0.3s, color 1.2s ease, border-color 1.2s ease;
}
.btn-solid {
  background: var(--gold);
  color: #1c1206;
  box-shadow: 0 0 0 0 rgba(232, 161, 60, 0);
}
.btn-solid:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(232, 161, 60, 0.35);
}
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--accent-ink); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  color: var(--ink);
  transition: background-color 0.45s ease, color 1.2s ease, box-shadow 0.45s ease;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: auto;
  white-space: nowrap;
}
.nav-logo em {
  font-style: normal;
  font-weight: 380;
  color: var(--accent-ink);
  transition: color 1.2s ease;
}
.nav-logo-mark {
  width: 1.4rem; height: 1.4rem; flex: none;
  background: var(--accent-ink);
  -webkit-mask: url("images/ywamchiangmai-ywam-chiangmai-safari-pinned-tab.svg") center / contain no-repeat;
  mask: url("images/ywamchiangmai-ywam-chiangmai-safari-pinned-tab.svg") center / contain no-repeat;
}

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 460;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.nav-links a:hover { opacity: 1; }

.nav-apply {
  background: var(--gold);
  color: #1c1206;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}
.nav-apply:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(232, 161, 60, 0.35); }

.nav-burger { display: none; flex-direction: column; gap: 6px; padding: 8px; }
.nav-burger span {
  width: 24px; height: 2px;
  background: var(--ink);
  transition: transform 0.3s, opacity 0.3s;
}
.nav-burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem) 2rem;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--line);
}
.mobile-menu a {
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 500;
  padding: 0.6rem 0;
}
.mobile-menu .nav-apply { align-self: flex-start; margin-top: 0.5rem; }
.mobile-menu[hidden] { display: none; }

@media (max-width: 760px) {
  .nav-links, .nav .nav-apply { display: none; }
  .nav-burger { display: flex; }
}

/* ---------- 1. Hero (night) ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: var(--nav-h);
}

#lanterns {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Static fallback sky for reduced motion / no JS */
.hero.static-sky #lanterns { display: none; }
.hero.static-sky::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle 3px at 20% 30%, rgba(232,161,60,0.9) 0 40%, transparent 60%),
    radial-gradient(circle 2px at 70% 20%, rgba(232,161,60,0.7) 0 40%, transparent 60%),
    radial-gradient(circle 4px at 82% 55%, rgba(232,161,60,0.8) 0 40%, transparent 60%),
    radial-gradient(circle 2px at 40% 60%, rgba(232,161,60,0.6) 0 40%, transparent 60%),
    radial-gradient(circle 3px at 55% 35%, rgba(232,161,60,0.75) 0 40%, transparent 60%),
    radial-gradient(circle 2px at 12% 70%, rgba(232,161,60,0.5) 0 40%, transparent 60%);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 65% 70% at 50% 45%, transparent 35%, #0d1220 100%),
    radial-gradient(ellipse 90% 50% at 50% 110%, rgba(201, 111, 74, 0.16) 0%, transparent 60%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 68ch;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  padding: 0 1.25rem;
}

.hero-eyebrow { margin-bottom: 0; animation: fadeUp 0.9s var(--ease-out) both; }

.hero-heading {
  font-size: clamp(2.9rem, 8vw, 6.2rem);
  font-variation-settings: "SOFT" 70, "WONK" 1, "opsz" 144;
}

/* Words light up one by one, like lanterns */
.hero-heading .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.45em);
  filter: blur(6px);
  animation: lanternIn 0.9s var(--ease-out) forwards;
  animation-delay: calc(0.25s + var(--w) * 0.14s);
}
@keyframes lanternIn {
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-sub {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 46ch;
  animation: fadeUp 0.9s var(--ease-out) 1.5s both;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.9s var(--ease-out) 1.75s both;
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  animation: fadeUp 0.9s var(--ease-out) 2.2s both;
}
.scroll-cue-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: cueDrop 2.2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cueDrop {
  0%, 100% { transform: scaleY(0.35); opacity: 0.4; }
  50%      { transform: scaleY(1); opacity: 1; }
}

/* ---------- 2. City (dusk) ---------- */
.city-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.2rem;
  padding-bottom: 1rem;
}

.city-card {
  scroll-snap-align: start;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-raise);
  transition: background-color 1.2s ease, transform 0.5s var(--ease-out);
}
.city-card:nth-child(even) { transform: translateY(1.4rem); }
.city-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.city-card figcaption {
  padding: 0.9rem 1rem 1.1rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  transition: color 1.2s ease;
}

@media (max-width: 900px) {
  .city-strip { grid-template-columns: repeat(2, 1fr); }
  .city-card:nth-child(even) { transform: none; }
}
@media (max-width: 540px) {
  .city-strip { grid-template-columns: 1fr; }
}

.ministries-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 1.5rem;
}
.ministries-grid .city-card:nth-child(even) { transform: none; }

#ministries { padding-top: clamp(6rem, 14vh, 11rem); padding-bottom: clamp(6rem, 14vh, 11rem); }

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

/* ---------- 3. Mission (dawn) ---------- */
.mission {
  position: relative;
  text-align: center;
  overflow: hidden;
}
/* Sun glow rising behind the copy */
.mission::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -30%;
  width: 130vmin;
  height: 130vmin;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 185, 138, 0.55) 0%, rgba(233, 185, 138, 0.18) 40%, transparent 70%);
  pointer-events: none;
}

.horizon {
  position: absolute;
  top: clamp(1.5rem, 5vh, 3.5rem);
  left: 0;
  width: 100%;
  height: 60px;
  color: var(--ink-soft);
  opacity: 0.7;
}
.horizon path {
  stroke-dasharray: 1300;
  stroke-dashoffset: 1300;
  transition: stroke-dashoffset 1.9s var(--ease-out) 0.2s;
}
.horizon.drawn path { stroke-dashoffset: 0; }

.mission-inner {
  position: relative;
  max-width: 62ch;
  margin: 0 auto;
}
.mission-inner h2 { margin-inline: auto; }

.mission-lede {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  margin-top: 1.6rem;
  color: var(--ink);
}
.mission-lede strong { font-weight: 640; }

.mission-honest {
  margin: 1.4rem auto 0;
  max-width: 52ch;
  color: var(--ink-soft);
  transition: color 1.2s ease;
}

.mission-stats {
  display: flex;
  justify-content: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  margin-top: 3.5rem;
  flex-wrap: wrap;
}
.mission-stats > div { max-width: 15ch; }
.mission-stats dt {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  font-weight: 600;
  line-height: 1;
}
.mission-stats dd {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-top: 0.5rem;
  transition: color 1.2s ease;
}

/* ---------- 4. Mirrors (day) ---------- */
.mirror-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.4rem;
  max-width: 1200px;
}

.mirror-card {
  position: relative;
  padding: 2rem 1.8rem 2.2rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-raise);
  transition: background-color 1.2s ease, border-color 1.2s ease, transform 0.4s var(--ease-out);
}
.mirror-card:nth-child(even) { transform: translateY(1.6rem); }
.mirror-card:hover { transform: translateY(-4px); }
.mirror-card:nth-child(even):hover { transform: translateY(calc(1.6rem - 4px)); }

.mirror-num {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--accent-ink);
  transition: color 1.2s ease;
}
.mirror-card h3 { font-size: 1.5rem; margin: 0.7rem 0 0.7rem; }
.mirror-card p { color: var(--ink-soft); font-size: 0.98rem; transition: color 1.2s ease; }

@media (max-width: 900px) {
  .mirror-card:nth-child(even),
  .mirror-card:nth-child(even):hover { transform: none; }
}

/* ---------- 5. Programs (day) ---------- */
.program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1.4rem;
}

.program-card {
  --acc: var(--gold-deep);
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2.1rem 1.8rem 1.9rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-raise);
  overflow: hidden;
  transition: background-color 1.2s ease, border-color 0.35s ease,
              transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.program-card[data-accent="gold"]   { --acc: var(--gold-deep); --acc-glow: 232, 161, 60; }
.program-card[data-accent="teal"]   { --acc: var(--teal);      --acc-glow: 31, 111, 107; }
.program-card[data-accent="rose"]   { --acc: var(--rose);      --acc-glow: 176, 56, 79; }
.program-card[data-accent="indigo"] { --acc: var(--indigo);    --acc-glow: 61, 74, 143; }

/* Accent hairline across the top */
.program-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--acc), transparent 70%);
}

.program-card:hover {
  transform: translateY(-6px);
  border-color: var(--acc);
  box-shadow: 0 20px 44px -12px rgba(var(--acc-glow), 0.38);
}

.program-card__image {
  width: calc(100% + 3.6rem);
  margin: -2.1rem -1.8rem 1.4rem;
  height: 180px;
  object-fit: cover;
  display: block;
}

.program-label {
  font-size: 0.7rem;
  font-weight: 640;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--acc);
}
.program-card h3 {
  font-size: 2.1rem;
  margin-top: 0.9rem;
}
.program-tag {
  font-size: 0.85rem;
  font-weight: 560;
  color: var(--ink-soft);
  margin-top: 0.2rem;
  transition: color 1.2s ease;
}
.program-copy {
  font-size: 0.97rem;
  color: var(--ink-soft);
  margin-top: 1rem;
  flex-grow: 1;
  transition: color 1.2s ease;
}

.program-meta {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}
.program-meta dt {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 1.2s ease;
}
.program-meta dd { font-weight: 560; font-size: 0.95rem; margin-top: 0.15rem; }

.program-link {
  display: inline-block;
  margin-top: 1.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--acc);
  text-decoration: none;
}
.program-link span { display: inline-block; transition: transform 0.3s var(--ease-out); }
.program-link:hover span { transform: translateX(5px); }

/* ---------- 6. Life (day) ---------- */
.life-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.2rem;
  margin-bottom: 3rem;
}
.life-photo { border-radius: 14px; overflow: hidden; }
.life-photo img { width: 100%; height: 100%; object-fit: cover; }
.life-photo:nth-child(1) { grid-column: span 7; }
.life-photo:nth-child(2) { grid-column: span 5; }
.life-photo:nth-child(3) { grid-column: span 5; }
.life-photo:nth-child(4) { grid-column: span 7; }

@media (max-width: 760px) {
  .life-photo:nth-child(n) { grid-column: span 6; }
}

.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}
.quote p {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 460;
  line-height: 1.45;
  font-variation-settings: "SOFT" 80, "WONK" 0;
}
.quote cite {
  display: block;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 0.9rem;
  transition: color 1.2s ease;
}
.quote cite::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--accent-ink);
  vertical-align: middle;
  margin-right: 0.6rem;
}

/* ---------- 7. FAQ (day) ---------- */
.faq-list { max-width: 760px; }

.faq-item {
  border-bottom: 1px solid var(--line);
  transition: border-color 1.2s ease;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.4rem 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 540;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--accent-ink);
  transition: transform 0.35s var(--ease-out), color 1.2s ease;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  padding: 0 0 1.5rem;
  max-width: 60ch;
  color: var(--ink-soft);
  transition: color 1.2s ease;
}

/* ---------- 8. CTA (dusk) ---------- */
.cta { text-align: center; }
.cta-inner {
  max-width: 60ch;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cta h2 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); }
.cta .lede { margin-bottom: 2.4rem; }

/* ---------- Footer ---------- */
.footer {
  padding: 4rem clamp(1.25rem, 5vw, 4rem) 2.5rem;
  border-top: 1px solid var(--line);
  transition: border-color 1.2s ease;
  cursor: url("images/ywamchiangmai-ywam-chiangmai-cursor-white.svg") 4 4, auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.footer-logo em { font-style: normal; color: var(--accent-ink); transition: color 1.2s ease; }
.footer h3 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 640;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 0.8rem;
  transition: color 1.2s ease;
}
.footer-line { font-size: 0.92rem; color: var(--ink-soft); transition: color 1.2s ease; }
.footer-line a { text-decoration: none; }
.footer-line a:hover { text-decoration: underline; }
.footer-legal {
  font-size: 0.8rem;
  color: var(--ink-soft);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  transition: color 1.2s ease, border-color 1.2s ease;
}

/* ---------- Scroll reveals ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* Staggered children carry an inline --i index */
.reveal [style*="--i"] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
  transition-delay: calc(var(--i) * 95ms);
}
.reveal.in [style*="--i"] { opacity: 1; transform: translateY(0); }

/* Keep the designed offsets and hover lifts once revealed */
.reveal.in .city-card:nth-child(even) { transform: translateY(1.4rem); }
.reveal.in .mirror-card:nth-child(even) { transform: translateY(1.6rem); }
.reveal.in .program-card:hover { transform: translateY(-6px); }
.reveal.in .mirror-card:hover { transform: translateY(-4px); }
.reveal.in .mirror-card:nth-child(even):hover { transform: translateY(calc(1.6rem - 4px)); }
@media (max-width: 900px) {
  .reveal.in .city-card:nth-child(even),
  .reveal.in .mirror-card:nth-child(even) { transform: translateY(0); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-heading .w { opacity: 1; transform: none; filter: none; animation: none; }
  .hero-eyebrow, .hero-sub, .hero-ctas, .scroll-cue { animation: none; opacity: 1; }
  .reveal, .reveal [style*="--i"] { opacity: 1; transform: none; }
  .horizon path { stroke-dashoffset: 0; }
}
