/* Hero Section Styles
 *
 * Full viewport hero with centered content.
 * Responsive typography, proper spacing, mobile-optimized.
 */

/* ============================================
   GLOBAL RESETS
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-4);
  position: relative;
}

.hero-content {
  max-width: 800px;
  text-align: center;
  z-index: 1;
}

/* ============================================
   BRAIN-IN-JAR ICON CONTAINER
   ============================================ */

.brain-jar-container {
  margin-bottom: var(--space-8);
  display: inline-block;
  position: relative;
  width: 150px;
  height: 150px;
}

.brain-jar-icon {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 1; /* Below bubbles and arcs */
  animation: brainJarBreathe 4s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(230, 126, 34, 0.3));
  transition: filter 0.3s ease, transform 0.3s ease;
}

/* Dark mode - radioactive orange glow */
[data-theme="dark"] .brain-jar-icon {
  filter: drop-shadow(0 0 25px rgba(255, 107, 53, 0.4))
          drop-shadow(0 0 40px rgba(243, 156, 18, 0.2));
}

/* Hover - intensify glow and breathing */
.brain-jar-container:hover .brain-jar-icon {
  filter: drop-shadow(0 0 30px rgba(230, 126, 34, 0.6))
          drop-shadow(0 0 50px rgba(218, 165, 32, 0.4));
  animation: brainJarBreatheIntense 2.5s ease-in-out infinite;
}

[data-theme="dark"] .brain-jar-container:hover .brain-jar-icon {
  filter: drop-shadow(0 0 35px rgba(255, 107, 53, 0.7))
          drop-shadow(0 0 60px rgba(243, 156, 18, 0.4));
}

/* Breathing animation - subtle life */
@keyframes brainJarBreathe {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Intensified breathing on hover */
@keyframes brainJarBreatheIntense {
  0%, 100% {
    transform: scale(1.02);
  }
  50% {
    transform: scale(1.08);
  }
}

/* ============================================
   BUBBLES - Rising through liquid
   ============================================ */

.bubble {
  position: absolute;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(0, 168, 171, 0.3));
  border-radius: 50%;
  opacity: 0;
  z-index: 3; /* Above image */
  pointer-events: none;
}

/* Dark mode bubbles - orange tint */
[data-theme="dark"] .bubble {
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(255, 140, 0, 0.3));
}

/* Bubble 1 - left side, slow */
.bubble-1 {
  left: 35%;
  bottom: 20%;
  animation: bubbleRise1 4s ease-in-out infinite;
  animation-delay: 0s;
}

/* Bubble 2 - center, medium */
.bubble-2 {
  left: 50%;
  bottom: 15%;
  animation: bubbleRise2 3.5s ease-in-out infinite;
  animation-delay: 1.2s;
  width: 6px;
  height: 6px;
}

/* Bubble 3 - right side, fast */
.bubble-3 {
  left: 60%;
  bottom: 18%;
  animation: bubbleRise3 3s ease-in-out infinite;
  animation-delay: 2.4s;
  width: 5px;
  height: 5px;
}

@keyframes bubbleRise1 {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.7;
  }
  80% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-60px) translateX(8px);
    opacity: 0;
  }
}

@keyframes bubbleRise2 {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  80% {
    opacity: 0.4;
  }
  100% {
    transform: translateY(-65px) translateX(-5px);
    opacity: 0;
  }
}

@keyframes bubbleRise3 {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.5;
  }
  80% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-55px) translateX(-10px);
    opacity: 0;
  }
}

/* ============================================
   ELECTRICAL ARCS - Occasional mad scientist zaps
   ============================================ */

.electric-arc {
  position: absolute;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 100, 0.8) 20%,
    rgba(100, 200, 255, 1) 50%,
    rgba(255, 255, 100, 0.8) 80%,
    transparent
  );
  opacity: 0;
  z-index: 4; /* Above bubbles */
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(100, 200, 255, 1))
          drop-shadow(0 0 3px rgba(255, 255, 100, 0.8));
}

/* Dark mode arcs - brighter electrical blue/yellow */
[data-theme="dark"] .electric-arc {
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 150, 0.9) 20%,
    rgba(150, 220, 255, 1) 50%,
    rgba(255, 255, 150, 0.9) 80%,
    transparent
  );
  filter: drop-shadow(0 0 8px rgba(150, 220, 255, 1))
          drop-shadow(0 0 4px rgba(255, 255, 150, 1));
}

/* Arc 1 - across brain horizontally */
.arc-1 {
  top: 45%;
  left: 50%;
  transform: translateX(-50%) rotate(10deg);
  animation: electricZap1 8s ease-in-out infinite;
  width: 50px;
}

/* Arc 2 - across brain diagonally */
.arc-2 {
  top: 52%;
  left: 50%;
  transform: translateX(-50%) rotate(-25deg);
  animation: electricZap2 8s ease-in-out infinite;
  animation-delay: 4s;
  width: 45px;
}

@keyframes electricZap1 {
  0%, 90%, 100% {
    opacity: 0;
  }
  91%, 92% {
    opacity: 1;
  }
  93% {
    opacity: 0;
  }
  94%, 95% {
    opacity: 0.8;
  }
  96%, 100% {
    opacity: 0;
  }
}

@keyframes electricZap2 {
  0%, 90%, 100% {
    opacity: 0;
  }
  91% {
    opacity: 0.9;
  }
  92% {
    opacity: 0;
  }
  93%, 94% {
    opacity: 1;
  }
  95%, 100% {
    opacity: 0;
  }
}

/* ============================================
   MOBILE OPTIMIZATIONS
   ============================================ */

@media (max-width: 768px) {
  .hero {
    padding: var(--space-6) var(--space-4);
  }

  .brain-jar-container {
    width: 80px;
    height: 80px;
    margin-bottom: var(--space-4);
  }

  /* Simplify effects on mobile */
  .brain-jar-icon {
    filter: none;
    animation: none;
  }

  [data-theme="dark"] .brain-jar-icon {
    filter: none;
  }

  /* Hide bubbles on mobile */
  .bubble {
    display: none;
  }

  /* Hide electrical arcs on mobile */
  .electric-arc {
    display: none;
  }

  /* Reduce headline size */
  .hero-headline {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  /* Reduce subheading size */
  .hero-subheading {
    font-size: clamp(1rem, 3vw, 1.25rem);
  }
}

/* Disable all brain-jar animations if user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  .brain-jar-icon {
    animation: none !important;
  }

  .bubble {
    display: none;
  }

  .electric-arc {
    display: none;
  }
}

/* ============================================
   HERO HEADLINE
   ============================================ */

.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-6);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* Break into two lines on larger screens */
.hero-headline .break {
  display: block;
  margin-top: var(--space-2);
}

/* ============================================
   HERO SUBHEADING
   ============================================ */

.hero-subheading {
  font-family: var(--font-body);
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  line-height: 1.6;
  font-weight: 500;
}

/* ============================================
   CTA BUTTON
   ============================================ */

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  background: transparent;
  border: 2px solid var(--color-orange);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.cta-button:hover {
  background: var(--color-orange);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--color-orange-faint);
}

.cta-arrow {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.cta-button:hover .cta-arrow {
  transform: translateX(4px);
}

/* ============================================
   THEME TOGGLE
   Now handled by navigation.css (in header)
   ============================================ */

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .hero {
    padding: var(--space-6) var(--space-4);
  }

  .raygun-icon {
    width: 100px;
  }

  .hero-headline {
    margin-bottom: var(--space-4);
  }

  .hero-headline .break {
    margin-top: var(--space-1);
  }

  .hero-subheading {
    margin-bottom: var(--space-6);
  }

  .cta-button {
    padding: var(--space-3) var(--space-5);
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .raygun-icon {
    width: 80px;
  }

  .hero-headline .break {
    display: inline;
    margin-top: 0;
  }
}
