:root {
  --white: #FFFFFF;
  --ivory: #FBFAF6;
  --olive: #5C6B4A;
  --olive-light: #6E7B55;
  --gold: #C2A878;
  --charcoal: #3A3A35;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--ivory);
  color: var(--charcoal);
  font-family: 'Tajawal', sans-serif;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* GRAND HALL AMBIENT BACKGROUND */
.hall-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.arch-glow {
  position: absolute;
  top: -8%;
  left: 50%;
  width: 80%;
  max-width: 520px;
  height: 46%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.9) 0%, rgba(255,250,235,0.4) 40%, transparent 75%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  filter: blur(10px);
  opacity: 0.9;
}

.curtain {
  position: absolute;
  top: -5%;
  width: 24%;
  max-width: 200px;
  height: 110%;
  background:
    repeating-linear-gradient(100deg,
      rgba(255,255,255,0.55) 0px, rgba(255,255,255,0.55) 18px,
      rgba(230,226,210,0.35) 18px, rgba(230,226,210,0.35) 36px),
    linear-gradient(180deg, rgba(255,255,255,0.85) 0%, rgba(251,250,246,0.55) 60%, transparent 100%);
  filter: blur(1px);
  opacity: 0.7;
  transform-origin: top center;
}

.curtain-left {
  left: -4%;
  animation: curtain-sway-left 14s ease-in-out infinite;
}

.curtain-right {
  right: -4%;
  transform: scaleX(-1);
  animation: curtain-sway-right 16s ease-in-out infinite;
}

@keyframes curtain-sway-left {
  0%, 100% { transform: rotate(-1.2deg) translateX(0); }
  50% { transform: rotate(1deg) translateX(4px); }
}

@keyframes curtain-sway-right {
  0%, 100% { transform: scaleX(-1) rotate(-1.2deg) translateX(0); }
  50% { transform: scaleX(-1) rotate(1deg) translateX(4px); }
}

.light-beam {
  position: absolute;
  top: 0;
  left: -20%;
  width: 50%;
  height: 100%;
  background: linear-gradient(100deg, transparent 30%, rgba(255,250,230,0.35) 48%, transparent 65%);
  animation: light-drift 18s ease-in-out infinite;
  opacity: 0.6;
}

@keyframes light-drift {
  0%, 100% { transform: translateX(0); opacity: 0.4; }
  50% { transform: translateX(120%); opacity: 0.75; }
}

.floral {
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9) 0%, transparent 45%),
    radial-gradient(circle at 70% 35%, rgba(255,255,255,0.8) 0%, transparent 42%),
    radial-gradient(circle at 50% 65%, rgba(255,255,255,0.85) 0%, transparent 48%),
    radial-gradient(circle at 65% 70%, rgba(194,168,120,0.12) 0%, transparent 55%);
  filter: blur(5px);
  opacity: 0.65;
}

.floral-bl {
  bottom: -10%;
  left: -10%;
}

.floral-br {
  bottom: -12%;
  right: -10%;
}

@media (max-width: 420px) {
  .curtain { width: 30%; }
  .floral { width: 110px; height: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  .curtain-left,
  .curtain-right,
  .light-beam {
    animation: none;
  }
}

/* MAIN CARD */
.card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.7rem 1.1rem 0.9rem;
  position: relative;
  z-index: 1;
}

.card-frame {
  width: 100%;
  max-width: 480px;
  padding: 0.8rem 1.6rem 1rem;
  position: relative;
}

.bismillah {
  font-family: 'Aref Ruqaa', serif;
  font-size: clamp(1rem, 3.6vw, 1.25rem);
  color: var(--olive);
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.verse {
  font-family: 'Amiri', serif;
  font-size: clamp(0.76rem, 2.1vw, 0.88rem);
  line-height: 1.65;
  color: var(--charcoal);
  max-width: 380px;
  margin: 0 auto 0.5rem;
}

.dua {
  font-family: 'Reem Kufi', 'Aref Ruqaa', serif;
  font-size: clamp(0.88rem, 3vw, 1.05rem);
  color: var(--olive);
  line-height: 1.5;
  margin-bottom: 0.35rem;
}

.warm-line {
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: clamp(0.76rem, 2vw, 0.88rem);
  line-height: 1.55;
  color: var(--charcoal);
  opacity: 0.9;
  margin-bottom: 0.4rem;
}

.parents {
  font-family: 'Aref Ruqaa', serif;
  font-size: clamp(0.92rem, 2.8vw, 1.08rem);
  color: var(--olive);
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 0.3rem;
}

.parents-amp {
  color: var(--charcoal);
  font-size: 0.85em;
  opacity: 0.7;
  margin: 0 0.3em;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem auto;
  width: 80px;
}

.divider span {
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: divider-breathe 3.6s ease-in-out infinite;
  transform-origin: center;
}

@keyframes divider-breathe {
  0%, 100% { transform: scaleX(0.85); box-shadow: 0 0 4px rgba(194,168,120,0.2); }
  50% { transform: scaleX(1); box-shadow: 0 0 12px rgba(194,168,120,0.5); }
}

.invite-line {
  font-family: 'Amiri', serif;
  font-size: clamp(0.8rem, 2.1vw, 0.92rem);
  line-height: 1.6;
  color: var(--charcoal);
  opacity: 0.9;
  margin-bottom: 0.35rem;
}

.names {
  position: relative;
  font-family: 'Aref Ruqaa', serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 9vw, 2.9rem);
  color: var(--olive);
  line-height: 1.45;
  text-shadow: 0 2px 16px rgba(92,107,74,0.22);
  margin-bottom: 0.3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2em;
  /* Still generous enough top/bottom breathing room so ascenders/
     descenders on either name are never clipped, just tightened from the
     original spacing to help everything fit on one screen. */
  padding: 0.2em 0 0.25em;
}

.name-ornament {
  color: var(--gold);
  font-size: 0.32em;
  line-height: 1;
  opacity: 0.9;
}

/* When GSAP drives the name entrance, let it own opacity/transform on the
   container instead of fighting the CSS reveal-rise animation — GSAP sets
   the per-word state itself, including the initial hidden frame. */
.gsap-enhanced .names.reveal-item {
  animation: none;
  opacity: 1;
  transform: none;
}

.name-part {
  display: inline-block;
}

.name-part .word {
  display: inline-block;
  will-change: transform, opacity, filter;
}


.will-line {
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: clamp(0.76rem, 2vw, 0.86rem);
  color: var(--charcoal);
  opacity: 0.85;
  margin-bottom: 0.25rem;
}

.guest-count {
  display: inline-block;
  margin: 0.6rem auto 0;
  padding: 0.35rem 1.05rem;
  border: 1px solid rgba(194,168,120,0.5);
  border-radius: 999px;
  background: var(--white);
  font-family: 'Aref Ruqaa', serif;
  font-size: clamp(0.74rem, 2.1vw, 0.86rem);
  color: var(--olive);
  letter-spacing: 0.3px;
  box-shadow: 0 6px 16px rgba(58,58,53,0.07);
}

.guest-count-num {
  color: var(--gold);
  font-weight: 700;
}

.kids-note {
  font-family: 'Amiri', serif;
  font-style: italic;
  font-size: clamp(0.68rem, 1.8vw, 0.78rem);
  line-height: 1.6;
  color: var(--charcoal);
  opacity: 0.7;
  max-width: 380px;
  /* Deliberately more top margin than the surrounding rhythm — this is
     the gap the note needs so it doesn't feel glued to the cards above. */
  margin: 1.7rem auto 0;
}

/* INFO CARDS */
.info-cards {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.45rem;
}

.info-card {
  flex: 1 1 0;
  min-width: 0;
  max-width: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  background: var(--white);
  border: 1px solid rgba(194,168,120,0.45);
  border-radius: 8px;
  padding: 0.6rem 0.45rem;
  min-height: 76px;
  box-shadow: 0 8px 20px rgba(58,58,53,0.08);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card-link {
  cursor: pointer;
}

.info-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(58,58,53,0.14);
}

.info-icon {
  font-size: clamp(0.9rem, 3.6vw, 1.15rem);
  line-height: 1;
}

.info-label {
  font-family: 'Aref Ruqaa', serif;
  font-size: clamp(0.66rem, 2.4vw, 0.8rem);
  color: var(--olive);
  font-weight: 700;
}

.info-value {
  font-size: clamp(0.56rem, 2vw, 0.7rem);
  color: var(--charcoal);
  text-align: center;
  line-height: 1.3;
}

@media (max-width: 380px) {
  .info-cards {
    gap: 0.35rem;
  }

  .info-card {
    padding: 0.5rem 0.3rem;
    min-height: 68px;
  }
}

/* FOOTER */
.footer {
  text-align: center;
  padding: 0.6rem 1rem 0.8rem;
  color: var(--olive);
  background: transparent;
  position: relative;
  z-index: 1;
}

.footer-ornament {
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.footer p {
  font-family: 'Amiri', serif;
  font-size: clamp(0.64rem, 1.8vw, 0.76rem);
  letter-spacing: 0.5px;
  opacity: 0.85;
  color: var(--charcoal);
}

.footer p.copyright {
  unicode-bidi: isolate;
  text-align: center;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

/* ENTRANCE ANIMATION */
.reveal-item {
  opacity: 0;
  transform: translateY(16px);
  animation: reveal-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.bismillah.reveal-item { animation-delay: 0.1s; }
.verse.reveal-item { animation-delay: 0.25s; }
.divider-1.reveal-item { animation-delay: 0.4s; }
.dua.reveal-item { animation-delay: 0.5s; }
.warm-line.reveal-item { animation-delay: 0.65s; }
.parents.reveal-item { animation-delay: 0.8s; }
.invite-line.reveal-item { animation-delay: 0.9s; }
.names.reveal-item { animation-delay: 1.05s; }
.will-line.reveal-item { animation-delay: 1.3s; }
.divider-2.reveal-item { animation-delay: 1.45s; }
.info-cards.reveal-item { animation-delay: 1.6s; }
.kids-note.reveal-item { animation-delay: 1.75s; }
.guest-count.reveal-item { animation-delay: 1.95s; }

@keyframes reveal-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-item {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .divider span {
    animation: none;
  }
}
