.kgec-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  overflow: hidden;
  /* Matches the clip's own lighting (light left, darker right) so the faded edges disappear. */
  background: linear-gradient(100deg, #e4e4e4 0%, #d6d6d6 50%, #c1c1c1 100%);
  isolation: isolate;
  transition: opacity .55s ease, transform .65s cubic-bezier(.76, 0, .2, 1);
}

/* Size the clip so the whole lockup (arcs + "Kuwait Green Energy Co.") is always on screen and centred:
   as wide as possible without cropping the top/bottom, and wide enough on portrait screens
   that the logo is not tiny. Edges fade into the background. */
.kgec-intro__video {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: min(175vw, 177.78vh);
  max-width: none;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: transparent;
  transform: translate(-50%, -50%);
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 98%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 98%);
}

.kgec-intro__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 1.2rem;
  padding: 2rem;
  background: #f7f8f6;
  text-align: center;
  opacity: 0;
  pointer-events: none;
}

.kgec-intro__fallback img {
  width: clamp(260px, 42vw, 600px);
  max-width: 85vw;
  height: auto;
}

.kgec-intro__fallback p {
  margin: 0;
  color: #081720;
  font-family: Montserrat, Inter, sans-serif;
  font-size: clamp(1.3rem, 3.8vw, 3.3rem);
  font-weight: 650;
  letter-spacing: -.04em;
}

.kgec-intro__fallback p span { color: #0b5d45; }

.kgec-intro.is-fallback .kgec-intro__video { opacity: 0; }
.kgec-intro.is-fallback .kgec-intro__fallback { opacity: 1; }

.kgec-intro.is-leaving {
  opacity: 0;
  transform: translateY(-2%);
  pointer-events: none;
}

body.kgec-intro-lock { overflow: hidden; }

@media (max-width: 640px) {
  .kgec-intro__fallback p { max-width: 20ch; }
}

@media (prefers-reduced-motion: reduce) {
  .kgec-intro { display: none; }
  body.kgec-intro-lock { overflow: auto; }
}
