/* css/intro.css */

/* Reset & fill screen */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
#intro-container {
  position: relative;
  width: 100%;
  height: 100%;
}

/* All modules start hidden, full-bleed */
.module {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  display: none; /* hide completely until shown */
}

/* 1) Centered text */
.module-text {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 2) Vertical image */
.module-image-vertical img {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  object-fit: cover;
}

/* 3) Horizontal image—flush edge to edge, height always = viewport */
.module-image-horizontal img {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  object-fit: cover;
}

/* 4) Vertical video */
.module-video-vertical video {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  object-fit: cover;
}

/* 5) Horizontal video */
.module-video-horizontal video {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: auto;
  object-fit: cover;
}

/* MOBILE UPDATES */
@media (max-width: 768px) {
  /* force full-view height */
  html, body, #intro-container, .module {
    height: 100vh !important;
  }

  /* swap to mobile crops & fit viewport height */
  .module-image-vertical img,
  .module-image-horizontal img {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    left: 0;
    transform: none;
  }

  /* vertical-center the vertical modules when image height < viewport */
  .module-image-vertical img,
  .module-video-vertical video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: auto;
  }

  /* horizontal video on mobile */
  .module-video-horizontal video {
    width: 100%;
    height: auto;
    left: 0;
    top: 0;
    transform: none;
  }
}
