/* ================================================================
   Innovea Mark — hero-redesign.css
   HERO SECTION ONLY — scoped to #hero and .hero-* classes
   ----------------------------------------------------------------
   Load order in <head>:
     1. style.css
     2. components.css
     3. pages/home.css
     4. theme-override.css
     5. hero-redesign.css   ← this file (last — highest specificity)

   Nothing in this file touches anything outside #hero and .hero-*
   ================================================================ */


/* ================================================================
   1. HERO CUSTOM PROPERTIES (scoped, no global pollution)
   ================================================================ */
#hero {
  --hero-bg:          #08111F;
  --hero-bg-2:        #0D1728;
  --hero-card:        #121E31;
  --hero-gold:        #D4AF37;
  --hero-gold-hover:  #E6C55A;
  --hero-text:        #F5F5F5;
  --hero-muted:       #AAB3C5;
  --hero-border:      rgba(212,175,55,0.16);
  --hero-glow:        rgba(212,175,55,0.14);
  --hero-ease:        cubic-bezier(0.22, 0.61, 0.36, 1);
}


/* ================================================================
   2. HERO SHELL
   ================================================================ */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: clamp(5rem, 10vw, 7rem);

  /* Layered premium background — no pure black */
  background:
    radial-gradient(ellipse 72% 55% at 50% 32%,
      rgba(212,175,55,0.13) 0%,
      transparent 55%),
    radial-gradient(ellipse 45% 38% at 18% 18%,
      rgba(255,255,255,0.03) 0%,
      transparent 60%),
    radial-gradient(ellipse 55% 45% at 82% 72%,
      rgba(20,35,70,0.55) 0%,
      transparent 60%),
    linear-gradient(180deg,
      #08111F 0%,
      #0D1728 50%,
      #08111F 100%);
}

/* Remove old flat canvas — replaced by CSS orbs */
#hero-canvas { display: none; }


/* ================================================================
   3. BACKGROUND LAYERS
   ================================================================ */

/* Fine grid — more architectural, less decorative */
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212,175,55,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,175,55,0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 40%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 40%, black 20%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

/* Replace old glow divs with slower, more refined orbs */
.hero-glow-1,
.hero-glow-2 {
  display: none; /* replaced by .hero-orb-* below */
}

/* Drifting light orbs — all motion via CSS only */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
  z-index: 0;
}

.hero-orb-1 {
  width: min(640px, 90vw);
  height: min(640px, 90vw);
  top: -18%;
  left: -14%;
  background: radial-gradient(
    circle,
    rgba(30, 52, 110, 0.42) 0%,
    rgba(212,175,55,0.055) 38%,
    transparent 68%
  );
  animation: orbDrift1 22s ease-in-out infinite alternate;
}

.hero-orb-2 {
  width: min(520px, 75vw);
  height: min(520px, 75vw);
  bottom: -20%;
  right: -12%;
  background: radial-gradient(
    circle,
    rgba(16, 32, 72, 0.50) 0%,
    rgba(212,175,55,0.04) 40%,
    transparent 68%
  );
  animation: orbDrift2 28s ease-in-out infinite alternate;
}

.hero-orb-3 {
  width: min(340px, 55vw);
  height: min(340px, 55vw);
  top: 38%;
  right: 8%;
  background: radial-gradient(
    circle,
    rgba(212,175,55,0.07) 0%,
    transparent 65%
  );
  animation: orbDrift3 18s ease-in-out infinite alternate;
}

@keyframes orbDrift1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(32px, 22px) scale(1.06); }
}

@keyframes orbDrift2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-28px, -18px) scale(1.04); }
}

@keyframes orbDrift3 {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.7; }
  100% { transform: translate(-16px, 22px) scale(1.08); opacity: 1; }
}


/* ================================================================
   4. HERO CONTENT WRAPPER
   ================================================================ */
.hero-content {
  position: relative;
  z-index: 2;
  padding-block: clamp(3rem, 5vw, 4.5rem);
  max-width: 820px; /* constrain for readability */
}


/* ================================================================
   5. EYEBROW BADGE — glass pill
   ================================================================ */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1.125rem 0.5rem 0.875rem;
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hero-gold-hover);
  margin-bottom: 2.25rem;

  /* Glass treatment */
  background: rgba(212,175,55,0.07);
  border: 1px solid rgba(212,175,55,0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 8px 24px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.06);

  /* Reveal state — JS adds .revealed */
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.55s var(--hero-ease),
    transform 0.55s var(--hero-ease),
    background 0.3s ease,
    border-color 0.3s ease;
}

.hero-badge.revealed {
  opacity: 1;
  transform: translateY(0);
}

.hero-badge:hover {
  background: rgba(212,175,55,0.12);
  border-color: rgba(212,175,55,0.38);
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hero-gold);
  flex-shrink: 0;
  animation: heroPulse 2.4s ease-in-out infinite;
}

@keyframes heroPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,0.45); opacity: 1; }
  50%       { box-shadow: 0 0 0 5px rgba(212,175,55,0); opacity: 0.75; }
}


/* ================================================================
   6. HEADLINE — word-by-word reveal
   ================================================================ */
#hero h1 {
  font-size: clamp(2.6rem, 5.8vw, 5.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--hero-text);
  max-width: min(820px, 96vw);
  margin-bottom: 1.75rem;

  /* h1 itself is always visible — words inside control reveal */
  opacity: 1;
  animation: none; /* remove old CSS animation — JS handles it */
}

/* Individual word spans injected by JS */
.hw {
  display: inline-block;
  /* preserve space between words */
  white-space: pre;
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s var(--hero-ease),
    transform 0.55s var(--hero-ease);
}

.hw.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Gold highlight words — same transition, applied by JS */
.hw-gold {
  background: linear-gradient(
    125deg,
    #C9A227 0%,
    #E6C55A 45%,
    #B8961F 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* Slightly heavier to compensate for optical thinning of gradient text */
  font-style: italic;
}

/* Line breaks inside h1 */
#hero h1 br {
  display: block;
  content: '';
}


/* ================================================================
   7. SUBTITLE
   ================================================================ */
.hero-sub {
  max-width: min(580px, 92vw);
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--hero-muted);
  line-height: 1.82;
  margin-bottom: 2.75rem;

  /* Reveal state */
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.65s var(--hero-ease),
    transform 0.65s var(--hero-ease);
  animation: none; /* remove old CSS animation */
}

.hero-sub.revealed {
  opacity: 1;
  transform: translateY(0);
}


/* ================================================================
   8. CTA BUTTONS
   ================================================================ */
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
  align-items: center;

  /* Reveal state */
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.6s var(--hero-ease),
    transform 0.6s var(--hero-ease);
  animation: none; /* remove old CSS animation */
}

.hero-actions.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Primary CTA — champagne gold, premium */
.hero-actions .btn-gold {
  background: linear-gradient(135deg, #C9A227 0%, #DFB93E 48%, #B8961F 100%);
  color: #09100F;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: none;
  box-shadow:
    0 2px 6px rgba(0,0,0,0.45),
    0 6px 24px rgba(212,175,55,0.28),
    inset 0 1px 0 rgba(255,255,255,0.18);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    background 0.28s ease;
}

.hero-actions .btn-gold:hover {
  background: linear-gradient(135deg, #D4AF37 0%, #EDCA52 48%, #C9A227 100%);
  transform: translateY(-2px);
  box-shadow:
    0 4px 10px rgba(0,0,0,0.45),
    0 12px 36px rgba(212,175,55,0.38),
    inset 0 1px 0 rgba(255,255,255,0.22);
}

/* Secondary CTA — glass treatment per brief */
.hero-actions .btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--hero-muted);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;

  /* Glass */
  background: rgba(212,175,55,0.06);
  border: 1px solid rgba(212,175,55,0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 16px 48px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.07);

  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    transform 0.28s ease,
    box-shadow 0.28s ease;
}

.hero-actions .btn-hero-secondary:hover {
  background: rgba(212,175,55,0.12);
  border-color: rgba(212,175,55,0.40);
  color: var(--hero-gold-hover);
  transform: translateY(-2px);
  box-shadow:
    0 20px 56px rgba(0,0,0,0.32),
    0 0 24px rgba(212,175,55,0.10),
    inset 0 1px 0 rgba(255,255,255,0.10);
}


/* ================================================================
   9. STATS STRIP
   ================================================================ */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid rgba(212,175,55,0.13);
  padding-top: 2.5rem;

  /* Overall block reveal — JS staggers individual items */
  opacity: 1;
  animation: none; /* remove old CSS animation */
}

/* Each stat item — JS adds .revealed with stagger */
.hero-stat {
  padding-right: 2rem;
  border-right: 1px solid rgba(212,175,55,0.10);

  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.55s var(--hero-ease),
    transform 0.55s var(--hero-ease);
}

.hero-stat:last-child {
  border-right: none;
  padding-right: 0;
}

.hero-stat.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stat number — champagne gradient */
.hero-stat .stat-num {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(125deg, #C9A227 0%, #E6C55A 50%, #B8961F 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat .stat-label {
  font-size: 0.79rem;
  color: rgba(170,179,197,0.70);
  margin-top: 0.45rem;
  letter-spacing: 0.03em;
  line-height: 1.4;
}


/* ================================================================
   10. SCROLL INDICATOR
   ================================================================ */
.scroll-ind {
  position: absolute;
  bottom: 2.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;

  opacity: 0;
  transition: opacity 0.7s ease;
}

.scroll-ind.revealed { opacity: 1; }

.scroll-ind span {
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(125,136,152,0.65);
}

.scroll-line {
  width: 1px;
  height: 38px;
  background: linear-gradient(
    to bottom,
    rgba(212,175,55,0.55),
    transparent
  );
  animation: scrollBobNew 2s ease-in-out infinite;
  transform-origin: top center;
}

@keyframes scrollBobNew {
  0%, 100% { transform: scaleY(1);   opacity: 0.85; }
  50%       { transform: scaleY(0.55); opacity: 0.35; }
}


/* ================================================================
   11. RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem 0;
  }

  .hero-stat {
    border-right: none;
    border-bottom: 1px solid rgba(212,175,55,0.10);
    padding-right: 0;
    padding-bottom: 1.5rem;
  }

  .hero-stat:nth-child(odd) {
    border-right: 1px solid rgba(212,175,55,0.10);
    padding-right: 2rem;
  }

  .hero-stat:nth-last-child(-n+2) {
    border-bottom: none;
    padding-bottom: 0;
  }
}

@media (max-width: 640px) {
  #hero h1 { font-size: clamp(2.2rem, 8vw, 3rem); }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.875rem;
  }

  .hero-actions .btn-gold,
  .hero-actions .btn-hero-secondary {
    width: 100%;
    justify-content: center;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .hero-badge { font-size: 0.62rem; letter-spacing: 0.12em; }
}

@media (max-width: 400px) {
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stat { border-right: none !important; border-bottom: 1px solid rgba(212,175,55,0.10); padding-right: 0 !important; }
  .hero-stat:last-child { border-bottom: none; }
}

/* Reduce motion: honour user preference */
@media (prefers-reduced-motion: reduce) {
  .hero-orb-1,
  .hero-orb-2,
  .hero-orb-3,
  .hero-badge-dot,
  .scroll-line { animation: none !important; }

  .hw,
  .hero-badge,
  .hero-sub,
  .hero-actions,
  .hero-stat {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .scroll-ind { opacity: 1 !important; }
}
