/* ================================================
   RESET & BASE
   ================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Primary palette */
  --clr-primary: #6C2BD9;
  --clr-primary-light: #8B5CF6;
  --clr-primary-dark: #4C1D95;
  --clr-accent: #F59E0B;

  /* Neutrals */
  --clr-dark: #0F0D15;
  --clr-body: #1A1625;
  --clr-surface: #231E30;
  --clr-surface-light: #2D2640;
  --clr-border: rgba(139, 92, 246, 0.15);

  /* Text */
  --clr-text: #E2DFF0;
  --clr-text-muted: #9B95AD;
  --clr-white: #FFFFFF;

  /* Typography */
  --ff-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --ff-display: 'Playfair Display', Georgia, serif;

  /* Spacing */
  --section-py: clamp(4rem, 8vw, 7rem);

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--ff-sans);
  background: var(--clr-dark);
  color: var(--clr-text);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: 90%;
  max-width: 1140px;
  margin: 0 auto;
}

/* ================================================
   BUTTONS
   ================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-family: var(--ff-sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn--primary {
  background: var(--clr-primary);
  color: var(--clr-white);
  border-color: var(--clr-primary);
}

.btn--primary:hover {
  background: var(--clr-primary-light);
  border-color: var(--clr-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108, 43, 217, 0.4);
}

.btn--outline {
  background: transparent;
  color: var(--clr-white);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn--outline:hover {
  border-color: var(--clr-white);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.btn--white {
  background: var(--clr-white);
  color: var(--clr-primary-dark);
}

.btn--white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
}

.btn--lg {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
}

.btn--full {
  width: 100%;
}

.btn--nav {
  padding: 0.5rem 1.5rem;
  font-size: 0.85rem;
  background: var(--clr-primary);
  color: var(--clr-white);
  border-color: var(--clr-primary);
}

.btn--nav:hover {
  background: var(--clr-primary-light);
  border-color: var(--clr-primary-light);
}

/* ================================================
   SECTION HEADINGS
   ================================================ */
.section-tag {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--clr-primary-light);
  margin-bottom: 0.75rem;
}

.section-tag--center {
  text-align: center;
}

.section-title {
  font-family: var(--ff-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--clr-white);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.section-title--center {
  text-align: center;
}

/* ================================================
   NAVIGATION
   ================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 5%;
  transition: all 0.4s var(--ease);
}

.nav.scrolled {
  background: rgba(15, 13, 21, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.75rem 5%;
  box-shadow: 0 1px 0 var(--clr-border);
}

.nav__logo {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--clr-white);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav__logo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--clr-primary-light);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav__links a:not(.btn) {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  transition: color 0.3s;
}

.nav__links a:not(.btn):hover {
  color: var(--clr-white);
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-white);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}

.nav__hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ================================================
   HERO
   ================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 5% 4rem;
  background: linear-gradient(135deg, var(--clr-dark) 0%, var(--clr-primary-dark) 50%, var(--clr-dark) 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(108, 43, 217, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 40%);
  pointer-events: none;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: url('images/banner.jpg') center/cover no-repeat;
  opacity: 0.05;
  pointer-events: none;
}

.hero__content {
  position: relative;
  max-width: 720px;
  animation: fadeUp 1s var(--ease) both;
}

.hero__tag {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--clr-accent);
  margin-bottom: 1.5rem;
}

.hero__title {
  font-family: var(--ff-display);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  color: var(--clr-white);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero__title em {
  color: var(--clr-primary-light);
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--clr-text-muted);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--clr-text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeUp 1s 0.6s var(--ease) both;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--clr-primary-light), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ================================================
   ABOUT
   ================================================ */
.about {
  padding: var(--section-py) 0;
  background: var(--clr-body);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.about__text p {
  margin-bottom: 1.25rem;
  color: var(--clr-text-muted);
}

.about__text strong {
  color: var(--clr-white);
}

.about__stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--clr-border);
}

.stat__number {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--clr-white);
}

.stat__label {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ================================================
   IMAGE PLACEHOLDERS
   ================================================ */
.image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--clr-surface);
  border: 2px dashed var(--clr-border);
  border-radius: 16px;
  color: var(--clr-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: border-color 0.3s;
}

.image-placeholder:hover {
  border-color: var(--clr-primary-light);
}

.image-placeholder--portrait {
  aspect-ratio: 3 / 4;
}

.image-placeholder--landscape {
  aspect-ratio: 16 / 9;
}

.image-placeholder--square {
  aspect-ratio: 1;
}

.image-placeholder__icon {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

.image-placeholder__icon svg {
  width: 100%;
  height: 100%;
}

/* Actual images */
.about__img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  object-fit: cover;
}

.gallery__img {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  object-fit: cover;
  display: block;
}

/* ================================================
   PROGRESS
   ================================================ */
.progress-section {
  padding: 3rem 0;
  background: var(--clr-body);
}

.progress-card {
  background: var(--clr-surface);
  border-radius: 20px;
  padding: 2rem 2.5rem;
  border: 1px solid var(--clr-border);
}

.progress-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.progress-card__raised {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--clr-white);
}

.progress-card__raised span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--clr-text-muted);
}

.progress-card__percentage {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--clr-primary-light);
}

.progress-bar {
  height: 12px;
  background: var(--clr-surface-light);
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  width: var(--progress);
  border-radius: 100px;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-primary-light), var(--clr-accent));
  transition: width 1.5s var(--ease);
  position: relative;
}

.progress-bar__fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 2s infinite;
}

.progress-card__footer {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--clr-text-muted);
}

/* ================================================
   GALLERY
   ================================================ */
.gallery {
  padding: var(--section-py) 0;
  background: var(--clr-dark);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.gallery__item--wide {
  grid-column: span 2;
}

.gallery__item {
  border-radius: 16px;
  overflow: hidden;
}

/* ================================================
   VIDEOS
   ================================================ */
.videos {
  padding: var(--section-py) 0;
  background: var(--clr-body);
}

.videos__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2.5rem;
}

.videos__item {
  border-radius: 16px;
  overflow: hidden;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  transition: all 0.4s var(--ease);
}

.videos__item:hover {
  transform: translateY(-4px);
  border-color: var(--clr-primary-light);
  box-shadow: 0 12px 40px rgba(108, 43, 217, 0.15);
}

.videos__embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
}

.videos__embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.videos__caption {
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--clr-text-muted);
  text-align: center;
}

/* ---- Event link card ---- */
.event-link {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: 680px;
  margin: 1.5rem auto 0;
  padding: 1.25rem 1.5rem;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: all 0.35s var(--ease);
}

.event-link:hover {
  border-color: var(--clr-primary-light);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(108, 43, 217, 0.15);
}

.event-link__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
}

.event-link__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.event-link__text {
  flex: 1;
  min-width: 0;
}

.event-link__title {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--clr-white);
}

.event-link__desc {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  line-height: 1.4;
}

.event-link__arrow {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--clr-primary-light);
  transition: transform 0.3s var(--ease);
}

.event-link__arrow svg {
  width: 100%;
  height: 100%;
}

.event-link:hover .event-link__arrow {
  transform: translateX(4px);
}

/* ================================================
   BREAKDOWN
   ================================================ */
.breakdown {
  padding: var(--section-py) 0;
  background: var(--clr-body);
}

.breakdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.breakdown__card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.4s var(--ease);
}

.breakdown__card:hover {
  transform: translateY(-4px);
  border-color: var(--clr-primary-light);
  box-shadow: 0 12px 40px rgba(108, 43, 217, 0.15);
}

.breakdown__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1.25rem;
  color: var(--clr-primary-light);
}

.breakdown__icon svg {
  width: 100%;
  height: 100%;
}

.breakdown__card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--clr-white);
  margin-bottom: 0.75rem;
}

.breakdown__card p {
  font-size: 0.9rem;
  color: var(--clr-text-muted);
  line-height: 1.6;
}

/* ================================================
   DONATE
   ================================================ */
.donate {
  padding: var(--section-py) 0;
  background: var(--clr-dark);
}

.donate__intro {
  text-align: center;
  color: var(--clr-text-muted);
  max-width: 600px;
  margin: -0.5rem auto 3rem;
}

.donate__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.donate__card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.4s var(--ease);
  position: relative;
  display: flex;
  flex-direction: column;
}

.donate__card:hover {
  transform: translateY(-4px);
  border-color: var(--clr-primary-light);
  box-shadow: 0 16px 48px rgba(108, 43, 217, 0.2);
}

.donate__card--featured {
  border-color: var(--clr-primary);
  background: linear-gradient(180deg, rgba(108, 43, 217, 0.1) 0%, var(--clr-surface) 100%);
}

.donate__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--clr-primary);
  color: var(--clr-white);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.3rem 1rem;
  border-radius: 50px;
  white-space: nowrap;
}

.donate__emoji {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.donate__amount {
  font-size: 2rem;
  font-weight: 900;
  color: var(--clr-white);
  margin-bottom: 0.25rem;
}

.donate__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--clr-primary-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.donate__desc {
  font-size: 0.9rem;
  color: var(--clr-text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.donate__custom {
  text-align: center;
  margin-top: 2.5rem;
}

.donate__custom p {
  color: var(--clr-text-muted);
  margin-bottom: 1rem;
}

/* ================================================
   MESSAGES / TESTIMONIALS
   ================================================ */
.messages {
  padding: var(--section-py) 0;
  background: var(--clr-body);
}

.messages__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.messages__card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.4s var(--ease);
}

.messages__card:hover {
  transform: translateY(-2px);
  border-color: var(--clr-primary-light);
}

.messages__text {
  font-style: italic;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--clr-text);
  margin-bottom: 1.25rem;
}

.messages__author {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--clr-primary-light);
}

/* ================================================
   CTA
   ================================================ */
.cta {
  padding: var(--section-py) 0;
  background: linear-gradient(135deg, var(--clr-primary-dark), var(--clr-primary));
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.08) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.cta__title {
  font-family: var(--ff-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--clr-white);
  line-height: 1.2;
  margin-bottom: 1rem;
  position: relative;
}

.cta__subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 2rem;
  position: relative;
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
  padding: 3rem 0 1.5rem;
  background: var(--clr-dark);
  border-top: 1px solid var(--clr-border);
}

.footer__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--clr-border);
}

.footer__logo {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--clr-white);
  margin-bottom: 0.25rem;
}

.footer__tagline {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
}

.footer__links {
  display: flex;
  gap: 2rem;
}

.footer__links a {
  font-size: 0.9rem;
  color: var(--clr-text-muted);
  transition: color 0.3s;
}

.footer__links a:hover {
  color: var(--clr-white);
}

.footer__bottom {
  padding-top: 1.5rem;
  text-align: center;
}

.footer__bottom p {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
}

/* ================================================
   ANIMATIONS
   ================================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Scroll reveal base */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 1024px) {
  .breakdown__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .donate__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .videos__grid {
    grid-template-columns: 1fr;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--clr-surface);
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem;
    transition: right 0.4s var(--ease);
    box-shadow: -10px 0 40px rgba(0,0,0,0.3);
  }

  .nav__links.open {
    right: 0;
  }

  .nav__hamburger {
    display: flex;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about__image {
    max-width: 400px;
    margin: 0 auto;
  }

  .about__stats {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 1rem;
  }

  .stat__number {
    font-size: 1.25rem;
  }

  .stat__label {
    font-size: 0.65rem;
  }

  .gallery__grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery__item--wide {
    grid-column: span 2;
  }

  .messages__grid {
    grid-template-columns: 1fr;
  }

  .footer__content {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 2.25rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .donate__grid {
    grid-template-columns: 1fr;
  }

  .breakdown__grid {
    grid-template-columns: 1fr;
  }

  .gallery__grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery__item--wide {
    grid-column: span 1;
  }

  .progress-card {
    padding: 1.5rem;
  }
}

/* ================================================
   GALLERY MODAL
   ================================================ */
.gallery__img {
  cursor: pointer;
}

.gallery-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.9);
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.gallery-modal.active {
  display: flex;
}

.gallery-modal__img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
  object-fit: contain;
  animation: swirlIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.gallery-modal.closing .gallery-modal__img {
  animation: swirlOut 0.4s cubic-bezier(0.55, 0.06, 0.68, 0.19) forwards;
}

@keyframes swirlIn {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-540deg);
  }
  60% {
    opacity: 1;
    transform: scale(1.05) rotate(15deg);
  }
  80% {
    transform: scale(0.97) rotate(-5deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes swirlOut {
  0% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: scale(0) rotate(540deg);
  }
}

.gallery-modal__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 10000;
  line-height: 1;
  transition: transform 0.3s ease;
}

.gallery-modal__close:hover {
  transform: rotate(90deg) scale(1.2);
}

.gallery-modal__caption {
  color: #fff;
  text-align: center;
  margin-top: 1rem;
  font-size: 0.95rem;
  opacity: 0.85;
  animation: swirlIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.gallery-modal.closing .gallery-modal__caption {
  animation: swirlOut 0.4s cubic-bezier(0.55, 0.06, 0.68, 0.19) forwards;
}
