/* ============================================================
   hero.css – Sekcja hero z efektem 3D Depth Parallax
   Premier Motors v2.0
   ============================================================ */

/* ── Kontener hero – pełnoekranowy ── */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 700px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Warstwy parallax (3D depth) ── */
.hero-scene {
  position: absolute;
  inset: 0;
  perspective: 1000px;
  transform-style: preserve-3d;
}

/* Warstwa 1: tło (najwolniejsza) */
.hero-layer {
  position: absolute;
  inset: -20%;
  will-change: transform;
  transform-style: preserve-3d;
  transition: transform 0.1s linear;
}

.hero-bg {
  background:
    linear-gradient(180deg, rgba(10,10,10,0.3) 0%, rgba(10,10,10,0.6) 60%, rgba(10,10,10,0.95) 100%),
    url('https://placehold.co/1920x1080/0a0a0a/dc0000?text=Premier+Motors') center/cover no-repeat;
  background-color: #0a0a0a;
}

/* Gradient overlay na dole hero – blend z sekcjami poniżej */
.hero-bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to bottom, transparent, var(--color-bg));
}

/* Warstwa 2: pojazd (środkowa, szybsza parallax) */
.hero-vehicle {
  inset: -10%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero-vehicle-img {
  width: 75%;
  max-width: 900px;
  object-fit: contain;
  filter: drop-shadow(0 40px 80px rgba(220, 0, 0, 0.15));
  transform-origin: center bottom;
  animation: vehicleEntrance 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

/* Animacja wejścia pojazdu – efekt "wyjazdu" z głębi */
@keyframes vehicleEntrance {
  0% {
    opacity: 0;
    transform: perspective(1200px) translateZ(-300px) scale(0.7);
    filter: drop-shadow(0 40px 80px rgba(220, 0, 0, 0)) blur(8px);
  }
  60% {
    opacity: 1;
    filter: drop-shadow(0 40px 80px rgba(220, 0, 0, 0.12)) blur(0px);
  }
  100% {
    opacity: 1;
    transform: perspective(1200px) translateZ(0px) scale(1);
    filter: drop-shadow(0 40px 80px rgba(220, 0, 0, 0.15)) blur(0px);
  }
}

/* Warstwa 3: cząsteczki/blaski */
.hero-particles {
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Cząsteczki CSS – animowane złote punkty */
.hero-particles::before,
.hero-particles::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: var(--color-gold);
  opacity: 0.15;
  animation: particleFloat 8s ease-in-out infinite;
}

.hero-particles::before {
  width: 3px; height: 3px;
  top: 30%; left: 15%;
  box-shadow:
    80px  40px 0 var(--color-gold),
    160px -20px 0 var(--color-gold-light),
    240px  60px 0 var(--color-gold),
    320px  10px 0 var(--color-gold-light),
    50px  120px 0 var(--color-gold),
    400px  80px 0 var(--color-gold),
    480px -10px 0 var(--color-gold-light),
    560px  50px 0 var(--color-gold),
    640px  30px 0 var(--color-gold-light),
    720px  70px 0 var(--color-gold),
    800px -20px 0 var(--color-gold-light),
    880px  40px 0 var(--color-gold),
    960px  10px 0 var(--color-gold-light),
    1040px 60px 0 var(--color-gold),
    1120px 20px 0 var(--color-gold-light);
}

.hero-particles::after {
  width: 2px; height: 2px;
  top: 60%; left: 20%;
  animation-delay: -4s;
  opacity: 0.1;
  box-shadow:
    100px -30px 0 var(--color-gold-light),
    200px  20px 0 var(--color-gold),
    300px -10px 0 var(--color-gold-light),
    450px  40px 0 var(--color-gold),
    600px -20px 0 var(--color-gold-light),
    750px  10px 0 var(--color-gold),
    900px -30px 0 var(--color-gold-light),
    1050px 25px 0 var(--color-gold);
}

@keyframes particleFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-20px); }
}

/* Kanwas cząsteczek JS (jeśli używamy canvas) */
.hero-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
}

/* ── Treść hero (nad warstwami) ── */
.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding-inline: var(--space-6);
  max-width: 900px;
  margin-inline: auto;
}

/* Label nad tytułem */
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-4);
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.3s forwards;
}

.hero-label::before,
.hero-label::after {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--color-gold);
  opacity: 0.6;
}

/* Tytuł główny hero */
.hero-title {
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 900;
  color: var(--color-white);
  line-height: 1.0;
  margin-bottom: var(--space-4);
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.5s forwards;
  letter-spacing: -0.03em;
}

.hero-title .line-gold {
  display: block;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
}

/* Podtytuł */
.hero-subtitle {
  font-size: clamp(var(--text-base), 2.5vw, var(--text-xl));
  color: var(--color-white-dim);
  margin-bottom: var(--space-10);
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.7s forwards;
  letter-spacing: 0.05em;
  font-weight: 300;
}

/* ── Przyciski CTA hero ── */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.9s forwards;
}

/* Pulsujący glow na głównym CTA */
.btn--hero-cta {
  padding: var(--space-4) var(--space-10);
  font-size: var(--text-base);
  animation: heroBtnGlow 3s ease-in-out infinite;
}

@keyframes heroBtnGlow {
  0%, 100% { box-shadow: 0 4px 20px rgba(220, 0, 0, 0.3); }
  50%       { box-shadow: 0 4px 50px rgba(220, 0, 0, 0.6), 0 0 80px rgba(220, 0, 0, 0.2); }
}

/* ── Scroll indicator ── */
.hero-scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  opacity: 0;
  animation: fadeInUp 0.8s ease 1.3s forwards;
  cursor: pointer;
}

.hero-scroll-indicator span {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-white-muted);
}

.scroll-arrow {
  width: 28px;
  height: 28px;
  border-right: 2px solid var(--color-gold);
  border-bottom: 2px solid var(--color-gold);
  transform: rotate(45deg);
  animation: scrollBounce 1.8s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 1; }
  50%       { transform: rotate(45deg) translateY(8px); opacity: 0.5; }
}

/* ── Przycisk wideo (opcjonalny) ── */
.hero-video-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-white-dim);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  background: rgba(255, 255, 255, 0.05);
}

.hero-video-btn:hover {
  color: var(--color-white);
  border-color: var(--color-gold);
  background: var(--color-gold-dim);
}

.hero-video-btn .play-icon {
  width: 28px;
  height: 28px;
  background: var(--color-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-video-btn .play-icon svg {
  fill: #ffffff;
  width: 10px;
  height: 10px;
  margin-left: 2px;
}

/* ── Video background (ukryte domyślnie) ── */
.hero-video-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}

.hero-video-bg.playing {
  opacity: 1;
}

.hero-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateZ(0);
  will-change: transform;
}

.hero-video-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.4) 0%, rgba(10,10,10,0.3) 50%, rgba(10,10,10,0.8) 100%);
}

/* ── Dekoracyjna linia gradient na dole hero ── */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent, var(--color-bg));
  pointer-events: none;
  z-index: 5;
}

/* ── Animacje wejścia ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Responsywność ── */
@media (max-width: 768px) {
  .hero {
    min-height: 600px;
    align-items: flex-end;
    padding-bottom: var(--space-20);
  }
  .hero-vehicle-img {
    width: 100%;
    opacity: 0.4;
  }
  .hero-title {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .hero-video-btn {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-content {
    padding-inline: var(--space-4);
  }
  .hero-label {
    font-size: 0.65rem;
  }
  .hero-scroll-indicator {
    display: none;
  }
}
