/* Pentamarket homepage opening animation v1 — scoped, homepage only */
html.penta-opening-boot,
html.penta-opening-boot body {
  background: #07070a !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: none !important;
}

html.penta-opening-boot body {
  position: fixed !important;
  inset: 0 !important;
  margin: 0 !important;
}

html.penta-opening-boot #root {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 1.2s cubic-bezier(.2,.72,.2,1) !important;
}

html.penta-opening-boot.penta-opening-reveal #root {
  opacity: 1 !important;
}

.penta-opening-overlay {
  --po-purple: #BE24DC;
  --po-purple-2: #D75BF0;
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(190,36,220,.12), transparent 26%),
    radial-gradient(circle at 50% 70%, rgba(130,32,190,.10), transparent 38%),
    linear-gradient(180deg, #09090d 0%, #060609 100%);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 1.12s cubic-bezier(.2,.72,.2,1),
    visibility 1.12s ease,
    background 1.08s cubic-bezier(.2,.7,.2,1);
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  isolation: isolate;
  touch-action: none;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
}


.penta-opening-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 32%, rgba(255,255,255,.045), transparent 16%),
    radial-gradient(circle at 20% 18%, rgba(215,91,240,.05), transparent 18%),
    radial-gradient(circle at 80% 80%, rgba(190,36,220,.05), transparent 18%);
  filter: blur(24px);
  animation: pentaOpeningAuraMove 8s ease-in-out infinite;
  opacity: .9;
  transition:
    opacity 1.08s cubic-bezier(.2,.7,.2,1),
    transform 1.08s cubic-bezier(.2,.7,.2,1),
    filter 1.08s cubic-bezier(.2,.7,.2,1);
}

.penta-opening-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: .2;
  -webkit-mask-image: radial-gradient(circle at center, black, transparent 92%);
  mask-image: radial-gradient(circle at center, black, transparent 92%);
  pointer-events: none;
  transition:
    opacity 1.08s cubic-bezier(.2,.7,.2,1),
    transform 1.08s cubic-bezier(.2,.7,.2,1),
    filter 1.08s cubic-bezier(.2,.7,.2,1);
}

.penta-opening-core {
  position: relative;
  z-index: 2;
  width: min(900px, calc(100% - 40px));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition:
    opacity 1.08s cubic-bezier(.2,.7,.2,1),
    transform 1.08s cubic-bezier(.2,.7,.2,1),
    filter 1.08s cubic-bezier(.2,.7,.2,1);
}

.penta-opening-logo-wrap {
  position: relative;
  width: 172px;
  height: 172px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.penta-opening-logo-wrap::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(190,36,220,.20), transparent 68%);
  filter: blur(16px);
  opacity: 0;
  animation:
    pentaOpeningGlowAppear .8s ease .38s forwards,
    pentaOpeningGlowPulse 3.2s ease 1.2s infinite;
}

.penta-opening-logo {
  position: relative;
  z-index: 2;
  width: 172px;
  height: 172px;
  object-fit: contain;
  opacity: 0;
  transform: translateY(-220px) scale(.82) rotate(-8deg);
  filter: blur(10px) drop-shadow(0 0 0 rgba(0,0,0,0));
  animation: pentaOpeningLogoDrop 1.55s cubic-bezier(.16,.86,.22,1) .20s forwards;
  will-change: transform, opacity, filter;
}

.penta-opening-word-stage {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 82px;
  margin-top: 2px;
  padding-bottom: 8px;
}

.penta-opening-word {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  white-space: nowrap;
  font-size: clamp(34px, 6vw, 72px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.065em;
  color: #fff;
  text-transform: uppercase;
}

.penta-opening-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(26px) scale(.97);
  filter: blur(10px);
  animation: pentaOpeningLetterReveal 1.10s cubic-bezier(.16,.84,.24,1) forwards;
  will-change: transform, opacity, filter;
}

.penta-opening-letter:nth-child(1)  { animation-delay: 1.05s; }
.penta-opening-letter:nth-child(2)  { animation-delay: 1.23s; }
.penta-opening-letter:nth-child(3)  { animation-delay: 1.41s; }
.penta-opening-letter:nth-child(4)  { animation-delay: 1.59s; }
.penta-opening-letter:nth-child(5)  { animation-delay: 1.77s; }
.penta-opening-letter:nth-child(6)  { animation-delay: 1.95s; }
.penta-opening-letter:nth-child(7)  { animation-delay: 2.13s; }
.penta-opening-letter:nth-child(8)  { animation-delay: 2.31s; }
.penta-opening-letter:nth-child(9)  { animation-delay: 2.49s; }
.penta-opening-letter:nth-child(10) { animation-delay: 2.67s; }
.penta-opening-letter:nth-child(11) { animation-delay: 2.85s; }

.penta-opening-line {
  position: relative;
  width: min(340px, 58vw);
  height: 2px;
  margin-top: 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px);
  animation: pentaOpeningFadeUp .70s ease 3.25s forwards;
}

.penta-opening-line::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(190,36,220,.9), rgba(215,91,240,.96));
  animation: pentaOpeningLineFill 1.45s cubic-bezier(.19,1,.22,1) 3.35s forwards;
}

.penta-opening-overlay.penta-opening-outro {
  background:
    radial-gradient(circle at 50% 38%, rgba(190,36,220,.05), transparent 28%),
    linear-gradient(180deg, #09090d 0%, #060609 100%);
}

.penta-opening-overlay.penta-opening-outro .penta-opening-core {
  opacity: 0;
  transform: translateY(-18px) scale(.992);
  filter: blur(10px);
}

.penta-opening-overlay.penta-opening-outro::before,
.penta-opening-overlay.penta-opening-outro::after {
  opacity: 0;
  transform: scale(1.035);
  filter: blur(18px);
}

.penta-opening-overlay.penta-opening-hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes pentaOpeningAuraMove {
  0%,100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(0,-8px,0) scale(1.05); }
}

@keyframes pentaOpeningGlowAppear { to { opacity: 1; } }

@keyframes pentaOpeningGlowPulse {
  0%,100% { transform: scale(.98); opacity: .84; }
  50% { transform: scale(1.04); opacity: 1; }
}

@keyframes pentaOpeningLogoDrop {
  0% {
    opacity: 0;
    transform: translateY(-240px) scale(.82) rotate(-8deg);
    filter: blur(10px) drop-shadow(0 0 0 rgba(0,0,0,0));
  }
  62% {
    opacity: 1;
    transform: translateY(8px) scale(1.02) rotate(0deg);
    filter: blur(0) drop-shadow(0 18px 34px rgba(0,0,0,.28));
  }
  80% { transform: translateY(-4px) scale(.995); }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0) drop-shadow(0 20px 40px rgba(0,0,0,.36));
  }
}

@keyframes pentaOpeningLetterReveal {
  0% {
    opacity: 0;
    transform: translateY(26px) scale(.97);
    filter: blur(10px);
  }
  42% {
    opacity: .70;
    transform: translateY(8px) scale(.988);
    filter: blur(3px);
  }
  76% {
    opacity: 1;
    transform: translateY(-2px) scale(1.002);
    filter: blur(.6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes pentaOpeningFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pentaOpeningLineFill {
  0% { width: 0; }
  55% { width: 62%; }
  100% { width: 100%; }
}

@media (max-width: 720px) {
  .penta-opening-core { width: min(100%, calc(100% - 28px)); }
  .penta-opening-logo-wrap,
  .penta-opening-logo { width: 134px; height: 134px; }
  .penta-opening-word-stage { min-height: 60px; }
  .penta-opening-word { font-size: 42px; }
  .penta-opening-line { width: min(220px, 66vw); }
}

@media (max-width: 390px) {
  .penta-opening-logo-wrap,
  .penta-opening-logo { width: 116px; height: 116px; }
  .penta-opening-word { font-size: clamp(30px, 11vw, 38px); }
}

@media (prefers-reduced-motion: reduce) {
  .penta-opening-overlay,
  .penta-opening-core,
  .penta-opening-overlay::before,
  .penta-opening-overlay::after,
  html.penta-opening-boot #root {
    transition-duration: .35s !important;
  }
}
