/* ==========================================================================
   Elements & Order — grand opening ceremony
   Homepage overlay only. Loaded from index.php.
   ========================================================================== */

html.eo-opening-lock,
html.eo-opening-lock body {
  overflow: hidden !important;
  overscroll-behavior: none;
  height: 100%;
}

.eo-opening {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  touch-action: none;
}

.eo-spotlight {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(ellipse 46% 40% at 50% 46%, rgba(255, 220, 160, 0.28), rgba(255, 196, 120, 0.08) 46%, transparent 70%);
  transition: opacity 0.8s ease;
}

.eo-rod {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  height: 12px;
  z-index: 7;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff8e2 0%, #e8d08a 28%, #c4a04a 58%, #7a5c22 100%);
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.eo-rod::before,
.eo-rod::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #fff8e4, #e0c36a 42%, #6e5420 78%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.eo-rod::before { left: -6px; }
.eo-rod::after { right: -6px; }

.eo-curtain-left .eo-rod::after,
.eo-curtain-right .eo-rod::before {
  content: none;
}

.eo-curtain {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 51%;
  z-index: 2;
  will-change: transform;
  transition: transform 6.2s cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

.eo-curtain-left {
  left: 0;
  transform: translate3d(0, 0, 0);
}

.eo-curtain-right {
  right: 0;
  transform: translate3d(0, 0, 0);
}

.eo-opening.is-open .eo-curtain-left {
  transform: translate3d(-100%, 0, 0);
  transition-delay: 0.7s;
}

.eo-opening.is-open .eo-curtain-right {
  transform: translate3d(100%, 0, 0);
  transition-delay: 0.7s;
}

.eo-opening.is-open .eo-spotlight {
  opacity: 0;
  transition-duration: 0.45s;
}

.eo-fabric {
  position: absolute;
  inset: 0;
  display: flex;
  background: #4a0d16;
}

.eo-curtain-left .eo-fabric {
  box-shadow:
    inset 42px 0 70px rgba(0, 0, 0, 0.38),
    inset -34px 0 42px rgba(0, 0, 0, 0.55),
    inset 0 -80px 70px rgba(0, 0, 0, 0.5);
}

.eo-curtain-right .eo-fabric {
  box-shadow:
    inset -42px 0 70px rgba(0, 0, 0, 0.38),
    inset 34px 0 42px rgba(0, 0, 0, 0.55),
    inset 0 -80px 70px rgba(0, 0, 0, 0.5);
}

.eo-fold {
  flex: 1 1 0;
  min-width: 0;
  background: linear-gradient(
    90deg,
    #22060b 0%,
    #5a1220 16%,
    #8a2234 36%,
    #d47884 47%,
    #7a1a2c 58%,
    #451018 78%,
    #1a0508 100%
  );
}

.eo-fold-wide { flex-grow: 1.4; }
.eo-fold-tight { flex-grow: 0.68; }

.eo-curtain-right .eo-fold {
  transform: scaleX(-1);
}

.eo-fabric::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 220, 200, 0.22), transparent 18%, transparent 62%, rgba(0, 0, 0, 0.42)),
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.035) 0 1px,
      transparent 1px 4px
    );
}

.eo-valance {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 128px;
  z-index: 3;
  background:
    linear-gradient(180deg, #2a070e 0%, #7a1c2c 42%, #4e101a 100%);
  -webkit-mask-image: radial-gradient(circle at 22px calc(100% + 2px), transparent 20px, #000 21px);
  mask-image: radial-gradient(circle at 22px calc(100% + 2px), transparent 20px, #000 21px);
  -webkit-mask-size: 44px 100%;
  mask-size: 44px 100%;
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.28);
}

.eo-valance::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  height: 10px;
  background: linear-gradient(180deg, #f6e7c1, #b8923c 55%, #6e5420);
  opacity: 0.9;
}

.eo-tassel-row {
  position: absolute;
  top: 112px;
  left: 8px;
  right: 8px;
  z-index: 4;
  display: flex;
  justify-content: space-evenly;
  pointer-events: none;
}

.eo-tassel {
  position: relative;
  width: 7px;
  height: 42px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, #f3e2b0, #a6843a);
}

.eo-tassel::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 12px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6d8, #d4af37 46%, #6d5420);
}

.eo-tassel::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 14px;
  height: 18px;
  transform: translateX(-50%);
  background: linear-gradient(#e8cc82, #8c6a2e);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.eo-trim {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  z-index: 5;
  background: linear-gradient(90deg, #6a5424, #f8ecc4 38%, #d4af37 62%, #7a6230);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.35);
}

.eo-curtain-left .eo-trim { right: 0; }
.eo-curtain-right .eo-trim { left: 0; }

.eo-tie {
  position: absolute;
  top: 62%;
  width: 28px;
  height: 108px;
  z-index: 6;
  pointer-events: none;
}

.eo-curtain-left .eo-tie { right: 20px; }
.eo-curtain-right .eo-tie { left: 20px; }

.eo-tie::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 22px;
  height: 22px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6d4, #e0c36a 42%, #7d5e22 80%);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.35);
}

.eo-tie::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  width: 24px;
  height: 76px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(
    90deg,
    #8a6828 0 2px,
    #f0d78a 3px 5px,
    #a07c32 6px 8px
  );
  clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%);
}

.eo-opening-copy {
  position: relative;
  z-index: 6;
  width: min(40rem, calc(100% - 2.75rem));
  margin-top: 3.5rem;
  padding: 0 0.5rem 1rem;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.eo-opening.is-ready .eo-opening-copy {
  opacity: 1;
  transform: none;
}

.eo-opening.is-open .eo-opening-copy {
  opacity: 0;
  transform: translateY(-12px);
  transition-duration: 0.55s;
  pointer-events: none;
}

.eo-opening-kicker,
.eo-opening-note {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-weight: 500;
  color: #e7cd86;
}

.eo-opening-kicker {
  margin-bottom: 0.85rem;
  font-size: 0.74rem;
  letter-spacing: 0.46em;
}

.eo-opening-title {
  margin: 0 0 0.75rem;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(2.7rem, 7vw, 5.5rem);
  line-height: 0.92;
  letter-spacing: 0.045em;
  color: #f8f1e3;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.eo-opening-tag {
  margin: 0 0 1.7rem;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  color: #f4e7cc;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.eo-opening-btn {
  appearance: none;
  cursor: pointer;
  border: 1px solid #f6e7c1;
  border-radius: 999px;
  padding: 1.05rem 1.9rem;
  background: linear-gradient(180deg, #f8ecc8 0%, #e0c36a 36%, #b8923c 74%, #8c6b28 100%);
  color: #3a2710;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.eo-opening-btn:hover {
  filter: brightness(1.06);
}

.eo-opening-btn:focus-visible {
  outline: 2px solid #fff6d8;
  outline-offset: 4px;
}

.eo-opening-btn:disabled {
  cursor: default;
  filter: none;
}

.eo-opening-note {
  margin-top: 1.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.34em;
}

@media (max-width: 700px) {
  .eo-rod {
    top: 10px;
    left: 0;
    right: 0;
  }

  .eo-valance {
    height: 92px;
  }

  .eo-tassel-row {
    top: 78px;
  }

  .eo-tassel {
    height: 30px;
  }

  .eo-tie {
    display: none;
  }

  .eo-opening-copy {
    margin-top: 2.4rem;
  }

  .eo-opening-kicker {
    letter-spacing: 0.28em;
    font-size: 0.66rem;
  }

  .eo-opening-title {
    font-size: clamp(1.7rem, 8.2vw, 3.1rem);
    letter-spacing: 0.02em;
  }

  .eo-opening-tag {
    margin-bottom: 1.25rem;
  }

  .eo-opening-btn {
    width: min(100%, 18.5rem);
    padding: 0.95rem 1rem;
    letter-spacing: 0.14em;
  }

  .eo-opening-note {
    letter-spacing: 0.16em;
    font-size: 0.62rem;
  }

  .eo-trim {
    width: 6px;
  }
}

@media (max-height: 640px) {
  .eo-valance {
    height: 72px;
  }

  .eo-tassel-row {
    top: 60px;
  }

  .eo-tassel {
    height: 24px;
  }

  .eo-tie {
    display: none;
  }

  .eo-opening-copy {
    margin-top: 1.5rem;
  }

  .eo-opening-title {
    font-size: 2.35rem;
  }

  .eo-opening-tag {
    margin-bottom: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eo-opening-copy,
  .eo-spotlight {
    transition: none;
  }

  .eo-opening-copy {
    opacity: 1;
    transform: none;
  }
}
