/* ============================================
   Hero Section — Cinematic Premium
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px var(--space-margin-desktop) 80px;
  overflow: hidden;
}

@media (max-width: 768px) {
  .hero {
    padding: 120px var(--space-margin-mobile) 64px;
  }
}

/* Background layers */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55) saturate(1.1);
  transform: scale(1.05);
}

.hero__bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(0, 229, 255, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 30% 60%, rgba(0, 71, 171, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 70% 60%, rgba(0, 71, 171, 0.05) 0%, transparent 60%),
    linear-gradient(180deg, rgba(18, 19, 23, 0.15) 0%, transparent 25%, transparent 55%, rgba(18, 19, 23, 1) 100%);
}

.hero__bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* Floating particles */
.hero__particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.hero__particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--color-primary-container);
  border-radius: 50%;
  opacity: 0;
  animation: float-particle linear infinite;
}

.hero__particle:nth-child(1) { left: 10%; animation-duration: 12s; animation-delay: 0s; }
.hero__particle:nth-child(2) { left: 25%; animation-duration: 15s; animation-delay: 2s; }
.hero__particle:nth-child(3) { left: 40%; animation-duration: 10s; animation-delay: 4s; }
.hero__particle:nth-child(4) { left: 55%; animation-duration: 14s; animation-delay: 1s; }
.hero__particle:nth-child(5) { left: 70%; animation-duration: 11s; animation-delay: 3s; }
.hero__particle:nth-child(6) { left: 85%; animation-duration: 13s; animation-delay: 5s; }
.hero__particle:nth-child(7) { left: 15%; animation-duration: 16s; animation-delay: 6s; }
.hero__particle:nth-child(8) { left: 60%; animation-duration: 9s; animation-delay: 2.5s; }

@keyframes float-particle {
  0% {
    transform: translateY(100vh) translateX(0);
    opacity: 0;
  }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% {
    transform: translateY(-100px) translateX(30px);
    opacity: 0;
  }
}

/* HUD Frame around hero content */
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 60px 40px;
  animation: fade-in-up 0.8s ease-out;
}

@media (max-width: 768px) {
  .hero__content {
    padding: 40px 20px;
  }
}

/* HUD corner brackets */
.hero__hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__hud::before,
.hero__hud::after,
.hero__hud .hud-br::before,
.hero__hud .hud-br::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border-color: rgba(0, 229, 255, 0.25);
  border-style: solid;
}

.hero__hud::before {
  top: 0;
  left: 0;
  border-width: 2px 0 0 2px;
}

.hero__hud::after {
  top: 0;
  right: 0;
  border-width: 2px 2px 0 0;
}

.hero__hud .hud-br::before {
  bottom: 0;
  left: 0;
  border-width: 0 0 2px 2px;
}

.hero__hud .hud-br::after {
  bottom: 0;
  right: 0;
  border-width: 0 2px 2px 0;
}

/* HUD horizontal lines */
.hero__hud-line {
  position: absolute;
  background: rgba(0, 229, 255, 0.08);
}

.hero__hud-line--top {
  top: -1px;
  left: 40px;
  right: 40px;
  height: 1px;
}

.hero__hud-line--bottom {
  bottom: -1px;
  left: 40px;
  right: 40px;
  height: 1px;
}

.hero__hud-line--left {
  left: -1px;
  top: 40px;
  bottom: 40px;
  width: 1px;
}

.hero__hud-line--right {
  right: -1px;
  top: 40px;
  bottom: 40px;
  width: 1px;
}

.hero__logo {
  width: 200px;
  height: auto;
  margin: 0 auto 32px;
}

.hero__title {
  font-family: var(--font-headline);
  font-size: var(--text-headline-xl-size);
  font-weight: var(--text-headline-xl-weight);
  line-height: var(--text-headline-xl-line);
  letter-spacing: var(--text-headline-xl-tracking);
  text-transform: uppercase;
  color: var(--color-on-surface);
  margin-bottom: 24px;
  text-shadow:
    0 0 7px rgba(0, 229, 255, 0.4),
    0 0 21px rgba(0, 229, 255, 0.3),
    0 0 42px rgba(0, 229, 255, 0.2),
    0 0 82px rgba(0, 229, 255, 0.1);
}

.hero__title-accent {
  color: var(--color-primary-container);
  text-shadow:
    0 0 4px rgba(0, 229, 255, 0.8),
    0 0 14px rgba(0, 229, 255, 0.6),
    0 0 28px rgba(0, 229, 255, 0.4),
    0 0 56px rgba(0, 229, 255, 0.3),
    0 0 112px rgba(0, 229, 255, 0.15);
  position: relative;
  display: inline-block;
}

/* Glitch effect on accent text */
.hero__title-accent::before,
.hero__title-accent::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.hero__title-accent::before {
  color: #ff0040;
  animation: glitch-clip 4s infinite linear alternate-reverse;
}

.hero__title-accent::after {
  color: #00e5ff;
  animation: glitch-clip2 4s infinite linear alternate-reverse;
}

@keyframes glitch-clip {
  0%, 92%, 100% { opacity: 0; transform: translate(0); }
  93% { opacity: 0.8; transform: translate(-3px, 1px); }
  94% { opacity: 0; }
  96% { opacity: 0.6; transform: translate(3px, -1px); }
  97% { opacity: 0; }
}

@keyframes glitch-clip2 {
  0%, 90%, 100% { opacity: 0; transform: translate(0); }
  91% { opacity: 0.6; transform: translate(2px, 1px); }
  92% { opacity: 0; }
  95% { opacity: 0.8; transform: translate(-2px, -1px); }
  96% { opacity: 0; }
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-body-lg-size);
  line-height: var(--text-body-lg-line);
  color: var(--color-on-surface-variant);
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.15);
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__actions .btn-primary,
.hero__actions .btn-secondary {
  gap: 10px;
}

.hero__actions svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: fade-in-up 1s ease-out 0.5s both;
}

.hero__scroll-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--color-on-surface-variant);
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.hero__scroll-icon:hover {
  opacity: 1;
}

.hero__scroll-text {
  font-family: var(--font-headline);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero__scroll-arrow {
  width: 20px;
  height: 20px;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
