/* =========================
   Full-Page Hero Behind Sidebar
   ========================= */
.hero-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;

  /* Mobile-safe viewport height */
  min-height: 100svh;
  min-height: 100dvh;
  min-height: 100vh;

  z-index: 0;
  background-image: url('../assets/hero.webp');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;

  display: flex;
  justify-content: center;
  align-items: center;

  overflow-x: hidden;
  overflow-y: visible; /* removed auto scroll */
}

/* Light mode hero image */
[data-md-color-scheme="default"] .hero-container {
  background-image: url('../assets/herolight.webp');
}

/* =========================
   Hero Fade Overlay
   ========================= */
.hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 20vh;
  z-index: 1;
  pointer-events: none;

  background: linear-gradient(
    to bottom,
    rgba(44, 44, 44, 0) 0%,
    #2c2c2c 100%
  );
}

[data-md-color-scheme="default"] .hero-fade {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    #ffffff 100%
  );
}

/* =========================
   Hero Content
   ========================= */
.hero-content {
  position: relative;
  z-index: 2;
  color: white;
  text-align: center;
  padding: clamp(1rem, 2vw, 1.5rem);

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  width: 100%;
  min-height: 100%;
}

.hero-content h1 {
  color: white;
  margin-bottom: clamp(0.5rem, 1vw, 0.4rem);
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  opacity: 0;
  transform: scale(1.2) translateY(10px);
  animation: heroFadeIn 1.2s ease forwards;
  animation-delay: 0.3s;
}

.hero-subtitle {
  color: white;
  font-size: clamp(0.8rem, 2.5vw, 0.9rem);
  margin-top: clamp(0.25rem, 1vw, 0.4rem);
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
  opacity: 0;
  transform: translateY(10px);
  animation: heroFadeIn 1.2s ease forwards;
  animation-delay: 0.5s;
}

/* Light mode text shadow */
[data-md-color-scheme="default"] .hero-content h1 {
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
}

[data-md-color-scheme="default"] .hero-subtitle {
  text-shadow: 1.5px 1.5px 5px rgba(0, 0, 0, 0.5);
}

/* =========================
   Twitch Stream + Buttons Wrapper
   ========================= */
.stream-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.5rem);
  max-width: clamp(600px, 80vw, 1200px);
  width: 100%;
}

/* Twitch Stream Video */
.stream-video {
  flex: 2.4;
  aspect-ratio: 16 / 9;
  max-width: clamp(300px, 45vw, 1000px);
  display: flex;
}

.stream-video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* =========================
   Vertical Button Column
   ========================= */
.hero-buttons-vertical {
  flex: 0.8;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: clamp(0.6rem, 1vw, 0.9rem);
  max-width: clamp(130px, 16vw, 190px);
  width: 100%;
}

/* Buttons */
.hero-buttons-vertical .hero-btn {
  width: 100%;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;

  padding: clamp(0.5rem, 0.9vw, 0.75rem)
           clamp(0.75rem, 1.2vw, 1.05rem);

  font-size: clamp(0.9rem, 1.3vw, 1.05rem);

  border-radius: 7px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;

  background-color: inherit;
  color: inherit;
  outline: none;
  border: none;
  box-shadow: none;
}

/* Dark button */
.hero-buttons-vertical .hero-btn-dark {
  background-color: #2c2c2c;
  color: white;
}

.hero-buttons-vertical .hero-btn-dark:hover,
.hero-buttons-vertical .hero-btn-dark:focus,
.hero-buttons-vertical .hero-btn-dark:focus-visible,
.hero-buttons-vertical .hero-btn-dark:active {
  background-color: #2c2c2c;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Accent button */
.hero-buttons-vertical .hero-btn-accent {
  background-color: #f96854;
  color: white;
  font-weight: 600;
}

.hero-buttons-vertical .hero-btn-accent:hover,
.hero-buttons-vertical .hero-btn-accent:focus,
.hero-buttons-vertical .hero-btn-accent:focus-visible,
.hero-buttons-vertical .hero-btn-accent:active {
  background-color: #f96854;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(249, 104, 84, 0.5);
}

/* =========================
   Mobile Layout
   ========================= */
@media (max-width: 900px) {

  .stream-wrapper {
    flex-direction: column;
    gap: 2vh;
    justify-content: center;
    align-items: center;
  }

  .stream-video {
    display: none;
  }

  /* Center hero content vertically */
  .hero-content {
    justify-content: center; /* vertically center */
    padding-top: 0; /* remove extra top padding */
    padding-left: 2rem;
    padding-right: 2rem;
    min-height: 100%; /* fill viewport */
  }

  .hero-content h1 {
    margin-bottom: 3vh;
  }

  .hero-buttons-vertical {
    width: 80%;
    max-width: 250px;
    height: auto; /* grow naturally */
    gap: 2vh;
  }

  .hero-buttons-vertical .hero-btn {
    flex: 1 1 auto;
    height: clamp(48px, 9vh, 95px);
    min-height: 48px;
    font-size: clamp(1rem, 2vh, 1.5rem);
    padding: clamp(0.5rem, 0.9vw, 0.75rem)
             clamp(0.75rem, 1.2vw, 1.05rem);
  }

  .hero-subtitle {
    display: none;
  }
}

/* =========================
   Spacer
   ========================= */
.hero-spacer {
  height: 100svh;
  height: 100dvh;
  height: 100vh;
}

/* =========================
   Smooth scrolling
   ========================= */
html {
  scroll-behavior: smooth;
}

/* =========================
   Header Fade
   ========================= */
.md-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--md-default-bg);
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: -1;
}

.md-header {
  transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

.md-header.transparent-over-hero {
  background-color: transparent !important;
  box-shadow: none !important;
}

/* =========================
   Fade-In Animation
   ========================= */
@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}