/**
 * BigCat Codeworks Hero Component
 * Hero section styles for the homepage
 * 
 * Import order: _tokens.css → base.css → layout.css → components/hero.css
 */

/* ===== HERO CONTAINER ===== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(
    135deg,
    var(--color-bg-primary) 0%,
    var(--color-bg-secondary) 50%,
    var(--color-bg-tertiary) 100%
  );
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(30, 144, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(0, 206, 209, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 0, 255, 0.03) 2px,
      rgba(255, 0, 255, 0.03) 4px
    );
  pointer-events: none;
  animation: scanlines 20s linear infinite;
}

/* ===== HERO CONTENT ===== */

.hero__tagline {
  display: block;
  font-family: var(--font-hero);
  font-size: clamp(var(--font-size-4xl), 8vw, var(--font-size-6xl));
  font-weight: var(--font-weight-black);
  line-height: 0.9;
  color: var(--color-text-primary);
  text-shadow: 
    0 0 20px rgba(255, 0, 255, 0.5),
    0 0 40px rgba(255, 0, 255, 0.3),
    0 0 60px rgba(255, 0, 255, 0.1);
  animation: heroTitleGlow 3s ease-in-out infinite alternate;
}

.hero__tagline--glitch {
  position: relative;
  display: inline-block;
}

.hero__tagline--glitch {
  position: relative;
  display: inline-block;
  /* Removed pseudo-elements to prevent text duplication */
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--container-2xl);
  padding: var(--spacing-8) var(--spacing-4);
  margin: 0 auto;
}

.hero__title {
  font-family: var(--font-hero);
  font-size: clamp(var(--font-size-4xl), 8vw, var(--font-size-6xl));
  font-weight: var(--font-weight-black);
  line-height: 0.9;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-6);
  text-shadow: 
    0 0 20px rgba(255, 0, 255, 0.5),
    0 0 40px rgba(255, 0, 255, 0.3),
    0 0 60px rgba(255, 0, 255, 0.1);
  animation: heroTitleGlow 3s ease-in-out infinite alternate;
}

.hero__subtitle {
  font-family: var(--font-heading);
  font-size: clamp(var(--font-size-lg), 3vw, var(--font-size-2xl));
  font-weight: var(--font-weight-medium);
  line-height: 1.3;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-8);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.5s forwards;
}

.hero__description {
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-12);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.8s forwards;
}

/* ===== HERO ACTIONS ===== */

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-4);
  opacity: 0;
  animation: fadeInUp 1s ease-out 1.1s forwards;
}

@media (min-width: 640px) {
  .hero__actions {
    flex-direction: row;
    justify-content: center;
  }
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-3);
  padding: var(--spacing-4) var(--spacing-8);
  font-family: var(--font-heading);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  color: var(--color-text-inverse);
  background: var(--color-primary);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-xl);
  transition: all var(--duration-normal) var(--ease-cyber-out);
  position: relative;
  overflow: hidden;
}

.hero__cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left var(--duration-normal) var(--ease-cyber-out);
}

.hero__cta:hover::before {
  left: 100%;
}

.hero__cta:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary-light);
  transform: translateY(-4px);
  box-shadow: 
    0 20px 40px rgba(255, 0, 255, 0.3),
    0 0 60px rgba(255, 0, 255, 0.2);
}

.hero__cta:focus {
  outline: none;
  box-shadow: 
    0 0 0 4px rgba(255, 0, 255, 0.3),
    0 20px 40px rgba(255, 0, 255, 0.3);
}

.hero__cta:active {
  transform: translateY(-2px);
}

.hero__secondary-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-3);
  padding: var(--spacing-4) var(--spacing-8);
  font-family: var(--font-heading);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  color: var(--color-primary);
  background: transparent;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-xl);
  transition: all var(--duration-normal) var(--ease-cyber-out);
}

.hero__secondary-cta:hover {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  transform: translateY(-4px);
  box-shadow: 
    0 20px 40px rgba(255, 0, 255, 0.2),
    0 0 40px rgba(255, 0, 255, 0.1);
}

.hero__secondary-cta:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 0, 255, 0.3);
}

.hero__secondary-cta:active {
  transform: translateY(-2px);
}

/* ===== HERO DECORATIVE ELEMENTS ===== */

/* Removed glitch overlay styles to prevent duplicate text */

/* ===== HERO BACKGROUND ANIMATIONS ===== */

.hero__floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero__floating-element {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--color-primary);
  border-radius: 50%;
  opacity: 0.6;
  animation: float 6s ease-in-out infinite;
}

.hero__floating-element:nth-child(1) {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 8s;
}

.hero__floating-element:nth-child(2) {
  top: 60%;
  left: 80%;
  animation-delay: 2s;
  animation-duration: 10s;
}

.hero__floating-element:nth-child(3) {
  top: 80%;
  left: 20%;
  animation-delay: 4s;
  animation-duration: 12s;
}

.hero__floating-element:nth-child(4) {
  top: 30%;
  left: 90%;
  animation-delay: 1s;
  animation-duration: 9s;
}

.hero__floating-element:nth-child(5) {
  top: 70%;
  left: 5%;
  animation-delay: 3s;
  animation-duration: 11s;
}

/* ===== HERO RESPONSIVE DESIGN ===== */

@media (max-width: 767px) {
  .hero {
    min-height: 80vh;
    padding-top: var(--spacing-20);
    padding-bottom: var(--spacing-8);
  }
  
  .hero__content {
    padding: var(--spacing-6) var(--spacing-4);
  }
  
  .hero__title {
    margin-bottom: var(--spacing-4);
  }
  
  .hero__subtitle {
    margin-bottom: var(--spacing-6);
  }
  
  .hero__description {
    margin-bottom: var(--spacing-8);
    font-size: var(--font-size-base);
  }
  
  .hero__actions {
    gap: var(--spacing-3);
  }
  
  .hero__cta,
  .hero__secondary-cta {
    padding: var(--spacing-3) var(--spacing-6);
    font-size: var(--font-size-base);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hero {
    min-height: 90vh;
  }
  
  .hero__content {
    padding: var(--spacing-8) var(--spacing-6);
  }
}

@media (min-width: 1024px) {
  .hero {
    min-height: 100vh;
  }
  
  .hero__content {
    padding: var(--spacing-12) var(--spacing-8);
  }
  
  .hero__title {
    margin-bottom: var(--spacing-8);
  }
  
  .hero__subtitle {
    margin-bottom: var(--spacing-10);
  }
  
  .hero__description {
    margin-bottom: var(--spacing-16);
  }
}

/* ===== HERO ANIMATIONS ===== */

@keyframes heroTitleGlow {
  0% {
    text-shadow: 
      0 0 20px rgba(255, 0, 255, 0.5),
      0 0 40px rgba(255, 0, 255, 0.3),
      0 0 60px rgba(255, 0, 255, 0.1);
  }
  100% {
    text-shadow: 
      0 0 30px rgba(255, 0, 255, 0.7),
      0 0 60px rgba(255, 0, 255, 0.5),
      0 0 90px rgba(255, 0, 255, 0.3);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scanlines {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(100%);
  }
}

@keyframes glitchFlicker {
  0%, 90%, 100% {
    opacity: 0;
  }
  5%, 85% {
    opacity: 0.1;
  }
  10%, 80% {
    opacity: 0.2;
  }
  15%, 75% {
    opacity: 0.3;
  }
  20%, 70% {
    opacity: 0.4;
  }
  25%, 65% {
    opacity: 0.5;
  }
  30%, 60% {
    opacity: 0.6;
  }
  35%, 55% {
    opacity: 0.7;
  }
  40%, 50% {
    opacity: 0.8;
  }
  45% {
    opacity: 0.9;
  }
}

@keyframes glitchShift {
  0%, 100% {
    transform: translate(-2px, 0);
  }
  50% {
    transform: translate(2px, 0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.6;
  }
  25% {
    transform: translateY(-20px) rotate(90deg);
    opacity: 0.8;
  }
  50% {
    transform: translateY(-40px) rotate(180deg);
    opacity: 0.4;
  }
  75% {
    transform: translateY(-20px) rotate(270deg);
    opacity: 0.8;
  }
}

/* ===== HERO ACCESSIBILITY ===== */

@media (prefers-reduced-motion: reduce) {
  .hero__title {
    animation: none;
  }
  
  .hero__subtitle,
  .hero__description,
  .hero__actions {
    animation: none;
    opacity: 1;
  }
  
  .hero__glitch-overlay {
    animation: none;
    opacity: 0;
  }
  
  .hero__floating-elements {
    display: none;
  }
  
  .hero::after {
    animation: none;
  }
}

/* ===== HERO PRINT STYLES ===== */

@media print {
  .hero {
    min-height: auto;
    padding: var(--spacing-8) 0;
  }
  
  .hero__glitch-overlay,
  .hero__floating-elements,
  .hero::before,
  .hero::after {
    display: none;
  }
  
  .hero__title {
    color: var(--color-text-primary);
    text-shadow: none;
    animation: none;
  }
  
  .hero__subtitle,
  .hero__description {
    color: var(--color-text-secondary);
    animation: none;
    opacity: 1;
  }
  
  .hero__actions {
    animation: none;
    opacity: 1;
  }
  
  .hero__cta,
  .hero__secondary-cta {
    border: 2px solid var(--color-text-primary);
    color: var(--color-text-primary);
    background: transparent;
    text-decoration: none;
  }
}
