/* ==========================================================================
   Natyarpana — Our Legacy in Motion
   ========================================================================== */

.home-legacy {
  --bg-primary: #050505;
  --bg-secondary: #0b0b0b;
  --gold-main: #c8a44d;
  --gold-light: #e0c27a;
  --gold-dark: #8e6b23;
  --text-primary: #f5e7c1;
  --text-secondary: #d6c6a5;
  --border-gold: rgba(200, 164, 77, 0.45);

  position: relative;
  background-color: var(--bg-primary);
  background-image: url("../img/Backgrounds/22.webp");
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  padding: clamp(80px, 9vw, 128px) clamp(20px, 4vw, 40px);
  overflow: hidden;
}

.home-legacy::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 45% 35% at 50% 8%,
      rgba(200, 164, 77, 0.08) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 35% 30% at 75% 60%,
      rgba(200, 164, 77, 0.06) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.home-legacy::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 100% 85% at 50% 50%,
    transparent 30%,
    rgba(0, 0, 0, 0.5) 100%
  );
  pointer-events: none;
}

.home-legacy__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.025;
  pointer-events: none;
  background-image: repeating-linear-gradient(
      45deg,
      transparent,
      transparent 40px,
      rgba(200, 164, 77, 0.12) 40px,
      rgba(200, 164, 77, 0.12) 41px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 40px,
      rgba(200, 164, 77, 0.08) 40px,
      rgba(200, 164, 77, 0.08) 41px
    );
}

.home-legacy__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    radial-gradient(1px 1px at 12% 30%, rgba(224, 194, 122, 0.55), transparent),
    radial-gradient(1.5px 1.5px at 88% 25%, rgba(200, 164, 77, 0.45), transparent),
    radial-gradient(1px 1px at 65% 88%, rgba(224, 194, 122, 0.4), transparent),
    radial-gradient(1px 1px at 30% 70%, rgba(200, 164, 77, 0.35), transparent);
  animation: home-legacy-particles 22s ease-in-out infinite alternate;
}

@keyframes home-legacy-particles {
  0% {
    opacity: 0.26;
    transform: translateY(0);
  }
  100% {
    opacity: 0.38;
    transform: translateY(-5px);
  }
}

.home-legacy__mandala {
  position: absolute;
  width: clamp(120px, 16vw, 200px);
  height: clamp(120px, 16vw, 200px);
  opacity: 0.11;
  pointer-events: none;
  background: url("../img/about/bg-shape.png") center / contain no-repeat;
  filter: sepia(0.55) saturate(1.3) hue-rotate(8deg) brightness(1.05);
}

.home-legacy__mandala--tl {
  top: 0;
  left: 0;
}
.home-legacy__mandala--tr {
  top: 0;
  right: 0;
  transform: scaleX(-1);
}
.home-legacy__mandala--bl {
  bottom: 0;
  left: 0;
  transform: scaleY(-1);
}
.home-legacy__mandala--br {
  bottom: 0;
  right: 0;
  transform: scale(-1, -1);
}

.home-legacy__diya-hang {
  position: absolute;
  top: 0;
  width: clamp(44px, 5vw, 64px);
  height: clamp(90px, 10vw, 120px);
  opacity: 0.28;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 120'%3E%3Cpath fill='none' stroke='%23C8A44D' stroke-width='1.2' d='M24 0v28'/%3E%3Cpath fill='%23C8A44D' fill-opacity='.2' stroke='%23C8A44D' stroke-width='1' d='M12 36c0-6 5-12 12-12s12 6 12 12v8H12v-8z'/%3E%3Cpath fill='%23E0C27A' d='M20 52h8l-2 10h-4l-2-10z'/%3E%3Ccircle cx='24' cy='32' r='4' fill='%23D4AF37' fill-opacity='.45'/%3E%3C/svg%3E")
    center top / contain no-repeat;
}

.home-legacy__diya-hang--l {
  left: clamp(12px, 4vw, 56px);
}
.home-legacy__diya-hang--r {
  right: clamp(12px, 4vw, 56px);
  transform: scaleX(-1);
}

.home-legacy__wrap {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Intro
   -------------------------------------------------------------------------- */
.home-legacy__intro {
  text-align: center;
  max-width: 820px;
  margin: 0 auto clamp(52px, 6vw, 72px);
}

.home-legacy__ornament {
  display: block;
  width: clamp(52px, 6vw, 68px);
  height: auto;
  margin: 0 auto 18px;
  filter: drop-shadow(0 0 18px rgba(200, 164, 77, 0.38));
}

.home-legacy__divider {
  display: block;
  width: min(200px, 55%);
  height: 1px;
  margin: 0 auto 22px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--gold-main),
    var(--gold-light),
    var(--gold-main),
    transparent
  );
}

.home-legacy__title {
  margin: 0 0 12px;
  font-family: "Cinzel", "Cormorant Garamond", serif;
  font-size: clamp(1.45rem, 2.8vw, 2.35rem);
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.3;
  color: var(--gold-light);
  text-transform: uppercase;
}

.home-legacy__subtitle {
  margin: 0 0 22px;
  font-family: "Cinzel", serif;
  font-size: clamp(0.82rem, 1.35vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-main);
}

.home-legacy__desc {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.75;
  color: var(--text-secondary);
}

.home-legacy__desc + .home-legacy__desc {
  margin-top: 0.65em;
}

/* --------------------------------------------------------------------------
   Main split — impact + gallery
   -------------------------------------------------------------------------- */
.home-legacy__main {
  display: grid;
  grid-template-columns: 40fr 60fr;
  gap: clamp(28px, 3.5vw, 48px);
  align-items: stretch;
  margin-bottom: clamp(36px, 4.5vw, 52px);
}

.home-legacy__panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-gold);
  border-radius: 18px;
  padding: clamp(24px, 2.8vw, 36px);
  box-shadow:
    inset 0 0 32px rgba(0, 0, 0, 0.45),
    0 16px 40px rgba(0, 0, 0, 0.35);
}

.home-legacy__panel-title {
  margin: 0 0 clamp(22px, 2.5vw, 28px);
  font-family: "Cinzel", "Cormorant Garamond", serif;
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-gold);
}

/* Impact stats 2x2 */
.home-legacy__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.home-legacy__stat {
  position: relative;
  padding: clamp(18px, 2vw, 24px) clamp(14px, 1.6vw, 18px);
  text-align: center;
}

.home-legacy__stat:nth-child(1),
.home-legacy__stat:nth-child(2) {
  border-bottom: 1px solid var(--border-gold);
}

.home-legacy__stat:nth-child(1),
.home-legacy__stat:nth-child(3) {
  border-right: 1px solid var(--border-gold);
}

.home-legacy__stat-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 1px solid var(--border-gold);
  background: rgba(200, 164, 77, 0.08);
  color: var(--gold-light);
  font-size: 17px;
}

.home-legacy__stat-value {
  display: block;
  margin: 0 0 6px;
  font-family: "Cinzel", "Cormorant Garamond", serif;
  font-size: clamp(1.65rem, 2.8vw, 2.15rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.1;
  color: var(--gold-light);
}

.home-legacy__stat-value--text {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  letter-spacing: 0.12em;
}

.home-legacy__stat-label {
  display: block;
  margin: 0 0 8px;
  font-family: "Cinzel", serif;
  font-size: clamp(0.68rem, 0.95vw, 0.78rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-main);
}

.home-legacy__stat-desc {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: clamp(11px, 1vw, 12px);
  line-height: 1.55;
  color: var(--text-secondary);
}

/* Gallery 3x2 */
.home-legacy__gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.2vw, 14px);
}

.home-legacy__gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-gold);
  aspect-ratio: 4 / 3;
  background: #080808;
}

.home-legacy__gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s ease;
}

.home-legacy__gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(5, 5, 5, 0.15) 0%,
    rgba(5, 5, 5, 0.55) 100%
  );
  pointer-events: none;
  transition: background 0.45s ease;
}

.home-legacy__gallery-item:hover {
  border-color: rgba(200, 164, 77, 0.7);
  box-shadow: 0 0 22px rgba(200, 164, 77, 0.15);
}

.home-legacy__gallery-item:hover img {
  transform: scale(1.06);
}

.home-legacy__gallery-item:hover .home-legacy__gallery-overlay {
  background: linear-gradient(
    180deg,
    rgba(5, 5, 5, 0.05) 0%,
    rgba(5, 5, 5, 0.4) 100%
  );
}

/* --------------------------------------------------------------------------
   Testimonials strip
   -------------------------------------------------------------------------- */
.home-legacy__testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-gold);
  border-radius: 18px;
  padding: clamp(28px, 3vw, 40px) clamp(20px, 2.5vw, 32px);
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.4);
}

.home-legacy__quote {
  position: relative;
  padding: 0 clamp(16px, 2vw, 28px);
  text-align: center;
}

.home-legacy__quote:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 8%;
  right: 0;
  width: 1px;
  height: 84%;
  background: linear-gradient(
    180deg,
    transparent,
    var(--gold-main),
    var(--gold-dark),
    transparent
  );
  opacity: 0.55;
}

.home-legacy__quote-mark {
  display: block;
  margin-bottom: 12px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1;
  color: var(--gold-main);
  opacity: 0.85;
}

.home-legacy__quote-text {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(15px, 1.35vw, 17px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-primary);
}

/* Scroll reveal */
.home-legacy .home-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.75s ease,
    transform 0.75s ease;
}

.home-legacy .home-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.home-legacy__stat.home-reveal:nth-child(1) { transition-delay: 0.05s; }
.home-legacy__stat.home-reveal:nth-child(2) { transition-delay: 0.1s; }
.home-legacy__stat.home-reveal:nth-child(3) { transition-delay: 0.15s; }
.home-legacy__stat.home-reveal:nth-child(4) { transition-delay: 0.2s; }

.home-legacy__gallery-item.home-reveal:nth-child(1) { transition-delay: 0.04s; }
.home-legacy__gallery-item.home-reveal:nth-child(2) { transition-delay: 0.08s; }
.home-legacy__gallery-item.home-reveal:nth-child(3) { transition-delay: 0.12s; }
.home-legacy__gallery-item.home-reveal:nth-child(4) { transition-delay: 0.16s; }
.home-legacy__gallery-item.home-reveal:nth-child(5) { transition-delay: 0.2s; }
.home-legacy__gallery-item.home-reveal:nth-child(6) { transition-delay: 0.24s; }

.home-legacy__quote.home-reveal:nth-child(1) { transition-delay: 0.06s; }
.home-legacy__quote.home-reveal:nth-child(2) { transition-delay: 0.12s; }
.home-legacy__quote.home-reveal:nth-child(3) { transition-delay: 0.18s; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1199px) {
  .home-legacy__main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .home-legacy__stats {
    grid-template-columns: 1fr;
  }

  .home-legacy__stat:nth-child(1),
  .home-legacy__stat:nth-child(2),
  .home-legacy__stat:nth-child(3) {
    border-bottom: 1px solid var(--border-gold);
  }

  .home-legacy__stat:nth-child(1),
  .home-legacy__stat:nth-child(3) {
    border-right: none;
  }

  .home-legacy__gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-legacy__testimonials {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 22px;
  }

  .home-legacy__quote:not(:last-child)::after {
    display: none;
  }

  .home-legacy__quote:not(:last-child) {
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-gold);
  }
}

@media (max-width: 479px) {
  .home-legacy__gallery {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin-inline: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-legacy .home-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .home-legacy__particles {
    animation: none;
  }

  .home-legacy__gallery-item:hover img {
    transform: none;
  }
}
