/* ==========================================================================
   Sapphire — a calm, cartoonish non-profit site
   Plain CSS. No frameworks. Light + dark themes.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* palette: sky-blue anchor, warm cream ground, coral + sunny-yellow accents */
  --sky: #5aa7e6;
  --sky-deep: #3f8fd6;
  --sky-soft: #d7ecfb;
  --coral: #ff9d8a;
  --coral-deep: #f57e69;
  --sun: #ffd166;
  --cream: #fff7ec;
  --cream-2: #fdeede;

  --bg: var(--cream);
  --bg-panel: #ffffff;
  --bg-tint: #fbf1e4;
  --ink: #33404f;
  --ink-soft: #5d6b7a;
  --line: #eadfce;
  --shadow: 30px 40px 60px -30px rgba(63, 143, 214, 0.28);
  --shadow-sm: 0 10px 24px -14px rgba(63, 143, 214, 0.4);

  --accent: var(--coral);
  --accent-deep: var(--coral-deep);

  --r-lg: 34px;
  --r-md: 22px;
  --r-sm: 14px;
  --r-pill: 999px;

  --font-display: "Fredoka", "Baloo 2", "Comic Sans MS", "Trebuchet MS", sans-serif;
  --font-body: "Nunito", "Segoe UI", "Helvetica Neue", sans-serif;

  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);

  --maxw: 1120px;
}

:root[data-theme="dark"] {
  --bg: #182230;
  --bg-panel: #212e3f;
  --bg-tint: #1d2937;
  --ink: #eaf1f9;
  --ink-soft: #a9b8c8;
  --line: #33445a;
  --sky-soft: #26374c;
  --cream: #182230;
  --shadow: 30px 40px 60px -30px rgba(0, 0, 0, 0.55);
  --shadow-sm: 0 10px 24px -14px rgba(0, 0, 0, 0.6);
}

/* Follow system preference until a choice is stored (JS sets data-theme). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg: #182230;
    --bg-panel: #212e3f;
    --bg-tint: #1d2937;
    --ink: #eaf1f9;
    --ink-soft: #a9b8c8;
    --line: #33445a;
    --sky-soft: #26374c;
    --cream: #182230;
    --shadow: 30px 40px 60px -30px rgba(0, 0, 0, 0.55);
    --shadow-sm: 0 10px 24px -14px rgba(0, 0, 0, 0.6);
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.06rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  /* soft paper-grain texture layered over a gentle mesh */
  background-image:
    radial-gradient(1000px 600px at 12% -8%, rgba(90, 167, 230, 0.16), transparent 60%),
    radial-gradient(900px 620px at 105% 4%, rgba(255, 209, 102, 0.16), transparent 60%),
    radial-gradient(820px 700px at 50% 118%, rgba(255, 157, 138, 0.14), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-attachment: fixed, fixed, fixed, fixed;
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

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

a { color: var(--sky-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }

p { margin: 0 0 1rem; }

.wrap { width: min(100% - 2.4rem, var(--maxw)); margin-inline: auto; }

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; position: relative; }
.section--tint { background: color-mix(in srgb, var(--bg-tint) 70%, transparent); }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sky-deep);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.lede { font-size: 1.18rem; color: var(--ink-soft); max-width: 56ch; }

/* ---------- Skip link ---------- */
.skip {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--sky); color: #fff; padding: 0.7rem 1.2rem;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
}
.skip:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--sky);
  --btn-ink: #fff;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-ink);
  box-shadow: 0 8px 0 0 var(--btn-shade, var(--sky-deep));
  text-decoration: none;
  transition: transform 0.22s var(--ease-bounce), box-shadow 0.22s var(--ease-bounce), filter 0.2s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 11px 0 0 var(--btn-shade, var(--sky-deep)); text-decoration: none; filter: saturate(1.05); }
.btn:active { transform: translateY(4px) scale(0.98); box-shadow: 0 3px 0 0 var(--btn-shade, var(--sky-deep)); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.btn--accent { --btn-bg: var(--coral); --btn-shade: var(--coral-deep); --btn-ink: #52281f; }
.btn--sun { --btn-bg: var(--sun); --btn-shade: #e8b23f; --btn-ink: #5b4415; }
.btn--ghost {
  --btn-bg: transparent; --btn-ink: var(--ink);
  box-shadow: inset 0 0 0 3px var(--line);
}
.btn--ghost:hover { box-shadow: inset 0 0 0 3px var(--sky); }
.btn--lg { padding: 1.05rem 2rem; font-size: 1.15rem; }
.btn--block { width: 100%; justify-content: center; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 2px dashed var(--line);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.7rem 0;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand svg { width: 34px; height: 34px; }
.brand span { transition: transform 0.3s var(--ease-bounce); }
.brand:hover span { transform: rotate(-4deg); }

.nav__links { display: flex; align-items: center; gap: 0.35rem; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  font-family: var(--font-display); font-weight: 500; color: var(--ink);
  padding: 0.5rem 0.9rem; border-radius: var(--r-pill); transition: background 0.2s ease, color 0.2s ease;
}
.nav__links a:hover { background: var(--sky-soft); text-decoration: none; }
.nav__links a[aria-current="page"] { background: var(--sky); color: #fff; }

.nav__tools { display: flex; align-items: center; gap: 0.5rem; }

.theme-toggle, .nav__burger {
  width: 44px; height: 44px; border-radius: var(--r-pill);
  border: 2px solid var(--line); background: var(--bg-panel); color: var(--ink);
  cursor: pointer; display: grid; place-items: center; font-size: 1.2rem;
  transition: transform 0.25s var(--ease-bounce), border-color 0.2s ease;
}
.theme-toggle:hover, .nav__burger:hover { transform: rotate(12deg) scale(1.08); border-color: var(--sky); }
.theme-toggle:active { transform: scale(0.9); }
.theme-toggle:focus-visible, .nav__burger:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.theme-toggle .sun-i { display: none; }
:root[data-theme="dark"] .theme-toggle .sun-i { display: block; }
:root[data-theme="dark"] .theme-toggle .moon-i { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun-i { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon-i { display: none; }
}

.nav__burger { display: none; }

@media (max-width: 820px) {
  .nav__burger { display: grid; }
  .nav__links {
    position: fixed; inset: 64px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0.2rem;
    background: var(--bg-panel); border-bottom: 3px solid var(--line);
    padding: 1rem 1.2rem 1.4rem; margin: 0;
    box-shadow: var(--shadow-sm);
    transform: translateY(-140%);
    transition: transform 0.4s var(--ease-soft);
  }
  .nav__links.open { transform: translateY(0); }
  .nav__links a { padding: 0.85rem 1rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 8vw, 6rem); overflow: hidden; }
.hero__grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.hero__title { margin-bottom: 0.4rem; }
.hero__title .hl { position: relative; color: var(--sky-deep); white-space: nowrap; }
.hero__title .hl::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: 0.06em; height: 0.34em;
  background: var(--sun); border-radius: var(--r-pill); z-index: -1; opacity: 0.85;
  transform: rotate(-1.2deg);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.6rem; }
.hero__note { margin-top: 1.1rem; font-size: 0.98rem; color: var(--ink-soft); }

.hero__art { position: relative; display: grid; place-items: center; }
.hero__blob {
  position: absolute; inset: -8% -6%;
  background: radial-gradient(closest-side, var(--sky-soft), transparent 78%);
  border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%;
  z-index: 0;
}
.hero__mascot { position: relative; z-index: 1; width: min(78%, 320px); filter: drop-shadow(0 24px 30px rgba(63,143,214,0.28)); }

/* animated load-in helpers */
.rise { opacity: 0; transform: translateY(26px) scale(0.98); }
.hero-in .rise { animation: heroRise 0.75s var(--ease-bounce) forwards; }
.hero-in .rise.d1 { animation-delay: 0.05s; }
.hero-in .rise.d2 { animation-delay: 0.18s; }
.hero-in .rise.d3 { animation-delay: 0.31s; }
.hero-in .rise.d4 { animation-delay: 0.44s; }
@keyframes heroRise {
  0% { opacity: 0; transform: translateY(26px) scale(0.96); }
  70% { opacity: 1; transform: translateY(-6px) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.hero-in .pop { animation: popIn 0.8s var(--ease-bounce) 0.35s both; }
@keyframes popIn {
  0% { opacity: 0; transform: scale(0.6) rotate(-6deg); }
  70% { opacity: 1; transform: scale(1.05) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* ---------- Floating doodles ---------- */
.doodles { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.doodle { position: absolute; opacity: 0.85; will-change: transform; animation: bob 7s var(--ease-soft) infinite; }
.doodle svg { width: 100%; height: 100%; }
.doodle.d-a { top: 12%; left: 6%; width: 46px; animation-duration: 8s; }
.doodle.d-b { top: 22%; right: 9%; width: 34px; animation-duration: 6.5s; animation-delay: -2s; }
.doodle.d-c { bottom: 16%; left: 12%; width: 40px; animation-duration: 9s; animation-delay: -3.5s; }
.doodle.d-d { bottom: 24%; right: 14%; width: 52px; animation-duration: 7.5s; animation-delay: -1s; }
.doodle.d-e { top: 46%; left: 44%; width: 28px; animation-duration: 8.5s; animation-delay: -4s; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-18px) rotate(6deg); }
}

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s var(--ease-soft), transform 0.6s var(--ease-bounce); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

/* ---------- Section heads ---------- */
.head { max-width: 60ch; margin-bottom: 2.4rem; }
.head--center { margin-inline: auto; text-align: center; }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 1.4rem; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .cards--3, .cards--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards--3, .cards--4 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-panel);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s var(--ease-bounce), box-shadow 0.28s var(--ease-bounce), border-color 0.2s ease;
}
.card:hover { transform: translateY(-8px) rotate(-0.6deg); box-shadow: var(--shadow); border-color: var(--sky); }
.card__icon {
  width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center;
  font-size: 1.7rem; margin-bottom: 1rem; background: var(--sky-soft);
}
.card:nth-child(2n) .card__icon { background: color-mix(in srgb, var(--coral) 32%, var(--bg-panel)); }
.card:nth-child(3n) .card__icon { background: color-mix(in srgb, var(--sun) 42%, var(--bg-panel)); }
.card h3 { margin-bottom: 0.35rem; }
.card p { color: var(--ink-soft); margin: 0; }

/* ---------- How it works (steps) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; counter-reset: step; }
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative; background: var(--bg-panel); border: 2px solid var(--line);
  border-radius: var(--r-lg); padding: 2.2rem 1.5rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s var(--ease-bounce);
}
.step:hover { transform: translateY(-6px) scale(1.01); }
.step__num {
  counter-increment: step;
  position: absolute; top: -22px; left: 22px;
  width: 48px; height: 48px; border-radius: var(--r-pill);
  background: var(--sky); color: #fff; font-family: var(--font-display);
  font-size: 1.35rem; font-weight: 600; display: grid; place-items: center;
  box-shadow: 0 6px 0 var(--sky-deep);
}
.step:nth-child(2) .step__num { background: var(--coral); box-shadow: 0 6px 0 var(--coral-deep); }
.step:nth-child(3) .step__num { background: var(--sun); color: #5b4415; box-shadow: 0 6px 0 #e8b23f; }
.step h3 { margin-bottom: 0.3rem; }
.step p { color: var(--ink-soft); margin: 0; }

/* ---------- Big CTA band ---------- */
.cta-band {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--sky), var(--sky-deep));
  border-radius: var(--r-lg);
  padding: clamp(2.4rem, 6vw, 4rem);
  text-align: center; color: #fff;
  box-shadow: var(--shadow);
}
.cta-band h2, .cta-band p { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.9); max-width: 48ch; margin-inline: auto; }
.cta-band .hero__cta { justify-content: center; }
.cta-band::before, .cta-band::after {
  content: ""; position: absolute; border-radius: 50%; opacity: 0.25;
}
.cta-band::before { width: 220px; height: 220px; background: var(--sun); top: -80px; left: -60px; }
.cta-band::after { width: 260px; height: 260px; background: var(--coral); bottom: -110px; right: -70px; }
.cta-band .wrap-inner { position: relative; z-index: 1; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 0.85fr; gap: 2rem; align-items: center; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  background: var(--bg-panel); border: 2px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.6rem, 4vw, 2.6rem); box-shadow: var(--shadow-sm);
}
.social-link {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.1rem;
  padding: 0.9rem 1.3rem; border-radius: var(--r-pill);
  background: linear-gradient(135deg, #f9ce6b, #f77e7e, #d16ba5);
  color: #fff; box-shadow: var(--shadow-sm);
  transition: transform 0.22s var(--ease-bounce);
}
.social-link:hover { transform: translateY(-3px) scale(1.03); text-decoration: none; }
.later-note { font-size: 0.95rem; color: var(--ink-soft); margin-top: 1.4rem; padding-top: 1.2rem; border-top: 2px dashed var(--line); }

/* ---------- Forms ---------- */
.form-shell {
  background: var(--bg-panel); border: 2px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.6rem, 4vw, 2.8rem); box-shadow: var(--shadow);
  max-width: 720px; margin-inline: auto; position: relative;
}
.form-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 600;
  padding: 0.4rem 1rem; border-radius: var(--r-pill);
  background: var(--sky-soft); color: var(--sky-deep); margin-bottom: 1rem;
}
.form-badge.team { background: color-mix(in srgb, var(--coral) 30%, var(--bg-panel)); color: var(--coral-deep); }

.field { margin-bottom: 1.25rem; }
.field > label { display: block; font-family: var(--font-display); font-weight: 500; margin-bottom: 0.4rem; }
.field .req { color: var(--coral-deep); }
.field .hint { display: block; font-size: 0.9rem; color: var(--ink-soft); font-weight: 400; margin-top: -0.1rem; }

.input, .select, .textarea {
  width: 100%; font-family: var(--font-body); font-size: 1.02rem; color: var(--ink);
  background: var(--bg); border: 2px solid var(--line); border-radius: var(--r-md);
  padding: 0.8rem 1rem; transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.textarea { min-height: 130px; resize: vertical; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235aa7e6' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M3 6l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.6rem;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--sky);
  box-shadow: 0 0 0 4px var(--sky-soft); transform: translateY(-1px);
}
.field.invalid .input, .field.invalid .select, .field.invalid .textarea,
.field.invalid .choice-grid { border-color: var(--coral-deep); box-shadow: 0 0 0 4px color-mix(in srgb, var(--coral) 30%, transparent); }
.error-msg { display: none; color: var(--coral-deep); font-size: 0.9rem; font-weight: 600; margin-top: 0.4rem; }
.field.invalid .error-msg { display: block; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 560px) { .two-col { grid-template-columns: 1fr; } }

/* custom pill choices (radio / checkbox) */
.choice-grid { display: grid; gap: 0.6rem; grid-template-columns: repeat(2, 1fr); border: 2px solid transparent; border-radius: var(--r-md); }
@media (max-width: 560px) { .choice-grid { grid-template-columns: 1fr; } }
.choice {
  position: relative; display: flex; align-items: center; gap: 0.7rem;
  padding: 0.75rem 1rem; border-radius: var(--r-md);
  border: 2px solid var(--line); background: var(--bg);
  cursor: pointer; font-weight: 600; transition: transform 0.2s var(--ease-bounce), border-color 0.2s ease, background 0.2s ease;
}
.choice:hover { transform: translateY(-2px); border-color: var(--sky); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .dot {
  width: 22px; height: 22px; border-radius: 8px; border: 2px solid var(--line);
  display: grid; place-items: center; flex: none; transition: all 0.2s var(--ease-bounce);
}
.choice[data-type="radio"] .dot { border-radius: 50%; }
.choice .dot::after { content: ""; width: 10px; height: 10px; border-radius: inherit; background: #fff; transform: scale(0); transition: transform 0.2s var(--ease-bounce); }
.choice input:checked ~ .dot { background: var(--sky); border-color: var(--sky); }
.choice input:checked ~ .dot::after { transform: scale(1); }
.choice:has(input:checked) { border-color: var(--sky); background: var(--sky-soft); }
.choice input:focus-visible ~ .dot { outline: 3px solid var(--sky); outline-offset: 2px; }
.form--team .choice:has(input:checked) { border-color: var(--coral-deep); background: color-mix(in srgb, var(--coral) 22%, var(--bg-panel)); }
.form--team .choice input:checked ~ .dot { background: var(--coral-deep); border-color: var(--coral-deep); }

.other-reveal { margin-top: 0.7rem; }
.other-reveal[hidden] { display: none; }
.other-reveal .hint { display: block; font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 0.35rem; }

.form-intro { margin-bottom: 1.8rem; }

/* success / confirmation overlay inside the shell */
.form-success {
  display: none; text-align: center; padding: 1rem 0 0.5rem;
}
.form-success.show { display: block; animation: popIn 0.6s var(--ease-bounce); }
.form-success .badge-check {
  width: 92px; height: 92px; margin: 0 auto 1rem; border-radius: 50%;
  background: var(--sky); display: grid; place-items: center; box-shadow: 0 10px 0 var(--sky-deep);
}
.form--team .form-success .badge-check { background: var(--coral-deep); box-shadow: 0 10px 0 #d1583f; }
.form-success .badge-check svg { width: 46px; height: 46px; stroke: #fff; }
.is-hidden { display: none !important; }

.form-status { min-height: 1.2rem; }
.submit-row { margin-top: 1.6rem; }

/* ---------- Footer ---------- */
.footer {
  margin-top: 2rem; padding: 2.5rem 0;
  border-top: 2px dashed var(--line);
  background: color-mix(in srgb, var(--bg-tint) 55%, transparent);
}
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.2rem; align-items: center; }
.footer__links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; list-style: none; margin: 0; padding: 0; }
.footer__links a { color: var(--ink-soft); font-weight: 600; }
.footer small { color: var(--ink-soft); }

/* ---------- Confetti canvas ---------- */
#confetti-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 300;
}

/* ---------- Page transition fade ---------- */
.page-fade { animation: pageIn 0.5s var(--ease-soft) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
body.leaving { opacity: 0; transition: opacity 0.28s ease; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.stack-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* ---------- Reduced motion ---------- */
@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;
  }
  .doodles { display: none; }
  .rise, .reveal { opacity: 1 !important; transform: none !important; }
  .page-fade { animation: none; }
}
