/* =========================================================
   Codename Aarambh — Era-style Door Opening Intro
   Same door-split effect on desktop, tablet & mobile
   ========================================================= */

html.is-intro-active,
html.is-intro-active body {
  overflow: hidden !important;
  height: 100%;
  height: 100dvh;
}

.site-intro {
  position: fixed;
  inset: 0;
  z-index: 999999;
  pointer-events: auto;
  background-color: #f0f7ea;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}

.site-intro.is-done {
  pointer-events: none;
  visibility: hidden;
}

.intro-door {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  z-index: 2;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.intro-door-left {
  left: 0;
}

.intro-door-right {
  right: 0;
}

/*
  Continuous split image (works on mobile + desktop):
  each door is 50% viewport; each panel is full 100vw with same cover image.
  Right panel is shifted -50vw so both halves form one seamless elevation.
*/
.intro-door-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100%;
  background-color: #f0f7ea;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transform: translateZ(0);
}

.intro-door-left .intro-door-panel {
  left: 0;
}

.intro-door-right .intro-door-panel {
  left: -50vw;
}

/* Light sage overlay — keep elevation clear */
.intro-door::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(240, 247, 234, 0.12) 0%,
    rgba(240, 247, 234, 0.04) 42%,
    rgba(240, 247, 234, 0.1) 72%,
    rgba(240, 247, 234, 0.22) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Refined center seam */
.intro-door-left::before {
  content: "";
  position: absolute;
  top: 12%;
  right: 0;
  width: 1px;
  height: 76%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 57, 49, 0.18) 18%,
    rgba(245, 130, 31, 0.65) 50%,
    rgba(0, 57, 49, 0.18) 82%,
    transparent 100%
  );
  z-index: 3;
  box-shadow: 0 0 18px rgba(245, 130, 31, 0.16);
}

.intro-brand {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: max(1.25rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
  color: #f0f7ea;
  pointer-events: none;
}

.intro-brand-mark {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  opacity: 0;
  will-change: transform, opacity;
}

.intro-brand .site-logo-intro {
  opacity: 1;
  position: relative;
  z-index: 1;
  display: block;
  width: clamp(240px, 34vw, 420px);
  max-width: min(420px, 86vw);
  height: auto;
  filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.45));
}

/* Tablet — same door effect, tuned logo size */
@media (max-width: 991.98px) {
  .intro-door-left .intro-door-panel,
  .intro-door-right .intro-door-panel {
    /* Keep continuous split; cover still fills tall viewports */
    background-size: cover;
  }

  .intro-brand .site-logo-intro {
    width: min(320px, 56vw);
  }
}

/* Mobile — same door effect, smaller logo only */
@media (max-width: 575.98px) {
  .intro-brand .site-logo-intro {
    width: min(260px, 70vw);
  }

  .intro-door-left::before {
    top: 16%;
    height: 68%;
  }
}

@media (max-height: 500px) {
  .intro-brand .site-logo-intro {
    width: min(210px, 48vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-door,
  .intro-brand-mark {
    transition: none !important;
  }
}
