/* Recovery House — recoveryhouse.ca
   Palette pulled from the original neon logo artwork:
   deep indigo grid, pink-to-violet glow. */

:root {
  --bg: #120a2e;
  --bg-2: #1b0f3d;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-line: rgba(214, 182, 255, 0.16);
  --text: #f4effd;
  --muted: #bfb3e3;
  --pink: #f08ad6;
  --violet: #9d7bf2;
  --glow: linear-gradient(120deg, var(--pink) 0%, #c584ea 45%, var(--violet) 100%);
  --alert: #ffcf6e;
  --radius: 18px;
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  font-synthesis: none;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  /* the grid from the 4K wallpaper, rebuilt in CSS so it stays crisp */
  background-image:
    radial-gradient(1200px 700px at 85% -10%, rgba(240, 138, 214, 0.18), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(157, 123, 242, 0.16), transparent 60%),
    linear-gradient(rgba(214, 182, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(214, 182, 255, 0.05) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
  color: var(--text);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--pink); text-underline-offset: 3px; }
a:hover { color: #ffb6ea; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { left: 8px; }

/* ---------- logo mark: the original white PNG used as a mask over the glow ---------- */
.mark {
  display: inline-block;
  aspect-ratio: 900 / 762;
  background: var(--glow);
  -webkit-mask: url("../assets/brand/logo-white.png") center / contain no-repeat;
          mask: url("../assets/brand/logo-white.png") center / contain no-repeat;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(18, 10, 46, 0.78);
  border-bottom: 1px solid var(--panel-line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.15rem; letter-spacing: 0.01em; }
.brand .mark { width: 40px; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a {
  color: var(--muted); text-decoration: none; font-weight: 700; font-size: 0.95rem;
  padding: 8px 12px; border-radius: 999px;
}
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.help { color: var(--bg); background: var(--alert); }
.nav a.help:hover { background: #ffe0a0; }
.nav-toggle { display: none; }

@media (max-width: 980px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--panel-line);
    background: var(--panel); color: var(--text); font: inherit; cursor: pointer;
  }
  .nav {
    position: absolute; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch;
    padding: 10px var(--gutter) 18px; background: var(--bg-2); border-bottom: 1px solid var(--panel-line);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
}

/* ---------- hero ---------- */
.hero { padding: clamp(44px, 6vw, 80px) 0 clamp(20px, 2.5vw, 32px); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.8rem; font-weight: 800; color: var(--pink); margin: 0 0 14px; }
h1, h2, h3 { line-height: 1.12; margin: 0; font-weight: 900; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h1 .glow, h2 .glow {
  background: var(--glow); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lede { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--muted); max-width: 34ch; margin: 20px 0 30px; }
.hero-art { position: relative; display: grid; place-items: center; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800;
  padding: 13px 22px; border-radius: 999px; font-size: 1rem; border: 1px solid transparent; cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--glow); color: #1a0b33; box-shadow: 0 8px 30px -10px rgba(240, 138, 214, 0.7); }
.btn-primary:hover { color: #1a0b33; filter: brightness(1.08); }
.btn-ghost { color: var(--text); border-color: var(--panel-line); background: var(--panel); }
.btn-ghost:hover { color: var(--text); border-color: rgba(240, 138, 214, 0.5); }

.definitions { margin-top: 38px; display: grid; gap: 14px; max-width: 46ch; }
.definitions p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.definitions b { color: var(--text); font-weight: 800; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .logo-stage { width: min(62vw, 300px); }
  .eq { height: 30px; }
}

/* ---------- sections ---------- */
section { padding: clamp(22px, 2.4vw, 30px) 0; }
#events + .past-section { padding-top: 0; }
.wrap > :last-child { margin-bottom: 0; }
.section-head { max-width: 62ch; margin-bottom: 36px; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.section-head p { color: var(--muted); margin: 14px 0 0; }

.panel {
  background: var(--panel); border: 1px solid var(--panel-line); border-radius: var(--radius);
  padding: clamp(20px, 3vw, 30px);
}

/* about */
.about-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.about-copy p { margin: 0 0 1.1em; }
.about-copy p:last-child { margin-bottom: 0; }
.photo {
  position: sticky; top: 96px;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--panel-line);
  background: var(--bg-2); margin: 0;
}
.photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 78%; }
.photo figcaption { font-size: 0.85rem; color: var(--muted); padding: 10px 14px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.facts li {
  border: 1px solid var(--panel-line); border-radius: 999px; padding: 6px 14px;
  font-size: 0.9rem; font-weight: 700; color: var(--muted); background: rgba(18, 10, 46, 0.6);
}
.facts strong { color: var(--text); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } .photo { position: static; } }

/* events */
.events-list { display: grid; gap: 16px; }
.event {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 20px; align-items: center;
  background: var(--panel); border: 1px solid var(--panel-line); border-radius: var(--radius); padding: 20px;
}
.event-date {
  text-align: center; border-radius: 14px; padding: 10px 0; background: rgba(18, 10, 46, 0.7);
  border: 1px solid rgba(240, 138, 214, 0.35);
}
.event-date .m { display: block; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pink); }
.event-date .d { display: block; font-size: 2rem; font-weight: 900; line-height: 1.05; }
.event-date .w { display: block; font-size: 0.78rem; color: var(--muted); }
.event h3 { font-size: 1.3rem; }
.event .meta { color: var(--muted); font-size: 0.95rem; margin: 4px 0 8px; }
.event .desc { margin: 0; font-size: 0.98rem; }
.event .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.event .tag { font-size: 0.78rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: rgba(157, 123, 242, 0.18); color: #d9c9ff; }
.event-links { display: flex; flex-direction: column; gap: 8px; min-width: 150px; }
.event-links .btn { justify-content: center; padding: 10px 16px; font-size: 0.92rem; }
.event.past { grid-template-columns: 92px 1fr; opacity: 0.82; }
.events-empty { color: var(--muted); }
.events-foot { margin-top: 26px; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 760px) {
  .event, .event.past { grid-template-columns: 72px 1fr; }
  .event-links { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .event-links .btn { flex: 1 1 140px; }
  .event-date .d { font-size: 1.6rem; }
}

/* impact */
.impact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.impact-card h3 { font-size: 1.2rem; margin: 16px 0 8px; }
.impact-card p { margin: 0; color: var(--muted); }
.impact-icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: rgba(240, 138, 214, 0.12); border: 1px solid rgba(240, 138, 214, 0.35);
}
.impact-icon svg { width: 28px; height: 28px; fill: var(--pink); }
.impact-tag { margin: 36px 0 0; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 900; }
.impact-tag span { display: block; font-size: 1rem; font-weight: 700; color: var(--muted); margin-top: 4px; }

/* team */
.team-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.person {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  background: var(--panel); border: 1px solid var(--panel-line); border-radius: var(--radius);
}
.person .avatar {
  width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center;
  font-weight: 900; font-size: 1.15rem; color: #1a0b33; background: var(--glow);
  box-shadow: 0 0 18px -4px rgba(240, 138, 214, 0.7);
}
/* a face photo, when there is one, covers the initial */
.person .avatar { position: relative; overflow: hidden; margin: 0; }
.person .avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.person strong { display: block; font-size: 1.02rem; line-height: 1.25; }
.person span { display: block; color: var(--muted); font-size: 0.9rem; line-height: 1.35; margin-top: 2px; }

/* events with flyers */
.event.has-flyer { grid-template-columns: 150px 1fr auto; }
.event-flyer img {
  width: 150px; height: 150px; object-fit: cover; border-radius: 14px; cursor: zoom-in;
  border: 1px solid rgba(240, 138, 214, 0.35); background: var(--bg-2);
}
@media (max-width: 760px) {
  .event.has-flyer { grid-template-columns: 1fr; }
  .event-flyer img { width: 100%; height: auto; max-height: 360px; object-fit: contain; }
}

/* past parties */
.past-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.past-card {
  background: var(--panel); border: 1px solid var(--panel-line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.past-img img, .past-img-blank { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; cursor: zoom-in; display: block; background: var(--bg-2); }
.past-img-blank { background: var(--glow); opacity: 0.25; }
.past-body { padding: 14px 16px 18px; }
.past-date { margin: 0; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pink); }
.past-card h3 { font-size: 1.08rem; margin: 4px 0 2px; }
.past-card h3 a { color: var(--text); text-decoration: none; }
.past-card h3 a:hover { color: var(--pink); }
.past-loc { margin: 0 0 6px; font-size: 0.85rem; color: var(--muted); }
.past-desc { margin: 0; font-size: 0.9rem; color: var(--muted); line-height: 1.5; }

/* gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: 14px; grid-auto-flow: dense; }
.gallery-grid figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--panel-line); background: var(--bg-2); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform 0.4s ease; }
.gallery-grid figure:hover img { transform: scale(1.04); }
.gallery-grid figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 10px; font-size: 0.85rem; font-weight: 700;
  background: linear-gradient(transparent, rgba(18, 10, 46, 0.88));
}
.gallery-grid .g-wide { grid-column: span 2; }
.gallery-grid .g-tall { grid-row: span 2; }
@media (max-width: 860px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; } }
@media (prefers-reduced-motion: reduce) { .gallery-grid img { transition: none; } }

/* lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(10, 5, 28, 0.88); }
.lightbox img { max-width: 94vw; max-height: 92vh; display: block; border-radius: 12px; }
.lightbox-close {
  position: fixed; top: 14px; right: 18px; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--panel); color: var(--text); font-size: 1.8rem; line-height: 1; cursor: pointer;
}

/* resources */
.crisis {
  border: 1px solid rgba(255, 207, 110, 0.55); background: rgba(255, 207, 110, 0.08);
  border-radius: var(--radius); padding: clamp(20px, 3vw, 28px); margin-bottom: 32px;
}
.crisis h3 { color: var(--alert); font-size: 1.25rem; margin-bottom: 14px; }
.crisis-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.crisis-item { background: rgba(18, 10, 46, 0.6); border-radius: 14px; padding: 14px 16px; }
.crisis-item a.num { display: block; font-size: 1.45rem; font-weight: 900; color: var(--text); text-decoration: none; letter-spacing: 0.01em; }
.crisis-item a.num:hover { color: var(--alert); }
.crisis-item span { font-size: 0.9rem; color: var(--muted); }

.res-grid { columns: 2 340px; column-gap: 18px; margin-bottom: -18px; }
.res-grid .res-group { break-inside: avoid; margin-bottom: 18px; }
.res-group h3 { font-size: 1.15rem; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.res-group h3::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 10px var(--pink); flex: none; }
.res-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.res-group li { border-top: 1px solid var(--panel-line); padding-top: 12px; }
.res-group li:first-child { border-top: 0; padding-top: 0; }
.res-group a.name { font-weight: 800; color: var(--text); text-decoration: none; }
.res-group a.name:hover { color: var(--pink); text-decoration: underline; }
.res-group p { margin: 2px 0 0; font-size: 0.93rem; color: var(--muted); }
.res-group .contact { display: block; margin-top: 3px; font-size: 0.9rem; font-weight: 700; color: #e6dcff; }
.res-group .contact a { color: inherit; }
.res-note { margin-top: 26px; font-size: 0.9rem; color: var(--muted); max-width: 70ch; }

/* connect */
.connect-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.connect-card {
  display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--panel-line); border-radius: var(--radius); padding: 20px;
  transition: border-color 0.2s, transform 0.2s;
}
.connect-card:hover { color: var(--text); border-color: rgba(240, 138, 214, 0.55); transform: translateY(-2px); }
.connect-card svg { width: 30px; height: 30px; flex: none; fill: var(--pink); }
.connect-card strong { display: block; font-size: 1.05rem; }
.connect-card span { display: block; color: var(--muted); font-size: 0.92rem; line-height: 1.4; margin-top: 2px; }

/* footer */
.site-footer { border-top: 1px solid var(--panel-line); padding: 40px 0 56px; color: var(--muted); font-size: 0.92rem; }
.site-footer .wrap { display: grid; grid-template-columns: auto 1fr; gap: 20px 32px; align-items: start; }
.site-footer .mark { width: 54px; opacity: 0.9; }
.site-footer p { margin: 0 0 10px; max-width: 72ch; }
.site-footer a { color: var(--muted); }
@media (max-width: 600px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* ==========================================================================
   Motion and interactivity. Everything here switches off for people who ask
   their device for reduced motion (bottom of this block).
   ========================================================================== */

/* the shared animations: a lub-dub heartbeat at house tempo, a slow colour sweep */
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 10% { transform: scale(1.07); } 20% { transform: scale(0.99); } 30% { transform: scale(1.04); } 46% { transform: scale(1); } }
@keyframes sweep { to { background-position: 200% 0; } }
.sweep, h1 .glow, .logo-stage .mark {
  background-image: linear-gradient(110deg, var(--pink), #c584ea, var(--violet), #c584ea, var(--pink));
  background-size: 200% 100%;
  animation: sweep 7s linear infinite;
}

/* ---------- hero logo ---------- */
.hero-art { perspective: 1000px; flex-direction: column; }
.logo-stage {
  position: relative; display: grid; place-items: center;
  width: min(100%, 420px); aspect-ratio: 900 / 762;
  padding: 0; border: 0; background: none; color: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.35s ease-out;
}
.logo-stage:focus-visible { border-radius: 30px; outline-offset: 10px; }
.logo-glow {
  display: block; width: 100%;
  filter: drop-shadow(0 0 16px rgba(240, 138, 214, 0.55)) drop-shadow(0 0 46px rgba(157, 123, 242, 0.45));
}
.logo-stage .mark {
  display: block; width: 100%;
  animation: neon-on 1.3s linear both, heartbeat 1s ease-in-out 1.3s infinite, sweep 7s linear infinite;
}
/* like a neon sign warming up */
@keyframes neon-on { 0% { opacity: 0; } 8% { opacity: 0.9; } 12% { opacity: 0.08; } 22% { opacity: 1; } 26% { opacity: 0.3; } 34%, 100% { opacity: 1; } }
.logo-glow.thump { animation: thump 0.5s cubic-bezier(0.2, 0.8, 0.3, 1); }
@keyframes thump { 30% { transform: scale(1.16); filter: drop-shadow(0 0 30px rgba(240, 138, 214, 0.9)) drop-shadow(0 0 80px rgba(157, 123, 242, 0.7)); } }

/* sound rings that leave the heart on every beat */
.rings { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.rings i {
  position: absolute; width: 58%; aspect-ratio: 1; border-radius: 50%;
  border: 2px solid rgba(240, 138, 214, 0.6); box-shadow: 0 0 18px rgba(240, 138, 214, 0.35);
  opacity: 0; animation: ring 2s ease-out 1.3s infinite;
}
.rings i:nth-child(2) { animation-delay: 2.3s; border-color: rgba(157, 123, 242, 0.6); }
@keyframes ring { 0% { transform: scale(0.7); opacity: 0; } 8% { opacity: 0.75; } 100% { transform: scale(1.75); opacity: 0; } }

/* little equalizer under the heart */
.eq { display: flex; gap: 6px; align-items: flex-end; height: 42px; margin-top: 14px; }
.eq i {
  width: 7px; height: 100%; border-radius: 4px; background: var(--glow); opacity: 0.85;
  transform-origin: bottom; transform: scaleY(0.25);
  animation: eq var(--d, 0.9s) ease-in-out var(--o, 0s) infinite alternate;
}
@keyframes eq { from { transform: scaleY(0.15); } to { transform: scaleY(1); } }

/* hearts that fly out when you tap the logo */
.logo-stage .mark.burst {
  position: absolute; left: 50%; top: 50%; width: var(--w, 30px); pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(240, 138, 214, 0.9));
  animation: burst 1.2s cubic-bezier(0.15, 0.7, 0.3, 1) forwards;
}
@keyframes burst {
  from { transform: translate(-50%, -50%) scale(0.3); opacity: 1; }
  60% { opacity: 1; }
  to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)) scale(1); opacity: 0; }
}
.hero-art.paused *, .hero-art.paused { animation-play-state: paused !important; }

/* countdown to the next party */
.next-up {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 22px;
  padding: 10px 18px 10px 12px; border-radius: 999px; text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--panel-line);
  transition: border-color 0.2s, background 0.2s;
}
.next-up[hidden] { display: none; }
.next-up:hover { color: var(--text); border-color: rgba(240, 138, 214, 0.55); background: rgba(240, 138, 214, 0.08); }
.next-up .mark { width: 30px; animation: heartbeat 1s ease-in-out infinite; }
.next-up > span:last-child { display: grid; line-height: 1.3; }
.next-up b { font-size: 0.95rem; }
.next-up #next-when { font-size: 0.88rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- the logo around the rest of the site ---------- */
.eyebrow { display: flex; align-items: center; gap: 8px; }
.eyebrow::before {
  content: ""; flex: none; width: 20px; aspect-ratio: 900 / 762; background: var(--glow);
  -webkit-mask: url("../assets/brand/logo-white.png") center / contain no-repeat;
          mask: url("../assets/brand/logo-white.png") center / contain no-repeat;
}
.section-head.in-done .eyebrow::before { animation: heartbeat 1s ease-in-out 0.3s 2; }
.brand:hover .mark, .site-footer .mark:hover { animation: heartbeat 1s ease-in-out infinite; }
.impact-tag .mark { display: inline-block; width: 1.15em; margin: 0 0.4em 0 0; vertical-align: -0.14em; animation: heartbeat 1s ease-in-out infinite; }

/* a big faint heart drifting behind a couple of sections */
#impact, #connect { position: relative; isolation: isolate; overflow-x: clip; }
#impact::before, #connect::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: min(52vw, 560px); aspect-ratio: 900 / 762; background: var(--glow); opacity: 0.06;
  -webkit-mask: url("../assets/brand/logo-white.png") center / contain no-repeat;
          mask: url("../assets/brand/logo-white.png") center / contain no-repeat;
  transform: translateY(var(--para, 0px)) rotate(var(--tip, -10deg));
}
#impact::before { right: -8%; top: 4%; }
#connect::before { left: -10%; top: 10%; --tip: 12deg; }

/* back to top: the heart inside a ring that fills as you scroll */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(var(--pink) calc(var(--p, 0) * 1turn), rgba(214, 182, 255, 0.18) 0);
  box-shadow: 0 8px 26px -8px rgba(240, 138, 214, 0.6);
  opacity: 0; translate: 0 14px; pointer-events: none; transition: opacity 0.3s, translate 0.3s;
}
.to-top::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--bg-2); }
.to-top .mark { position: relative; width: 28px; }
.to-top.show { opacity: 1; translate: 0 0; pointer-events: auto; }
.to-top:hover .mark { animation: heartbeat 1s ease-in-out infinite; }

/* ---------- cards: lift, plus a glow that follows the pointer ---------- */
.panel, .event, .person, .past-card, .connect-card, .crisis-item { position: relative; }
.event, .person, .past-card, .impact-card, .connect-card {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.event:hover, .person:hover, .past-card:hover, .impact-card:hover, .connect-card:hover {
  transform: translateY(-3px); border-color: rgba(240, 138, 214, 0.45);
  box-shadow: 0 14px 40px -18px rgba(240, 138, 214, 0.55);
}
.spot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(240, 138, 214, 0.13), transparent 65%);
  opacity: 0; transition: opacity 0.3s;
}
.spot:hover::after { opacity: 1; }
.person:hover .avatar { animation: heartbeat 1s ease-in-out; }
.btn-primary { background-size: 180% 100%; background-position: 0 0; transition: background-position 0.5s ease, filter 0.2s; }
.btn-primary:hover { background-position: 100% 0; }

/* ---------- things rise in as you scroll to them ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); }
.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .logo-stage, .event, .person, .past-card, .impact-card, .connect-card { transition: none; transform: none; }
}
