/* ============================================
   RODE CULTURE — Cinematic Scroll Experience
   Premium motorcycle animation system
============================================ */

/* ---- HERO CANVAS BACKGROUND ---- */

.hero { isolation: isolate; }

#heroCanvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 1;
}

/* Road horizon glow at bottom of hero */
.hero-road-glow {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 220px;
  background: linear-gradient(0deg,
    rgba(0,0,0,0.45) 0%,
    rgba(0,0,0,0.15) 40%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 2;
}

/* Vignette edges */
.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 90% at 50% 50%,
    transparent 40%,
    rgba(0,0,0,0.55) 100%
  );
  pointer-events: none;
  z-index: 2;
}

.hero-ambient-orb {
  position: absolute;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20,20,20,0.35) 0%, transparent 70%);
  top: -30%;
  right: -15%;
  pointer-events: none;
  z-index: 1;
  animation: orbPulse 9s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

@keyframes orbPulse {
  from { transform: scale(1) translate(0,0); opacity: 0.6; }
  to   { transform: scale(1.18) translate(-20px, 30px); opacity: 1; }
}

.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 128px;
}

/* Enhanced hero actions button hover */
.hero-actions .btn {
  transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.hero-actions .btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  transform: translateX(-100%) skewX(-15deg);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-actions .btn:hover::before { transform: translateX(150%) skewX(-15deg); }
.hero-actions .btn:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.35); }

/* Clip reveal on hero text (GSAP-driven, starts clipped) */
.hero-clip-wrap {
  overflow: hidden;
  display: block;
}

/* ---- CINEMATIC SCENE ---- */

.cinematic-scene {
  position: relative;
  background: #060504;
  overflow: hidden;
  width: 100%;
}

.cinematic-inner {
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Atmospheric background gradient */
.scene-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(30,20,12,0.9) 0%, transparent 100%),
    linear-gradient(180deg, #0a0806 0%, #060504 50%, #0d0b07 100%);
  z-index: 0;
}

/* Horizon glow line */
.scene-horizon {
  position: absolute;
  bottom: 32%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(201,168,130,0.06) 20%,
    rgba(201,168,130,0.18) 50%,
    rgba(201,168,130,0.06) 80%,
    transparent 100%
  );
  z-index: 1;
}

/* Atmospheric fog layer */
.scene-fog {
  position: absolute;
  bottom: 28%;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(201,168,130,0.025) 40%,
    rgba(201,168,130,0.04) 60%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
  animation: fogDrift 12s ease-in-out infinite alternate;
}

@keyframes fogDrift {
  from { opacity: 0.6; transform: scaleX(1); }
  to   { opacity: 1;   transform: scaleX(1.04); }
}

/* Light shafts */
.scene-shafts {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.light-shaft {
  position: absolute;
  top: 0;
  width: 180px;
  height: 55%;
  background: linear-gradient(180deg, rgba(255,240,180,0.04) 0%, transparent 100%);
  transform-origin: top center;
  pointer-events: none;
  animation: shaftFlicker 7s ease-in-out infinite alternate;
}
.light-shaft:nth-child(2) { animation-duration: 11s; animation-delay: -3s; }
.light-shaft:nth-child(3) { animation-duration: 9s; animation-delay: -6s; }

@keyframes shaftFlicker {
  0%,100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Road surface */
.road-surface {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 34%;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(12,10,6,0.7) 30%,
    #0c0a07 100%
  );
  z-index: 2;
  pointer-events: none;
}

/* Road texture line */
.road-line {
  position: absolute;
  bottom: 32%;
  left: 0;
  right: 0;
  height: 60px;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.road-dashes {
  position: absolute;
  bottom: 29%;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 3;
  overflow: hidden;
}

.road-dashes::before {
  content: '';
  position: absolute;
  inset: 0;
  width: 200%;
  background: repeating-linear-gradient(90deg,
    rgba(201,168,130,0.12) 0px,
    rgba(201,168,130,0.12) 80px,
    transparent 80px,
    transparent 160px
  );
  animation: dashScroll 2.5s linear infinite;
}

@keyframes dashScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Cinematic caption text */
.ride-caption {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  will-change: opacity, transform;
  white-space: nowrap;
}

.ride-caption-tag {
  display: block;
  font-family: 'Garet', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--tan);
  margin-bottom: 14px;
  opacity: 0;
  transform: translateY(10px);
}

.ride-caption-title {
  display: block;
  font-family: 'Yeseva One', serif;
  font-size: clamp(3.5rem, 10vw, 8rem);
  color: var(--cream);
  line-height: 1;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(15px);
  text-shadow: 0 0 80px rgba(201,168,130,0.15);
}

/* Motorcycle container */
.moto-container {
  position: absolute;
  bottom: 30%;
  left: 0;
  width: 100%;
  z-index: 10;
  pointer-events: none;
}

.moto-wrapper {
  position: relative;
  display: inline-block;
  width: 620px;
  will-change: transform;
  transform: translateX(-130vw);
}

.moto-svg-el {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 20px 50px rgba(0,0,0,0.7));
}

/* Headlight beam cone */
.headlight-beam {
  position: absolute;
  right: -15px;
  top: 32%;
  width: 520px;
  height: 260px;
  background: conic-gradient(
    from -18deg at 2% 50%,
    rgba(255,245,180,0.28) 0deg,
    rgba(255,245,180,0.14) 14deg,
    rgba(255,245,180,0.06) 24deg,
    transparent 34deg
  );
  transform-origin: left center;
  filter: blur(10px);
  border-radius: 0 50% 50% 0;
  pointer-events: none;
  opacity: 0;
  z-index: -1;
}

/* Ground dust trail under bike */
.ground-dust {
  position: absolute;
  bottom: -2px;
  left: 5%;
  right: 25%;
  height: 30px;
  background: linear-gradient(90deg,
    rgba(150,120,80,0.18) 0%,
    transparent 100%
  );
  filter: blur(6px);
  opacity: 0;
  pointer-events: none;
}

/* Exhaust smoke particles (created by JS) */
.smoke-p {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180,160,130,0.55) 0%, transparent 70%);
  pointer-events: none;
  will-change: transform, opacity;
}

/* Scene bottom fade to next section */
.scene-bottom-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(0deg, #F5F0E8, transparent);
  pointer-events: none;
  z-index: 20;
}

/* ---- GSAP ENTRANCE CLASSES ---- */

/* Sections after the cinematic scene get a premium entrance */
.cin-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.85s ease, transform 0.85s ease;
}
/* Triggered by IntersectionObserver on non-home pages; GSAP inline styles override on home */
.cin-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- WHEEL ROTATION BASE ---- */
#rearWheel, #frontWheel { transform-box: fill-box; transform-origin: center; }

/* ---- MOBILE ADJUSTMENTS ---- */
@media (max-width: 1024px) {
  .moto-wrapper { width: 480px; }
}

@media (max-width: 768px) {
  .moto-wrapper { width: 340px; }
  .headlight-beam { width: 280px; height: 140px; }
  .ride-caption-title { font-size: clamp(2.5rem, 14vw, 5rem); }
  .hero-ambient-orb { width: 500px; height: 500px; }
}

@media (max-width: 480px) {
  .moto-wrapper { width: 280px; }
  .ride-caption { white-space: normal; width: 90vw; }
}

/* ---- SECTION TRANSITIONS (post-cinematic) ---- */

/* Stats bar entrance */
.stats-bar { position: relative; overflow: hidden; }

/* Smooth reveal for all fade-up children in sections after scene */
.post-cinematic .section-title,
.post-cinematic .section-label {
  transition-delay: 0.1s;
}
