/* Webflow-style smooth scroll wrapper (homepage uneven scroll) */

@media (prefers-reduced-motion: no-preference) {
  #smooth-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  /* Webflow marketing pages on desktop: native document scroll (no Lenis). */
  html.tc-native-scroll #smooth-wrapper {
    position: relative;
    height: auto;
    overflow: visible;
  }

  html.tc-native-scroll #smooth-content {
    will-change: auto;
  }

  #smooth-content {
    overflow: visible;
    will-change: transform;
  }

  body:has(.svc-detail) #smooth-content {
    background-color: #161616;
  }

  html.lenis,
  html.lenis body {
    height: auto;
  }

  .lenis.lenis-smooth {
    scroll-behavior: auto !important;
  }

  .lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
  }

  .lenis.lenis-stopped {
    overflow: hidden;
  }

  /* Curtain panel slides over pinned hero */
  body.tc-curtain-scroll .home-hero.home-hero--page.tc-curtain-hero {
    z-index: 1 !important;
  }

  body.tc-curtain-scroll .home-hero.home-hero--page .custom-grid.home-hero-grid {
    z-index: 1 !important;
    position: relative;
  }

  #smooth-content > section:not(.home-hero) {
    position: relative;
    z-index: 2;
  }

  .tc-curtain-panel {
    position: relative;
    z-index: 2;
    margin-top: 0 !important;
    background-color: #161616;
    box-shadow: 0 -32px 64px rgba(0, 0, 0, 0.4);
  }

  body.tc-curtain-scroll--mobile .tc-curtain-panel {
    box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.35);
  }

  .tc-curtain-panel.svc-intro,
  .tc-curtain-panel.project-details,
  .tc-curtain-panel.shaping,
  .tc-curtain-panel.blog,
  .tc-curtain-panel.project,
  .tc-curtain-panel.contact {
    padding-top: 110px;
  }

  body.tc-curtain-scroll--mobile .tc-curtain-panel.svc-intro,
  body.tc-curtain-scroll--mobile .tc-curtain-panel.project-details,
  body.tc-curtain-scroll--mobile .tc-curtain-panel.shaping,
  body.tc-curtain-scroll--mobile .tc-curtain-panel.blog,
  body.tc-curtain-scroll--mobile .tc-curtain-panel.project,
  body.tc-curtain-scroll--mobile .tc-curtain-panel.contact {
    padding-top: 72px;
  }
}
