/* Hard iOS Safari overrides: visible content, header clearance, native scroll */

html {
  overflow-x: hidden;
}

body.scroll-smooth,
body {
  overflow-x: hidden;
  max-width: 100%;
}

body > div.relative.z-10 {
  overflow-x: hidden;
  max-width: 100%;
}

@media (max-width: 767px) {
  html.lenis,
  html.lenis-smooth,
  html.lenis-scrolling {
    height: auto !important;
    overflow: auto !important;
  }

  header.fixed.top-0 {
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  header.fixed.top-0 > div.flex.items-center.relative.w-full {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  body > div.relative.z-10 > section:first-of-type {
    padding-top: calc(100px + env(safe-area-inset-top, 0px)) !important;
  }

  .h-screen:not(.fixed),
  .min-h-screen,
  .h-svh:not(.fixed),
  .min-h-svh,
  section.h-svh:not(.fixed),
  section.min-h-svh,
  section.h-screen:not(.fixed) {
    height: auto !important;
    min-height: 100dvh !important;
  }

  body > div.relative.z-10 > section:first-of-type.min-h-svh {
    min-height: 0 !important;
    height: auto !important;
  }

  body > div.relative.z-10 > section:first-of-type.h-svh .flex-1.min-h-0 {
    min-height: 20rem;
  }

  .fixed.h-svh,
  .fixed.h-screen {
    height: 100dvh;
    min-height: 100dvh;
  }

  .js-three-wrapper {
    display: none !important;
    height: 0 !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  .pin-spacer {
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }

  /* Force-reveal page content that GSAP/Lenis leave at opacity 0.
     Do not target the closed mobile-nav overlay (sibling of header). */
  body > div.relative.z-10 > section,
  body > div.relative.z-10 > section *:not(script):not(style),
  footer,
  footer *:not(script):not(style),
  .sprig-component,
  .sprig-component * {
    opacity: 1 !important;
    visibility: visible !important;
  }

  .gsap-marker-start,
  .gsap-marker-end,
  [data-framer-name],
  .motion-div,
  [style*="translateY"],
  [style*="translate3d"] {
    transform: none !important;
  }

  img[loading="lazy"][style*="opacity"] {
    opacity: 1 !important;
  }
}
