/*
 * ========================================================================
 * ANALYTIC ENDEAVORS - GUIDE HERO SECTION
 * Shared styles for guide page hero/intro sections
 * Copyright (c) 2024-2025 Havens Consulting Inc. All Rights Reserved.
 * ========================================================================
 *
 * Usage:
 *   1. Link this CSS in your guide page <head>
 *   2. Use the standard hero HTML structure (see GUIDE-CREATION-REFERENCE.md)
 *   3. Customize colors via CSS variables in your page's <style> block
 *
 * Customizable via CSS variables:
 *   --hero-gradient-mid: Middle gradient color (default: #1a1a3e)
 *   --hero-accent-1: First radial accent (default: rgba(0,153,153,0.1))
 *   --hero-accent-2: Second radial accent (default: rgba(0,88,124,0.1))
 *   --hero-title-gradient: Gradient for h1 (default: --teal-light to --blue)
 */

/* ===== PARTICLE BACKGROUND CANVAS ===== */
#particles-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] #particles-bg {
  opacity: 0.5;
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg,
    var(--bg-dark) 0%,
    var(--hero-gradient-mid, #1a1a3e) 50%,
    var(--bg-dark) 100%
  );
  position: relative;
  overflow: hidden;
}

/* Animated gradient overlay */
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 30% 30%, var(--hero-accent-1, rgba(0,153,153,0.1)) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, var(--hero-accent-2, rgba(0,88,124,0.1)) 0%, transparent 50%);
  animation: heroFloat 20s ease-in-out infinite;
}

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

/* ===== HERO CONTENT ===== */
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

/* Logo container */
.hero-logo {
  margin-bottom: 1.5rem;
}

.hero-logo img {
  height: 140px;
  width: auto;
  filter: drop-shadow(0 0 30px rgba(0, 153, 153, 0.3));
  animation: logoGlow 4s ease-in-out infinite;
}

@keyframes logoGlow {
  0%, 100% { filter: drop-shadow(0 0 30px rgba(0, 153, 153, 0.3)); }
  50% { filter: drop-shadow(0 0 50px rgba(0, 153, 153, 0.5)); }
}

/* Title with gradient text */
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  background: var(--hero-title-gradient, linear-gradient(135deg, var(--teal-light), var(--blue)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Subtitle */
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Tagline with optional blinking cursor */
.hero-tagline {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
}

/* Blinking cursor effect (add class .typewriter to enable) */
.hero-tagline.typewriter::after {
  content: '|';
  animation: blink 1s step-end infinite;
  color: var(--teal-light);
  font-weight: 300;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ===== READ TIME BADGE ===== */
.read-time {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card-surface);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.read-time svg {
  width: 16px;
  height: 16px;
}

/* ===== COLOR THEME VARIANTS ===== */

/* Purple theme */
.hero--purple::before {
  background:
    radial-gradient(circle at 30% 30%, rgba(107,91,149,0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(0,153,153,0.1) 0%, transparent 50%);
}

.hero--purple h1 {
  background: linear-gradient(135deg, var(--purple-light, #9382BA), var(--teal-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero--purple .hero-tagline.typewriter::after {
  color: var(--purple-light, #9382BA);
}

.hero--purple .hero-logo img {
  filter: drop-shadow(0 0 30px rgba(107, 91, 149, 0.3));
  animation: logoGlowPurple 4s ease-in-out infinite;
}

@keyframes logoGlowPurple {
  0%, 100% { filter: drop-shadow(0 0 30px rgba(107, 91, 149, 0.3)); }
  50% { filter: drop-shadow(0 0 50px rgba(107, 91, 149, 0.5)); }
}

/* Orange theme */
.hero--orange::before {
  background:
    radial-gradient(circle at 30% 30%, rgba(0,153,153,0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(255,140,66,0.1) 0%, transparent 50%);
}

.hero--orange h1 {
  background: linear-gradient(135deg, var(--teal-light), var(--orange, #FF8C42));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero--orange .hero-tagline.typewriter::after {
  color: var(--orange, #FF8C42);
}

/* ===== LIGHT MODE OVERRIDES ===== */
[data-theme="light"] .hero {
  background: linear-gradient(135deg, #e8e8f0 0%, #f5f5f7 50%, #e8e8f0 100%);
}

[data-theme="light"] .hero::before {
  opacity: 0.7;
}

[data-theme="light"] .hero-logo img {
  filter: drop-shadow(0 0 20px rgba(0, 88, 124, 0.2));
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero {
    min-height: 60vh;
    padding: 1.5rem;
  }

  .hero-logo img {
    height: 100px;
  }

  .hero-tagline {
    font-size: 0.9rem;
  }

  .read-time {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }
}

/* ===== PRINT ===== */
@media print {
  .hero {
    min-height: auto;
    padding: 2rem;
    background: white !important;
  }

  .hero::before {
    display: none;
  }

  .hero h1 {
    background: none;
    -webkit-text-fill-color: #1a1a2e;
    color: #1a1a2e;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .hero::before {
    animation: none;
  }

  .hero-logo img {
    animation: none;
    filter: drop-shadow(0 0 30px rgba(0, 153, 153, 0.3));
  }
}
