/* ============ SCENE 0 · THE HAVELI DOOR ============ */
.intro {
  --dw: min(70vw, 34vh, 380px);
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  background: #1c0409;
  transition: opacity 1.3s ease 1.5s, visibility 0s linear 2.8s;
}

.intro-wall {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12px 12px, rgba(217, 181, 106, 0.16) 2px, transparent 3px) 0 0 / 24px 24px,
    radial-gradient(circle at 0 0, rgba(217, 181, 106, 0.08) 9px, transparent 10px) 0 0 / 24px 24px,
    radial-gradient(ellipse at 50% 45%, #7a1428 0%, #4a0c1a 45%, #1c0409 100%);
}

.intro-wall::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 35%, rgba(0, 0, 0, 0.65) 100%);
}

.intro-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.2vh;
  padding: 7vh 1rem 2vh;
  transition: transform 2.8s cubic-bezier(0.75, 0, 0.25, 1);
  will-change: transform;
}

.intro-mantra {
  font-family: "Tiro Devanagari Hindi", serif;
  color: #f5d98b;
  font-size: clamp(1rem, 2.4vh, 1.4rem);
  letter-spacing: 2px;
  text-shadow: 0 0 18px rgba(245, 217, 139, 0.5);
  transition: opacity 0.8s;
}

/* ---- doorway frame ---- */
.doorway {
  position: relative;
  width: var(--dw);
  height: calc(var(--dw) * 1.62);
  flex: none;
  padding: calc(var(--dw) * 0.045);
  border-radius: calc(var(--dw) / 2) calc(var(--dw) / 2) 0 0;
  background: linear-gradient(135deg, #fff0b8 0%, #d9b056 22%, #8a6420 50%, #e6c26a 78%, #fff0b8 100%);
  box-shadow:
    0 0 0 calc(var(--dw) * 0.022) #2a060c,
    0 0 0 calc(var(--dw) * 0.034) #b8913f,
    0 0 70px rgba(245, 190, 90, 0.28),
    0 30px 60px rgba(0, 0, 0, 0.6);
}

.arch-crest {
  position: absolute;
  top: calc(var(--dw) * -0.085);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  padding: 0.3em 1.3em 0.2em;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff0b8, #c99a3c);
  border: 2px solid #6b4a12;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.arch-crest span {
  font-family: "Yatra One", serif;
  font-size: calc(var(--dw) * 0.062);
  color: #6d1023;
}

.door-opening {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: calc(var(--dw) * 0.455) calc(var(--dw) * 0.455) 0 0;
  background: #120306;
  perspective: 1400px;
  box-shadow: inset 0 0 0 3px #2a060c;
}

/* what waits beyond the door */
.beyond {
  position: absolute;
  inset: 0;
  background: url("images/hero.jpg") center / cover no-repeat, #5a1020;
  filter: brightness(0.9) saturate(1.1);
  transform: scale(1.15);
  transition: transform 5s ease-out;
}

.door-light {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 60%, rgba(255, 236, 180, 0.6) 0%, rgba(255, 190, 80, 0.3) 40%, rgba(255, 170, 50, 0) 75%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 2.4s ease 0.3s;
}

.leaf {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  transition: transform 3.2s cubic-bezier(0.65, 0.02, 0.2, 1);
  will-change: transform;
}

.leaf svg {
  display: block;
  width: 100%;
  height: 100%;
}

.leaf::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 60%);
  opacity: 0.35;
  transition: opacity 3s;
}

.leaf-left {
  left: 0;
  transform-origin: left center;
}

.leaf-right {
  right: 0;
  transform-origin: right center;
}

.leaf-right svg,
.leaf-right::after {
  transform: scaleX(-1);
}

.door-step {
  position: absolute;
  left: -9%;
  right: -9%;
  bottom: calc(var(--dw) * -0.07);
  height: calc(var(--dw) * 0.07);
  border-radius: 4px;
  background: linear-gradient(180deg, #c99a3c, #6b4a12);
  box-shadow: 0 calc(var(--dw) * 0.05) 0 calc(var(--dw) * 0.02) #3d0a13, 0 20px 40px rgba(0, 0, 0, 0.6);
}

.diya {
  position: absolute;
  bottom: calc(var(--dw) * -0.05);
  z-index: 4;
  font-size: calc(var(--dw) * 0.13);
  filter: drop-shadow(0 0 14px #ffb347) drop-shadow(0 0 30px rgba(255, 150, 40, 0.8));
  animation: flicker 1.6s ease-in-out infinite alternate;
}

.diya-left { left: calc(var(--dw) * -0.2); }
.diya-right { right: calc(var(--dw) * -0.2); animation-delay: -0.7s; }

/* ---- call to action ---- */
.intro-cta {
  margin-top: calc(var(--dw) * 0.1);
  text-align: center;
  transition: opacity 0.8s, transform 0.8s;
}

.intro-names {
  font-family: "Pinyon Script", "Amita", cursive;
  font-size: clamp(1.8rem, 4.6vh, 2.8rem);
  color: #fbf3e2;
  line-height: 1.1;
}

.intro-names em {
  font-family: "Cormorant Garamond", "Tiro Devanagari Hindi", serif;
  font-size: 0.5em;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #d9b56a;
  margin: 0 0.3em;
}

.open-btn {
  position: relative;
  margin-top: 1.2vh;
  padding: 0.55rem 2rem 0.6rem;
  border: 1.5px solid #f5d98b;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(245, 217, 139, 0.22), rgba(245, 217, 139, 0.06));
  color: #fbf3e2;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  animation: breathe 2.2s ease-in-out infinite;
}

.open-btn .hi {
  font-family: "Yatra One", serif;
  font-size: clamp(1.1rem, 2.6vh, 1.5rem);
  color: #f5d98b;
}

.open-btn .en {
  font-family: "Cinzel", serif;
  font-size: 0.62rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  opacity: 0.85;
}

/* sound on / off, chosen before the door opens */
.intro-hint {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  margin: 1.2vh auto 0;
  padding: 0.25rem 0.9rem;
  background: none;
  border: 1px solid rgba(245, 217, 139, 0.35);
  border-radius: 999px;
  font-family: "Cormorant Garamond", "Tiro Devanagari Hindi", serif;
  font-style: italic;
  font-size: 0.85rem;
  color: rgba(251, 243, 226, 0.75);
  cursor: pointer;
}

body.sound-off .intro-hint { color: rgba(251, 243, 226, 0.5); }

.skip-btn {
  position: absolute;
  right: 1rem;
  bottom: 0.8rem;
  background: none;
  border: none;
  color: rgba(251, 243, 226, 0.45);
  font-family: "Cinzel", serif;
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
}

.skip-btn:hover { color: #f5d98b; }

/* ---- language choice ---- */
.lang-pick {
  position: absolute;
  left: 1rem;
  bottom: 0.8rem;
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(245, 217, 139, 0.55);
  border-radius: 999px;
  transition: opacity 0.8s;
}

.lang-pick button {
  padding: 0.3rem 0.9rem;
  background: none;
  border: none;
  color: rgba(251, 243, 226, 0.75);
  font-family: "Cormorant Garamond", "Tiro Devanagari Hindi", serif;
  font-size: 0.95rem;
  cursor: pointer;
}

.lang-pick button.active { background: #f5d98b; color: #4a0c1a; }

html[lang="hi"] .intro-names { font-size: clamp(1.5rem, 3.8vh, 2.3rem); line-height: 1.5; }
html[lang="hi"] .intro-names em { font-size: 0.6em; }
html[lang="hi"] .open-btn .en { font-size: 0.85rem; }
html[lang="hi"] .intro-hint { font-size: 0.95rem; }
html[lang="hi"] .skip-btn { font-size: 0.9rem; }

/* ---- the opening ---- */
.intro.open .leaf-left { transform: rotateY(86deg); }
.intro.open .leaf-right { transform: rotateY(-86deg); }
.intro.open .leaf::after { opacity: 1; }
.intro.open .door-light { opacity: 1; }
.intro.open .beyond { transform: scale(1); }
.intro.open .intro-cta { opacity: 0; transform: translateY(20px); pointer-events: none; }
.intro.open .intro-mantra,
.intro.open .lang-pick,
.intro.open .skip-btn { opacity: 0; pointer-events: none; }

/* walk through the door */
.intro.zoom .intro-stage { transform: scale(9); }
.intro.zoom { opacity: 0; visibility: hidden; pointer-events: none; }
.intro.done { display: none; }

/* ============ MARIGOLD TORAN (shared) ============ */
.toran {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  padding: 0 1.5%;
  pointer-events: none;
}

.toran::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  height: 20px;
  background: radial-gradient(circle, #ffc247 0 30%, #f08a00 32% 56%, transparent 58%) 0 0 / 20px 20px repeat-x;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.4));
}

.toran .str {
  position: relative;
  width: 14px;
  height: var(--h);
  transform-origin: top center;
  background: radial-gradient(circle, #ffc247 0 28%, #f08a00 30% 56%, transparent 58%) 0 0 / 14px 14px repeat-y;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
  animation: sway var(--d) ease-in-out var(--o) infinite alternate;
}

.toran .str.b {
  background-image: radial-gradient(circle, #fff3a6 0 28%, #f6c31c 30% 56%, transparent 58%);
}

.toran .str.c {
  background-image:
    radial-gradient(circle at 7px 7px, #ff6b7a 0 2.5px, #b3122a 3px 6px, transparent 6.5px),
    radial-gradient(circle at 7px 7px, #ffffff 0 2.5px, #efe6cf 3px 5px, transparent 5.5px);
  background-size: 14px 56px, 14px 14px;
}

/* mango leaf at the end of every string */
.toran .str::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -20px;
  width: 13px;
  height: 22px;
  margin-left: -6.5px;
  border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
  background: linear-gradient(90deg, #2f7d32 48%, #1b5e20 52%);
}

.toran .str.c::after {
  width: 14px;
  height: 14px;
  bottom: -14px;
  margin-left: -7px;
  border-radius: 50% 50% 50% 50% / 35% 35% 65% 65%;
  background: radial-gradient(circle at 40% 30%, #fff0b8, #c99a3c 60%, #6b4a12);
}

@keyframes sway {
  from { transform: rotate(-2.2deg); }
  to { transform: rotate(2.2deg); }
}

@keyframes flicker {
  0% { filter: drop-shadow(0 0 10px #ffb347) drop-shadow(0 0 24px rgba(255, 150, 40, 0.6)); transform: scale(1); }
  100% { filter: drop-shadow(0 0 18px #ffd27a) drop-shadow(0 0 42px rgba(255, 160, 50, 0.95)); transform: scale(1.04); }
}

@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 217, 139, 0.45), 0 0 22px rgba(245, 217, 139, 0.2); }
  50% { box-shadow: 0 0 0 14px rgba(245, 217, 139, 0), 0 0 34px rgba(245, 217, 139, 0.45); }
}

@media (max-height: 620px) {
  .intro { --dw: min(60vw, 30vh); }
  .intro-hint { display: none; }
}
