/* =====================================================================
   CREATIVE SPACE — Scroll Expansion Hero (About / Contact)
   Vanilla port of the "ScrollExpandMedia" React component: a media card
   that expands from a small frame to a large frame as the user scrolls,
   while the full-bleed background fades and the headline splits apart.
   Page scroll stays locked until the card is fully expanded.
   ===================================================================== */

.expand-hero {
  position: relative;
  height: 100dvh;
  overflow: hidden;
  background: #141110;
  isolation: isolate;
}

/* full-bleed background, fades out as the card expands */
.expand-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 1;
  will-change: opacity;
}

.expand-hero__stage {
  position: relative;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* the media card that grows on scroll */
.expand-hero__card {
  position: relative;
  width: 300px;
  height: 400px;
  max-width: 95vw;
  max-height: 85vh;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
  will-change: width, height;
}

.expand-hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1rem;
}

.expand-hero__scrim {
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  background: #000;
  opacity: 0.7;
}

.expand-hero__cardtext {
  position: absolute;
  left: 0;
  right: 0;
  top: 1.4rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
  pointer-events: none;
}

.expand-hero__meta {
  font-family: var(--sans);
  font-size: 1.45rem;
  font-weight: 700;
  color: #bde0ff;
  will-change: transform;
}

.expand-hero__hint {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #bde0ff;
  opacity: 0.9;
  will-change: transform;
  white-space: nowrap;
}

/* headline slides apart while scrolling */
.expand-hero__titles {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin: 0;
  font-weight: inherit;
  text-align: center;
  pointer-events: none;
}

.expand-hero__word {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 1;
  color: #fff;
  mix-blend-mode: difference;
  will-change: transform;
}

.expand-hero__cta {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: clamp(2.2rem, 7vh, 4rem);
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.6s ease;
}

.expand-hero.is-expanded .expand-hero__cta {
  opacity: 1;
}

/* fully expanded: card fills the hero edge-to-edge, no corner gaps */
.expand-hero.is-expanded .expand-hero__card {
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
}

.expand-hero.is-expanded .expand-hero__media,
.expand-hero.is-expanded .expand-hero__scrim {
  border-radius: 0;
}

.expand-hero.is-expanded .expand-hero__cardtext {
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* reduced motion: render fully expanded and allow normal scrolling */
@media (prefers-reduced-motion: reduce) {
  .expand-hero__bg {
    opacity: 0 !important;
  }

  .expand-hero__card {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0;
    box-shadow: none;
  }

  .expand-hero__cta {
    opacity: 1 !important;
  }
}

@media (max-width: 767px) {
  .expand-hero__word {
    font-size: clamp(2.6rem, 13vw, 4.5rem);
    gap: 0.8rem;
  }

  .expand-hero__cardtext {
    top: 1rem;
  }
}