/* ==========================================================================
   Cinematic video hero — CLASS OTOMOTİV OTONOMİ
   Neon accents: purple / electric blue / controlled red
   ========================================================================== */

:root {
  --neon-purple: #9b5cff;
  --neon-blue: #3aa0ff;
  --neon-red: #ff3b5c;
  --neon-gold: #C6A36A;
}

/* Glass header over cinematic hero */
body.has-cinema-hero .site-header {
  background: rgba(8, 9, 11, 0.35);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(155, 92, 255, 0.12);
}

body.has-cinema-hero .site-header.is-scrolled {
  background: rgba(8, 9, 11, 0.9);
  border-bottom-color: rgba(245, 245, 245, 0.08);
}

body.has-cinema-hero .top-bar {
  background: rgba(8, 9, 11, 0.75);
  border-bottom-color: rgba(58, 160, 255, 0.15);
}

/* Hero shell */
.hero.hero--cinema {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 2.5rem) 1.25rem 5.5rem;
  overflow: hidden;
  isolation: isolate;
}

body.has-topbar .hero.hero--cinema {
  padding-top: calc(var(--header-h) + 3.75rem);
}

.hero-cinema {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #05060a;
}

.hero-cinema-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: brightness(0.55) contrast(1.05);
  z-index: 0;
}

.hero-video-slot {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
  pointer-events: none;
}

.hero-video-slot.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-video-slot.is-leaving {
  opacity: 0;
  z-index: 2;
}

.hero-video-slot video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transform: scale(1.02);
  transform-origin: center center;
}

.hero-video-slot.is-active video.is-kenburns-in {
  animation: hero-kenburns-in 14s ease-out forwards;
}

.hero-video-slot.is-active video.is-kenburns-out {
  animation: hero-kenburns-out 14s ease-out forwards;
}

@keyframes hero-kenburns-in {
  from { transform: scale(1.02); }
  to { transform: scale(1.08); }
}

@keyframes hero-kenburns-out {
  from { transform: scale(1.08); }
  to { transform: scale(1.02); }
}

/* Readable overlays */
.hero-cinema-shade {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(105deg, rgba(5, 6, 10, 0.88) 0%, rgba(5, 6, 10, 0.55) 42%, rgba(5, 6, 10, 0.35) 70%, rgba(5, 6, 10, 0.55) 100%),
    linear-gradient(to bottom, rgba(5, 6, 10, 0.65) 0%, transparent 28%, transparent 55%, rgba(5, 6, 10, 0.92) 100%);
}

/* Soft neon light beams */
.hero-fx {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.hero-fx-beam {
  position: absolute;
  width: 55vmax;
  height: 55vmax;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.28;
  mix-blend-mode: screen;
  animation: hero-beam-drift 18s ease-in-out infinite alternate;
}

.hero-fx-beam--purple {
  top: -20%;
  left: -10%;
  background: radial-gradient(circle, rgba(155, 92, 255, 0.55), transparent 68%);
}

.hero-fx-beam--blue {
  bottom: -25%;
  right: -15%;
  background: radial-gradient(circle, rgba(58, 160, 255, 0.45), transparent 68%);
  animation-delay: -6s;
  animation-duration: 22s;
}

.hero-fx-beam--red {
  top: 35%;
  left: 45%;
  width: 30vmax;
  height: 30vmax;
  background: radial-gradient(circle, rgba(255, 59, 92, 0.22), transparent 70%);
  opacity: 0.18;
  animation-delay: -11s;
  animation-duration: 16s;
}

@keyframes hero-beam-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4%, -3%, 0) scale(1.12); }
}

.hero-fx-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(155, 92, 255, 0.06) 48%,
    rgba(58, 160, 255, 0.08) 52%,
    transparent 60%
  );
  background-size: 220% 100%;
  animation: hero-scan 9s ease-in-out infinite;
  opacity: 0.7;
}

@keyframes hero-scan {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0% 0; }
}

.hero-fx-line {
  position: absolute;
  height: 1px;
  width: 40%;
  left: -40%;
  top: 28%;
  background: linear-gradient(90deg, transparent, rgba(58, 160, 255, 0.55), transparent);
  animation: hero-line-sweep 11s ease-in-out infinite;
  opacity: 0.45;
}

.hero-fx-line--2 {
  top: 72%;
  animation-delay: -5s;
  background: linear-gradient(90deg, transparent, rgba(155, 92, 255, 0.45), transparent);
}

@keyframes hero-line-sweep {
  0% { transform: translateX(0); opacity: 0; }
  15% { opacity: 0.5; }
  50% { transform: translateX(220%); opacity: 0.35; }
  100% { transform: translateX(220%); opacity: 0; }
}

.hero-fx-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(155, 92, 255, 0.18), transparent 55%);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.hero-fx-flash.is-on {
  opacity: 1;
}

/* Content */
.hero.hero--cinema .hero-content {
  position: relative;
  z-index: 6;
  width: min(100%, 50rem);
  text-align: left;
}

.hero-cinema-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(168, 173, 181, 0.9);
  margin-bottom: 1.35rem;
  opacity: 0;
  transform: translateY(16px);
}

.hero-cinema-brand {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.85rem, 5.2vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: 0.18em;
  color: #f5f5f5;
  text-shadow:
    0 0 24px rgba(155, 92, 255, 0.35),
    0 0 48px rgba(58, 160, 255, 0.15);
  opacity: 0;
  transform: translateY(20px);
  position: relative;
}

.hero-cinema-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 45%,
    transparent 70%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  mix-blend-mode: soft-light;
  animation: hero-title-sheen 5.5s ease-in-out 2.2s infinite;
  pointer-events: none;
  opacity: 0;
}

.hero.is-ready .hero-cinema-brand::after {
  opacity: 1;
}

@keyframes hero-title-sheen {
  0%, 100% { background-position: 120% 0; }
  50% { background-position: -20% 0; }
}

.hero-cinema-slogan {
  margin-top: 1.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #e8d5a8;
  text-shadow: 0 0 20px rgba(198, 163, 106, 0.25);
  opacity: 0;
  transform: translateY(28px);
}

.hero-cinema-lead,
.hero-cinema-meta {
  margin-top: 0.85rem;
  opacity: 0;
  transform: translateY(22px);
}

.hero-cinema-lead {
  font-size: 1.1rem;
  color: #f0f2f5;
  max-width: 30rem;
}

.hero-cinema-meta {
  font-size: 0.95rem;
  color: var(--muted);
}

.hero-cinema-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 2.35rem;
  opacity: 0;
  transform: translateY(20px);
}

/* Intro animation states */
.hero.is-ready .hero-cinema-eyebrow,
.hero.is-ready .hero-cinema-brand,
.hero.is-ready .hero-cinema-slogan,
.hero.is-ready .hero-cinema-lead,
.hero.is-ready .hero-cinema-meta,
.hero.is-ready .hero-cinema-actions {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1s cubic-bezier(0.22, 1, 0.36, 1),
    letter-spacing 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero.is-ready .hero-cinema-eyebrow { transition-delay: 0.15s; }
.hero.is-ready .hero-cinema-brand {
  transition-delay: 0.35s;
  letter-spacing: 0.07em;
}
.hero.is-ready .hero-cinema-slogan { transition-delay: 0.7s; }
.hero.is-ready .hero-cinema-lead { transition-delay: 0.95s; }
.hero.is-ready .hero-cinema-meta { transition-delay: 1.15s; }
.hero.is-ready .hero-cinema-actions { transition-delay: 1.35s; }

/* Neon CTA buttons */
.btn-neon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0.85rem 1.7rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f5f5f5;
  background: rgba(8, 9, 11, 0.45);
  border: 1px solid rgba(58, 160, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(155, 92, 255, 0.12) inset,
    0 0 18px rgba(58, 160, 255, 0.18);
  backdrop-filter: blur(8px);
  transition: border-color 0.35s, box-shadow 0.35s, background 0.35s, transform 0.35s;
}

.btn-neon:hover {
  border-color: rgba(155, 92, 255, 0.75);
  background: rgba(155, 92, 255, 0.12);
  box-shadow:
    0 0 0 1px rgba(58, 160, 255, 0.2) inset,
    0 0 28px rgba(155, 92, 255, 0.28);
  transform: translateY(-1px);
}

.btn-neon-fill {
  color: #08090B;
  background: linear-gradient(120deg, #c6a36a, #e0c48a);
  border-color: transparent;
  box-shadow: 0 0 22px rgba(198, 163, 106, 0.3);
}

.btn-neon-fill:hover {
  background: linear-gradient(120deg, #d4b78a, #f0d9a8);
  box-shadow: 0 0 30px rgba(198, 163, 106, 0.4);
  border-color: transparent;
}

/* Progress + dots */
.hero-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 7;
  height: 2px;
  background: rgba(245, 245, 245, 0.08);
}

.hero-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon-purple), var(--neon-blue), var(--neon-red));
  box-shadow: 0 0 12px rgba(58, 160, 255, 0.55);
  transition: width 0.1s linear;
}

.hero-dots {
  position: absolute;
  bottom: 1.35rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  display: flex;
  gap: 0.55rem;
  padding: 0.35rem 0.55rem;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(245, 245, 245, 0.45);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.hero-dot.is-active {
  background: var(--neon-blue);
  border-color: var(--neon-blue);
  box-shadow: 0 0 10px rgba(58, 160, 255, 0.7);
  transform: scale(1.15);
}

.hero-dot:hover {
  border-color: var(--neon-purple);
}

.hero.hero--cinema .hero-scroll {
  bottom: 2.75rem;
  z-index: 8;
  border-color: rgba(58, 160, 255, 0.35);
}

.hero.hero--cinema .hero-scroll span {
  background: linear-gradient(to bottom, var(--neon-blue), var(--neon-purple));
}

/* Soft blend into next section */
.hero-cinema-fadeout {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 7rem;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, #15171B);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-fx-beam,
  .hero-fx-scan,
  .hero-fx-line,
  .hero-cinema-brand::after,
  .hero-video-slot video.is-kenburns-in,
  .hero-video-slot video.is-kenburns-out {
    animation: none !important;
  }

  .hero-video-slot {
    transition-duration: 0.01ms;
  }

  .hero-cinema-eyebrow,
  .hero-cinema-brand,
  .hero-cinema-slogan,
  .hero-cinema-lead,
  .hero-cinema-meta,
  .hero-cinema-actions {
    opacity: 1 !important;
    transform: none !important;
    letter-spacing: 0.06em;
  }
}

@media (max-width: 640px) {
  .hero.hero--cinema {
    align-items: flex-end;
    padding-bottom: 5.5rem;
  }

  .hero-cinema-brand {
    letter-spacing: 0.1em;
  }

  .hero.is-ready .hero-cinema-brand {
    letter-spacing: 0.04em;
  }

  .hero-cinema-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-neon {
    width: 100%;
  }

  .hero-fx-beam {
    opacity: 0.18;
    filter: blur(60px);
  }

  .hero-fx-line {
    display: none;
  }

  .hero-video-slot video {
    object-position: center 35%;
  }
}
