/* =========================================================================
   TO'Y TAKLIFNOMASI — Aquamarine (turkuaz) yaltiroq mavzu
   ========================================================================= */

:root {
  --color-bg: #f4fcfb;
  --color-bg-alt: #ddf3f0;
  --color-gold: #2fb3a8;          /* asosiy turkuaz */
  --color-gold-light: #8fe9e0;    /* och turkuaz (to'q fonlarda) */
  --color-gold-dark: #10756e;     /* to'q turkuaz (matn uchun) */
  --color-text: #0f3330;
  --color-text-light: #4d7c78;
  --color-white: #fbffff;

  --font-script: 'Great Vibes', cursive;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Cormorant Garamond', serif;

  --max-width: 1100px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
  font-size: 19px;
  line-height: 1.6;
}

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

/* ---------- Cover / opening screen ---------- */
body.locked { overflow: hidden; height: 100vh; }

.cover {
  --cover-inset: clamp(14px, 2.6vw, 38px);
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(48px, 10vh, 110px) 1.5rem;
  background:
    radial-gradient(circle at 50% 34%, rgba(47,179,168,0.30) 0%, rgba(47,179,168,0) 58%),
    radial-gradient(circle at 50% 50%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.45) 100%),
    linear-gradient(160deg, #0e3f3c 0%, #04201f 100%);
  transition: opacity .8s ease, visibility .8s ease;
}
.cover.cover-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

/* ikki qavatli ingichka oltin ramka — taklifnoma kartasi taassuroti */
.cover-frame {
  position: absolute;
  inset: var(--cover-inset);
  border: 1px solid rgba(47, 179, 168, 0.42);
  pointer-events: none;
}
.cover-frame::after {
  content: "";
  position: absolute; inset: 7px;
  border: 1px solid rgba(47, 179, 168, 0.16);
}

.cover-content {
  position: relative; z-index: 2;
  text-align: center;
  color: var(--color-white);
  max-width: 640px;
}
.cover .eyebrow { color: var(--color-gold-light); }

/* monogramma — ismlarning bosh harflari */
.cover-monogram {
  width: 62px; height: 62px;
  margin: 1.1rem auto 0.2rem;
  border: 1px solid rgba(47, 179, 168, 0.55);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-size: 1rem;
  letter-spacing: 0.14em;
  color: var(--color-gold-light);
  box-shadow: inset 0 0 22px rgba(47, 179, 168, 0.12);
}

.cover-names {
  font-family: var(--font-script);
  font-size: clamp(2.7rem, 9vw, 4.6rem);
  line-height: 1.15;
  margin-top: 0.5rem;
  display: flex; align-items: center; justify-content: center; gap: 0.35em;
  flex-wrap: wrap;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.cover-orn {
  display: block;
  width: min(340px, 82%);
  height: auto;
  margin: 0.9rem auto 1.1rem;
  color: var(--color-gold-light);
  opacity: 0.9;
}
.cover-date {
  font-family: var(--font-heading);
  letter-spacing: 0.14em;
  font-size: 1.08rem;
  color: var(--color-gold-light);
}
.cover-venue {
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: rgba(230, 255, 253, 0.75);
  margin: 0.35rem 0 2.3rem;
}
.btn-open {
  font-family: var(--font-heading);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--color-white);
  background: transparent;
  border: 1px solid var(--color-gold);
  padding: 1rem 2.2rem;
  border-radius: 2px;
  cursor: pointer;
  opacity: 0;
  animation:
    coverIn 1s cubic-bezier(.22,.61,.36,1) .85s forwards,
    pulseGlow 2.4s ease-in-out 1.9s infinite;
  transition: background .35s ease;
}
.btn-open:hover { background: rgba(47,179,168,0.15); }
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(47,179,168,0); }
  50% { box-shadow: 0 0 22px rgba(47,179,168,0.45); }
}

/* qopqoq elementlari ketma-ket, yumshoq paydo bo'ladi */
@keyframes coverIn { to { opacity: 1; transform: none; } }
.cover-content > *:not(.btn-open) {
  opacity: 0;
  transform: translateY(16px);
  animation: coverIn 1s cubic-bezier(.22,.61,.36,1) forwards;
}
.cover-content > *:nth-child(1) { animation-delay: 0.10s; }
.cover-content > *:nth-child(2) { animation-delay: 0.22s; }
.cover-content > *:nth-child(3) { animation-delay: 0.36s; }
.cover-content > *:nth-child(4) { animation-delay: 0.52s; }
.cover-content > *:nth-child(5) { animation-delay: 0.64s; }
.cover-content > *:nth-child(6) { animation-delay: 0.74s; }

/* Xavfsizlik to'ri: animatsiya biror sababga ko'ra ishlamasa ham (eski
   brauzer, fon tabda ochilgan sahifa), matn baribir ko'rinib qoladi. */
.cover-content.anim-done > *:not(.btn-open) { opacity: 1; transform: none; animation: none; }
.cover-content.anim-done > .btn-open {
  opacity: 1;
  animation: pulseGlow 2.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .cover-content > *,
  .cover-content > *:not(.btn-open) { opacity: 1; transform: none; animation: none; }
}

/* ---------- Naqshlar: gul shoxchasi va nikoh uzuklari ---------- */
.orn-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.ornament {
  color: var(--color-gold);
  padding: 0.6rem 1.5rem;
  text-align: center;
}
.ornament svg,
.cover-orn,
.cover-corner {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ornament svg {
  display: block;
  width: min(400px, 78%);
  height: auto;
  margin: 0 auto;
}
.ornament-rings svg { width: min(164px, 44%); }
.ornament-light { color: var(--color-gold-light); }

/* naqshdan keyingi bo'lim tepasidagi bo'shliq kichraytiriladi */
.ornament + section { padding-top: 2.6rem; }
.footer .ornament { padding: 0 0 0.8rem; }

/* qopqoq ekranining to'rt burchagidagi gulli naqshlar (ramka ustida turadi) */
.cover-corner {
  position: absolute;
  width: clamp(58px, 12vw, 116px);
  height: auto;
  color: var(--color-gold-light);
  opacity: 0.62;
  pointer-events: none;
}
.cover-corner-tl { top: calc(var(--cover-inset) - 5px); left: calc(var(--cover-inset) - 5px); }
.cover-corner-tr { top: calc(var(--cover-inset) - 5px); right: calc(var(--cover-inset) - 5px); transform: scaleX(-1); }
.cover-corner-bl { bottom: calc(var(--cover-inset) - 5px); left: calc(var(--cover-inset) - 5px); transform: scaleY(-1); }
.cover-corner-br { bottom: calc(var(--cover-inset) - 5px); right: calc(var(--cover-inset) - 5px); transform: rotate(180deg); }

/* ---------- Qopqoqdagi oltin uchqunlar ---------- */
.sparkles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sparkles span {
  position: absolute;
  bottom: -12px;
  border-radius: 50%;
  background: var(--color-gold-light);
  box-shadow: 0 0 8px rgba(143, 233, 224, 0.85);
  animation-name: floatUp;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes floatUp {
  0%   { transform: translate3d(0, 0, 0) scale(0.6); }
  50%  { transform: translate3d(18px, -48vh, 0) scale(1); }
  100% { transform: translate3d(-10px, -100vh, 0) scale(0.5); }
}

/* ---------- Reveal animation ---------- */
[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s ease, transform 1s ease;
}
[data-animate].in-view { opacity: 1; transform: translateY(0); }

/* ---------- Eyebrow / dividers / headings ---------- */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  color: var(--color-gold-dark);
  font-family: var(--font-heading);
  font-weight: 500;
}
.section-heading { text-align: center; margin-bottom: 2.6rem; }
.divider { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 1rem 0; }
.divider span { width: 46px; height: 1px; background: var(--color-gold); display: inline-block; }
.divider i { color: var(--color-gold); font-style: normal; font-size: 1rem; }
.divider.small span { width: 28px; }
.script-heading {
  font-family: var(--font-script);
  font-size: 2.6rem;
  color: var(--color-gold-dark);
  font-weight: 400;
  line-height: 1.3;
}
.venue-name {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  margin-top: 0.6rem;
  color: var(--color-text);
}
.venue-address { color: var(--color-text-light); margin-top: 0.3rem; font-size: 1.1rem; }

/* ---------- Buttons ---------- */
.btn-gold {
  display: inline-block;
  margin: 2.2rem auto 0;
  padding: 0.9rem 2.4rem;
  border: 1px solid var(--color-gold);
  color: var(--color-gold-dark);
  text-decoration: none;
  font-family: var(--font-heading);
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background .35s ease, color .35s ease;
}
.btn-gold:hover { background: var(--color-gold); color: var(--color-white); }
.btn-gold-soft { border-color: var(--color-gold-light); color: var(--color-text-light); }
.btn-gold-soft:hover { background: var(--color-gold-light); color: var(--color-text); }
.location-actions {
  display: flex; justify-content: center; align-items: center;
  gap: 1rem; flex-wrap: wrap;
  margin-top: 2.2rem;
}
.location-actions .btn-gold { margin: 0; }

/* ---------- Music toggle ---------- */
.music-toggle {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 500;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--color-white);
  border: 1px solid var(--color-gold-light);
  box-shadow: 0 6px 18px rgba(16, 117, 110, 0.22);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--color-gold-dark);
}
.music-icon { width: 22px; height: 22px; }
.music-toggle.playing .music-icon { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.08);
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,40,38,0.32) 0%, rgba(6,40,38,0.55) 55%, rgba(5,32,31,0.78) 100%);
}
.hero-content { position: relative; z-index: 2; text-align: center; color: var(--color-white); padding: 0 1.5rem; }
.hero .eyebrow { color: var(--color-gold-light); }
.hero-names {
  font-family: var(--font-script);
  font-size: clamp(3rem, 10vw, 5.5rem);
  margin-top: 0.8rem;
  display: flex; align-items: center; justify-content: center; gap: 0.4em;
  flex-wrap: wrap;
}
.ampersand { font-size: 0.7em; color: var(--color-gold-light); }
.hero-date {
  font-family: var(--font-heading);
  letter-spacing: 0.15em;
  font-size: 1.15rem;
  margin-top: 0.4rem;
}
.hero-venue {
  font-family: var(--font-body);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--color-gold-light);
  margin-top: 0.35rem;
}
.hero .divider span { background: var(--color-gold-light); }
.hero .divider i { color: var(--color-gold-light); }

.scroll-down {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 2; text-align: center; color: var(--color-white);
}
.scroll-down span {
  display: block; width: 1px; height: 40px; background: rgba(255,255,255,0.7);
  margin: 0 auto 8px; animation: scrollBounce 1.8s ease-in-out infinite;
}
.scroll-down p { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.85; }
@keyframes scrollBounce { 0%,100% { transform: scaleY(1); opacity: .4; } 50% { transform: scaleY(1.3); opacity: 1; } }

/* ---------- Countdown ---------- */
.countdown-section { padding: 5.5rem 1.5rem 4.5rem; text-align: center; }
.countdown { display: flex; justify-content: center; gap: 1.2rem; flex-wrap: wrap; }
.countdown-box {
  background: var(--color-white);
  border: 1px solid var(--color-gold-light);
  border-radius: 6px;
  min-width: 88px;
  padding: 1.3rem 0.6rem;
  box-shadow: 0 8px 24px rgba(16,117,110,0.10);
}
.countdown-num {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.3rem;
  color: var(--color-gold-dark);
  font-weight: 600;
}
.countdown-label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-top: 0.3rem;
}
.countdown.hidden { display: none; }
.countdown-today {
  display: none;
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--color-gold-dark);
}
.countdown-today.visible { display: block; }

/* ---------- Invitation section ---------- */
.invite-section {
  display: flex; align-items: center; justify-content: center; gap: 4rem;
  max-width: var(--max-width); margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  flex-wrap: wrap;
}
.invite-image { position: relative; flex: 1 1 320px; max-width: 400px; }
.invite-image img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 4px; }
.invite-image-frame {
  position: absolute; top: 16px; left: 16px; right: -16px; bottom: -16px;
  border: 1px solid var(--color-gold); border-radius: 4px; z-index: -1;
}
.invite-text { flex: 1 1 380px; max-width: 480px; }
.invite-text .script-heading { margin: 0.5rem 0 1.2rem; }
.invite-message { color: var(--color-text-light); font-size: 1.15rem; margin-bottom: 1.8rem; }
.invite-details { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.invite-detail-item { display: flex; flex-direction: column; }
.detail-label {
  font-family: var(--font-heading); font-size: 0.75rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--color-gold-dark); margin-bottom: 0.3rem;
}
.detail-value { font-size: 1.2rem; }

/* ---------- Gallery ---------- */
.gallery-section { background: var(--color-bg-alt); padding: 5rem 1.5rem; }
.gallery-grid {
  max-width: var(--max-width); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
.gallery-grid img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 4px;
  cursor: pointer; transition: transform .4s ease, box-shadow .4s ease;
}
.gallery-grid img:hover { transform: translateY(-6px); box-shadow: 0 14px 26px rgba(16,117,110,0.24); }

/* ---------- Location ---------- */
.location-section { padding: 5.5rem 1.5rem; text-align: center; }
.map-wrap {
  max-width: var(--max-width); margin: 0 auto;
  height: 380px; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--color-gold-light);
}

/* ---------- Footer ---------- */
.footer { text-align: center; padding: 4rem 1.5rem 3.5rem; background: var(--color-text); color: var(--color-white); }
.footer .divider span { background: var(--color-gold-light); }
.footer .divider i { color: var(--color-gold-light); }
.footer-message { font-family: var(--font-body); font-size: 1.2rem; color: var(--color-gold-light); margin-bottom: 0.5rem; }
.footer-names { font-family: var(--font-script); font-size: 2.2rem; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; background: rgba(4,26,25,0.93);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 88vw; max-height: 82vh; border-radius: 4px; }
.lightbox-close {
  position: absolute; top: 20px; right: 28px; background: none; border: none;
  color: var(--color-white); font-size: 2.4rem; cursor: pointer; line-height: 1;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--color-white); font-size: 1.6rem; cursor: pointer;
  padding: 1rem;
}
.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  body { font-size: 17px; }
  .invite-section { gap: 2.5rem; padding-top: 1rem; }
  .invite-image-frame { display: none; }
  .countdown-box { min-width: 72px; padding: 1rem 0.4rem; }
  .countdown-num { font-size: 1.8rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .map-wrap { height: 300px; }
  .invite-details { gap: 1.6rem; }
  .countdown-today { font-size: 1.8rem; }
  .hero-venue { font-size: 0.98rem; }
}

@media (max-width: 420px) {
  .countdown { gap: 0.7rem; }
  .countdown-box { min-width: 64px; }
}

/* =========================================================================
   YALTIROQ (gloss) QATLAMI — turkuaz tosh effekti
   Matnlarda yorug'lik yugurishi, kartalarda shisha yaltirog'i.
   ========================================================================= */

@keyframes shineSweep {
  0%   { background-position: 140% 0; }
  100% { background-position: -140% 0; }
}
@keyframes glossSlide {
  0%   { transform: translateX(-120%) skewX(-18deg); }
  55%  { transform: translateX(240%) skewX(-18deg); }
  100% { transform: translateX(240%) skewX(-18deg); }
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  /* to'q fondagi ismlar — oq nur yugurib turadi */
  .cover-names span,
  .hero-names span,
  .footer-names {
    background-image: linear-gradient(100deg,
      #a7ede6 0%, #e8fffc 18%, #ffffff 30%, #9fe9e0 46%, #d9fffb 62%, #7fdcd3 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shineSweep 7s linear infinite;
  }
  /* yorug' fondagi sarlavhalar — sayqallangan turkuaz */
  .script-heading,
  .countdown-num,
  .venue-name {
    background-image: linear-gradient(100deg,
      #17867e 0%, #2fb3a8 24%, #7fe0d8 40%, #2fb3a8 56%, #0f6b64 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shineSweep 9s linear infinite;
  }
}

/* qopqoqdagi ismlarga yumshoq nur */
.cover-names { filter: drop-shadow(0 3px 18px rgba(0, 0, 0, 0.45)); text-shadow: none; }
.hero-names  { filter: drop-shadow(0 3px 18px rgba(0, 0, 0, 0.45)); }

/* monogramma — shishasimon doira */
.cover-monogram {
  background:
    linear-gradient(150deg, rgba(255,255,255,0.16) 0%, rgba(143,233,224,0.06) 45%, rgba(255,255,255,0) 70%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    inset 0 0 26px rgba(47,179,168,0.22),
    0 0 26px rgba(47,179,168,0.28);
}

/* kun sanoq katakchalari — sayqallangan shisha */
.countdown-box {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #ffffff 0%, #eafbf9 52%, #cdf1ec 100%);
  box-shadow:
    0 10px 26px rgba(16, 117, 110, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.countdown-box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg,
    rgba(255,255,255,0.85) 10%, rgba(255,255,255,0.25) 34%, rgba(255,255,255,0) 52%);
  pointer-events: none;
}

/* tugmalar — yaltiroq sirt */
.btn-gold {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #ffffff 0%, #e8faf8 100%);
  box-shadow: 0 6px 16px rgba(16, 117, 110, 0.14), inset 0 1px 0 rgba(255,255,255,0.9);
}
.btn-gold:hover {
  background: linear-gradient(160deg, var(--color-gold-light) 0%, var(--color-gold) 100%);
  color: #05302c;
}
.btn-open {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(143,233,224,0.16) 0%, rgba(16,117,110,0.10) 100%);
  border-color: var(--color-gold-light);
}
.btn-open::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 45%; height: 100%;
  background: linear-gradient(100deg,
    rgba(255,255,255,0) 0%, rgba(255,255,255,0.42) 50%, rgba(255,255,255,0) 100%);
  animation: glossSlide 4.2s ease-in-out 2.4s infinite;
  pointer-events: none;
}

/* galereya kartalari — turkuaz soya va yengil yaltiroq */
.gallery-grid img {
  box-shadow: 0 8px 20px rgba(16, 117, 110, 0.14);
}
.gallery-grid img:hover {
  box-shadow: 0 16px 30px rgba(16, 117, 110, 0.28);
}
.invite-image img {
  box-shadow: 0 14px 34px rgba(16, 117, 110, 0.18);
}

/* musiqa tugmasi */
.music-toggle {
  background: linear-gradient(160deg, #ffffff 0%, #dff6f3 100%);
  box-shadow: 0 6px 18px rgba(16, 117, 110, 0.26), inset 0 1px 0 rgba(255,255,255,0.9);
}

/* naqshlar — metall turkuaz (SVG gradient) */
.ornament svg { stroke: url(#aquaGrad); }
.ornament-light svg,
.cover-orn,
.cover-corner { stroke: url(#aquaGradLight); }

@media (prefers-reduced-motion: reduce) {
  .cover-names span, .hero-names span, .footer-names,
  .script-heading, .countdown-num, .venue-name { animation: none; }
  .btn-open::after { animation: none; opacity: 0; }
}
