/* ==========================================================================
   FIT EZ — CINEMATIC SCROLL REVEAL & STATIC BACKGROUND INTEGRATION
   Zero-gap, zero-split architecture:
   - Static last frame (frame_241.jpg) is fixed behind the entire website.
   - Canvas plays/scrubs animation over transparent sticky viewport.
   - Canvas blends seamlessly into identical static background on completion.
   - Content emerges smoothly upward with scroll as opacity increases.
   ========================================================================== */

:root {
  --hero-lime: #95BD3E;
  --hero-lime-glow: rgba(149, 189, 62, 0.45);
}

/* ── Scroll Track Architecture (Transparent so static background is seamless) ── */
.logo-scroll-section.hero-section,
#hero.logo-scroll-section {
  position: relative !important;
  width: 100% !important;
  height: 320vh !important;
  min-height: 320vh !important;
  background: transparent !important;
  z-index: 10 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  overflow: visible !important;
  display: block !important;
}


.logo-scroll-section.hero-section::before,
.logo-scroll-section.hero-section::after {
  display: none !important;
}

/* 100vh Sticky Viewport Window (Transparent: zero edge seam on unpinning) ── */
.logo-scroll-sticky {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  background: transparent !important;
  will-change: transform !important;
  z-index: 10 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ── Fullscreen Canvas Layer ── */
.logo-scroll-canvas {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: contain !important;
  pointer-events: none !important;
  background: transparent !important;
  transform: translate3d(0, 0, 0) !important;
  will-change: opacity, transform !important;
  z-index: 1 !important;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* ── Emerging Hero Content Layer ── */
.hero-reveal-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding: 0 1.5rem;
}

.hero-reveal-container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero-reveal-stage .hero-content {
  position: relative;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
  padding: 2.25rem 2rem;
  border-radius: 28px;
  background: radial-gradient(ellipse 90% 75% at center, rgba(12, 20, 15, 0.85) 0%, rgba(12, 20, 15, 0.55) 70%, transparent 100%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(149, 189, 62, 0.14);

  /* Scroll-driven transformation: initially hidden, opacity increases with scroll */
  opacity: 0;
  transform: translate3d(0, 70px, 0);
  pointer-events: none;
  will-change: transform, opacity;
}

/* ── Premium Editorial Headline Typography ── */
.hero-h1.liquid-headline {
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: clamp(2.35rem, 5.2vw, 4.25rem) !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  letter-spacing: -0.035em !important;
  color: #F0F7EA !important;
  margin-top: 0 !important;
  margin-bottom: 1.35rem !important;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

/* Restrained lime-green emphasis consistent with Fit Ez logo */
.hero-h1.liquid-headline em,
.hero-h1.liquid-headline .liquid-accent {
  font-style: normal;
  color: var(--hero-lime) !important;
  display: inline-block;
  text-shadow: 0 0 28px rgba(149, 189, 62, 0.4);
  position: relative;
}

/* ── Liquid Text Hover Physics Engine ── */
.liquid-word {
  display: inline-block;
  white-space: nowrap;
}

.liquid-char {
  display: inline-block;
  position: relative;
  will-change: transform;
  transform: translate3d(0, var(--liquid-y, 0px), 0)
             scale(var(--liquid-scale, 1))
             rotate(var(--liquid-rot, 0deg));
  transition: color 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              text-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.liquid-char.is-hovered {
  color: #FFFFFF !important;
  text-shadow: 0 0 18px var(--hero-lime-glow), 0 0 35px var(--hero-lime-glow);
}

.hero-h1.liquid-headline em .liquid-char.is-hovered,
.hero-h1.liquid-headline .liquid-accent .liquid-char.is-hovered {
  color: #D4FF66 !important;
  text-shadow: 0 0 25px rgba(149, 189, 62, 0.9), 0 0 50px rgba(149, 189, 62, 0.6);
}

.liquid-char-space {
  display: inline-block;
  width: 0.28em;
}

/* ── Content Elements Consistency ── */
.hero-reveal-stage .hero-tagline {
  color: #9DB59A !important;
  font-size: clamp(1rem, 1.3vw, 1.15rem) !important;
  line-height: 1.6 !important;
  max-width: 620px !important;
  margin: 0 auto 1.75rem auto !important;
}

.hero-reveal-stage .hero-proof-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 1.25rem !important;
  justify-content: center !important;
  margin-bottom: 2rem !important;
}

.hero-reveal-stage .hero-proof-item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  color: #9DB59A !important;
  font-size: 0.92rem !important;
  font-weight: 500 !important;
}

.hero-reveal-stage .hero-proof-item i {
  color: var(--hero-lime) !important;
}

.hero-reveal-stage .hero-cta-wrapper {
  margin: 0 auto 1.5rem auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 1rem !important;
}

.hero-reveal-stage .hero-cta-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 1rem !important;
  justify-content: center !important;
}

.hero-reveal-stage .hero-pricing-line {
  justify-content: center !important;
}

/* ── Header Visibility Synchronization ── */
.header.header-hidden-in-reveal {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(-16px) !important;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.header.header-visible-site {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Mobile Responsive Adaptation ── */
@media (max-width: 768px) {
  .logo-scroll-section.hero-section,
  #hero.logo-scroll-section {
    height: 280vh !important;
    min-height: 280vh !important;
  }

  .logo-scroll-sticky {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }

  .hero-reveal-stage {
    padding: 0 1rem;
    align-items: center;
  }

  .hero-reveal-stage .hero-content {
    padding: 1.35rem 1.15rem !important;
    border-radius: 20px !important;
    background: radial-gradient(ellipse 95% 85% at center, rgba(12, 20, 15, 0.94) 0%, rgba(12, 20, 15, 0.85) 75%, transparent 100%) !important;
    max-width: 92vw !important;
    max-height: calc(100dvh - 110px) !important;
    overflow-y: auto !important;
    scrollbar-width: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(149, 189, 62, 0.18) !important;
  }

  .hero-reveal-stage .hero-content::-webkit-scrollbar {
    display: none;
  }

  .hero-h1.liquid-headline {
    font-size: clamp(1.75rem, 6.2vw, 2.2rem) !important;
    line-height: 1.12 !important;
    letter-spacing: -0.025em !important;
    margin-bottom: 0.6rem !important;
  }

  .hero-reveal-stage .hero-tagline {
    font-size: 0.84rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.8rem !important;
    max-width: 330px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .hero-reveal-stage .hero-proof-row {
    gap: 0.35rem 0.6rem !important;
    margin-bottom: 0.9rem !important;
    justify-content: center !important;
  }

  .hero-reveal-stage .hero-proof-item {
    font-size: 0.74rem !important;
  }

  .hero-reveal-stage .hero-cta-wrapper {
    gap: 0.5rem !important;
    width: 100% !important;
    max-width: 320px !important;
    margin: 0 auto !important;
  }

  .hero-reveal-stage .hero-cta-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .hero-reveal-stage .btn-lime,
  .hero-reveal-stage .btn-outline-forest {
    flex: 1 !important;
    padding: 0.68rem 0.5rem !important;
    font-size: 0.84rem !important;
    justify-content: center !important;
    white-space: nowrap !important;
  }

  .hero-reveal-stage .btn-brochure {
    width: 100% !important;
    padding: 0.6rem 0.8rem !important;
    font-size: 0.82rem !important;
    justify-content: center !important;
  }

  .hero-reveal-stage .hero-pricing-line {
    margin-top: 0.5rem !important;
    font-size: 0.74rem !important;
  }
}

/* ── Reduced Motion Accessibility ── */
@media (prefers-reduced-motion: reduce) {
  .logo-scroll-section.hero-section {
    height: auto !important;
    min-height: 100vh !important;
  }

  .logo-scroll-sticky {
    position: relative !important;
    height: auto !important;
    min-height: 100vh !important;
  }

  .logo-scroll-canvas {
    opacity: 0 !important;
  }

  .hero-reveal-stage {
    position: relative !important;
    min-height: 100vh !important;
  }

  .hero-reveal-stage .hero-content {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  .liquid-char {
    transform: none !important;
  }

  .header.header-hidden-in-reveal {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
  }
}
