/**
 * CINEMATIC HERO SECTION
 * Award-winning parallax design with 3D elements
 */

/* ============================================
   CSS VARIABLES
   ============================================ */

:root {
  /* Colors */
  --canon-void: #0E0F10;
  --canon-parchment: #F7F3ED;
  --canon-bloodline: #E60012;
  --canon-bloodline-10: rgba(230, 0, 18, 0.1);
  --canon-scar: #bfb9a3;
  --canon-ghost-white: #F7F3ED;
  
  /* Typography */
  --text-hero: 4rem;
  --text-4xl: 2.25rem;
  --text-2xl: 1.5rem;
  --text-xl: 1.25rem;
  --text-lg: 1.125rem;
  --text-sm: 0.875rem;
  --text-xs: 0.75rem;
  --leading-tight: 1.1;
  
  /* Spacing */
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  
  /* Border Radius */
  --radius-lg: 12px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-large: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-dramatic: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --glow-bloodline: 0 0 20px rgba(230, 0, 18, 0.3);
  
  /* Effects */
  --blur-medium: 10px;
  
  /* Transitions */
  --duration-normal: 0.3s;
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-dramatic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

.hero-cinematic {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--canon-void);
}

/* ============================================
   PARALLAX BACKGROUND LAYERS
   ============================================ */

.hero-parallax {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.parallax-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: transform;
  pointer-events: none;
}

/* Layer 1 - Red Flags (Back, slowest) */
.parallax-layer-1 {
  background-image: url('/assets/Red Flags.png');
  opacity: 0.6;
  filter: blur(2px);
  z-index: 1;
  pointer-events: none;
}

/* Layer 2 - Red Flags Coffee (Middle, medium speed) */
.parallax-layer-2 {
  background-image: url('/assets/Red Flags Coffee.png');
  opacity: 0.7;
  filter: blur(1px);
  z-index: 2;
  pointer-events: none;
}

/* Layer 3 - Receipts (Front, fastest) */
.parallax-layer-3 {
  background-image: url('/assets/Receipts.png');
  opacity: 0.8;
  z-index: 3;
  pointer-events: none;
}

/* Gradient overlay for readability - MUCH LIGHTER */
.hero-gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.25) 0%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(0, 0, 0, 0.35) 100%
  );
  z-index: 4;
  pointer-events: none;
}

/* Vignette effect - SUBTLE */
.hero-vignette {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse at center,
    transparent 0%,
    rgba(0, 0, 0, 0.15) 100%
  );
  z-index: 5;
  pointer-events: none;
}

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

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
  pointer-events: auto;
}

.hero-content * {
  pointer-events: auto;
}

/* Hero Title - Cinematic Typography */
.hero-title-cinematic {
  font-family: 'Space Grotesk', sans-serif;
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--canon-parchment);
  margin-bottom: var(--space-lg);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1.2s var(--ease-dramatic) 0.3s forwards;
}

.hero-title-line {
  display: block;
}

/* Gradient text effect for emphasis */
.hero-title-gradient {
  background: linear-gradient(
    135deg,
    #F7F3ED 0%,
    #E60012 35%,
    #E60012 65%,
    #F7F3ED 100%
  );
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 6s ease infinite;
  filter: drop-shadow(0 2px 8px rgba(230, 0, 18, 0.5));
}

/* Hero Subtitle */
.hero-subtitle-cinematic {
  font-size: var(--text-2xl);
  color: #d4cfc0;
  margin-bottom: var(--space-2xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1.2s var(--ease-dramatic) 0.6s forwards;
  line-height: 1.6;
}

/* ============================================
   RED FLAG KIT CTA
   ============================================ */

.hero-cta-wrapper {
  margin-bottom: var(--space-3xl);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1.2s var(--ease-dramatic) 0.9s forwards;
}

.hero-cta-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 600px;
  margin: 0 auto var(--space-lg);
}

.hero-email-input {
  padding: var(--space-lg) var(--space-xl);
  background: rgba(245, 241, 232, 0.1);
  backdrop-filter: blur(var(--blur-medium));
  border: 2px solid rgba(245, 241, 232, 0.2);
  border-radius: var(--radius-lg);
  color: var(--canon-parchment);
  font-size: var(--text-lg);
  transition: all var(--duration-normal) var(--ease-smooth);
  outline: none;
}

.hero-email-input::placeholder {
  color: var(--canon-scar);
}

.hero-email-input:focus {
  background: rgba(245, 241, 232, 0.15);
  border-color: var(--canon-bloodline);
  box-shadow: 0 0 0 4px var(--canon-bloodline-10),
              var(--glow-bloodline);
}

.hero-cta-button {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #E60012 0%, #C40010 100%);
  color: #F7F3ED;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 20px rgba(230, 0, 18, 0.4);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s;
}

.hero-cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(230, 0, 18, 0.5);
  background: linear-gradient(135deg, #ff0015 0%, #E60012 100%);
}

.hero-cta-button:hover::before {
  left: 100%;
}

.hero-cta-button:active {
  transform: translateY(0);
}

/* CTA subtext */
.hero-cta-subtext {
  font-size: var(--text-sm);
  color: var(--canon-scar);
  text-align: center;
  font-style: italic;
}

/* ============================================
   3D BOOK SHOWCASE
   ============================================ */

.book-showcase-3d {
  margin: var(--space-4xl) auto;
  max-width: 800px;
  opacity: 0;
  transform: scale(0.9);
  animation: scaleIn 1.2s var(--ease-dramatic) 1.2s forwards;
}

.book-video {
  width: 100%;
  height: auto;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-dramatic);
  filter: drop-shadow(0 0 40px rgba(230, 0, 18, 0.3));
}

/* ============================================
   SCROLL INDICATOR
   ============================================ */

.scroll-indicator {
  position: absolute;
  bottom: var(--space-3xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  opacity: 0;
  animation: fadeIn 1s ease 2s forwards;
}

.scroll-arrow {
  width: 30px;
  height: 50px;
  border: 2px solid var(--canon-parchment);
  border-radius: var(--radius-full);
  position: relative;
}

.scroll-arrow::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--canon-bloodline);
  border-radius: 50%;
  animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollDot {
  0%, 100% {
    top: 10px;
    opacity: 1;
  }
  50% {
    top: 30px;
    opacity: 0.3;
  }
}

.scroll-text {
  margin-top: var(--space-sm);
  font-size: var(--text-xs);
  color: var(--canon-scar);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

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

@media (min-width: 640px) {
  .hero-cta-form {
    flex-direction: row;
  }

  .hero-email-input {
    flex: 1;
  }

  .hero-cta-button {
    width: auto;
    white-space: nowrap;
  }
}

@media (max-width: 768px) {
  .hero-title-cinematic {
    font-size: var(--text-4xl);
  }

  .hero-subtitle-cinematic {
    font-size: var(--text-lg);
  }

  .parallax-layer-1,
  .parallax-layer-2,
  .parallax-layer-3 {
    background-attachment: scroll;
    background-size: cover;
  }

  .book-showcase-3d {
    margin: var(--space-2xl) auto;
  }
}

/* ============================================
   ACCESSIBILITY & PERFORMANCE
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .parallax-layer {
    transform: none !important;
    will-change: auto;
  }

  .hero-title-cinematic,
  .hero-subtitle-cinematic,
  .hero-cta-wrapper,
  .book-showcase-3d,
  .scroll-indicator {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .scroll-arrow::before {
    animation: none;
  }
}

/* Ensure video performance */
.book-video {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

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

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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