/* Hero */
.hero {
  position: fixed;
  inset: 0 0 auto 0;
  /* top/left/right:0 */
  min-height: 100vh;
  width: 100%;
  z-index: 1;
  /* header has z-index:100, so header stays above */
  overflow: hidden;
  /* Smooth exit transition with ease-out for natural deceleration */
  transition:
    transform 1.2s var(--hero-ease-out),
    opacity 0.8s var(--hero-ease-out);
}

/* Initial hidden state for entrance animation */
.hero.hero-hidden {
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  transition: none;
  /* Disable transition for initial state */
}

/* When visible, animate in */
.hero:not(.hero-hidden):not(.scrolled) {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.hero-inner {
  position: fixed;
  inset: 0;
  width: 100%;
  min-height: 100vh;
  /* Maintain aspect ratio - adjust this to match your image's aspect ratio */
  /* Common ratios: 16:9 = 56.25%, 21:9 = 42.85%, 4:3 = 75% */
  aspect-ratio: 16 / 9;
  display: table;
}

/* Video background */
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
}

/* Ensure hero scales properly on very wide screens */
@media (min-aspect-ratio: 16/9) {
  .hero-inner {
    width: 100%;
    height: 100vh;
    aspect-ratio: auto;
  }
}

/* Gradient overlay for better text contrast */
.hero-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(0, 0, 0, 0.3) 0%,
      rgba(0, 0, 0, 0.1) 40%,
      rgba(0, 0, 0, 0.1) 60%,
      rgba(0, 0, 0, 0.5) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero-title {
  display: table-cell;
  vertical-align: middle;
  text-align: center;
  position: relative;
  z-index: 2;
  /* Above the gradient overlay */
}

.title {
  letter-spacing: .3em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.title:hover {
  transform: scale(1.02);
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), 0 8px 30px rgba(0, 0, 0, 0.4);
}

.text-light {
  color: #fff;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
}

.font-2 {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 700;
}

/* Scroll Down Button - Animated with down arrow */
.sd {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: opacity 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  z-index: 3;
  /* Above the gradient overlay */
}

/* Down arrow icon using CSS */
.sd::after {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {

  0%,
  100% {
    transform: rotate(45deg) translateY(0);
    opacity: 1;
  }

  50% {
    transform: rotate(45deg) translateY(10px);
    opacity: 0.5;
  }
}

.sd:hover,
.sd:focus {
  color: #fff;
  opacity: 0.8;
  transform: translateX(-50%) scale(1.05);
}

.sd:hover::after {
  animation-duration: 1s;
}

/* Content: starts small/faded; settles in when hero is scrolled */
.content1 {
  position: relative;
  background-color: #151518;
  border-top: 10px solid #f05df0;
  margin: 0;
  padding: 0;
  /* Start slightly lower - no scale to avoid right-to-center shift */
  transform: translateY(30px);
  opacity: 0;
  /* Staggered entrance - waits 0.2s for hero to start exiting, then animates in */
  transition:
    transform 0.8s var(--hero-ease-out) 0.2s,
    opacity 0.6s var(--hero-ease-out) 0.25s;
}

/* When scrolled: hero flies up/fades; content becomes full */
.hero.scrolled {
  transform: translateY(-100%);
  opacity: 0;
}

.content1.scrolled {
  transform: translateY(0);
  opacity: 1;
  padding-top: 20px;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {

  .hero,
  .content {
    transition: none !important;
  }
}