/* =========================================
   PARALLAX CSS (standalone)
   - Works with your parallax.js pin setup
   - Stable height across mobile/desktop
   - No layout jump on breakpoint changes
========================================= */

/* BASE (desktop/tablet default) */
.parallax {
  position: relative;
  width: 100%;

  /* stable full-screen height */
  min-height: 100vh;
  min-height: 100svh;
  height: 100dvh;

  overflow: hidden;
}

/* Media stays fixed and crisp */
.parallax-media {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;
  display: block;

  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

/* Overlay (JS animates opacity) */
.parallax-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;

  pointer-events: none;
  opacity: 0;
  will-change: opacity;

  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.80) 35%,
    rgba(0, 45, 20, 0.80) 100%
  );
}

/* Content (JS animates autoAlpha + y) */
.parallax-content {
  position: relative;
  z-index: 2;

  width: 100%;
  height: 100%;

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

  max-width: 70rem;
  margin: 0 auto;
  padding: 2rem;

  text-align: center;

  opacity: 0; /* JS controls */
  will-change: opacity, transform;
}

.parallax-content .fade-text {
  max-width: 60rem;
  margin: 0;
}

/* Keep your heading baseline */
.parallax-content .fade-heading {
  font-family: "bebas-neue", sans-serif;
  font-weight: 400;
  font-size: 5rem;
  line-height: 5rem;
}

/* =========================================
   MOBILE (<= 40em)
   - keep your “pushed down” layout
========================================= */
@media (max-width: 40em) {
  .parallax {
    min-height: 100vh;
    min-height: 100svh;
    height: auto; /* lets content padding breathe without fighting iOS bars */
  }

  .parallax-media {
    object-position: 50% 18%;
  }

  .parallax-content {
    max-width: 100%;
    justify-content: flex-start;

    padding-top: calc(env(safe-area-inset-top, 0px) + 7.5rem);
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    padding-bottom: 2rem;

    text-align: center;
  }

  /* Keep your mobile type exactly how you like */
  .parallax-content .fade-heading {
    margin: 0;
    font-size: clamp(1.7rem, 5.5vw + 0.3rem, 2.8rem);
    line-height: 1.08;
    letter-spacing: 0.01em;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
  }

  .parallax-content .fade-text {
    margin-top: 1rem;
    text-align: center;
    max-width: 62ch;

    font-size: clamp(1.02rem, 2.4vw + 0.35rem, 1.35rem);
    line-height: 1.55;
    letter-spacing: 0.01em;

    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
  }
}

/* =========================================
   TABLET (40.001em -> 64em)
========================================= */
@media (min-width: 40.001em) and (max-width: 64em) {
  .parallax {
    min-height: 100vh;
    min-height: 100svh;
    height: 100dvh;
  }

  .parallax-media {
    object-position: 50% 20%;
  }

  .parallax-content {
    max-width: 60rem;
    padding: 2rem;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .parallax-content .fade-text {
    text-align: center;
  }
}