/* =========================================================
   MEENA PHOTOGRAPHY
   CONTACT + INSTAGRAM
   CLEAN / CONSOLIDATED / PERFORMANCE-FIRST CSS
========================================================= */

:root {
  --ci-bg: #fdfaf6;
  --ci-white: #fff;
  --ci-text: #2d2926;
  --ci-muted: #66615c;
  --ci-gold: #d9a77a;
  --ci-gold-light: #f6e8d8;
  --ci-border: #ead8c8;
  --ci-shadow: 0 25px 60px rgba(0, 0, 0, .08);
  --ci-radius: 36px;
  --ci-transition: .45s ease;
}

/* =========================================================
   CONTACT / INSTAGRAM MAIN SECTION
========================================================= */

.contact-insta {
  position: relative;
  overflow: hidden;
  padding: clamp(60px, 8vw, 110px) clamp(15px, 3vw, 30px);
  background: var(--ci-bg);
}

.contact-insta::before,
.contact-insta::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.contact-insta::before {
  width: 900px;
  height: 900px;
  left: -320px;
  top: -320px;
  background: radial-gradient(
    circle,
    rgba(217, 167, 122, .10),
    transparent 72%
  );
}

.contact-insta::after {
  width: 850px;
  height: 850px;
  right: -280px;
  bottom: -280px;
  background: radial-gradient(
    circle,
    rgba(217, 167, 122, .08),
    transparent 72%
  );
}

.ci-container {
  position: relative;
  z-index: 2;
  width: min(100%, 1500px);
  margin: auto;
}

/* =========================================================
   TOP
========================================================= */

.ci-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 60px;
  margin-bottom: 70px;
}

.ci-title {
  margin: 0;
  color: var(--ci-gold);
  font-family: "Bodoni Moda", serif;
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 400;
  letter-spacing: 3px;
  line-height: .9;
  text-transform: uppercase;
}

.ci-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding-top: 10px;
}

.cii-item {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--ci-text);
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(.9rem, 1vw, 1rem);
  letter-spacing: .3px;
  transition: transform .35s ease, color .35s ease;
}

.cii-item:hover {
  transform: translate3d(8px, 0, 0);
}

.cii-item svg {
  flex-shrink: 0;
  stroke: var(--ci-gold);
  transition: transform .35s ease;
}

.cii-item:hover svg {
  transform: scale(1.15);
}

.gold-link {
  position: relative;
  color: var(--ci-gold);
  font-weight: 600;
  text-decoration: none;
}

.gold-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--ci-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}

.gold-link:hover::after {
  transform: scaleX(1);
}

/* =========================================================
   STATIC SPARKLES
   No dynamic DOM generation here.
========================================================= */

.s-sparkle {
  position: absolute;
  width: 28px;
  height: 28px;
  opacity: .75;
  pointer-events: none;
  animation: sparkleFloat 5s ease-in-out infinite;
}

.s-sparkle svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ci-sp-1 { left: -40px; top: 120px; }
.ci-sp-2 { left: 120px; top: 420px; width: 44px; height: 44px; animation-delay: 1s; }
.ci-sp-3 { right: 40px; top: 170px; width: 34px; height: 34px; animation-delay: 2s; }
.ci-sp-4 { right: -30px; top: 420px; width: 46px; height: 46px; animation-delay: 3s; }

@keyframes sparkleFloat {
  0%, 100% {
    opacity: .2;
    transform: translate3d(0, 0, 0) rotate(0) scale(.8);
  }

  50% {
    opacity: 1;
    transform: translate3d(0, -15px, 0) rotate(25deg) scale(1.25);
  }
}

/* =========================================================
   SCROLL REVEAL
   JavaScript adds .show.
========================================================= */

.reveal-up,
.ci-title,
.ci-info,
.ci-hero-img,
.ig-item {
  will-change: opacity, transform;
}

.reveal-up {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition: opacity .75s ease, transform .75s ease;
}

.reveal-up.show {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* =========================================================
   HERO IMAGE
========================================================= */

.ci-hero-img-wrap {
  position: relative;
  width: min(100%, 980px);
  margin: 60px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ci-hero-img {
  position: relative;
  width: 100%;
  aspect-ratio: 2.3 / 1.15;
  overflow: hidden;
  border-radius: 40px;
  clip-path: polygon(
    8% 0,
    92% 0,
    100% 18%,
    72% 100%,
    28% 100%,
    0 18%
  );
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, .14),
    0 0 45px rgba(217, 167, 122, .18);
  transition:
    opacity .75s ease,
    transform .75s ease,
    box-shadow .6s ease;
  will-change: opacity, transform;
}

.ci-hero-img.show {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.ci-hero-img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .8s ease, filter .6s ease;
}

.ci-hero-img::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, .05),
    rgba(217, 167, 122, .10),
    rgba(0, 0, 0, .18)
  );
  pointer-events: none;
}

.ci-hero-img::after {
  content: "";
  position: absolute;
  top: -120%;
  left: -40%;
  z-index: 3;
  width: 35%;
  height: 300%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, .45),
    transparent
  );
  transform: rotate(18deg);
  transition: left 1s ease;
  pointer-events: none;
}

.ci-hero-img:hover {
  transform: translate3d(0, -8px, 0) scale(1.01);
  box-shadow:
    0 45px 80px rgba(0, 0, 0, .16),
    0 0 60px rgba(217, 167, 122, .28);
}

.ci-hero-img:hover img {
  transform: scale(1.08);
  filter: saturate(110%) brightness(1.02);
}

.ci-hero-img:hover::after {
  left: 130%;
}

.hero-glow {
  position: absolute;
  left: 50%;
  top: 45%;
  z-index: -1;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(217, 167, 122, .12),
    transparent 72%
  );
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: glowPulse 6s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    opacity: .45;
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    opacity: .9;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

.ci-mini-star {
  position: absolute;
  width: 18px;
  height: 18px;
  opacity: .55;
  pointer-events: none;
  animation: sparkleFloat 5s ease-in-out infinite;
}

.star-1 { left: 6%; top: 40%; }
.star-2 { left: 18%; top: 65%; animation-delay: .8s; }
.star-3 { right: 14%; top: 55%; animation-delay: 1.4s; }
.star-4 { right: 6%; top: 32%; animation-delay: 2.3s; }
.star-5 { left: 28%; bottom: -15px; animation-delay: 3.1s; }
.star-6 { right: 28%; bottom: -25px; animation-delay: 4s; }

/* =========================================================
   INSTAGRAM
========================================================= */

.ci-insta {
  position: relative;
  margin-top: 60px;
  text-align: center;
}

.cii-follow {
  margin: 0;
  color: #444;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.cii-title {
  margin: 18px 0 55px;
  color: var(--ci-text);
  font-family: "Bodoni Moda", serif;
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 400;
  line-height: .9;
  letter-spacing: 2px;
}

.insta-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
  align-items: center;
}

.ig-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid rgba(217, 167, 122, .25);
  border-radius: 26px;
  background: var(--ci-white);
  box-shadow: 0 12px 35px rgba(0, 0, 0, .08);
  cursor: pointer;
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition:
    opacity .7s ease,
    transform .45s ease,
    box-shadow .45s ease;
}

.ig-item.show {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.ig-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .7s ease, filter .5s ease;
}

.ig-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    rgba(217, 167, 122, 0),
    rgba(217, 167, 122, .45)
  );
  opacity: 0;
  transition: opacity .45s ease;
  pointer-events: none;
}

.ig-item::after {
  content: "📷";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  color: #fff;
  font-size: 34px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.5);
  transition: opacity .45s ease, transform .45s ease;
  pointer-events: none;
}

.ig-item:hover {
  transform: translate3d(0, -10px, 0);
  box-shadow:
    0 25px 55px rgba(0, 0, 0, .15),
    0 0 25px rgba(217, 167, 122, .25);
}

.ig-item:hover img {
  transform: scale(1.12);
  filter: brightness(.82);
}

.ig-item:hover::before {
  opacity: 1;
}

.ig-item:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* =========================================================
   BOTTOM DIVIDER
========================================================= */

.ci-bottom-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin-top: 70px;
}

.cib-line {
  flex: 1;
  max-width: 650px;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--ci-gold),
    transparent
  );
}

.cib-ornament {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cib-ornament svg {
  width: 28px;
  height: 28px;
}

/* =========================================================
   DYNAMIC STAR
   Keep only if JS creates these elements.
========================================================= */

.dynamic-star {
  position: absolute;
  z-index: 20;
  color: var(--ci-gold);
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 0 10px rgba(217, 167, 122, .5);
  animation: dynamicSparkle 4s linear forwards;
}

@keyframes dynamicSparkle {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(.2) rotate(0);
  }

  15% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate3d(0, -120px, 0) scale(2) rotate(180deg);
  }
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1200px) {
  .insta-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ci-top {
    gap: 40px;
  }
}

@media (max-width: 992px) {
  .ci-top {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 40px;
  }

  .ci-info {
    align-items: center;
  }

  .cii-item {
    justify-content: center;
  }

  .ci-hero-img {
    aspect-ratio: 2 / 1.2;
    border-radius: 30px;
  }

  .insta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {
  .contact-insta {
    padding: 70px 20px;
  }

  .ci-title {
    font-size: 3.6rem;
    letter-spacing: 2px;
  }

  .cii-title {
    margin-top: 30px;
    font-size: 3.5rem;
  }

  .cii-item {
    font-size: 15px;
  }

  .ci-hero-img-wrap {
    margin: 45px auto;
  }

  .ci-hero-img {
    aspect-ratio: 1.3 / 1;
    border-radius: 24px;
    clip-path: polygon(
      5% 0,
      95% 0,
      100% 15%,
      75% 100%,
      25% 100%,
      0 15%
    );
  }

  .hero-glow,
  .s-sparkle,
  .ci-mini-star {
    display: none;
  }

  .insta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .ig-item {
    border-radius: 20px;
  }

  .ig-item:hover {
    transform: none;
    box-shadow: 0 12px 35px rgba(0, 0, 0, .08);
  }

  .ig-item:hover img {
    transform: none;
    filter: none;
  }

  .ig-item:hover::before,
  .ig-item:hover::after {
    opacity: 0;
  }
}

@media (max-width: 576px) {
  .cii-item {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .ci-title,
  .cii-title {
    font-size: 2.8rem;
  }

  .insta-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .ig-item {
    width: min(100%, 360px);
    margin: auto;
  }
}

@media (max-width: 400px) {
  .contact-insta {
    padding: 60px 15px;
  }

  .ci-title,
  .cii-title {
    font-size: 2.4rem;
  }

  .cii-item {
    font-size: .9rem;
  }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .contact-insta *,
  .contact-insta *::before,
  .contact-insta *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal-up,
  .ci-title,
  .ci-info,
  .ci-hero-img,
  .ig-item {
    opacity: 1 !important;
    transform: none !important;
  }
}
