@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Pinyon+Script&family=Playfair+Display:wght@500;600;700&display=swap");

/* Asl shablondagi qo'lyozma shrift.
   Fayl: azizxon_v4/fonts/BeauRivage-Regular.ttf
   Agar fayl topilmasa, brauzer Pinyon Script'ga o'tadi. */
@font-face {
  font-family: "Beau Rivage";
  src: url("./fonts/BeauRivage-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Lotus Pink — videodagi shablondan olingan ranglar */
  --paper: #fdf8f7;
  --rose: #b26c8a;
  --rose-deep: #c2417a;
  --rose-btn: #c06b8d;
  --ink: #6a4b56;
  --ink-soft: #8d7480;
  --gold: #d4a657;
  --gold-soft: rgba(212, 166, 87, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #ffffff;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  background: var(--paper);
  padding-bottom: 0;
  overflow: hidden;
}

/* Fondagi nilufar naqshi — faqat sahifa ustuni ichida */
.page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("./images/new/hoa-sen-bg.webp");
  background-size: 340px auto;
  background-repeat: repeat;
  /* Videodagidek juda xira suv belgisi */
  opacity: 0.075;
  pointer-events: none;
  z-index: 0;
}

/* ================= Chekkalardagi nilufarlar =================
   Har bir gul sahifa chetidan kiradi: gul boshi ichkariga qaraydi,
   poyasi esa chetdan tashqariga chiqib ketadi.
   flower2/flower4 poyasi tabiiy holatda pastki o'ngda, shuning uchun
   chap chetdagilar gorizontal ko'zgulanadi. */
.deco {
  position: absolute;
  pointer-events: none;
  height: auto;
  z-index: 1;
}

/* Chap chet: gul ko'zgulangan — poyasi chapga chiqadi */
.d-l1 {
  width: min(52%, 320px);
  top: 1120px;
  left: -26%;
  transform: scaleX(-1);
}

/* O'ng chet: gul ko'zgulanmaydi — poyasi o'ng chetdan tashqariga chiqadi */
.d-r1 {
  width: min(52%, 320px);
  top: 1610px;
  right: -31%;
  transform: rotate(-8deg);
}

/* Keng ekranda matn markazda torroq turadi, shuning uchun gulni
   ichkariroq chiqarsa bo'ladi */
@media (min-width: 620px) {
  .d-r1 {
    right: -26%;
  }
}

/* Chap chet (past): gul ko'zgulangan */
.d-l2 {
  width: min(50%, 300px);
  top: 2600px;
  left: -25%;
  transform: scaleX(-1) rotate(10deg);
}

/* ================= Muqova ================= */
.hero {
  position: relative;
  z-index: 2;
  padding: 52px 18px 26px;
  display: flex;
  justify-content: center;
}

.gold-box {
  position: relative;
  width: min(100%, 430px);
  aspect-ratio: 1500 / 2100;
  max-height: 70vh;
}

.gold-box-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.gold-box-inner {
  position: absolute;
  inset: 14% 10% 8%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}

/* Ismlar ramkaning qolgan bo'sh joyida markazlashadi */
.name-group {
  margin: auto 0;
  width: 100%;
}

/* Ramka burchaklaridagi nilufarlar */
.hero-lotus {
  position: absolute;
  pointer-events: none;
  height: auto;
  z-index: 2;
}

.hero-lotus.tl {
  width: 66%;
  top: -15%;
  left: -28%;
}

.hero-lotus.br {
  width: 64%;
  bottom: -13%;
  right: -40%;
  /* Burilgani uchun bandi pastki o'ngga — ekran chetidan tashqariga ketadi */
  transform: rotate(-30deg);
}

.eyebrow {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 3.6px;
  text-transform: uppercase;
  color: var(--rose);
  margin: 0;
}

.script-name {
  font-family: "Beau Rivage", "Pinyon Script", "Great Vibes", cursive;
  font-size: clamp(2.6rem, 11.5vw, 4.2rem);
  line-height: 1.25;
  color: var(--rose-deep);
  margin: 0;
}

.script-amp {
  font-family: "Beau Rivage", "Pinyon Script", "Great Vibes", cursive;
  font-size: clamp(1.5rem, 6.4vw, 2.2rem);
  color: var(--rose);
  margin: 0.5rem 0;
}

/* ================= Bo'limlar ================= */
.section {
  position: relative;
  z-index: 2;
  padding: 2.4rem 22px 2rem;
  text-align: center;
}

/* Sarlavha ustidagi oltin burchaklar */
.gold-top {
  position: relative;
  /* Muqovadagi oltin ramka bilan bir xil kenglik */
  max-width: 430px;
  margin: 2rem auto 2.2rem;
  padding: 5rem 3rem 0rem;
}

.gold-top-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.gold-top .head {
  position: relative;
  margin: 0;
}

/* Sarlavha ostidagi ikkinchi qator — yozma shriftda */
.head-sub {
  position: relative;
  font-family: "Beau Rivage", "Pinyon Script", "Great Vibes", cursive;
  font-size: clamp(1.6rem, 6.8vw, 2.1rem);
  line-height: 1.3;
  color: var(--rose-deep);
  margin: 3rem 0 0;
}

.head {
  font-family: "Playfair Display", serif;
  font-size: clamp(0.95rem, 4.2vw, 1.25rem);
  font-weight: 600;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: var(--rose);
  margin: 0rem 0 1.3rem;
}

.head.small {
  font-size: clamp(0.95rem, 4vw, 1.15rem);
  margin-top: 2rem;
}

/* ================= Taklif matni ================= */
.invite-text {
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--ink);
  max-width: 470px;
  margin: 0 auto 1.1rem;
}

.lead {
  font-size: 0.92rem;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.9;
  margin: 1.8rem 0 0.6rem;
}

.big-time {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.5rem, 6.4vw, 1.9rem);
  font-weight: 500;
  color: var(--ink);
  margin: 0.2rem 0 1.1rem;
}

/* ================= Sana ================= */
.date-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.date-side {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.8rem;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--ink);
  /* Ikkala chet bir xil kenglikda — shunda kun raqami aniq o'rtada qoladi */
  flex: 0 0 100px;
  text-align: center;
}

.date-day {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 9vw, 2.6rem);
  font-weight: 500;
  color: var(--rose);
  line-height: 1;
}

.date-bar {
  width: 1px;
  height: 42px;
  background: var(--gold-soft);
}

.date-year {
  font-family: "Playfair Display", serif;
  font-size: 1.15rem;
  color: var(--rose);
  margin: 0.7rem 0 0;
}

/* ================= Ikki vaqt ================= */
.two-times {
  display: flex;
  justify-content: center;
  gap: 2.8rem;
  margin-top: 1.4rem;
}

.tt-label {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.68rem;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.25rem;
}

.tt-value {
  font-family: "Playfair Display", serif;
  font-size: 1.25rem;
  color: var(--rose);
  margin: 0;
}

.countdown {
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  color: var(--ink);
  margin: 0 0 1.8rem;
}

/* ================= Kalendar ================= */
.cal-wrap {
  position: relative;
  width: min(100%, 380px);
  margin: 0 auto 0.4rem;
  aspect-ratio: 1374 / 1145;
}

.cal-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.calendar {
  position: absolute;
  inset: 13% 12% 11%;
  display: flex;
  flex-direction: column;
}

.cal-title {
  font-family: "Playfair Display", serif;
  font-size: 0.86rem;
  color: var(--rose);
  margin-bottom: 0.3rem;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  flex: 1;
  align-content: start;
}

.cal-grid span {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(0.68rem, 2.8vw, 0.88rem);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  position: relative;
}

.cal-grid .dow {
  font-size: clamp(0.56rem, 2.2vw, 0.7rem);
  color: var(--ink-soft);
  aspect-ratio: auto;
  padding-bottom: 4px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--gold-soft);
}

/* To'y kuni — pushti yurak ichida.
   SVG fon sifatida beriladi: clip-path: path() element bilan
   masshtablanmaydi, background esa viewBox bo'yicha moslashadi. */
.cal-grid .is-day {
  color: #fff;
  font-weight: 600;
  position: relative;
}

.cal-grid .is-day::before {
  content: "";
  position: absolute;
  inset: -12%;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23c06b8d' d='M12 21.6C6.4 16.9 2 13.4 2 8.9 2 5.6 4.5 3 7.6 3c1.9 0 3.6.9 4.4 2.4C12.8 3.9 14.5 3 16.4 3 19.5 3 22 5.6 22 8.9c0 4.5-4.4 8-10 12.7z'/></svg>")
    center 42% / 100% auto no-repeat;
  z-index: -1;
}

/* ================= Tugmalar ================= */
.pill-button {
  background: var(--rose-btn);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.9rem;
  font-family: "Playfair Display", serif;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.3s;
}

.pill-button:hover {
  background: #a85878;
}

.link-button {
  background: none;
  border: none;
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  color: var(--rose);
  text-decoration: underline;
  text-underline-offset: 5px;
  cursor: pointer;
  padding: 0.6rem;
}

.link-button:hover {
  color: var(--rose-deep);
}

.map-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin-top: 1.2rem;
}

/* ================= Manzil ================= */
.venue {
  font-family: "Playfair Display", serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--rose);
  margin: 0 0 0.3rem;
}

.venue-addr {
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0;
}

/* ================= Ajratgich ================= */
.divider {
  display: block;
  position: relative;
  z-index: 2;
  width: min(300px, 70%);
  height: auto;
  margin: 0rem auto;
}

/* Matndan keyingi naqsh: tepa va pastdagi masofa teng hamda ixcham.
   Buning uchun qo'shni bo'limlarning to'ldirishlari shu chegarada
   nolga tushiriladi va butun masofa naqshning o'z chekkasi bilan
   belgilanadi. */
.invite-text + .divider {
  margin-top: 3rem;
  margin-bottom: 0;
}

.section-invite {
  padding-bottom: 0;
}

.section-reception {
  padding-top: 3rem;
}

.section-reception > .lead:first-child {
  margin-top: 0;
}

/* ================= Tilaklar ================= */
.wish-form {
  max-width: 440px;
  margin: 0 auto 1.4rem;
  border: 1px solid var(--gold-soft);
  border-radius: 14px;
  padding: 1.1rem;
  background: rgba(255, 255, 255, 0.6);
}

.wish-form input,
.wish-form textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  margin-bottom: 0.8rem;
  border: 1px solid var(--gold-soft);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1.02rem;
  color: var(--ink);
  background: #fff;
}

.wish-form input:focus,
.wish-form textarea:focus {
  outline: 1.5px solid var(--rose-btn);
}

.wish-list {
  max-width: 440px;
  margin: 0 auto;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}

.comment {
  border: 1px solid var(--gold-soft);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  margin-bottom: 0.7rem;
  background: rgba(255, 255, 255, 0.7);
  text-align: left;
  animation: fadeIn 0.5s ease-in;
}

.comment b {
  font-family: "Playfair Display", serif;
  font-size: 0.92rem;
  color: var(--rose);
}

.comment p {
  margin: 0.35rem 0 0;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--ink);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= Pastki gullar va footer ================= */
.bottom-flowers {
  display: block;
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  height: auto;
  margin: 1rem auto -10px;
}

.foot {
  position: relative;
  z-index: 2;
  text-align: center;
  font-family: "Playfair Display", serif;
  font-size: 0.72rem;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
  padding: 0 0 1.8rem;
}

/* ================= Musiqa tugmasi ================= */
.music-button {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 60;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--rose-btn);
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(178, 108, 138, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Chalinayotganini tovush ustunchalari bildiradi */
.music-button .bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}

.music-button .bars i {
  display: block;
  width: 3px;
  height: 5px;
  border-radius: 2px;
  background: #fff;
  transition: height 0.3s ease;
}

.music-button.is-playing .bars i {
  animation: eq 0.9s ease-in-out infinite;
}

.music-button.is-playing .bars i:nth-child(2) {
  animation-delay: 0.15s;
}

.music-button.is-playing .bars i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes eq {
  0%,
  100% {
    height: 5px;
  }
  50% {
    height: 17px;
  }
}

/* Musiqa o'chiq turganda ustunchalar o'rniga nota belgisi ko'rinadi */
.music-button .note {
  display: none;
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
}

.music-button.is-muted .bars {
  display: none;
}

.music-button.is-muted .note {
  display: block;
}

/* ================= Scroll reveal ================= */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .music-button.is-playing .note {
    animation: none;
  }
}

/* ================= Kengroq ekranlar =================
   Telefonda nilufarlar ekran chetiga tegadi. Kengroq ekranda ramka
   sahifa o'rtasida bo'lgani uchun ular ichkarida qolib ketadi —
   shuning uchun bu yerda ular sahifa chetiga chiqariladi. */
@media (min-width: 620px) {
  .hero-lotus.tl {
    width: 82%;
    top: -18%;
    left: -74%;
  }

  .hero-lotus.br {
    width: 66%;
    bottom: -12%;
    right: -66%;
  }
}

/* =========================================================
   Ochilish ekrani
   ========================================================= */
.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #cc799a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.intro.is-open {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.intro-lock {
  overflow: hidden;
}

/* Fonda sekin uchib yuradigan mayda gullar */
.intro-petals {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.intro-petal {
  position: absolute;
  opacity: 0;
  animation: introDrift linear infinite;
}

@keyframes introDrift {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }
  15%,
  80% {
    opacity: 0.75;
  }
  100% {
    transform: translateY(115vh) translateX(var(--dx, 40px)) rotate(220deg);
    opacity: 0;
  }
}

/* Ochilganda otiladigan gullar */
.burst-petal {
  position: absolute;
  pointer-events: none;
  animation: introBurst 1.6s cubic-bezier(0.15, 0.7, 0.3, 1) forwards;
}

@keyframes introBurst {
  0% {
    transform: translate(0, 0) scale(0.4) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(var(--bx), var(--by)) scale(1.1) rotate(260deg);
    opacity: 0;
  }
}

/* Kengayib yo'qoladigan katta nilufarlar */
.bloom {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.bloom-img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 54%;
  max-width: 460px;
  height: auto;
  opacity: 0;
  filter: blur(1.5px);
  will-change: transform, opacity;
}

.intro.is-opening .bloom-img {
  animation: bloomOut 1.6s cubic-bezier(0.2, 0.7, 0.25, 1) forwards;
}

.bloom-img.b1 {
  --bx: -62%;
  --br: -18deg;
}

.bloom-img.b2 {
  --bx: 46%;
  --br: 22deg;
  animation-delay: 0.12s;
}

.bloom-img.b3 {
  --bx: -8%;
  --br: 6deg;
  animation-delay: 0.24s;
}

@keyframes bloomOut {
  0% {
    opacity: 0;
    transform: translate(calc(-50% + var(--bx)), -50%) scale(0.35)
      rotate(var(--br));
  }
  35% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--bx) * 1.6), -58%) scale(2)
      rotate(var(--br));
  }
}

/* ===== Karta ===== */
.intro-card {
  position: relative;
  z-index: 2;
  width: min(86vw, 420px);
  /* Balandlik matnga qarab belgilanadi — aks holda telefonda
     yurak belgisi va tugma kartadan chiqib ketadi */
  padding: 1.9rem 1.4rem;
  background: #fffdfb;
  border-radius: 6px;
  box-shadow: 0 26px 60px rgba(120, 40, 70, 0.3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: cardIn 0.9s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Ochilganda karta qiyshayib yuqoriga uchib ketadi.
   O'tish (transition) emas, animatsiya ishlatiladi — kirish
   animatsiyasini aniq almashtirishi uchun. */
.intro.is-opening .intro-card {
  animation: cardOut 1.15s cubic-bezier(0.5, 0, 0.2, 1) forwards;
}

@keyframes cardOut {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  30% {
    opacity: 1;
    transform: translate(2%, -4%) rotate(2deg) scale(0.99);
  }
  100% {
    opacity: 0;
    transform: translate(16%, -34%) rotate(9deg) scale(0.8);
  }
}

.card-lotus {
  position: absolute;
  height: auto;
  pointer-events: none;
}

.card-lotus.tl {
  width: 46%;
  top: -10%;
  left: -14%;
}

.card-lotus.br {
  width: 42%;
  bottom: -14%;
  right: -10%;
  transform: rotate(-22deg);
}

.intro-body {
  position: relative;
  z-index: 2;
  text-align: center;
}

.heart-badge {
  width: 46px;
  height: 46px;
  margin: 0 auto 0.7rem;
  border-radius: 50%;
  background: var(--rose-btn);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 6px 14px rgba(192, 107, 141, 0.38);
}

.intro-name {
  font-family: "Beau Rivage", "Pinyon Script", "Great Vibes", cursive;
  font-size: clamp(1.6rem, 6.4vw, 2rem);
  line-height: 1.15;
  color: var(--rose);
  margin: 0;
}

.intro-amp {
  font-family: "Beau Rivage", "Pinyon Script", "Great Vibes", cursive;
  font-size: 1.05rem;
  color: var(--rose);
  margin: 0.1rem 0;
}

.intro-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.7rem 0 0.6rem;
  color: var(--gold);
  font-size: 0.7rem;
}

.intro-rule span {
  width: 44px;
  height: 1px;
  background: var(--gold-soft);
}

.intro-date,
.intro-invites {
  font-size: 0.98rem;
  color: var(--rose);
  margin: 0.25rem 0;
}

.intro-open {
  margin-top: 0.9rem;
  background: var(--rose-btn);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.9rem;
  font-family: "Playfair Display", serif;
  font-size: 0.82rem;
  letter-spacing: 1.2px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.intro-open:hover {
  background: #a85878;
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .intro-petal,
  .burst-petal,
  .bloom-img {
    display: none;
  }

  .intro-card {
    animation: none;
  }
}
