/* ============ OPENING · THE CURTAIN ============ */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #1a030a;
  transition: opacity 0.9s ease 1.6s, visibility 0s linear 2.5s;
}

/* velvet: vertical folds + light from above */
.curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.55)),
    repeating-linear-gradient(90deg,
      #4d0a26 0, #6d1238 1.6%, #8e1f4f 3.2%, #a02c5e 4.2%, #861a48 5.6%, #5d0e2f 7.4%, #4d0a26 8.5%);
  transition: transform 2.2s cubic-bezier(0.7, 0, 0.25, 1);
  will-change: transform;
}

.curtain.left { left: 0; transform-origin: left center; box-shadow: inset -30px 0 40px rgba(0, 0, 0, 0.35); }
.curtain.right { right: 0; transform-origin: right center; box-shadow: inset 30px 0 40px rgba(0, 0, 0, 0.35); }

/* the gold seam where the curtains meet */
.rod {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 14px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #6e4a14, #f3d58a 35%, #fff2c4 50%, #d6a84a 65%, #6e4a14);
  box-shadow: 0 0 18px rgba(243, 213, 138, 0.35);
  transition: opacity 0.5s;
}

.intro-card {
  position: relative;
  width: min(440px, 88vw);
  padding: 2.4rem 1.8rem 2.2rem;
  border: 1px solid rgba(214, 176, 92, 0.7);
  border-radius: 22px;
  background: radial-gradient(ellipse at 50% 35%, #4d0d20 0%, #2c0712 70%, #22040d 100%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 6px rgba(42, 6, 16, 0.5), inset 0 0 60px rgba(0, 0, 0, 0.4);
  text-align: center;
  color: #f6e3b4;
  transition: transform 1s cubic-bezier(0.6, 0, 0.3, 1), opacity 0.8s;
  animation: card-in 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

.cnr {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 0 solid #d6b05c;
}
.cnr.tl { top: 12px; left: 12px; border-top-width: 2px; border-left-width: 2px; }
.cnr.tr { top: 12px; right: 12px; border-top-width: 2px; border-right-width: 2px; }
.cnr.bl { bottom: 12px; left: 12px; border-bottom-width: 2px; border-left-width: 2px; }
.cnr.br { bottom: 12px; right: 12px; border-bottom-width: 2px; border-right-width: 2px; }

.intro-card .mantra { font-size: 0.95rem; }

.intro-kicker {
  margin-top: 0.9rem;
  color: rgba(246, 227, 180, 0.7);
  font-size: 0.72rem;
}

/* staggered names: "Nancy  weds" on the first row, "Prashant" offset below */
.intro-names {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  align-items: center;
  column-gap: 0.7rem;
  row-gap: 0.15em;
  margin: 1.1rem 0 0.2rem;
  font-family: var(--script);
  font-weight: 400;
  line-height: 1.2;
  color: #f6dfa5;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}
.intro-names span { font-size: clamp(3.2rem, 14vw, 4.6rem); }
.intro-names .n1 { grid-column: 1; }
.intro-names .n2 { grid-column: 1 / span 2; margin-left: 1.2em; }
.intro-names small {
  grid-column: 2;
  font-family: var(--caps);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #c9a24d;
}

.intro-orn { display: block; width: 160px; height: 14px; margin: 1rem auto 0.6rem; color: #c9a24d; }

.intro-date {
  font-family: var(--caps);
  font-size: 1.15rem;
  color: #fbf1dc;
}

.open-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding: 0.8rem 2rem;
  border: 1px solid #c9a24d;
  border-radius: 999px;
  background: linear-gradient(180deg, #6a3d22, #4a2414);
  color: #fbecc6;
  font-family: var(--caps);
  font-size: 0.9rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(214, 176, 92, 0.25);
  animation: glow 2.4s ease-in-out infinite;
}
.open-btn svg { width: 18px; height: 18px; }
.open-btn:hover { background: linear-gradient(180deg, #7d4a29, #5a2c18); }

.intro-foot {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: opacity 0.5s;
}

.lang-pick {
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(214, 176, 92, 0.6);
  border-radius: 999px;
  background: rgba(26, 3, 10, 0.55);
}
.lang-pick button {
  padding: 0.35rem 0.95rem;
  border: 0;
  background: none;
  color: rgba(251, 236, 198, 0.75);
  font-family: var(--serif);
  font-size: 0.95rem;
  cursor: pointer;
}
.lang-pick button.active { background: #e9c97a; color: #3a0815; }

.intro-sound {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.95rem;
  border: 1px solid rgba(214, 176, 92, 0.45);
  border-radius: 999px;
  background: rgba(26, 3, 10, 0.55);
  color: rgba(251, 236, 198, 0.85);
  font-family: var(--serif);
  font-size: 0.95rem;
  cursor: pointer;
}

/* opening sequence */
.intro.open .intro-card { transform: scale(1.12); opacity: 0; }
.intro.open .intro-foot,
.intro.open .rod { opacity: 0; pointer-events: none; }
.intro.open .curtain.left { transform: scaleX(0.08); transition-delay: 0.35s; }
.intro.open .curtain.right { transform: scaleX(0.08); transition-delay: 0.35s; }
.intro.open { opacity: 0; visibility: hidden; background: transparent; }
.intro.done { display: none; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 14px rgba(214, 176, 92, 0.2); }
  50% { box-shadow: 0 0 34px rgba(214, 176, 92, 0.5); }
}

/* Hindi on the opening card */
html[lang="hi"] .intro-names { line-height: 1.4; row-gap: 0; margin-top: 0.7rem; }
html[lang="hi"] .intro-names span { font-size: clamp(2.6rem, 11vw, 3.6rem); }
html[lang="hi"] .intro-names .n2 { margin-left: 1em; }
html[lang="hi"] .intro-names small { font-family: var(--serif); font-size: 1rem; letter-spacing: 0; }
html[lang="hi"] .intro-kicker { font-size: 1rem; }
html[lang="hi"] .intro-date { font-family: var(--serif); font-size: 1.25rem; }
html[lang="hi"] .open-btn { font-family: var(--serif); font-size: 1.1rem; letter-spacing: 0; }

@media (max-height: 640px) {
  .intro-card { padding: 1.6rem 1.4rem 1.5rem; }
  .intro-names span { font-size: clamp(2.6rem, 10vh, 3.8rem); }
  .open-btn { margin-top: 1rem; }
}
