/* ============================================================
   AFTERBURN — site-fx.css
   Shared "bold & animated" engine for ALL pages.
   Loaded after style.css, before any page-specific css.
   Animations are opt-in via the .js flag (added by site-fx.js)
   and disabled under prefers-reduced-motion. Content is always
   visible without JS / under reduced motion (no stuck-hidden state).
   ============================================================ */

:root {
  --c-cyan:    #0ABFBF;
  --c-magenta: #CC0099;
  --c-gold:    #C8930A;
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io:   cubic-bezier(0.65, 0, 0.35, 1);
  --dur:       0.9s;
  --glow-cyan:    0 0 40px rgba(10, 191, 191, 0.45);
  --glow-magenta: 0 0 40px rgba(204, 0, 153, 0.40);
}

/* prevent giant type from causing horizontal scroll */
.fx { overflow-x: hidden; }

/* ============================================================
   1. GLOBAL CHROME — progress bar, cursor glow, header state
   ============================================================ */

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--c-cyan), var(--c-magenta), var(--c-gold));
  z-index: 300;
  pointer-events: none;
}

.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10,191,191,0.55), rgba(10,191,191,0) 70%);
  pointer-events: none;
  z-index: 290;
  transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out),
              background 0.25s var(--ease-out);
  will-change: transform;
}
.cursor-glow.is-hovering {
  width: 64px; height: 64px;
  background: radial-gradient(circle, rgba(204,0,153,0.40), rgba(204,0,153,0) 70%);
}
@media (pointer: coarse) { .cursor-glow { display: none; } }

.site-header.is-scrolled {
  box-shadow: var(--shadow-md);
  border-bottom-color: transparent;
}

/* header CTA button (Donate) — mirrors nav-links visibility */
.header-cta {
  margin-left: 0.75rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.875rem;
  flex-shrink: 0;
}
@media (max-width: 800px) {
  .header-cta { display: none; }
}

/* ============================================================
   MODAL (generic, [data-modal-target] / #id + iframe)
   ============================================================ */

.fx-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 3vw, 2rem);
  background: rgba(15, 31, 60, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.fx-modal[hidden] { display: none; }

.fx-modal__dialog {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  width: min(720px, 96vw);
  height: min(86vh, 900px);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.fx-modal iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.fx-modal__close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 1;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--color-text);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: background-color var(--transition);
}
.fx-modal__close:hover { background: var(--c-magenta); }
.site-header.is-scrolled .header-inner { height: 60px; }
.site-header .header-inner { transition: height 0.3s var(--ease-out); }

/* ============================================================
   2. REVEAL ENGINE (IntersectionObserver adds .is-visible)
   Hidden state applies only when JS is active AND motion allowed.
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity var(--dur) var(--ease-out),
                transform var(--dur) var(--ease-out);
    transition-delay: var(--reveal-delay, 0s);
  }
  .js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   3. SPLIT TEXT (kinetic headings)
   ============================================================ */

.split-line { display: block; overflow: hidden; }
.split-unit { display: inline-block; will-change: transform; }
@media (prefers-reduced-motion: no-preference) {
  .js [data-split] .split-unit {
    transform: translateY(110%);
    opacity: 0;
  }
  .js [data-split].is-visible .split-unit {
    animation: unitRise 0.9s var(--ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 0.06s);
  }
}
@keyframes unitRise {
  to { transform: translateY(0); opacity: 1; }
}

/* gradient text utility */
.fx-grad {
  background: linear-gradient(100deg, var(--c-cyan) 10%, var(--c-magenta) 60%, var(--c-gold) 110%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============================================================
   3b. WIDE BANNER (full-width image band, no text)
   ============================================================ */

.fx-banner {
  width: 100%;
  height: clamp(220px, 40vw, 460px);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
}

/* banner used as a page hero: centered title written over the image */
.fx-banner--hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: clamp(300px, 52vw, 600px);
}
.fx-banner--hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 31, 60, 0.30), rgba(15, 31, 60, 0.55));
}
.fx-banner__title {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0 var(--container-pad, 1.25rem);
  color: #fff;
  font-family: var(--font-sans);
  font-size: clamp(2.2rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: normal;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
}
/* the "10" stays in the Lyzero display face */
.fx-banner__num {
  font-family: var(--font-display);
  letter-spacing: var(--tracking-display);
}

/* ============================================================
   4. BOLD PAGE HERO (inner pages)
   ============================================================ */

.page-hero--bold {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 12vh, 9rem) 0 clamp(3rem, 7vh, 6rem);
}
.page-hero--bold .page-hero__bg {
  position: absolute;
  inset: -10% 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  pointer-events: none;
}
.page-hero--bold .page-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(15,31,60,0.55), rgba(15,31,60,0.75));
}
.page-hero--bold .container { position: relative; z-index: 1; }
.page-hero--bold.is-onimage { color: #fff; }
.page-hero--bold .page-hero__eyebrow {
  font-size: clamp(0.72rem, 1.4vw, 0.9rem);
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--c-magenta);
  margin-bottom: clamp(0.75rem, 2vw, 1.25rem);
}
.page-hero--bold h1 {
  font-size: clamp(2.8rem, 11vw, 9rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}
.page-hero--bold .page-hero__subtitle {
  margin-top: clamp(1rem, 2vw, 1.75rem);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  max-width: 52ch;
  opacity: 0.85;
}

/* ============================================================
   5. MARQUEE
   ============================================================ */

.marquee {
  background: var(--color-text);
  color: #fff;
  padding: clamp(0.75rem, 2vw, 1.25rem) 0;
  overflow: hidden;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.marquee + .marquee {
  border-top: none;
  background: var(--c-cyan);
  color: var(--color-text);
}
.marquee__track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  will-change: transform;
}
.marquee__item {
  font-size: clamp(1.4rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  padding: 0 1.5rem;
}
.marquee__item span { color: var(--c-gold); margin: 0 1rem; }
.marquee--2 .marquee__item span { color: var(--c-magenta); }

@media (prefers-reduced-motion: no-preference) {
  .marquee__track { animation: marquee 28s linear infinite; }
  .marquee--2 .marquee__track { animation-direction: reverse; }
  .marquee:hover .marquee__track { animation-play-state: paused; }
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ============================================================
   6. MAGNETIC + GLOW BUTTONS
   ============================================================ */

.btn-magnetic {
  will-change: transform;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out),
              background-color var(--transition), color var(--transition),
              border-color var(--transition);
}
.btn-magnetic:hover { box-shadow: var(--glow-cyan); }
.btn--outline.btn-magnetic:hover { box-shadow: var(--glow-magenta); }

/* ============================================================
   7. SCROLL CUE
   ============================================================ */

.scroll-cue {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.5;
}
.scroll-cue__dot {
  width: 22px; height: 36px;
  border: 2px solid currentColor;
  border-radius: var(--radius-full);
  position: relative;
}
.scroll-cue__dot::after {
  content: '';
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: currentColor;
}
@media (prefers-reduced-motion: no-preference) {
  .scroll-cue__dot::after { animation: cueBounce 1.6s var(--ease-io) infinite; }
}
@keyframes cueBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%      { transform: translateY(12px); opacity: 0.2; }
}

/* ============================================================
   8. MANIFESTO — word-by-word reveal on scroll
   ============================================================ */

[data-manifesto] .word {
  color: var(--color-text);
  transition: color 0.4s var(--ease-out);
}
@media (prefers-reduced-motion: no-preference) {
  .js [data-manifesto] .word { color: rgba(15, 31, 60, 0.18); }
  .js [data-manifesto] .word.lit { color: var(--color-text); }
}

/* ============================================================
   9. STATS COUNT-UP COLOR TRIAD (shared band)
   ============================================================ */

.section--dark .stat-item:nth-child(3n+1) .stat-number { color: var(--c-cyan); }
.section--dark .stat-item:nth-child(3n+2) .stat-number { color: var(--c-magenta); }
.section--dark .stat-item:nth-child(3n+3) .stat-number { color: var(--c-gold); }

/* ============================================================
   10. PRINCIPLES — bolder coloured numbers (principles.html only)
   ============================================================ */

.principles-grid .principle-card__number {
  font-size: 7rem;
  opacity: 0.12;
}
.principles-grid .principle-card:nth-child(3n+1) .principle-card__number { color: var(--c-cyan); }
.principles-grid .principle-card:nth-child(3n+2) .principle-card__number { color: var(--c-magenta); }
.principles-grid .principle-card:nth-child(3n+3) .principle-card__number { color: var(--c-gold); }

/* ============================================================
   11. DONATION (donation.html only)
   ============================================================ */

.donate-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.donate-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border-top: 5px solid var(--c-magenta);
  box-shadow: var(--shadow-md);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
}
.donate-card__title {
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.donate-form { display: flex; flex-direction: column; gap: 1rem; }
.donate-input-wrap {
  display: flex;
  align-items: center;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 0 1.25rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.donate-input-wrap:focus-within {
  border-color: var(--c-cyan);
  box-shadow: var(--glow-cyan);
}
.donate-currency { font-size: 1.5rem; font-weight: 700; opacity: 0.5; }
.donate-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  padding: 0.85rem 0.5rem;
  width: 100%;
}
.donate-submit { align-self: stretch; font-size: 1.0625rem; padding: 1rem; }
.donate-error { color: var(--c-magenta); font-size: 0.875rem; font-weight: 600; }
.donate-note { font-size: 0.8125rem; opacity: 0.55; text-align: center; }

@media (max-width: 800px) {
  .donate-grid { grid-template-columns: 1fr; }
  .donate-card { position: static; }
}

/* ============================================================
   12. MEDIA / link-in-bio (media.html only)
   ============================================================ */

.linktree {
  max-width: 540px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.linktree__avatar {
  width: 120px; height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.5rem;
  box-shadow: var(--shadow-md);
}
.linktree .btn {
  width: 100%;
  padding: 1.05rem 1.5rem;
  font-size: 1.0625rem;
  gap: 0.75rem;
}
.linktree .btn svg { width: 22px; height: 22px; flex-shrink: 0; }

/* ============================================================
   13. SLIDER — lightweight vanilla carousel (scroll-snap)
   Used via [data-slider]. Manual only (no autoplay).
   ============================================================ */

.fx-slider { position: relative; }
.fx-slider__track {
  display: flex;
  align-items: stretch;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.5rem 0 1rem;
}
.fx-slider__track::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) {
  .fx-slider__track { scroll-behavior: auto; }
}

/* slide = card with photo + text */
.fx-slider__slide {
  flex: 0 0 auto;
  width: clamp(280px, 82vw, 380px);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.fx-slider__media {
  height: clamp(200px, 30vw, 260px);
  flex-shrink: 0;
}
.fx-slider__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fx-slider__media--placeholder {
  background: linear-gradient(120deg, var(--c-cyan), var(--c-magenta) 60%, var(--c-gold));
}
.fx-slider__content {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.fx-slider__num {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}
.fx-slider__slide:nth-child(3n+1) .fx-slider__num { color: var(--c-cyan); }
.fx-slider__slide:nth-child(3n+2) .fx-slider__num { color: var(--c-magenta); }
.fx-slider__slide:nth-child(3n+3) .fx-slider__num { color: var(--c-gold); }
.fx-slider__heading {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: normal;
}
.fx-slider__body {
  font-size: 0.9375rem;
  line-height: 1.6;
  opacity: 0.75;
}
.fx-slider__note {
  align-self: flex-start;
  margin-top: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-gold);
  background: rgba(200, 147, 10, 0.12);
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
}

.fx-slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--color-text);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 2;
  transition: background-color var(--transition), opacity var(--transition), transform var(--transition);
}
.fx-slider__btn:hover { background: var(--c-cyan); }
.fx-slider__btn:disabled { opacity: 0.3; cursor: default; }
.fx-slider__btn--prev { left: 0.5rem; }
.fx-slider__btn--next { right: 0.5rem; }
.fx-slider__btn svg { width: 20px; height: 20px; }

@media (max-width: 600px) {
  .fx-slider__btn { width: 40px; height: 40px; }
}
