/* MDE cinematic first-visit intro */
.mde-brand-intro {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  background: #070d10;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

html.mde-intro-active .mde-brand-intro {
  display: flex;
}

html.mde-intro-active,
html.mde-intro-active body {
  overflow: hidden;
}

.mde-brand-intro.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.mde-brand-intro__bg {
  position: absolute;
  inset: -4%;
  background-color: #0b1820;
  background-image: var(--mde-intro-bg);
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  filter: saturate(0.92) brightness(0.72);
  animation: mde-intro-bg-drift 3.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.mde-brand-intro__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 13, 16, 0.55) 0%, rgba(7, 13, 16, 0.22) 42%, rgba(7, 13, 16, 0.7) 100%),
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(18, 59, 74, 0.35) 0%, transparent 70%);
}

.mde-brand-intro__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 50% at 50% 48%, transparent 20%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}

.mde-brand-intro__grain {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: overlay;
}

.mde-brand-intro__glow {
  position: absolute;
  width: min(90vw, 720px);
  height: min(70vw, 420px);
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%) scale(0.88);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(241, 245, 245, 0.2) 0%, rgba(241, 245, 245, 0.06) 38%, transparent 70%);
  opacity: 0;
  animation: mde-intro-glow 2.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  pointer-events: none;
}

.mde-brand-intro__sweep {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -35%;
  width: 28%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.03) 35%,
    rgba(255, 255, 255, 0.14) 50%,
    rgba(255, 255, 255, 0.03) 65%,
    transparent 100%
  );
  transform: skewX(-12deg);
  opacity: 0;
  pointer-events: none;
  animation: mde-intro-sweep 1.35s cubic-bezier(0.4, 0, 0.2, 1) 0.05s forwards;
}

.mde-brand-intro__stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.35rem;
  padding: 1.5rem;
  width: min(92vw, 560px);
}

.mde-brand-intro__logo-wrap {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  filter: drop-shadow(0 18px 48px rgba(0, 0, 0, 0.45));
}

.mde-brand-intro__firma {
  width: min(86vw, 520px);
  height: auto;
  display: block;
  border: 0;
  background: transparent;
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  animation: mde-intro-logo-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.08s forwards;
}

.mde-brand-intro__firma--animated {
  min-height: 120px;
  pointer-events: none;
}

.mde-brand-intro__firma--static {
  display: none;
  max-width: min(86vw, 520px);
  pointer-events: none;
}

.mde-brand-intro__tagline {
  margin: 0;
  font-family: "Manrope", "Source Sans 3", sans-serif;
  font-size: clamp(0.82rem, 2.1vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(241, 245, 245, 0.86);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.mde-brand-intro.is-tagline .mde-brand-intro__tagline {
  opacity: 1;
  transform: translateY(0);
}

@keyframes mde-intro-bg-drift {
  to { transform: scale(1); }
}

@keyframes mde-intro-glow {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.88); }
  35% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0.78; transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes mde-intro-sweep {
  0% { opacity: 0; left: -40%; }
  18% { opacity: 1; }
  100% { opacity: 0; left: 110%; }
}

@keyframes mde-intro-logo-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

html.mde-intro-reduced .mde-brand-intro__firma--animated { display: none; }
html.mde-intro-reduced .mde-brand-intro__firma--static {
  display: block;
  opacity: 1;
  transform: none;
  animation: none;
}
html.mde-intro-reduced .mde-brand-intro__sweep { display: none; }
html.mde-intro-reduced .mde-brand-intro__bg,
html.mde-intro-reduced .mde-brand-intro__glow {
  animation: none !important;
}
html.mde-intro-reduced .mde-brand-intro__tagline {
  opacity: 1;
  transform: none;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .mde-brand-intro,
  .mde-brand-intro__bg,
  .mde-brand-intro__glow,
  .mde-brand-intro__sweep,
  .mde-brand-intro__firma,
  .mde-brand-intro__tagline {
    animation: none !important;
    transition: none !important;
  }

  .mde-brand-intro__firma--animated { display: none; }
  .mde-brand-intro__firma--static {
    display: block;
    opacity: 1;
    transform: none;
  }

  .mde-brand-intro__tagline {
    opacity: 1;
    transform: none;
  }

  .mde-brand-intro__sweep { display: none; }
}
