/* athamjonovs.lovestory.uz — Premium Wedding Invitation */

:root {
  --ivory: #faf7f2;
  --cream: #f5f0e8;
  --beige: #e8dfd0;
  --gold: #c9a962;
  --gold-dark: #a88b4a;
  --gold-light: #e8d5a3;
  --charcoal: #2c2824;
  --text-muted: #6b635a;
  --glass: rgba(255, 255, 255, 0.45);
  --glass-border: rgba(255, 255, 255, 0.65);
  --shadow-soft: 0 8px 32px rgba(44, 40, 36, 0.08);
  --shadow-gold: 0 12px 40px rgba(201, 169, 98, 0.25);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Montserrat", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--charcoal);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--cream);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-dark);
}

/* Loading screen */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ivory) 0%, var(--cream) 50%, var(--beige) 100%);
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-heart {
  width: 48px;
  height: 48px;
  animation: heartbeat 1.2s ease-in-out infinite;
}
.loader-heart svg {
  width: 100%;
  height: 100%;
  fill: var(--gold);
  filter: drop-shadow(0 4px 12px rgba(201, 169, 98, 0.4));
}
.loader-text {
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.2em;
  color: var(--gold-dark);
  text-transform: uppercase;
}
.loader-bar {
  width: 120px;
  height: 2px;
  margin-top: 1rem;
  background: var(--beige);
  border-radius: 2px;
  overflow: hidden;
}
.loader-bar::after {
  content: "";
  display: block;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  animation: loaderSlide 1.2s ease-in-out infinite;
}

@keyframes loaderSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.15); }
  30% { transform: scale(1); }
  45% { transform: scale(1.1); }
}

/* Typography */
.font-display {
  font-family: var(--font-display);
}
.text-gold {
  color: var(--gold-dark);
}
.gold-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 1rem auto;
}

/* Glass card */
.glass-card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  box-shadow: var(--shadow-soft);
}

/* Section spacing */
.section-padding {
  padding: 5rem 1.25rem;
}
@media (min-width: 768px) {
  .section-padding {
    padding: 6rem 2rem;
  }
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--charcoal);
}
.section-subtitle {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.5rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  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.05);
  animation: heroKenBurns 20s ease-in-out infinite alternate;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(44, 40, 36, 0.55) 0%,
    rgba(44, 40, 36, 0.35) 40%,
    rgba(44, 40, 36, 0.65) 100%
  );
}
@keyframes heroKenBurns {
  from { transform: scale(1.05); }
  to { transform: scale(1.12); }
}

/* Hero portraits */
.hero-portraits {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
}
@media (min-width: 768px) {
  .hero-portraits {
    grid-template-columns: 1fr 1.4fr 1fr;
    align-items: center;
    gap: 1.25rem;
  }
}
.portrait-frame {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 1s ease forwards;
}
.portrait-frame:nth-child(1) { animation-delay: 0.3s; }
.portrait-frame:nth-child(2) { animation-delay: 0.15s; }
.portrait-frame:nth-child(3) { animation-delay: 0.45s; }

.portrait-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  padding: 2px;
  background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(201,169,98,0.6));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}
.portrait-glass {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.5rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-gold), 0 0 60px rgba(201, 169, 98, 0.15);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.6s ease;
}
.portrait-frame:hover .portrait-glass {
  transform: scale(1.03);
  box-shadow: 0 20px 50px rgba(201, 169, 98, 0.35), 0 0 80px rgba(255, 255, 255, 0.2);
}
.portrait-frame img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.75rem;
  aspect-ratio: 3/4;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.portrait-frame:hover img {
  transform: scale(1.05);
}
.portrait-main .portrait-glass {
  padding: 0.65rem;
}
@media (min-width: 768px) {
  .portrait-main img {
    aspect-ratio: 4/5;
    min-height: 380px;
  }
}
@media (max-width: 767px) {
  .hero-portraits {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "main main"
      "groom bride";
  }
  .portrait-main { grid-area: main; }
  .portrait-groom { grid-area: groom; }
  .portrait-bride { grid-area: bride; }
  .portrait-side img {
    aspect-ratio: 1;
    max-height: 180px;
  }
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: #fff;
  padding: 2rem 1rem 4rem;
  width: 100%;
}
.hero-names {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 400;
  line-height: 1.15;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  opacity: 0;
  animation: fadeUp 1s ease 0.6s forwards;
}
.hero-heart-icon {
  display: inline-block;
  color: var(--gold-light);
  animation: pulseHeart 2s ease-in-out infinite;
}
@keyframes pulseHeart {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.85; }
}
.hero-invite {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  letter-spacing: 0.15em;
  font-weight: 300;
  margin-top: 0.75rem;
  opacity: 0;
  animation: fadeUp 1s ease 0.8s forwards;
}
.hero-meta {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-top: 1rem;
  opacity: 0;
  animation: fadeUp 1s ease 1s forwards;
}
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  animation: bounce 2s ease infinite;
}
.scroll-indicator span {
  display: block;
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  position: relative;
}
.scroll-indicator span::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  background: var(--gold-light);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollDot 2s ease infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}
@keyframes scrollDot {
  0% { opacity: 1; top: 8px; }
  100% { opacity: 0; top: 20px; }
}

/* Floating hearts */
.hearts-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}
.heart-particle {
  position: absolute;
  bottom: -20px;
  font-size: 1rem;
  color: var(--gold);
  opacity: 0;
  animation: floatHeart linear forwards;
}
@keyframes floatHeart {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg) scale(0.5);
  }
  10% { opacity: 0.6; }
  90% { opacity: 0.3; }
  100% {
    opacity: 0;
    transform: translateY(-100vh) rotate(360deg) scale(1);
  }
}

/* Info cards */
.info-card {
  text-align: center;
  padding: 2rem 1.5rem;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
}
.info-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 4px 16px rgba(201, 169, 98, 0.35);
}

/* Countdown */
.countdown-box {
  min-width: 72px;
  padding: 1.25rem 1rem;
  text-align: center;
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease;
}
.countdown-box:hover {
  transform: scale(1.05);
}
.countdown-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 600;
  color: var(--gold-dark);
  line-height: 1;
  display: block;
}
.countdown-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.35rem;
}
.countdown-box.tick {
  animation: tickPulse 0.4s ease;
}
@keyframes tickPulse {
  50% { transform: scale(1.08); }
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding-left: 2rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), var(--beige));
}
.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}
.timeline-item::before {
  content: "♥";
  position: absolute;
  left: -2rem;
  top: 0;
  width: 16px;
  height: 16px;
  font-size: 10px;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulseHeart 2s ease infinite;
}
.timeline-year {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold-dark);
  margin-bottom: 0.25rem;
}
.timeline-text {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  aspect-ratio: 1;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(44, 40, 36, 0.4));
  opacity: 0;
  transition: opacity 0.4s ease;
}
.gallery-item:hover img {
  transform: scale(1.08);
}
.gallery-item:hover::after {
  opacity: 1;
}
.gallery-item .zoom-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  color: #fff;
  font-size: 1.5rem;
  transition: all 0.4s ease;
  z-index: 2;
}
.gallery-item:hover .zoom-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(44, 40, 36, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.lightbox.active {
  opacity: 1;
  visibility: visible;
}
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 0.5rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.3s ease;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Schedule */
.schedule-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}
.schedule-time {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--gold-dark);
  min-width: 4.5rem;
}
.schedule-content h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}
.schedule-content p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* RSVP Form */
.form-input {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: 1px solid var(--beige);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.7);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.2);
}
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff;
  border: none;
  border-radius: 9999px;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgba(201, 169, 98, 0.4);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(201, 169, 98, 0.5);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--gold);
  color: var(--gold-dark);
  border-radius: 9999px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.3s ease;
}
.btn-outline:hover {
  background: var(--gold);
  color: #fff;
}

/* Music toggle */
.music-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 800;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(201, 169, 98, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.music-toggle:hover {
  transform: scale(1.08);
}
.music-toggle.playing {
  animation: musicPulse 2s ease infinite;
}
@keyframes musicPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(201, 169, 98, 0.45); }
  50% { box-shadow: 0 8px 32px rgba(201, 169, 98, 0.7), 0 0 0 8px rgba(201, 169, 98, 0.15); }
}

/* Telegram share */
.share-telegram {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 800;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #229ed9;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 8px 24px rgba(34, 158, 217, 0.4);
  transition: transform 0.3s ease;
}
.share-telegram:hover {
  transform: scale(1.08);
}

/* Footer */
.footer-heart {
  display: inline-block;
  animation: pulseHeart 2s ease infinite;
  color: var(--gold);
}

/* Location */
.location-event {
  margin-top: 1.25rem;
  margin-bottom: 2rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  line-height: 1.65;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Map */
.map-wrapper {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--glass-border);
  padding-bottom: 0.5rem;
}
.map-container {
  position: relative;
  overflow: hidden;
}
.map-container iframe {
  display: block;
  width: 100%;
  height: 350px;
  border: 0;
}
@media (min-width: 768px) {
  .map-container iframe {
    height: 420px;
  }
}
/* Qulflangan: sahifa scroll xaritani surmaydi */
.map-container.is-locked iframe {
  pointer-events: none;
}
.map-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
  cursor: pointer;
  background: linear-gradient(
    180deg,
    rgba(250, 247, 242, 0.15) 0%,
    rgba(250, 247, 242, 0.55) 100%
  );
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.map-overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1.25rem 1.75rem;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-soft);
  color: var(--charcoal);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}
.map-overlay-inner i {
  font-size: 1.5rem;
  color: var(--gold-dark);
  margin-bottom: 0.25rem;
}
.map-overlay-inner small {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.map-container:not(.is-locked) .map-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.map-lock-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: calc(100% - 2rem);
  margin: 0.75rem auto 0;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-dark);
  background: transparent;
  border: 1px solid var(--beige);
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}
.map-lock-btn:hover {
  background: var(--cream);
  color: var(--charcoal);
}
.map-lock-btn.hidden {
  display: none;
}

/* RSVP success */
.rsvp-success {
  display: none;
  text-align: center;
  padding: 2rem;
}
.rsvp-success.show {
  display: block;
}

/* Nav */
.nav-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
.nav-fixed.scrolled {
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(44, 40, 36, 0.06);
}
.nav-fixed.scrolled .nav-link {
  color: var(--charcoal);
}
.nav-link {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.3s ease;
}
.nav-link:hover {
  color: var(--gold-light);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
