/* Reset and Base Page Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
  /* Tells the browser your site supports both themes */
  color-scheme: light dark; 
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: light-dark(#C0C0C0, #71716F);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
}

/* Floating Faded Black Container */
.main-container {
    margin-top: 0;
    width: 100%;
    max-width: 1000px;
    background-color: rgba(0, 0, 0); /* Faded black opacity */
    backdrop-filter: blur(5px); /* Optional: slight blur behind the container */
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    color: #ffffff;
    overflow: hidden;
    Padding-bottom: 30px;
}

/* Top Frame (Dynamic Content Area) */
#top-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 10px;
    margin-bottom: 30px;
}

/* Top Center Image */
.top-logo {
    max-width: 100%;
    height: auto;
    margin-bottom: 1 rem;
    display: block;
}

/* Menu Bar Navigation */
.menu-bar {
    width: 100%;
}

.menu-bar ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.menu-bar a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.menu-bar a:hover {
    color: #ffffff;
}

/* Bottom Frame (Content Area) */
.bottom-frame {
    padding: 10px 20px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.hero-container {
  width: 100%;
  position: relative;
  overflow: hidden;
  height: auto; /* Default for mobile */
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures the video fills the container nicely without distortion */
  display: block;
}

/* Hide desktop video by default on mobile */
.desktop-video {
  display: none;
}

.mobile-video {
  display: block;
  width: 100%;
}

/* Desktop styles (e.g., screens wider than 768px) */
@media (min-width: 769px) {
  .hero-container {
    height: 60dvh; /* Sets container height to 60% of dynamic viewport height */
  }

  .desktop-video {
    display: block;
    height: 100%;
  }

  .mobile-video {
    display: none;
  }
}


.vibrate-text {
  display: inline-block; /* Required for transforms to work correctly */
  font-family: Arial;
  font-size: 3rem;
  font-weight: bold;
  color: white;
  text-align: center;
  display: block;
  
  /* Apply the animation: 0.1 seconds long, loops forever, linear timing */
  animation: vibrate 0.1s linear infinite;
}

/* Keyframes that quickly shift the text position */
@keyframes vibrate {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-2px, 1px); }
  40% { transform: translate(-2px, -1px); }
  60% { transform: translate(2px, 1px); }
  80% { transform: translate(2px, -1px); }
  100% { transform: translate(0, 0); }
}

.floating-text {

  font-family: Arial;
  font-size: 3rem;
  font-weight: bold;
  Text-align: center;
  Color: white;
  display: inline-block;
  Width: 100%;
  animation: floatEffect 4s ease-in-out infinite;
}

h3 {

  font-family: Arial;
  font-size: 1.5rem;
  font-weight: bold;
  Text-align: center;
  Color: #A9A9A9;
  display: block;
  Width: 100%;
}

@keyframes floatEffect {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px); /* Moves text up */
  }
  100% {
    transform: translateY(0px);
  }
}

.video-link {
  display: block;
  text-decoration: none;
  transition: transform 0.3s ease, filter 0.3s ease;
  outline: none;
}

/* Raised lift effect and slight brightness on hover */
.video-link:hover,
.video-link:focus-within {
  transform: translateY(-8px);
  filter: brightness(1.05);
}

.video-wrapper {
  position: relative;
  width: 100%; /* Flexible on mobile screens */
  max-width: 250px; /* Maximum size allowed on desktop */
  aspect-ratio: 1 / 1; /* Keeps it perfectly square */
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  
  /* Optimized shadow: smoother and works better across different backgrounds */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); 
  transition: box-shadow 0.3s ease;
  
  /* Performance optimization for mobile rendering */
  transform: translateZ(0); 
}

/* Ensure the video inside fills the responsive container perfectly */
.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Prevents stretching or black bars */
}


/* 4. Scroll Fade-In Animation Rules */
.fade-in-scroll {
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), 
              transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Triggered by JavaScript when scrolled into view */
.fade-in-scroll.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* 5. Mobile Responsiveness (Resizes down to 25% width on small viewports) */
@media (max-width: 768px) {
  .video-wrapper {
    width: 60vw; /* Drops down to exactly 25% of the viewport width */
    min-width: 120px; /* Prevents it from becoming too microscopic on tiny phones */
  }
}

/* Ensure the container fits mobile widths */
#top-frame {
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  overflow-x: hidden;
}

/* Responsive Logo */
.top-logo {
  max-width: 100%;
  height: auto;
  width: 240px; /* Scales down on smaller phones */
  margin-bottom: 10px;
}

/* Responsive Menu Bar */
.menu-bar ul {
  list-style: none;
  padding: 0;
  margin: 0; 
  display: flex;
  flex-wrap: wrap; /* Wraps links if screen is too narrow */
  justify-content: center;
  gap: 12px;
}

.menu-bar li a {
  text-decoration: none;
  font-size: 24px;
  padding: 6px 10px;
  display: inline-block;
  color: #B7C9E2;
}

/* For very small mobile screens (under 480px) */
@media (max-width: 480px) {
  .menu-bar ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Creates two equal columns */
    justify-items: center;                 /* Centers content inside grid cells */
    align-items: center;                   /* Aligns content vertically */
    gap: 10px;                             /* Adds spacing between menu items */
  }

  /* Target the last item to span both columns and center it at the bottom */
  .menu-bar ul li:last-child {
    grid-column: span 2;
  }
}


  /* Target the last item if it's the odd one out */
  .menu-bar ul li:last-child:nth-child(odd) {
    grid-column: span 2; /* Spans across both columns */
    display: flex;
    justify-content: center; /* Centers horizontally */
    align-items: flex-end; /* Aligns to the bottom */
    text-align: center;
  }
}

