/* =============================================================
   TAKLIFNOMA — styles.css  (Vowlee "Petal" rose-gold, 1:1)
   Manba: www.vowlee.com/en/catalog/rose-gold (computed styles
   + piksel ranglar Playwright bilan o'lchangan)

   Tuzilishi:
     1. Tema o'zgaruvchilari
     2. Reset / asos
     3. Intro Gate (VIDEO eshik)
     4. Intro xabar ("We're getting married." + yuraklar)
     5. Keyframes
     6. Umumiy: sheet, eyebrow, script-title, quote, orn, pill-btn
     7. Hero + Save the date
     8. Venue
     9. Gallery (polaroid)
    10. Program
    11. Dress code
    12. Accommodation
    13. Gift / Playlist
    14. Countdown / RSVP / Footer
    15. Reveal tizimi
    16. Ambient canvas + Musiqa FAB
    17. Desktop / Reduced motion
   ============================================================= */

/* ── 1. Tema ─────────────────────────────────────────────────── */
:root {
  --plum:  #2e1520;                     /* asosiy matn/sarlavha */
  --rose:  #d4a8b8;                     /* akcent: tugma, hoshiya, eyebrow */
  --mauve: #b07a8e;                     /* to'q tugma, countdown raqamlar */
  --page:  #faedf0;                     /* sahifa foni (kartalar orasi) */
  --panel: #fff5f7;                     /* RSVP ichki panel */

  /* Great Vibes faqat lotin — kirill harflar Marck Script'ga tushadi */
  --gv:   "Great Vibes", "Marck Script", cursive;
  --corm: "Cormorant Garamond", Georgia, serif;
  --int:  Inter, system-ui, sans-serif;

  --gate-fade: 1.2s;
}

/* ── 2. Reset / asos ─────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--int);
  color: var(--plum);
  background: var(--page);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

body.gate-locked { overflow: hidden; height: 100vh; }

/* ── 3. Intro Gate (VIDEO eshik) ────────────────────────────── */
#gate {
  position: fixed; inset: 0; z-index: 9999;
  overflow: hidden; cursor: pointer;
  background: #f4e3ea;
  transition: opacity var(--gate-fade) ease;
}
.gate-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  z-index: 1;
}
.gate-video-bg {
  position: absolute; left: -5%; top: -5%;
  width: 110%; height: 110%;
  object-fit: cover; object-position: center;
  filter: blur(34px) brightness(.9);
  display: none;
}
@media (min-aspect-ratio: 1/1) {
  .gate-video    { object-fit: contain; }
  .gate-video-bg { display: block; }
}
#gate.open { opacity: 0; pointer-events: none; }

/* ── 4. Intro xabar ─────────────────────────────────────────── */
#intro-msg {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(90% 70% at 50% 46%, #ffffff 0%, #f7efee 55%, #f1e7e5 100%);
  transition: opacity .9s ease;
}
#intro-msg.out { opacity: 0; pointer-events: none; }
#intro-msg[hidden] { display: none; }

.im-text {
  font-family: var(--corm);
  font-size: clamp(1.7rem, 7.4vw, 2.4rem);
  color: #262220;
  letter-spacing: .01em;
  padding: 0 20px; text-align: center;
}
.im-text em { font-style: italic; }
.im-caret {
  display: inline-block;
  width: 1px; height: 1.05em;
  background: #262220;
  margin-left: 2px; vertical-align: -0.12em;
  animation: caretBlink 1s steps(1) infinite;
}
.im-hearts { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.im-hearts span {
  position: absolute;
  font-size: var(--hs, 16px);
  color: var(--hc, #e8b4c8);
  opacity: 0;
  animation: imFloat var(--hd, 5s) ease-in-out var(--hdel, 0s) infinite;
}

/* ── 5. Keyframes ───────────────────────────────────────────── */
@keyframes caretBlink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
@keyframes imFloat {
  0%   { opacity: 0; transform: translateY(14px) scale(.85) rotate(-6deg); }
  25%  { opacity: .85; }
  55%  { opacity: .5; }
  100% { opacity: 0; transform: translateY(-46px) scale(1.05) rotate(8deg); }
}
@keyframes heroBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
@keyframes photoReveal { 0% { opacity: 0; transform: scale(.93); } 100% { opacity: 1; transform: scale(1); } }
@keyframes venueTimeBadgePop { 0% { opacity: 0; transform: scale(.7); } 100% { opacity: 1; transform: scale(1); } }
@keyframes musicFadeIn { 0% { opacity: 0; transform: translate3d(0,16px,0) scale(.8); } 100% { opacity: 1; transform: translate3d(0,0,0) scale(1); } }
@keyframes musicTooltipBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes musicPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }

/* ── 6. Umumiy elementlar ───────────────────────────────────── */
#content { display: none; }
#content.enter { display: block; animation: photoReveal 1.4s ease-out both; }

/* Har bo'lim "varag'i" (vowli-section) */
.sheet {
  margin: 0 14px 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .45);
  box-shadow: 0 16px 40px rgba(180, 110, 100, .12);
}
.sec {
  padding: 56px 24px;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.script-title {
  font-family: var(--gv);
  font-weight: 400;
  font-size: clamp(1.8rem, 7.4vw, 2.4rem);
  letter-spacing: .02em;
  color: var(--plum);
  line-height: 1.5;
}

.eyebrow {
  font-family: var(--int);
  font-size: .85rem;
  letter-spacing: .3em; text-indent: .3em;
  text-transform: uppercase;
  color: var(--rose);
  margin: 6px 0 28px;
}

.quote {
  font-family: var(--corm);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--plum);
  max-width: 440px;
  margin: 0 auto;
}
.quote-lg { font-size: 1.35rem; line-height: 1.8; }

/* Bezak chiziq: --- ♡ --- */
.orn {
  display: flex; align-items: center; justify-content: center;
  gap: 12px;
  color: var(--rose);
  margin: 14px 0;
}
.orn i { width: 44px; height: 1px; background: rgba(212, 168, 184, .65); }
.orn-heart   { font-size: .9rem; }
.orn-diamond { font-size: .5rem; }
.orn-sm i    { width: 30px; }

/* Pushti pill tugma */
.pill-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  background: var(--rose); color: #fff;
  font-family: var(--int); font-size: .85rem; font-weight: 500;
  padding: 12px 24px;
  border: none; border-radius: 32px;
  text-decoration: none;
  transition: filter .25s ease, transform .25s ease;
}
.pill-btn:hover { filter: brightness(.96); transform: translateY(-1px); }
.pill-btn.sm   { padding: 8px 20px; font-size: .8rem; }
.pill-btn.wide { width: 100%; padding: 13px 24px; font-weight: 600; }

/* Foto placeholder (rasm yuklansa JS fon qilib qo'yadi) */
.ph {
  background: linear-gradient(135deg, #f9e0ea 0%, #f3cddc 50%, #f7d8e3 100%);
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
}
.ph span {
  font-family: var(--int); font-size: .62rem;
  letter-spacing: .3em; text-indent: .3em;
  text-transform: uppercase;
  color: rgba(46, 21, 32, .35);
}
.ph.has-img span { display: none; }

/* ── 7. Yuqori zona: Hero + Save the date ───────────────────── */
.top-zone {
  background: linear-gradient(180deg, #f6d9e4 0%, #f9e3eb 46%, #fbecf1 74%, var(--page) 100%);
  margin-bottom: 18px;
}

.hero {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;                 /* bulutlar hero ichida qoladi */
  padding: 24px;
}

/* Hero matni bulutlar ustida */
.hero-content { position: relative; z-index: 2; }

/* ── Bulutlar (blush rasm; scroll'da chetga suziladi) ── */
/* Konteyner (.cloud) = JS scroll-parallaks; ichki img = ohista "nafas" */
.cloud {
  position: absolute; z-index: 1;
  pointer-events: none;
  will-change: transform;
}
.cloud img {
  display: block; width: 100%; height: auto;
  animation: cloudBreath 15s ease-in-out infinite alternate;
}
.cloud-1 { top: -4%; left: -10%; width: clamp(430px, 104vw, 1160px); opacity: .92; }
.cloud-2 { top: 22%; right: -9%; width: clamp(220px, 58vw, 560px);  opacity: .85; }
.cloud-3 { top: 56%; left: -9%;  width: clamp(340px, 82vw, 860px);  opacity: .9; }
.cloud-2 img { animation-duration: 12s; }
.cloud-3 img { animation-duration: 18s; }

@keyframes cloudBreath { from { transform: translateX(0); } to { transform: translateX(14px); } }
.hero-eyebrow {
  font-family: var(--corm);
  font-size: 1.12rem;
  font-weight: 500;
  font-style: italic;
  letter-spacing: .01em; text-indent: 0;
  text-transform: none;
  line-height: 1.6;
  color: var(--plum);
  max-width: 350px;
  margin: 0 auto 16px;
}
.names {
  font-family: var(--gv);
  font-weight: 400;
  font-size: clamp(3rem, 12vw, 4.8rem);
  color: var(--plum);
  line-height: 1.05;
  margin: 8px 0;
}
.hero-sub {
  font-family: var(--corm);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--plum);
  margin-top: 2px;
}
.scroll-hint {
  position: absolute; bottom: 26px; left: 0; right: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: .65rem;
  letter-spacing: .3em; text-indent: .3em;
  text-transform: uppercase;
  color: var(--plum);
  animation: heroBounce 2s ease-in-out infinite;
}
.scroll-hint svg { opacity: .55; }

.savedate { text-align: center; padding: 40px 24px 84px; }
.savedate .script-title { letter-spacing: .08em; }

/* Sana — alohida, o'qiladigan: raqam + osti yorlig'i, ajratgich bilan */
.date-grid {
  display: flex; align-items: flex-start; justify-content: center;
  gap: clamp(8px, 3.5vw, 20px);
  margin-top: 12px;
}
.dg-col { display: flex; flex-direction: column; align-items: center; }
.dg-num {
  font-family: var(--gv);
  font-size: clamp(3rem, 15vw, 4.6rem);
  line-height: 1;
  color: var(--plum);
}
.dg-lbl {
  margin-top: 8px;
  font-family: var(--int);
  font-size: .5rem;
  letter-spacing: .34em; text-indent: .34em;
  text-transform: uppercase;
  color: rgba(46, 21, 32, .4);
}
.dg-sep {
  font-family: var(--gv);
  font-size: clamp(2.2rem, 10vw, 3.2rem);
  line-height: 1.3;
  color: var(--rose);
}
.date-rule {
  width: 64px; height: 1px;
  background: rgba(46, 21, 32, .18);
  margin: 22px auto 26px;
}

/* ── 8. Venue ───────────────────────────────────────────────── */
.venue-card {
  background: #fff;
  border: 1px solid rgba(212, 168, 184, .45);
  border-radius: 18px;
  padding: 12px 12px 30px;
  box-shadow: 0 14px 34px rgba(180, 110, 100, .1);
}
.venue-photo { height: 190px; border-radius: 12px; }
.venue-body  { padding: 18px 12px 0; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--rose); color: #fff;
  font-size: .72rem; font-weight: 600;
  letter-spacing: .06em;
  padding: 5px 13px;
  border-radius: 32px;
}
.reveal.in .badge { animation: venueTimeBadgePop .5s cubic-bezier(.22,1,.36,1) .35s both; }

.venue-name {
  font-family: var(--int);
  font-size: 1rem; font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--plum);
  margin: 14px 0 4px;
}
.venue-addr {
  font-size: .85rem;
  color: rgba(46, 21, 32, .65);
  margin-bottom: 18px;
}

/* ── 10. Program ────────────────────────────────────────────── */
.prog-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px;
  text-align: center;
}
.prog-cell {
  background: rgba(255, 255, 255, .65);
  border: 1px solid var(--rose);
  border-radius: 16px;
  padding: 20px 16px;
}
.prog-cell .pt {
  font-family: var(--int);
  font-size: 1.5rem; font-weight: 700;
  letter-spacing: .05em;
  color: var(--rose);
}
.prog-cell .pl {
  font-family: var(--corm);
  font-size: 1rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--plum);
  line-height: 1.5;
  margin-top: 10px;
}

/* ── 14. Countdown / RSVP / Footer ──────────────────────────── */
.count {
  display: flex; align-items: center; justify-content: center;
  gap: 14px;
  margin-top: 26px;
}
.c-num {
  font-family: var(--gv);
  font-size: clamp(2.6rem, 11vw, 3.2rem);
  letter-spacing: -.02em;
  line-height: 1;
  color: var(--mauve);
}
.c-lbl {
  margin-top: 8px;
  font-size: .55rem;
  letter-spacing: .22em; text-indent: .22em;
  text-transform: uppercase;
  color: rgba(46, 21, 32, .5);
}
.c-div { width: 1px; height: 42px; background: rgba(46, 21, 32, .12); }

.attending {
  font-size: .85rem;
  letter-spacing: .3em; text-indent: .3em;
  text-transform: uppercase;
  color: #1a1a1a;
  margin: 4px 0 10px;
}
.respond-by {
  font-size: .85rem;
  color: rgba(46, 21, 32, .6);
  margin-bottom: 26px;
}
.respond-by b { font-weight: 600; color: rgba(46, 21, 32, .85); }

/* Kalendar tugmasi (countdown ostida) */
.cal-btn { margin-top: 32px; }

.rsvp-panel {
  background: var(--panel);
  border-radius: 18px;
  padding: 34px 22px;
}

/* RSVP forma */
.rsvp-input {
  width: 100%;
  border: 1px solid #eed7de;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: .9rem;
  color: var(--plum);
  background: #fff;
  outline: none;
  text-align: center;
  transition: border-color .25s;
}
.rsvp-input::placeholder { color: rgba(46, 21, 32, .35); }
.rsvp-input:focus { border-color: var(--rose); }

.rsvp-opts {
  display: flex; flex-direction: column;
  gap: 10px;
  margin: 14px 0 22px;
}
.rsvp-opt {
  display: flex; align-items: center; gap: 11px;
  text-align: left;
  background: #fff;
  border: 1.5px solid rgba(212, 168, 184, .6);
  border-radius: 14px;
  padding: 13px 16px;
  font-size: .9rem;
  color: var(--plum);
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.rsvp-opt::before {
  content: ""; flex: 0 0 auto;
  width: 19px; height: 19px; border-radius: 50%;
  border: 2px solid var(--rose); box-sizing: border-box;
  transition: .2s;
}
.rsvp-opt:hover { border-color: var(--rose); background: #fdf1f5; }
.rsvp-opt.sel {
  background: var(--rose);
  border-color: var(--rose);
  color: #fff; font-weight: 600;
  box-shadow: 0 8px 20px rgba(201, 138, 146, .28);
}
.rsvp-opt.sel::before {
  border-color: #fff;
  background: radial-gradient(circle, #fff 45%, transparent 47%);
}
.rsvp-btn { border: none; cursor: pointer; font-family: inherit; }
.rsvp-preview {
  font-family: var(--gv);
  font-size: 1.1rem;
  color: var(--rose);
}
.rsvp-desc {
  font-size: .85rem;
  color: rgba(46, 21, 32, .65);
  max-width: 300px;
  margin: 10px auto 22px;
}
.rsvp-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--mauve); color: #fff;
  font-size: .82rem; font-weight: 600;
  padding: 12px 28px;
  border-radius: 10px;
  text-decoration: none;
  transition: filter .25s;
}
.rsvp-btn:hover { filter: brightness(1.06); }
.rsvp-btn .arr { transition: transform .25s; }
.rsvp-btn:hover .arr { transform: translateX(3px); }

.footer {
  text-align: center;
  padding: 48px 18px 0;
}
.footer-names {
  font-family: var(--gv);
  font-size: 1.5rem;
  color: var(--plum);
}
.made-with {
  margin-top: 4px;
  font-size: .75rem;
  color: rgba(46, 21, 32, .55);
}
/* Yakuniy favvora illustratsiyasi (shaffof, sahifa foniga qo'shiladi) */
.footer-fountain {
  display: block;
  width: 100%;
  max-width: 660px;
  height: auto;
  margin: 22px auto 0;
}

/* ── 15. Reveal tizimi ──────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity .9s cubic-bezier(.22,1,.36,1),
              transform .9s cubic-bezier(.22,1,.36,1);
}
.reveal.in { opacity: 1; transform: none; }

/* Ichki elementlar ketma-ket chiqadi (JS delay beradi) */
[data-st] {
  opacity: 0; transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in [data-st] { opacity: 1; transform: none; }

/* ── 16. Ambient canvas + Musiqa ────────────────────────────── */
#ambient {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 40;
}

/* Til almashtirgich — intro paytida yashirin, ichkariga kirgach chiqadi */
.lang-switch {
  position: fixed; top: 14px; right: 14px; z-index: 10000;
  display: flex; align-items: center; gap: 1px;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(46, 21, 32, .1);
  border-radius: 30px;
  padding: 4px 5px;
  box-shadow: 0 4px 16px rgba(46, 21, 32, .12);
  opacity: 0; pointer-events: none;
  transform: translateY(-8px);
  transition: opacity .5s ease, transform .5s ease;
}
.lang-switch.show { opacity: 1; pointer-events: auto; transform: none; }
.lang-btn {
  border: none; background: none; cursor: pointer;
  font-family: var(--int); font-size: .72rem; font-weight: 600;
  letter-spacing: .04em;
  color: rgba(46, 21, 32, .5);
  padding: 4px 10px; border-radius: 20px;
  transition: background .2s, color .2s;
}
.lang-btn.active { background: var(--rose); color: #fff; }
.lang-sep { color: rgba(46, 21, 32, .25); font-size: .7rem; }

.music-tip {
  position: fixed; right: 4.6rem; bottom: 1.75rem;
  z-index: 9100;               /* intro xabar ustida ham ko'rinadi */
  background: #2b2b2b; color: #fff;
  padding: .45rem .9rem;
  border-radius: 20px;
  font-size: .75rem;
  animation: musicTooltipBounce 2s ease-in-out infinite;
}
.music-tip[hidden] { display: none; }

/* Musiqa pleyeri — rasm uslubida: play/pauza doira + eq chiziqlar + nota */
.music-player {
  position: fixed; right: 1.1rem; bottom: 1.1rem;
  z-index: 9100;
  display: flex; align-items: center; gap: 10px;
  padding: 5px 15px 5px 5px;
  border: 1px solid rgba(212, 168, 184, .4);
  border-radius: 40px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 26px rgba(201, 138, 146, .28);
  cursor: pointer;
  animation: musicFadeIn .6s ease;
}
.music-player[hidden] { display: none; }

.mp-toggle {
  flex: 0 0 auto;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--mauve); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 3px 10px rgba(176, 122, 142, .4);
}
.ic-play  { margin-left: 2px; }             /* uchburchakni optik markazlash */
.ic-pause { display: none; }
.music-player.playing .ic-play  { display: none; }
.music-player.playing .ic-pause { display: block; }

.mp-eq { display: flex; align-items: flex-end; gap: 2.5px; height: 15px; }
.mp-eq i {
  width: 2.5px; height: 35%;
  background: var(--rose); border-radius: 2px;
}
.music-player.playing .mp-eq i { animation: eqBar .9s ease-in-out infinite; }
.mp-eq i:nth-child(2) { animation-delay: .12s; }
.mp-eq i:nth-child(3) { animation-delay: .24s; }
.mp-eq i:nth-child(4) { animation-delay: .36s; }
.mp-eq i:nth-child(5) { animation-delay: .48s; }
@keyframes eqBar { 0%, 100% { height: 28%; } 50% { height: 100%; } }

.mp-note { color: var(--mauve); opacity: .8; display: grid; place-items: center; }

/* ── 17. Desktop / Reduced motion ───────────────────────────── */
@media (min-width: 640px) {
  .sheet { max-width: 600px; margin-left: auto; margin-right: auto; }
  .sec   { padding: 64px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal, [data-st] { opacity: 1; transform: none; }
}
