/* Visual enhancements — Transform Creatively */

:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --gradient-brand: linear-gradient(135deg, #6b1782 0%, #be49df 50%, #d762f8 100%);
  --gradient-soft: linear-gradient(160deg, #faf5fc 0%, #ffffff 40%, #f0d4f7 100%);
  --gradient-mesh: radial-gradient(ellipse 80% 60% at 10% 20%, rgba(190, 73, 223, 0.18), transparent),
    radial-gradient(ellipse 60% 50% at 90% 80%, rgba(107, 23, 130, 0.12), transparent),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(244, 225, 249, 0.8), transparent);
  --shadow-glow: 0 0 0 1px rgba(190, 73, 223, 0.08), 0 20px 50px -12px rgba(107, 23, 130, 0.2);
  --shadow-card: 0 4px 6px rgba(39, 37, 37, 0.04), 0 12px 40px rgba(190, 73, 223, 0.1);
  --radius-xl: 28px;
}

body {
  background: var(--bg-white);
  background-image: var(--gradient-mesh);
  background-attachment: scroll;
}

@media (hover: hover) and (pointer: fine) {
  body {
    background-attachment: fixed;
  }
}

::selection {
  background: var(--purple-light);
  color: var(--purple-dark);
}

/* Nonprofit bar */
.nonprofit-bar {
  background: var(--gradient-brand);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 12px rgba(107, 23, 130, 0.25);
}

.nonprofit-bar a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Header */
.site-header {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid rgba(214, 186, 221, 0.5);
  transition: box-shadow 0.4s var(--ease-out), background 0.4s var(--ease-out);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 32px rgba(107, 23, 130, 0.08);
}

.logo img {
  filter: drop-shadow(0 2px 8px rgba(190, 73, 223, 0.25));
  transition: transform 0.4s var(--ease-spring);
}

.logo:hover img {
  transform: scale(1.05) rotate(-3deg);
}

.nav-desktop a {
  position: relative;
  padding: 0.25rem 0;
}

.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
  border-radius: 2px;
}

.nav-desktop a:hover::after,
.nav-desktop a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-desktop a.is-active {
  color: var(--purple-dark);
  font-weight: 600;
}

/* Buttons */
.btn--primary {
  background: var(--gradient-brand);
  border: none;
  box-shadow: 0 4px 14px rgba(190, 73, 223, 0.4);
}

.btn--primary:hover {
  box-shadow: 0 8px 28px rgba(107, 23, 130, 0.45);
  transform: translateY(-2px);
}

.btn--outline {
  border-width: 2px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
}

.btn--outline:hover {
  border-color: var(--purple-dark);
  box-shadow: var(--shadow-sm);
}

/* Mission strip */
.mission-statement {
  background: linear-gradient(90deg, rgba(244, 225, 249, 0.6), rgba(255, 255, 255, 0.9), rgba(244, 225, 249, 0.6));
  border-bottom: none;
  box-shadow: inset 0 -1px 0 var(--purple-border);
  padding: 1rem 0;
}

.mission-statement a {
  font-weight: 600;
  text-underline-offset: 3px;
}

/* Hero */
.hero {
  background: var(--gradient-soft);
  padding-bottom: 6rem;
  isolation: isolate;
}

.hero::before {
  background: radial-gradient(circle at 85% 15%, rgba(190, 73, 223, 0.2) 0%, transparent 45%);
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--bg-section), transparent);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(190, 73, 223, 0.25);
  box-shadow: 0 4px 20px rgba(190, 73, 223, 0.12);
}

.hero h1 {
  letter-spacing: -0.02em;
}

.hero h1 span {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-visual {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-glow);
  transform: perspective(1200px) rotateY(-2deg) rotateX(1deg);
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 3px;
  background: var(--gradient-brand);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
  opacity: 0.7;
}

.hero-visual:hover {
  transform: perspective(1200px) rotateY(0) rotateX(0);
  box-shadow: 0 24px 60px rgba(107, 23, 130, 0.25);
}

.hero-visual:not(.hero-visual--animated) img,
.hero-visual--animated .hero-visual__img {
  transition: transform 0.8s var(--ease-out);
}

.hero-visual:not(.hero-visual--animated):hover img {
  transform: scale(1.03);
}

/* Section headers */
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-header .section__label {
  background: rgba(190, 73, 223, 0.1);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.section-header h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin: 1rem auto 0;
  background: var(--gradient-brand);
  border-radius: 4px;
}

/* Cards */
.section--alt {
  background: linear-gradient(180deg, var(--bg-section) 0%, #ffffff 100%);
}

.feature-card,
.impact-card,
.school-card,
.pillar,
.testimonial,
.content-block,
.contact-card,
.work-card {
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.feature-card:hover,
.impact-card:hover,
.school-card:hover,
.pillar:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
}

.feature-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  overflow: hidden;
  border: 1px solid rgba(214, 186, 221, 0.4);
}

.feature-card__img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(107, 23, 130, 0.15), transparent 50%);
  pointer-events: none;
}

.feature-card__img {
  position: relative;
}

.pillar {
  background: linear-gradient(145deg, #ffffff, #faf5fc);
  border-left: 5px solid var(--purple-primary);
}

.impact-card {
  background: #fff;
  padding-top: 0;
}

.impact-card__img {
  position: relative;
}

.impact-card__img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(39, 37, 37, 0.05));
}

.school-card {
  border: none;
  box-shadow: var(--shadow-card);
}

.school-card__body {
  padding: 1.75rem;
}

.school-card__location {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--purple-lighter);
  border-radius: 999px;
  font-size: 0.8rem;
}

/* Media frames */
.media-frame {
  border: none;
  box-shadow: var(--shadow-glow);
  position: relative;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--gradient-brand);
  opacity: 0.15;
  z-index: -1;
  filter: blur(20px);
}

/* Photo gallery */
.photo-gallery__item {
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.photo-gallery__item:hover {
  box-shadow: var(--shadow-md);
  z-index: 2;
}

/* Leadership */
.leadership {
  background: linear-gradient(135deg, #ffffff 0%, #faf5fc 100%);
  border: none;
  box-shadow: var(--shadow-glow);
}

.leadership__photo {
  box-shadow: 0 12px 40px rgba(107, 23, 130, 0.15);
}

/* Testimonials */
.testimonial {
  background: linear-gradient(160deg, #fff 0%, #faf8fc 100%);
  border: none;
  box-shadow: var(--shadow-card);
}

.testimonial::before {
  color: var(--purple-primary);
  opacity: 0.35;
}

/* Stats */
.stats {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  border: 1px solid var(--purple-border);
  box-shadow: var(--shadow-sm);
}

.stat__number {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Purple sections */
.section--purple {
  background: var(--gradient-brand);
  position: relative;
  overflow: hidden;
}

.section--purple::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 150%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.section--purple .container {
  position: relative;
  z-index: 1;
}

.section--purple .step {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.section--purple .step:hover {
  transform: translateY(-4px);
  background: #ffffff;
}

.step__num {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Section banner */
.section-banner {
  background-attachment: scroll;
}

.section-banner::before {
  background: linear-gradient(135deg, rgba(107, 23, 130, 0.92) 0%, rgba(190, 73, 223, 0.85) 100%);
}

/* Newsletter */
#newsletter {
  background: linear-gradient(180deg, #fff 0%, var(--purple-lighter) 100%);
}

.newsletter-form input {
  background: #fff;
  box-shadow: inset 0 1px 3px rgba(39, 37, 37, 0.06);
}

.newsletter-form input:focus {
  box-shadow: 0 0 0 4px rgba(190, 73, 223, 0.15);
}

/* Page heroes */
.page-hero--image::before {
  background: linear-gradient(135deg, rgba(39, 37, 37, 0.5) 0%, rgba(107, 23, 130, 0.75) 100%);
}

.page-hero--image h1 {
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.02em;
}

/* Footer */
.site-footer {
  background: linear-gradient(180deg, #1f1d1d 0%, #272525 100%);
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-brand);
}

.footer-nav a {
  transition: color 0.2s, padding-left 0.2s;
}

.footer-nav a:hover {
  padding-left: 4px;
}

/* Reveal animations — stagger */
.reveal {
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.features-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.features-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.pillars .reveal:nth-child(2) { transition-delay: 0.1s; }
.pillars .reveal:nth-child(3) { transition-delay: 0.2s; }
.schools-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.schools-grid .reveal:nth-child(3) { transition-delay: 0.2s; }

/* Donate panel */
.donate-panel {
  margin-inline: auto;
  background: linear-gradient(160deg, #fff, #faf5fc);
  border: none;
  box-shadow: var(--shadow-glow);
}

/* Work cards */
.work-card {
  border: none;
  box-shadow: var(--shadow-card);
}

.work-card:hover {
  box-shadow: var(--shadow-glow);
}

/* Mobile menu */
.nav-mobile.is-open {
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.98);
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .hero-visual {
    transform: none;
  }

  .hero-visual::before {
    display: none;
  }

  .hero h1 span {
    -webkit-text-fill-color: var(--purple-primary);
    background: none;
  }
}

/* Animated prism bubbles (glass-style orbs over prism background) */
.prism-animated,
.section-banner--prism-animated,
.page-hero--prism-animated {
  overflow: hidden;
}

.section-banner.prism-animated::before,
.section-banner--prism-animated::before {
  background: linear-gradient(
    135deg,
    rgba(107, 23, 130, 0.45) 0%,
    rgba(190, 73, 223, 0.35) 50%,
    rgba(240, 212, 247, 0.25) 100%
  );
}

.section-banner--prism-animated .container {
  z-index: 2;
}

.prism-bubbles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.prism-bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(
    circle at 32% 28%,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(240, 212, 247, 0.35) 35%,
    rgba(190, 73, 223, 0.22) 70%,
    rgba(107, 23, 130, 0.12) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.6),
    0 8px 32px rgba(190, 73, 223, 0.2);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  will-change: transform, opacity;
}

.prism-bubble--1 {
  width: clamp(72px, 14vw, 140px);
  height: clamp(72px, 14vw, 140px);
  left: 6%;
  bottom: 12%;
  animation: prism-float-a 14s ease-in-out infinite;
}

.prism-bubble--2 {
  width: clamp(56px, 10vw, 110px);
  height: clamp(56px, 10vw, 110px);
  right: 14%;
  top: 16%;
  background: radial-gradient(
    circle at 30% 25%,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(244, 225, 249, 0.4) 40%,
    rgba(190, 73, 223, 0.28) 100%
  );
  animation: prism-float-b 11s ease-in-out infinite;
  animation-delay: -2s;
}

.prism-bubble--3 {
  width: clamp(100px, 18vw, 200px);
  height: clamp(100px, 18vw, 200px);
  right: -4%;
  top: 38%;
  opacity: 0.85;
  animation: prism-float-c 18s ease-in-out infinite;
  animation-delay: -5s;
}

.prism-bubble--4 {
  width: clamp(40px, 7vw, 72px);
  height: clamp(40px, 7vw, 72px);
  left: 38%;
  top: 10%;
  opacity: 0.65;
  animation: prism-float-a 9s ease-in-out infinite reverse;
  animation-delay: -1s;
}

.prism-bubble--5 {
  width: clamp(32px, 5vw, 56px);
  height: clamp(32px, 5vw, 56px);
  left: 52%;
  top: 22%;
  opacity: 0.5;
  animation: prism-float-b 13s ease-in-out infinite;
  animation-delay: -7s;
}

.prism-bubble--6 {
  width: clamp(48px, 8vw, 88px);
  height: clamp(48px, 8vw, 88px);
  right: 32%;
  bottom: 18%;
  background: radial-gradient(
    circle at 35% 30%,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(200, 230, 255, 0.35) 45%,
    rgba(190, 73, 223, 0.2) 100%
  );
  animation: prism-float-c 12s ease-in-out infinite reverse;
  animation-delay: -3s;
}

.prism-bubble--7 {
  width: clamp(28px, 4vw, 48px);
  height: clamp(28px, 4vw, 48px);
  left: 22%;
  top: 28%;
  opacity: 0.45;
  animation: prism-float-a 16s ease-in-out infinite;
  animation-delay: -9s;
}

@keyframes prism-float-a {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(12px, -18px) scale(1.04);
  }
  66% {
    transform: translate(-8px, 10px) scale(0.97);
  }
}

@keyframes prism-float-b {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.75;
  }
  50% {
    transform: translate(-16px, 14px) scale(1.06);
    opacity: 0.95;
  }
}

@keyframes prism-float-c {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  40% {
    transform: translate(20px, -12px) scale(1.03);
  }
  70% {
    transform: translate(-14px, 8px) scale(0.98);
  }
}

.page-hero--image.prism-animated::before,
.page-hero--prism-animated::before {
  background: linear-gradient(
    135deg,
    rgba(39, 37, 37, 0.35) 0%,
    rgba(107, 23, 130, 0.5) 100%
  );
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .hero-visual,
  .feature-card,
  .btn--primary,
  .prism-bubble {
    transition: none !important;
    animation: none !important;
  }

  .hero-visual {
    transform: none;
  }

  .prism-bubble {
    opacity: 0.7;
  }
}
