/* =========================================================
   STS GROUPS — Cinematic homepage (index.html ONLY)
   ---------------------------------------------------------
   Loaded only when <body class="home-cinematic"> is present,
   so every other page on the site is completely unaffected.

   Palette: Black + Metallic Silver (monochrome, no gold/amber —
   matches the site-wide theme in style.css). The tear-transition
   panels and text accents use a bright silver/chrome gradient so
   they read as polished metal against the black background.

   Product visuals are STS Groups' own real product photos with
   the background removed (assets/products/cutout/*.png) so they
   read as floating "3D" objects with a soft glow, rather than
   framed photographs or stock imagery.

   Structure (top to bottom):
   1. Shared helpers (reveal-in, silver text, cutout-jar glow)
   2. Hero — simple opening screen with a floating cutout jar;
      on scroll, a pinned "page tear" sweeps closed over it
      (top + bottom torn-metal panels meet in the middle) while
      the jar shrinks away, then releases into the carousel
   3. Impact band
   4. Product carousel — Buffalo / Cow / Combo, one product at a
      time, left/right detail columns, prev/next arrows + dots,
      next slide enters from the right, prev from the left
   5. Delivery-journey — scroll-driven "order → dispatch →
      delivered" scene at the very end of the homepage
   ========================================================= */

body.home-cinematic {
  --cine-glow: rgba(255, 255, 255, 0.09);
  --cine-glow-soft: rgba(255, 255, 255, 0.045);
  --cine-liquid: #e4e4e4;
  overflow-x: hidden;
}

/* ---------- 1. shared bits ---------- */
.home-cinematic .cine-gold-text {
  background: linear-gradient(180deg, #ffffff, #8f8f8f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.home-cinematic .reveal-el { opacity: 0; transform: translateY(26px); }
.home-cinematic .reveal-el.in,
.home-cinematic .reveal-el.cine-no-anim { animation: cineRevealUp 0.9s cubic-bezier(.16,.8,.24,1) forwards; }
@keyframes cineRevealUp { to { opacity: 1; transform: translateY(0); } }

.home-cinematic .cine-btn-line {
  display: inline-block;
  font-size: 13px;
  color: var(--accent);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 4px;
  transition: border-color .25s ease, color .25s ease;
}
.home-cinematic .cine-btn-line:hover { border-color: var(--accent-strong); color: var(--accent-strong); }

/* Real product photo, background removed — floats with a soft
   silver contact glow instead of a card frame, for a pseudo-3D
   product look against the black background */
.home-cinematic .cine-cutout-jar {
  display: block;
  max-width: 100%;
  filter: drop-shadow(0 0 34px rgba(255,255,255,0.10)) drop-shadow(0 30px 26px rgba(0,0,0,0.65));
  will-change: transform;
}

/* ---------- 2. hero ---------- */
.home-cinematic .cine-hero {
  position: relative; height: 100vh; min-height: 600px; width: 100%; overflow: hidden;
  background: linear-gradient(160deg, #0a0a0a 0%, #131313 100%);
}
.home-cinematic .cine-hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 18% 30%, var(--cine-glow), transparent 60%),
    radial-gradient(ellipse 50% 60% at 86% 74%, var(--cine-glow-soft), transparent 55%);
}
.home-cinematic .cine-hero-bgtype {
  position: absolute; inset: 0; z-index: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: min(22vw, 280px); font-weight: 700; color: rgba(255,255,255,0.04);
  letter-spacing: 12px; white-space: nowrap; user-select: none; pointer-events: none;
}

.home-cinematic .cine-hero-wrap {
  position: relative; z-index: 3; height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
}
.home-cinematic .cine-hero-content { max-width: 560px; }
.home-cinematic .cine-hero-content h1 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
  margin-bottom: 18px;
}
.home-cinematic .cine-hero-content p { color: var(--silver); font-size: 17px; margin-bottom: 30px; max-width: 480px; }

.home-cinematic .cine-hero-visual { position: relative; width: 380px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.home-cinematic .cine-hero-visual .cine-cutout-jar { width: 300px; animation: cineHeroBob 5.5s ease-in-out infinite; }
@keyframes cineHeroBob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-18px) rotate(2deg); } }

.home-cinematic .cine-scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 6;
  font-size: 10px; letter-spacing: 3px; color: var(--silver-dim); text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.home-cinematic .cine-scroll-cue .cine-line {
  width: 1px; height: 32px; background: linear-gradient(var(--accent-strong), transparent);
  animation: cineCueFlow 1.8s ease-in-out infinite;
}
@keyframes cineCueFlow { 0% { opacity: 0.15; } 50% { opacity: 0.9; } 100% { opacity: 0.15; } }

/* ---------- 3. impact band ---------- */
.home-cinematic .cine-impact {
  position: relative; padding: 70px 6vw; text-align: center; background: var(--bg-alt);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.home-cinematic .cine-impact h2 {
  font-size: clamp(18px, 3vw, 34px); letter-spacing: 3px; text-transform: uppercase; font-weight: 700; margin: 0;
  background: linear-gradient(100deg, #7a7a7a 0%, #ffffff 50%, #7a7a7a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.home-cinematic .cine-impact .cine-rule { width: 60px; height: 1px; background: var(--accent); margin: 20px auto 0; }

/* ---------- 4. product carousel ---------- */
.home-cinematic .cine-showcase { position: relative; padding: 90px 0 70px; background: var(--bg); overflow: hidden; }
.home-cinematic .cine-showcase-head { text-align: center; max-width: 560px; margin: 0 auto 50px; }
.home-cinematic .cine-showcase-head h2 { font-family: var(--font-serif); font-size: clamp(26px, 3.4vw, 40px); margin: 14px 0 0; }

.home-cinematic .cine-showcase-wrap { position: relative; display: flex; align-items: center; gap: 18px; max-width: 1320px; margin: 0 auto; padding: 0 6vw; }
.home-cinematic .cine-arrow {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border-light);
  background: var(--bg-card); color: var(--white); font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 5;
  transition: border-color .25s ease, background .25s ease, transform .15s ease, color .25s ease;
}
.home-cinematic .cine-arrow:hover { border-color: var(--accent-strong); color: var(--accent-strong); background: var(--bg-card-hover); }
.home-cinematic .cine-arrow:active { transform: scale(0.92); }

.home-cinematic .cine-carousel { position: relative; flex: 1; min-height: 620px; overflow: hidden; }
.home-cinematic .cine-slide-item {
  position: absolute; inset: 0; z-index: 1;
  display: grid; grid-template-columns: 0.85fr 1.05fr 0.85fr; align-items: center; gap: 24px;
  opacity: 0; pointer-events: none;
}
.home-cinematic .cine-slide-item.is-active { opacity: 1; pointer-events: auto; z-index: 2; }
.home-cinematic .cine-slide-item::before {
  content: ''; position: absolute; inset: -20px 0; z-index: -1; pointer-events: none; border-radius: 40px;
}
.home-cinematic .cine-slide-item[data-accent="1"]::before { background: radial-gradient(ellipse 60% 65% at 50% 50%, var(--cine-glow), transparent 65%); }
.home-cinematic .cine-slide-item[data-accent="2"]::before { background: radial-gradient(ellipse 60% 65% at 50% 50%, rgba(255,255,255,0.06), transparent 65%); }
.home-cinematic .cine-slide-item[data-accent="3"]::before { background: radial-gradient(ellipse 60% 65% at 50% 50%, var(--cine-glow-soft), transparent 65%); }

.home-cinematic .cine-slide-text-left { position: relative; z-index: 2; }
.home-cinematic .cine-cat { font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.home-cinematic .cine-slide-text-left h3 { font-family: var(--font-serif); font-size: clamp(28px, 3.4vw, 44px); margin: 0 0 16px; color: var(--white); letter-spacing: -0.3px; }
.home-cinematic .cine-slide-text-left p { color: var(--silver-soft); font-size: 14.5px; max-width: 340px; margin-bottom: 20px; }
.home-cinematic .cine-slide-text-left ul { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.home-cinematic .cine-slide-text-left li { font-size: 12.5px; color: var(--silver-soft); display: flex; align-items: center; gap: 8px; }
.home-cinematic .cine-slide-text-left li::before { content: '—'; color: var(--accent); }

.home-cinematic .cine-slide-visual { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; height: 100%; }
.home-cinematic .cine-slide-visual .cine-cutout-jar { width: 230px; max-width: 80%; }
.home-cinematic .cine-slide-visual .cine-cutout-jar.cine-cutout-jar-b { width: 160px; margin-left: -50px; margin-top: 70px; opacity: 0.92; }
.home-cinematic .cine-off {
  position: absolute; top: 18%; left: 30%; z-index: 3;
  background: var(--cine-liquid); color: var(--bg); font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
}

.home-cinematic .cine-slide-text-right { position: relative; z-index: 2; text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.home-cinematic .cine-price-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 22px; }
.home-cinematic .cine-now { font-family: var(--font-serif); font-size: 30px; color: var(--white); }
.home-cinematic .cine-mrp { font-size: 14px; color: var(--silver-dim); text-decoration: line-through; }
.home-cinematic .cine-add-cart { margin-bottom: 12px; }
.home-cinematic .cine-add-cart.is-added { background: linear-gradient(135deg, var(--accent-strong), var(--accent)); }
.home-cinematic .cine-view-link { font-size: 12.5px; color: var(--silver-soft); margin-bottom: 16px; }
.home-cinematic .cine-view-link:hover { color: var(--accent); }
.home-cinematic .cine-microcopy { font-size: 11.5px; color: var(--silver-dim); margin-top: 6px; max-width: 220px; }

.home-cinematic .cine-carousel-dots {
  display: flex; justify-content: center; gap: 10px; margin-top: 34px;
}
.home-cinematic .cine-carousel-dots button {
  width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--border-light); background: transparent; padding: 0; cursor: pointer;
  transition: background .3s ease, transform .3s ease;
}
.home-cinematic .cine-carousel-dots button.active { background: var(--accent-strong); transform: scale(1.35); box-shadow: 0 0 10px rgba(228,228,228,0.45); }

/* ---------- 5. delivery journey — scroll-driven closer ---------- */
.home-cinematic .cine-delivery-journey {
  position: relative; overflow: hidden; background: #060606;
  border-top: 1px solid var(--border);
  padding: 90px 0 70px;
}
.home-cinematic .cdj-sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.home-cinematic .cdj-sun {
  position: absolute; top: 8%; right: 12%; width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, var(--cine-liquid) 0%, rgba(228,228,228,0.15) 70%, transparent 100%);
  filter: blur(1px);
  animation: cdjPulse 4.5s ease-in-out infinite;
}
.home-cinematic .cdj-cloud {
  position: absolute; border-radius: 999px; background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05);
  animation: cdjDrift 42s linear infinite;
}
.home-cinematic .cdj-cloud-1 { width: 160px; height: 42px; top: 14%; left: -10%; }
.home-cinematic .cdj-cloud-2 { width: 110px; height: 30px; top: 30%; left: 60%; animation-duration: 58s; animation-delay: -12s; }
.home-cinematic .cdj-cloud-3 { width: 130px; height: 34px; top: 6%; left: 30%; animation-duration: 68s; animation-delay: -24s; }
@keyframes cdjDrift { from { transform: translateX(0); } to { transform: translateX(140vw); } }
@keyframes cdjPulse { 0%, 100% { opacity: 0.85; } 50% { opacity: 1; transform: scale(1.05); } }

.home-cinematic .cdj-head { position: relative; z-index: 2; text-align: center; max-width: 620px; margin: 0 auto 56px; }
.home-cinematic .cdj-head .eyebrow { color: #e4e4e4; }
.home-cinematic .cdj-head h2 {
  font-family: var(--font-serif); font-size: clamp(26px, 4vw, 44px); margin: 14px 0 0; color: var(--white);
}

.home-cinematic .cdj-scene { position: relative; z-index: 2; max-width: 1100px; margin: 0 auto; padding: 0 6vw 40px; }
.home-cinematic .cdj-road {
  position: relative; height: 3px; margin: 60px 0 46px;
  background-image: repeating-linear-gradient(90deg, rgba(228,228,228,0.35) 0 24px, transparent 24px 44px);
  background-size: 200% 100%;
}
.home-cinematic .cdj-rider {
  position: absolute; top: -46px; left: 0; width: 130px; color: #e4e4e4;
  filter: drop-shadow(0 12px 20px rgba(0,0,0,0.6));
  will-change: transform;
}
.home-cinematic .cdj-rider-svg { width: 100%; display: block; }

.home-cinematic .cdj-milestones {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; text-align: center;
}
.home-cinematic .cdj-milestone {
  opacity: 0.25; transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.home-cinematic .cdj-milestone.is-active { opacity: 1; transform: translateY(0); }
.home-cinematic .cdj-milestone-ic { display: block; font-size: 26px; margin-bottom: 10px; }
.home-cinematic .cdj-milestone p { font-size: 13.5px; color: var(--silver-soft); max-width: 220px; margin: 0 auto; }

.home-cinematic .cdj-cta { position: relative; z-index: 2; text-align: center; margin-top: 50px; }

@media (max-width: 900px) {
  /* Fixed 100vh + vertically-centered content left a large empty gap
     above the headline on tall phone screens — size the hero to its
     content instead, with sensible breathing room top/bottom. */
  .home-cinematic .cine-hero { height: auto; min-height: 0; padding: 44px 0 48px; }
  .home-cinematic .cine-hero-wrap { height: auto; flex-direction: column; text-align: center; justify-content: flex-start; padding-top: 0; gap: 22px; }
  .home-cinematic .cine-hero-content { max-width: 94%; }
  .home-cinematic .cine-hero-content p { margin-left: auto; margin-right: auto; }
  .home-cinematic .hero-actions, .home-cinematic .hero-trust-row { justify-content: center; }
  .home-cinematic .cine-hero-visual { width: 220px; height: 200px; }
  .home-cinematic .cine-hero-visual .cine-cutout-jar { width: 200px; }

  .home-cinematic .cine-showcase-wrap { gap: 8px; padding: 0 3vw; }
  .home-cinematic .cine-arrow { width: 38px; height: 38px; font-size: 18px; }
  /* min-height with overflow-y:auto on the slide below was showing a
     visible scrollbar line on phones whenever a slide's content ran a
     little taller than the box — size the carousel generously and let
     the active slide overflow quietly instead of scrolling internally. */
  .home-cinematic .cine-carousel { min-height: 840px; }
  .home-cinematic .cine-slide-item {
    grid-template-columns: 1fr; text-align: center; gap: 8px; padding: 8px 2vw; overflow-y: visible;
  }
  .home-cinematic .cine-slide-text-left, .home-cinematic .cine-slide-text-right { align-items: center; text-align: center; }
  .home-cinematic .cine-slide-text-left p, .home-cinematic .cine-microcopy { max-width: 100%; margin-left: auto; margin-right: auto; }
  .home-cinematic .cine-slide-text-left ul { align-items: center; }
  .home-cinematic .cine-slide-visual { order: -1; height: 200px; }

  .home-cinematic .cdj-milestones { grid-template-columns: 1fr; gap: 20px; }
  .home-cinematic .cdj-rider { width: 96px; }
}

@media (max-width: 620px) {
  .home-cinematic .cine-hero-content p { font-size: 15.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-cinematic .cine-hero-visual .cine-cutout-jar, .home-cinematic .cine-scroll-cue .cine-line,
  .home-cinematic .cdj-cloud, .home-cinematic .cdj-sun { animation: none !important; }
}
