/*
 * Mannsion.com - Splash Page Stylesheet
 * Enterprise Data Center & Digital Realty Solutions
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
html {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   Video Background Container - Responsive Full Viewport
   ========================================================================== */

.video-background {
  position: relative;
  width: 100%; /* Always 100% of browser width */
  min-height: 100vh; /* Fill viewport height */
  overflow: hidden;
  background-color: #000; /* Fallback */
}

/* Video Element - Fills viewport, scales with width at 100% */
.video-background video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%; /* Always 100% width - scales with browser */
  height: auto; /* Auto height maintains aspect ratio */
  min-height: 100%; /* Ensure it covers full container height */
  min-width: 100%; /* Ensure it covers full container width */
  object-fit: cover; /* Cover entire container while maintaining aspect ratio */
  object-position: center center; /* Center the video */
  z-index: 0;
}

/* ==========================================================================
   Logo Image - Responsive cropped logo (logo-splash_mannsion.png)
   ========================================================================== */

.logo-image {
  position: absolute;
  top: 30%; /* 30% padding from top */
  left: 50%;
  transform: translateX(-50%); /* Center horizontally only */
  width: 25%; /* Desktop: 25% of viewport width */
  max-width: 1123px; /* Never exceed native resolution */
  height: auto; /* Auto height maintains aspect ratio */
  object-fit: contain; /* Contain to show full logo */
  object-position: center center; /* Center the logo */
  z-index: 1; /* Above video (z-index: 0) */
}

/* Fallback image inside video tag */
.video-background video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Tablet: Show full 16:9 ratio, top-aligned */
@media (max-width: 991px) {
  .video-background {
    min-height: 56.25vw; /* Height based on viewport width (16:9) */
    height: auto;
  }

  .video-background video {
    top: 0;
    left: 0;
    transform: none; /* Remove centering transform */
    width: 100%;
    height: 100%;
    min-height: 100%;
    min-width: 100%;
  }

  /* Logo at 70% width on tablet (15% padding each side) */
  .logo-image {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%; /* 70% width = 15% padding left + 15% padding right */
    height: auto;
    min-height: auto;
    min-width: auto;
    object-fit: contain; /* Contain instead of cover */
  }
}

/* Mobile: Center vertically, logo at 75% */
@media (max-width: 767px) {
  .video-background {
    min-height: 100vh; /* Fill viewport on mobile */
  }

  .video-background video {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: auto;
    min-height: 100%;
    min-width: 100%;
  }

  /* Logo at 70% width on mobile (15% padding each side) */
  .logo-image {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%; /* 70% width = 15% padding left + 15% padding right */
    height: auto;
    min-height: auto;
    min-width: auto;
    object-fit: contain; /* Contain instead of cover */
  }
}

/* ==========================================================================
   Browser Compatibility (Vendor Prefixes)
   ========================================================================== */

.video-background video {
  -o-object-fit: cover;
  object-fit: cover;
  -o-object-position: center center;
  object-position: center center;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

.logo-image {
  -o-object-fit: cover;
  object-fit: cover;
  -o-object-position: center center;
  object-position: center center;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

/* Tablet: Override transforms */
@media (min-width: 768px) and (max-width: 991px) {
  .video-background video {
    -webkit-transform: none;
    -ms-transform: none;
    transform: none;
  }

  .logo-image {
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    -o-object-fit: contain;
    object-fit: contain;
  }
}

/* Mobile: Center transforms with 50% logo */
@media (max-width: 767px) {
  .video-background video,
  .logo-image {
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
  }

  .logo-image {
    -o-object-fit: contain;
    object-fit: contain;
  }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Prefers reduced motion - disable video */
@media (prefers-reduced-motion: reduce) {
  .video-background video {
    display: none;
  }

  .video-background {
    background-image: url('../graphics/bg_skyline-splash.jpg');
    background-size: cover;
    background-position: center center;
  }
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================================================================
   Optional: Disable video on mobile if bandwidth becomes an issue
   Uncomment this section to show static background on mobile devices
   ========================================================================== */

/*
@media (max-width: 767px) {
  .video-background video {
    display: none;
  }

  .video-background {
    background-image: url('../graphics/bg_skyline-splash.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
  }
}
*/
