/* ============================================
   Fetch It! — 3D Cube Landing Page Styles
   Layers on TOP of product.css (Tailwind)
   ============================================ */

:root {
  --cube-size: 320px;
  --cube-half: 160px;
  --bg-landing: #0a0a0f;
  --text-hero: #f5f5f5;
  --text-secondary: #9ca3af;
  --accent-orange: #f97316;
  --accent-blue: #1193d4;
  --font-display: 'Space Grotesk', sans-serif;
}

/* ---- Loading Overlay ---- */
.landing-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-landing);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.landing-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.landing-loader img {
  height: 48px;
  margin-bottom: 16px;
}
.landing-loader .loader-text {
  color: var(--text-secondary);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}
.landing-loader .loader-bar {
  width: 120px;
  height: 3px;
  background: #1f1f2e;
  border-radius: 2px;
  margin-top: 12px;
  overflow: hidden;
}
.landing-loader .loader-fill {
  height: 100%;
  width: 30%;
  background: var(--accent-orange);
  border-radius: 2px;
  animation: loader-slide 1.2s ease-in-out infinite;
}
@keyframes loader-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

/* ---- Noscript fallback ---- */
.noscript-fallback {
  padding: 4rem 2rem;
  text-align: center;
  background: var(--bg-landing);
  color: var(--text-hero);
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.noscript-fallback h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.noscript-fallback p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 480px;
}

/* ---- Main scroll container ---- */
.landing-scroll {
  position: relative;
  z-index: 1;
  background: var(--bg-landing);
}

/* ---- Hero Section ---- */
.landing-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: 2rem 2rem 12vh;
}
.landing-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: var(--text-hero);
  line-height: 1.1;
  margin-bottom: 1rem;
  opacity: 0;
}
.landing-hero .hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 0.5rem;
  opacity: 0;
}
.landing-hero .hero-price {
  font-size: 0.875rem;
  color: var(--accent-orange);
  font-weight: 600;
  opacity: 0;
}

/* ---- 3D Cube ---- */
.cube-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.cube-perspective {
  perspective: 1000px;
  width: var(--cube-size);
  height: var(--cube-size);
  margin: 0 auto;
}
.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  will-change: transform;
}
.cube-face {
  position: absolute;
  width: var(--cube-size);
  height: var(--cube-size);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(249, 115, 22, 0.2), 0 0 60px rgba(249, 115, 22, 0.08);
}
.cube-face video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  background: #1a1a2e;
}

/* Placeholder face styles (until real videos) */
.cube-face--placeholder {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Sound toggle button */
.cube-sound-toggle {
  pointer-events: auto;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.cube-sound-toggle:hover {
  background: rgba(249, 115, 22, 0.2);
  border-color: rgba(249, 115, 22, 0.4);
  color: var(--accent-orange);
}
.cube-sound-toggle.unmuted {
  background: rgba(249, 115, 22, 0.25);
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

/* Face transforms */
.face-front  { transform: translateZ(var(--cube-half)); }
.face-back   { transform: rotateY(180deg) translateZ(var(--cube-half)); }
.face-right  { transform: rotateY(90deg) translateZ(var(--cube-half)); }
.face-left   { transform: rotateY(-90deg) translateZ(var(--cube-half)); }
.face-top    { transform: rotateX(90deg) translateZ(var(--cube-half)); }
.face-bottom { transform: rotateX(-90deg) translateZ(var(--cube-half)); }

/* Face placeholder colors */
.face-top    { background: var(--accent-orange); }
.face-front  { background: #1a1a2e; }
.face-right  { background: #16213e; }
.face-back   { background: #0f3460; }
.face-left   { background: #1a1a2e; }
.face-bottom { background: #111; }

/* ---- Scroll Spacer ---- */
.scroll-spacer {
  height: 50vh;
}

/* ---- Beat Sections ---- */
.beat-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 4rem 2rem;
  position: relative;
}
.beat-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.beat-inner.reverse {
  direction: rtl;
}
.beat-inner.reverse > * {
  direction: ltr;
}

/* Beat text content */
.beat-text {
  opacity: 0;
}
.beat-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-orange);
  margin-bottom: 0.75rem;
}
.beat-heading {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  color: var(--text-hero);
  line-height: 1.15;
  margin-bottom: 1rem;
}
.beat-body {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 440px;
}
.beat-stat {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.5rem 1rem;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-orange);
}

/* ---- Repel word spans ---- */
.rw {
  display: inline-block;
  will-change: transform;
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  .rw { will-change: auto; }
}

/* Beat ad player (click-to-play with audio) */
.beat-ad-player {
  margin-top: 1.5rem;
  max-width: 400px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  background: #111118;
}
.beat-ad-player video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}
.beat-ad-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-orange);
  letter-spacing: 0.05em;
}

/* Beat cube placeholder (mobile fallback) */
.beat-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.beat-video-inline {
  display: none; /* Hidden on desktop, shown on mobile */
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1a2e;
}
.beat-video-inline video {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

/* ---- CTA Section (pinned) ---- */
.landing-cta {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
}
.cta-heading {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-hero);
  margin-bottom: 0.75rem;
  opacity: 0;
}
.cta-sub {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  opacity: 0;
}
.cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--accent-orange);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 24px rgba(249, 115, 22, 0.3);
  opacity: 0;
}
.cta-button:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 32px rgba(249, 115, 22, 0.45);
}
.cta-trial {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  opacity: 0;
}

/* ---- Testimonials (reuse existing Tailwind structure) ---- */
.landing-testimonials {
  padding: 4rem 2rem;
}

/* ---- Partner Logos ---- */
.landing-partners {
  padding: 3rem 2rem;
}

/* ---- Mobile Responsive (< 768px) ---- */
@media (max-width: 767px) {
  :root {
    --cube-size: 240px;
    --cube-half: 120px;
  }

  /* Hide the 3D cube on mobile */
  .cube-wrapper {
    display: none;
  }

  /* Show inline videos instead */
  .beat-video-inline {
    display: block;
  }

  /* Stack beat sections vertically */
  .beat-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .beat-inner.reverse {
    direction: ltr;
  }

  .beat-section {
    min-height: auto;
    padding: 3rem 1.5rem;
  }

  .beat-heading {
    font-size: 1.5rem;
  }

  .beat-body {
    max-width: 100%;
  }

  /* Show beat text immediately on mobile (no scroll-triggered reveal) */
  .beat-text {
    opacity: 1;
  }

  /* Sticky mobile CTA bar */
  .mobile-cta-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0.75rem 1rem;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255,255,255,0.08);
    justify-content: center;
  }
  .mobile-cta-bar a {
    display: block;
    width: 100%;
    max-width: 400px;
    text-align: center;
    padding: 0.75rem 1.5rem;
    background: var(--accent-orange);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 10px;
    text-decoration: none;
  }

  .landing-hero {
    min-height: auto;
    justify-content: center;
    padding: 3rem 1.5rem;
  }

  .landing-hero h1 {
    font-size: 2rem;
  }

  /* Hide scroll spacer (only needed for cube rotation on desktop) */
  .scroll-spacer {
    display: none;
  }

  /* Reduce CTA section height on mobile */
  .landing-cta {
    min-height: auto;
    padding: 3rem 1.5rem;
  }
}

/* Hide mobile CTA on desktop */
@media (min-width: 768px) {
  .mobile-cta-bar {
    display: none;
  }
}

/* ---- Medium screens (cube scaling) ---- */
@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --cube-size: 280px;
    --cube-half: 140px;
  }
}

/* ---- Large screens ---- */
@media (min-width: 1280px) {
  :root {
    --cube-size: 380px;
    --cube-half: 190px;
  }
}
