/* ============================================================
   HERO SECTION
   Hero gradient, dots, glows, kinetic text rotation,
   search bar, CTA buttons
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* CRITICAL: no overflow:hidden here — kinetic text needs room */
  overflow-x: clip;
  overflow-y: visible;
  background: var(--dark-bg);
  padding: 72px 0 80px;
}

/* Animated gradient background */
.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    var(--dark-bg) 0%,
    #3e1a2a 20%,
    var(--dark-bg) 40%,
    #1a2a4e 60%,
    var(--dark-bg) 80%,
    #2a1a3e 100%
  );
  background-size: 400% 400%;
  animation: gradientShift 16s ease infinite;
}

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

/* Dot grid overlay */
.hero-dots {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.3;
}

.dot {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(191, 13, 62, 0.5);
  animation: floatDot 8s ease-in-out infinite;
}

@keyframes floatDot {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
  50% { transform: translateY(-30px) scale(1.4); opacity: 0.7; }
}

/* Radial glow accents */
.hero-glow-1 {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(191,13,62,0.15) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  animation: pulseGlow 6s ease-in-out infinite;
}

.hero-glow-2 {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42,59,107,0.2) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  animation: pulseGlow 8s ease-in-out infinite 2s;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 40px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 6px 18px 6px 8px;
  background: rgba(191,13,62,0.15);
  border: 1px solid rgba(191,13,62,0.25);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cooper-red-light);
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cooper-red);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 {
  font-family: var(--font-primary);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.hero h1 .line-2 {
  display: block;
}

/* ============================================================
   KINETIC WORD ROTATION — CRITICAL: NO CUTOFF
   The wrapper uses overflow:visible and is sized to fit
   the longest word ("Guidelines").
   ============================================================ */
.kinetic-wrapper {
  display: inline-block;
  position: relative;
  vertical-align: bottom;
  height: 1.15em;
  /* Sized for "Guidelines" — the longest word at ~10ch.
     Using min-width ensures no word gets clipped. */
  min-width: 5.8em;
  /* CRITICAL: overflow must be visible, NOT hidden */
  overflow: visible;
}

.kinetic-word {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  animation: wordCycle 8s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  opacity: 0;
  transform: translateY(100%);
  background: linear-gradient(135deg, var(--cooper-red-light), #ff6b8a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* Ensure text is not clipped by anything */
  white-space: nowrap;
}

.kinetic-word:nth-child(1) { animation-delay: 0s; }
.kinetic-word:nth-child(2) { animation-delay: 2s; }
.kinetic-word:nth-child(3) { animation-delay: 4s; }
.kinetic-word:nth-child(4) { animation-delay: 6s; }

@keyframes wordCycle {
  0% { opacity: 0; transform: translateY(100%); }
  5% { opacity: 1; transform: translateY(0); }
  22% { opacity: 1; transform: translateY(0); }
  27% { opacity: 0; transform: translateY(-100%); }
  100% { opacity: 0; transform: translateY(-100%); }
}

.hero-tagline {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: rgba(255,255,255,0.5);
  font-weight: 300;
  margin-bottom: 48px;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-tagline em {
  color: rgba(255,255,255,0.75);
  font-style: normal;
  font-weight: 700;
}

/* Search Bar */
.hero-search {
  max-width: 560px;
  margin: 0 auto 36px;
  position: relative;
}

.hero-search form {
  position: relative;
}

.hero-search input {
  width: 100%;
  padding: 18px 24px 18px 52px;
  font-size: 1rem;
  font-family: var(--font-primary);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  color: var(--white);
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero-search input::placeholder {
  color: rgba(255,255,255,0.35);
}

.hero-search input:focus {
  border-color: rgba(191,13,62,0.4);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 0 4px rgba(191,13,62,0.1);
}

.hero-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.35);
}

/* CTA Buttons */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================================
   RESPONSIVE — Hero
   ============================================================ */
@media (max-width: 900px) {
  .hero-content {
    padding: 0 20px;
  }
}

@media (max-width: 680px) {
  .hero h1 {
    font-size: 2.4rem;
  }
  .kinetic-wrapper {
    min-width: 4.8em;
  }
  .hero-actions {
    flex-direction: column;
  }
}

/* ============================================================
   HERO — Interactive Grid Variant
   Light background, dark text, canvas mesh animation
   ============================================================ */
.hero.hero-grid {
    background: radial-gradient(ellipse 80% 70% at 25% 30%, #f0f0f4 0%, #d8d8e0 45%, #c0c0c8 100%);
}

.hero-grid .hero-grid-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-grid .hero-content {
    position: relative;
    z-index: 2;
}

/* Reverse text colors for light background */
.hero-grid h1 {
    color: #1a1a2e;
}

.hero-grid .hero-tagline {
    color: rgba(26, 26, 46, 0.75);
    font-weight: 500;
}

.hero-grid .hero-tagline em {
    color: #1a1a2e;
    font-weight: 600;
}

.hero-grid .hero-badge {
    background: rgba(42, 59, 107, 0.08);
    border-color: rgba(42, 59, 107, 0.12);
    color: var(--navy);
}

/* Darken kinetic word gradient for contrast on light background */
.hero-grid .kinetic-word {
    background: linear-gradient(135deg, #BF0D3E, #8a1a3e);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-grid .hero-search input {
    background: #2a3b6b;
    border: 1px solid rgba(42, 59, 107, 0.6);
    color: #fff;
    box-shadow: 0 2px 12px rgba(26, 26, 46, 0.12);
}

.hero-grid .hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.hero-grid .hero-search input:focus {
    border-color: rgba(191, 13, 62, 0.5);
    background: #2a3b6b;
    box-shadow: 0 0 0 4px rgba(191, 13, 62, 0.12);
}

.hero-grid .hero-search-icon {
    color: rgba(255, 255, 255, 0.5);
}

.hero-grid .btn-secondary {
    background: var(--cooper-red);
    color: #fff;
    border: 1px solid var(--cooper-red);
}

.hero-grid .btn-secondary:hover {
    background: var(--cooper-red-dark);
}
