/* Morphing section dividers + premium finale */

.morph-divider {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
  display: none;
}

.morph-divider__glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(90vw, 640px);
  height: 40px;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    ellipse 80% 60% at 50% 50%,
    rgba(124, 58, 237, 0.1),
    transparent 70%
  );
  pointer-events: none;
  filter: blur(16px);
  animation: morphGlowPulse 6s ease-in-out infinite alternate;
}

@keyframes morphGlowPulse {
  from {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

.morph-divider__svg {
  display: block;
  width: 100%;
  height: clamp(8px, 2vw, 16px);
  position: relative;
  z-index: 1;
}

.morph-divider__center {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: -8px;
  padding: 0 5vw;
}

.morph-divider__line {
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(192, 132, 252, 0.35),
    transparent
  );
}

.morph-divider__label {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: clamp(0.58rem, 1.8vw, 0.68rem);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  white-space: nowrap;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(168, 85, 247, 0.15);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.3s,
    border-color 0.3s;
}

.morph-divider__label.is-visible {
  opacity: 1;
  transform: translateY(0);
  color: rgba(255, 255, 255, 0.55);
  border-color: rgba(168, 85, 247, 0.28);
}

.morph-divider--tight {
  padding-top: clamp(4px, 1vw, 8px);
}

.morph-divider--finale {
  padding: 0;
  margin-bottom: -1px;
}

.morph-divider--finale .morph-divider__center {
  display: none;
}

/* ─── Premium finale (before footer, not a new section) ─── */
.premium-finale {
  position: relative;
  padding: clamp(72px, 14vw, 120px) 5vw clamp(48px, 8vw, 72px);
  text-align: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 50%, rgba(124, 58, 237, 0.05) 0%, transparent 60%);
}

.premium-finale__aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 70% at 50% 30%, rgba(124, 58, 237, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse 80% 50% at 20% 70%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 80% 50% at 80% 70%, rgba(192, 132, 252, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(109, 40, 217, 0.08) 0%, transparent 70%);
  animation: finaleAurora 12s ease-in-out infinite alternate;
}

@keyframes finaleAurora {
  from {
    opacity: 0.75;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 1;
    transform: scale(1.05) translateY(-2%);
  }
}

#finaleParticles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.7;
}

.premium-finale__stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(2px 2px at 130px 80px, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 160px 120px, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(2px 2px at 200px 50px, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1px 1px at 250px 90px, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(2px 2px at 300px 30px, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 350px 70px, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(2px 2px at 400px 100px, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(1px 1px at 450px 40px, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(2px 2px at 500px 80px, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(1px 1px at 550px 120px, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(2px 2px at 600px 60px, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1px 1px at 650px 20px, rgba(255, 255, 255, 0.25), transparent);
  background-size: 700px 150px;
  animation: starScroll 60s linear infinite;
  opacity: 0.4;
}

@keyframes starScroll {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 0 150px;
  }
}

.premium-finale__inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
}

.premium-finale__logo-wrap {
  margin-bottom: 32px;
  animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.premium-finale__logo {
  width: min(200px, 30vw);
  height: auto;
  filter: drop-shadow(0 0 40px rgba(168, 85, 247, 0.6)) drop-shadow(0 0 80px rgba(124, 58, 237, 0.4));
  animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
  from {
    filter: drop-shadow(0 0 40px rgba(168, 85, 247, 0.6)) drop-shadow(0 0 80px rgba(124, 58, 237, 0.4));
  }
  to {
    filter: drop-shadow(0 0 60px rgba(192, 132, 252, 0.8)) drop-shadow(0 0 100px rgba(168, 85, 247, 0.5));
  }
}

.premium-finale__glow-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  animation: orbFloat 8s ease-in-out infinite;
}

.glow-orb--1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.4) 0%, transparent 70%);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.glow-orb--2 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.35) 0%, transparent 70%);
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.glow-orb--3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.3) 0%, transparent 70%);
  bottom: 20%;
  left: 30%;
  animation-delay: 4s;
}

@keyframes orbFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(20px, -20px) scale(1.1);
  }
  50% {
    transform: translate(-10px, 20px) scale(0.95);
  }
  75% {
    transform: translate(-20px, -10px) scale(1.05);
  }
}

.premium-finale__eyebrow {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: rgba(192, 132, 252, 0.55);
  margin-bottom: 20px;
}

.premium-finale__title {
  font-family: var(--font-display, "Unbounded", sans-serif);
  font-size: clamp(2.2rem, 9vw, 4.5rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.05;
  margin: 0 0 16px;
  background: linear-gradient(
    120deg,
    #ffffff 0%,
    #e2e8f0 25%,
    #c084fc 55%,
    #ffffff 80%,
    #a855f7 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: finaleChrome 8s linear infinite, titlePulse 4s ease-in-out infinite;
  filter: drop-shadow(0 0 40px rgba(168, 85, 247, 0.35));
}

@keyframes finaleChrome {
  to {
    background-position: 200% center;
  }
}

@keyframes titlePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

.premium-finale__sub {
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  color: rgba(255, 255, 255, 0.42);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 32px;
  animation: subFadeIn 1s ease-out 0.5s both;
}

@keyframes subFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.premium-finale__words {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 18px;
  font-family: var(--font-elegant, "Cormorant Garamond", serif);
  font-style: italic;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  color: rgba(255, 255, 255, 0.55);
}

.premium-finale__words [data-constellation-node] {
  opacity: 0;
  transform: translateY(12px);
  animation: finaleWordIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.premium-finale__words [data-constellation-node]:nth-child(1) {
  animation-delay: 0.1s;
}
.premium-finale__words [data-constellation-node]:nth-child(3) {
  animation-delay: 0.22s;
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.4);
}
.premium-finale__words [data-constellation-node]:nth-child(5) {
  animation-delay: 0.38s;
  color: rgba(192, 132, 252, 0.85);
}

.premium-finale__words-block {
  position: relative;
  margin: 32px 0;
}

.premium-finale__constellation {
  position: absolute;
  inset: -20px;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  opacity: 0.3;
  animation: constellationRotate 20s linear infinite;
}

@keyframes constellationRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

.premium-finale__cta {
  display: inline-flex;
  margin-top: 40px;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition:
    background 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s,
    transform 0.4s;
  animation: ctaGlow 3s ease-in-out infinite;
}

@keyframes ctaGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.4);
  }
}

.premium-finale__cta:hover {
  background: rgba(124, 58, 237, 0.25);
  box-shadow: 0 0 32px rgba(168, 85, 247, 0.35);
  transform: translateY(-2px);
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .morph-divider__glow,
  .premium-finale__aurora,
  .premium-finale__title,
  .premium-finale__words span {
    animation: none;
  }
  .premium-finale__words span {
    opacity: 1;
    transform: none;
  }
}
