.eac-intro-active {
  overflow: hidden;
}

.eac-intro {
  --intro-bg: #ffffff;
  --intro-text: #1a1a2e;
  --intro-gold: #BC9042;
  --intro-tagline: #6a6a6a;
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--intro-bg);
  cursor: pointer;
}

.eac-intro-stage {
  display: grid;
  place-items: center;
  opacity: 0;
}

.eac-intro-ready .eac-intro-stage {
  opacity: 1;
}

.eac-intro-statement {
  grid-area: 1 / 1;
  z-index: 2;
  max-width: 800px;
  padding: 0 2rem;
  text-align: center;
  animation: eac-intro-flip-out .7s 1.9s cubic-bezier(.4, 0, .15, 1) forwards;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  will-change: opacity, transform;
}

.eac-intro-line {
  color: var(--intro-text);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(34px, 6.5vw, 66px);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.25;
}

.eac-intro-line-2 {
  margin-top: .1em;
  color: var(--intro-gold);
  font-style: italic;
}

.eac-intro-word {
  display: inline-block;
  margin: 0 .15em;
  opacity: 0;
  transform: translateY(14px);
  animation: eac-intro-word-in .4s ease-out forwards;
  backface-visibility: hidden;
  will-change: opacity, transform;
}

.eac-intro-composition {
  position: relative;
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(40px, 9vmin, 76px) clamp(52px, 13vmin, 116px);
  opacity: 0;
  animation: eac-intro-flip-in .7s 2s cubic-bezier(.22, .6, .2, 1) forwards,
    eac-intro-composition-out .5s 4.4s ease-in forwards;
  will-change: opacity;
}

.eac-intro-frame {
  position: absolute;
  inset: 0;
}

.eac-intro-edge {
  position: absolute;
  background: var(--intro-gold);
}

.eac-intro-edge-top {
  top: 0;
  right: 0;
  left: 0;
  height: 1.5px;
  transform: scaleX(0);
  transform-origin: left;
  animation: eac-intro-grow-x .22s 2.7s cubic-bezier(.3, .5, .2, 1) forwards;
}

.eac-intro-edge-right {
  top: 0;
  right: 0;
  bottom: 0;
  width: 1.5px;
  transform: scaleY(0);
  transform-origin: top;
  animation: eac-intro-grow-y .22s 2.9s cubic-bezier(.3, .5, .2, 1) forwards;
}

.eac-intro-edge-bottom {
  right: 0;
  bottom: 0;
  left: 0;
  height: 1.5px;
  transform: scaleX(0);
  transform-origin: right;
  animation: eac-intro-grow-x .22s 3.1s cubic-bezier(.3, .5, .2, 1) forwards;
}

.eac-intro-edge-left {
  top: 0;
  bottom: 0;
  left: 0;
  width: 1.5px;
  transform: scaleY(0);
  transform-origin: bottom;
  animation: eac-intro-grow-y .22s 3.3s cubic-bezier(.3, .5, .2, 1) forwards;
}

.eac-intro-logo {
  display: block;
  width: clamp(140px, 30vmin, 280px);
  height: auto;
  aspect-ratio: 1045 / 577;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.eac-intro-tagline {
  margin-top: clamp(20px, 4vmin, 34px);
  color: var(--intro-tagline);
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(11px, 2vw, 14px);
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(5px);
  animation: eac-intro-tagline-in .45s 3s cubic-bezier(.22, .6, .2, 1) forwards;
  will-change: opacity, transform;
}

.eac-intro:not(.eac-intro-ready) .eac-intro-statement,
.eac-intro:not(.eac-intro-ready) .eac-intro-word,
.eac-intro:not(.eac-intro-ready) .eac-intro-composition,
.eac-intro:not(.eac-intro-ready) .eac-intro-edge,
.eac-intro:not(.eac-intro-ready) .eac-intro-tagline {
  animation-play-state: paused;
}

@keyframes eac-intro-word-in {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes eac-intro-flip-out {
  0% { opacity: 1; transform: perspective(1200px) rotateY(0) scale(1); }
  55% { opacity: 0; }
  100% { opacity: 0; transform: perspective(1200px) rotateY(55deg) scale(.94); }
}

@keyframes eac-intro-flip-in {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes eac-intro-composition-out {
  to { opacity: 0; }
}

@keyframes eac-intro-grow-x {
  to { transform: scaleX(1); }
}

@keyframes eac-intro-grow-y {
  to { transform: scaleY(1); }
}

@keyframes eac-intro-tagline-in {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-color-scheme: dark) {
  .eac-intro {
    --intro-bg: #0a1929;
    --intro-text: #f0ece4;
    --intro-tagline: #cdd4dd;
  }

  .eac-intro-logo {
    content: url('../img/logo-dark.png');
    mix-blend-mode: screen;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eac-intro *,
  .eac-intro *::before,
  .eac-intro *::after {
    animation: none !important;
    transition: none !important;
  }
}
