/* ============================================================
   Salt Landing — Cinematic Feature Injection
   Scope: Cinematic (P1 + P2 + P3)
   Load order: AFTER main.css and landing.css
   ============================================================ */

/* ── 0. Override native smooth scroll — Lenis takes sole control ── */
html {
  scroll-behavior: auto !important;
}

/* ── Module B: Hero Animated Background ── */
/* Gold blob SVG drifts slowly behind hero content */
.lp-hero {
  position: relative;
  overflow: hidden;
}

.lp-hero::before {
  content: '';
  position: absolute;
  inset: -40px;
  background: url('../assets/hero-bg.svg') center / cover no-repeat;
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
  animation: blobDrift 14.4s ease-in-out infinite;
}

/* Vignette — bottom fade on mobile, left-side fade on desktop */
.lp-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 130% 80% at 50% 110%, var(--color-bg) 0%, transparent 65%);
  pointer-events: none;
  z-index: 1;
}

@media (min-width: 900px) {
  .lp-hero::after {
    background:
      radial-gradient(ellipse 65% 100% at 22% 50%, transparent 40%, var(--color-bg) 95%),
      linear-gradient(to right, var(--color-bg) 0%, transparent 42%, transparent 100%);
  }
}

.lp-hero__inner {
  position: relative;
  z-index: 2;
}

@keyframes blobDrift {
  0%   { transform: translate(0,    0)    scale(1);    }
  33%  { transform: translate(18px, -12px) scale(1.04); }
  66%  { transform: translate(-10px, 14px) scale(0.97); }
  100% { transform: translate(0,    0)    scale(1);    }
}

/* ── Module B: Hero Entrance (CSS animations — no GSAP dependency) ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lp-hero__headline {
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.lp-hero__sub {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}
.lp-hero__cta {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.55s both;
}

/* Mockup: mobile = JS-driven reveal; desktop = CSS animation on load */
@media (min-width: 900px) {
  .lp-hero__mockup {
    animation: mockupEnterDesktop 1s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
  }
}

@keyframes mockupEnterMobile {
  from { opacity: 0; transform: translateY(44px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes mockupEnterDesktop {
  from { opacity: 0; transform: translateX(52px) translateY(8px); }
  to   { opacity: 1; transform: translateX(0)    translateY(0); }
}

/* ── Mobile mockup: starts hidden, JS adds .mockup-visible ── */
@media (max-width: 899px) {
  .salt-mockup-wrapper {
    opacity: 0;
    transform: translateY(52px) scale(0.95);
    filter: blur(6px);
    transition:
      opacity  1s    cubic-bezier(0.16, 1, 0.3, 1),
      transform 1s   cubic-bezier(0.16, 1, 0.3, 1),
      filter   0.85s ease;
  }

  .salt-mockup-wrapper.mockup-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* ── Scroll hint ── */
.lp-scroll-hint {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: rgba(201, 168, 76, 0.55);
  pointer-events: none;
  z-index: 100;
  transition: opacity 0.65s ease, transform 0.65s ease;
}

/* Desktop: never show */
@media (min-width: 900px) {
  .lp-scroll-hint { display: none; }
}

.lp-scroll-hint__label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lp-scroll-hint__chevron {
  width: 18px;
  height: 12px;
  animation: scrollBounce 1.8s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0);   opacity: 0.55; }
  50%       { transform: translateY(5px); opacity: 1;    }
}

.lp-scroll-hint.hint-gone {
  opacity: 0;
  transform: translateX(-50%) translateY(14px);
}

/* ── Module C: Scroll Entrance Animations ── */
.reveal-up {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity  0.75s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay for sibling elements */
.reveal-up:nth-child(2) { transition-delay: 0.10s; }
.reveal-up:nth-child(3) { transition-delay: 0.20s; }
.reveal-up:nth-child(4) { transition-delay: 0.30s; }

/* ── Module E: Button Fill-Wipe Hover ── */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transform: translateX(-101%);
  transition: transform 380ms cubic-bezier(0.77, 0, 0.175, 1);
  z-index: 0;
  pointer-events: none;
}

.btn:hover::before {
  transform: translateX(0);
}

/* Primary (gold bg): white sheen wipes in */
.btn-primary::before {
  background: rgba(255, 255, 255, 0.18);
}

/* Ghost (transparent bg): gold fill wipes in */
.btn-ghost::before {
  background: rgba(201, 168, 76, 0.15);
}

/* Replace existing instant background jump on ghost hover with wipe */
.btn-ghost:hover {
  background: transparent;
}

/* Button children stay above fill layer */
.btn > *,
.btn > i,
.btn > span {
  position: relative;
  z-index: 1;
}

/* ── Module H: Bento card stagger delays ── */
.lp-bento-grid .lp-feature-card:nth-child(1) { transition-delay: 0.00s; }
.lp-bento-grid .lp-feature-card:nth-child(2) { transition-delay: 0.08s; }
.lp-bento-grid .lp-feature-card:nth-child(3) { transition-delay: 0.16s; }
.lp-bento-grid .lp-feature-card:nth-child(4) { transition-delay: 0.24s; }
.lp-bento-grid .lp-feature-card:nth-child(5) { transition-delay: 0.32s; }
.lp-bento-grid .lp-feature-card:nth-child(6) { transition-delay: 0.40s; }

/* (Keep legacy grid stagger for fallback) */
.lp-features__grid .lp-feature-card:nth-child(1) { transition-delay: 0.00s; }
.lp-features__grid .lp-feature-card:nth-child(2) { transition-delay: 0.10s; }
.lp-features__grid .lp-feature-card:nth-child(3) { transition-delay: 0.20s; }
.lp-features__grid .lp-feature-card:nth-child(4) { transition-delay: 0.30s; }
.lp-features__grid .lp-feature-card:nth-child(5) { transition-delay: 0.40s; }
.lp-features__grid .lp-feature-card:nth-child(6) { transition-delay: 0.50s; }

/* ── Module G: Card Hover Lift ── */
.lp-feature-card,
.lp-who-card {
  transition:
    transform  280ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 280ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.lp-feature-card:hover,
.lp-who-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.20);
}

/* ── Module J: Hero badge entrance ── */
.lp-hero__badge {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

/* ── Module K: Stats entrance stagger ── */
.lp-stats__grid .lp-stat-card:nth-child(1) { transition-delay: 0.00s; }
.lp-stats__grid .lp-stat-card:nth-child(2) { transition-delay: 0.12s; }
.lp-stats__grid .lp-stat-card:nth-child(3) { transition-delay: 0.24s; }

/* ── Module L: Testimonial quote entrance ── */
@keyframes quoteEnter {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.lp-quote.is-visible {
  animation: quoteEnter 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── Module M: CTA section stagger ── */
.lp-cta__inner .lp-badge-pill { transition-delay: 0.00s; }
.lp-cta__inner h2             { transition-delay: 0.10s; }
.lp-cta__inner p              { transition-delay: 0.20s; }
.lp-cta__inner .lp-cta__btn   { transition-delay: 0.30s; }

/* ── Module I: Mockup hover — desktop only (primary phone lifts and glows) ── */
@media (min-width: 900px) {
  .salt-mockup-wrapper:hover .salt-phone--primary {
    transform: perspective(1200px) rotateY(10deg) rotateX(2deg) translateY(-10px) !important;
    box-shadow:
      0 0 0 1px rgba(201, 168, 76, 0.45),
      0 40px 96px rgba(0, 0, 0, 0.95),
      0 0 64px rgba(201, 168, 76, 0.22) !important;
    transition: transform 0.45s cubic-bezier(.16, 1, .3, 1), box-shadow 0.45s ease !important;
  }
}

/* ── Reduced motion: disable all animations ── */
@media (prefers-reduced-motion: reduce) {
  .lp-hero::before,
  .lp-hero__headline,
  .lp-hero__sub,
  .lp-hero__cta,
  .lp-hero__mockup,
  .reveal-up {
    animation: none !important;
    transition: none !important;
  }

  .reveal-up {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ── WinnSS footer attribution ── */
.lp-footer__winnss {
  padding: 6px 0 22px;
  display: flex;
  justify-content: center;
}

.lp-winnss-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  opacity: 0.48;
  transition: opacity 0.25s ease;
}

.lp-winnss-link:hover {
  opacity: 0.85;
}

.lp-winnss-label {
  font-size: 10px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lp-winnss-logo {
  height: 18px;
  width: auto;
  display: block;
  /* Recolor WinnSS green → Salt gold */
  filter: brightness(0) invert(1) sepia(1) saturate(2.5) hue-rotate(-5deg) brightness(0.88);
}
