/* ==========================================================================
   AI Hero — Page-scoped styles (loaded only on /ai)
   ========================================================================== */

/* ── Hero Container ── */
.ai-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: #001212;
  isolation: isolate;
}

/* ── Canvas Layer ── */
.ai-hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
}

/* ── Top / Bottom gradient fades ── */
.ai-hero::before,
.ai-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 120px;
  z-index: 4;
  pointer-events: none;
}

.ai-hero::before {
  top: 0;
  background: linear-gradient(to bottom, #001212 0%, transparent 100%);
}

.ai-hero::after {
  bottom: 0;
  background: linear-gradient(to top, #001212 0%, transparent 100%);
}

/* ── Contrast Guard (between canvas & text) ── */
.ai-hero-contrast-guard {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-hero-contrast-guard::before {
  content: '';
  width: clamp(500px, 75vw, 1100px);
  height: clamp(350px, 55vh, 600px);
  border-radius: 50%;
  background: radial-gradient(ellipse,
    rgba(0, 18, 18, 0.55) 0%,
    rgba(0, 18, 18, 0.25) 40%,
    rgba(0, 18, 18, 0.08) 65%,
    transparent 85%
  );
  filter: blur(40px);
  opacity: 0.7;
  transition: opacity 0.4s ease;
}

/* ── Content Overlay ── */
.ai-hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 120px 24px 100px;
  text-align: center;
  pointer-events: none;
  box-sizing: border-box;
}

/* ── Eyebrow ── */
.ai-hero-eyebrow {
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(120, 175, 46, 0.9);
  margin-bottom: 16px;
  opacity: 0;
  animation: aiHeroFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.5s;
}

/* ── Headline ── */
.ai-hero-headline {
  font-family: 'Geist', sans-serif;
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 800;
  line-height: 0.95;
  color: #fff;
  margin: 0 0 24px;
  letter-spacing: -0.02em;
  opacity: 0;
  animation: aiHeroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.6s;
}

.ai-hero-headline .headline-gradient {
  background: linear-gradient(135deg, #78AF2E 0%, #A8E84C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Subhead ── */
.ai-hero-subhead {
  font-family: 'Geist', sans-serif;
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 400;
  line-height: 1.5;
  color: rgba(224, 237, 232, 0.92);
  max-width: 500px;
  margin: 0 0 32px;
  opacity: 0;
  animation: aiHeroFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.9s;
}

/* ── CTAs ── */
.ai-hero-ctas {
  display: flex;
  gap: 16px;
  align-items: center;
  pointer-events: auto;
  opacity: 0;
  animation: aiHeroFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 1.2s;
}

.ai-hero-ctas .btn-primary {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #78AF2E, #025EC4);
  color: #fff;
  font-family: 'Geist', sans-serif;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.ai-hero-ctas .btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.ai-hero-ctas .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(120, 175, 46, 0.3);
}

.ai-hero-ctas .btn-primary:hover::after {
  left: 150%;
  transition: left 0.8s ease;
}

.ai-hero-ctas .btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 12px rgba(120, 175, 46, 0.2);
}

.ai-hero-ctas .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: transparent;
  color: rgba(224, 237, 232, 0.9);
  font-family: 'Geist', sans-serif;
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.2s ease;
}

.ai-hero-ctas .btn-secondary:hover {
  border-color: #78AF2E;
  background: rgba(120, 175, 46, 0.1);
  transform: translateY(-2px);
}

/* ── Capability Chips ── */
.ai-hero-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 32px;
  opacity: 0;
  animation: aiHeroFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 1.2s;
}

.ai-chip {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(120, 175, 46, 0.95);
  padding: 6px 14px;
  border: 1px solid rgba(120, 175, 46, 0.4);
  border-radius: 100px;
  background: rgba(120, 175, 46, 0.1);
}

/* ── Scroll Indicator ── */
.ai-hero .scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 5;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0;
  animation: aiHeroFadeIn 0.8s ease forwards;
  animation-delay: 2.5s;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 1px;
  height: 100%;
  background: #78AF2E;
  animation: scrollDrop 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes scrollDrop {
  0% { top: -100%; }
  50%, 100% { top: 100%; }
}

[data-theme="light"] .scroll-line::after {
  background: #025EC4;
}

/* ── Entrance Animations ── */
@keyframes aiHeroFadeUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

/* ── Image-load failure fallback ── */
.ai-hero--no-image {
  background: linear-gradient(135deg, #001212 0%, #001A1F 50%, #0a1a12 100%);
}

/* ==========================================================================
   LIGHT MODE
   ========================================================================== */

/* Light mode: canvas stays dark, only HTML overlay adapts */

/* Headline: "AI" stays white — dark canvas backdrop */
[data-theme="light"] .ai-hero-headline {
  color: #fff;
}

/* "Compute" gradient switches to blue → cyan */
[data-theme="light"] .ai-hero-headline .headline-gradient {
  background: linear-gradient(135deg, #025EC4 0%, #38BDF8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Eyebrow — blue */
[data-theme="light"] .ai-hero-eyebrow {
  color: rgba(2, 94, 196, 0.95);
}

/* Subhead — stays light on dark canvas */
[data-theme="light"] .ai-hero-subhead {
  color: rgba(224, 237, 232, 0.92);
}

/* Primary CTA — blue gradient */
[data-theme="light"] .ai-hero-ctas .btn-primary {
  background: linear-gradient(135deg, #025EC4, #38BDF8);
  color: #fff;
}

[data-theme="light"] .ai-hero-ctas .btn-primary:hover {
  box-shadow: 0 8px 24px rgba(2, 94, 196, 0.3);
}

/* Secondary CTA — light text on dark canvas, blue hover */
[data-theme="light"] .ai-hero-ctas .btn-secondary {
  color: rgba(224, 237, 232, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .ai-hero-ctas .btn-secondary:hover {
  border-color: #025EC4;
  background: rgba(2, 94, 196, 0.08);
}

/* Chips — blue */
[data-theme="light"] .ai-chip {
  color: rgba(56, 189, 248, 0.95);
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.1);
}

/* Scroll indicator — stays light on dark canvas */
[data-theme="light"] .ai-hero .scroll-indicator {
  color: rgba(255, 255, 255, 0.5);
}

/* Image-load failure — light gradient */
[data-theme="light"] .ai-hero--no-image {
  background: linear-gradient(135deg, #F0F5F2 0%, #E2EBE6 50%, #d8e8de 100%);
}

/* ── Reduced Motion: Poster Mode ── */
@media (prefers-reduced-motion: reduce) {
  .ai-hero-canvas {
    display: none;
  }

  .ai-hero {
    background-image: url('/images/ai/back1.jpg');
    background-size: cover;
    background-position: center;
  }

  .ai-hero::before {
    height: 100%;
    background: rgba(0, 18, 18, 0.75);
  }

  .ai-hero::after {
    display: none;
  }

  .ai-hero-eyebrow,
  .ai-hero-headline,
  .ai-hero-subhead,
  .ai-hero-ctas,
  .ai-hero-chips,
  .ai-hero .scroll-indicator {
    opacity: 1;
    animation: none;
    transform: none;
  }

  /* Light mode poster — lighter overlay */
  [data-theme="light"] .ai-hero::before {
    background: rgba(240, 245, 242, 0.7);
  }
}

/* ── Responsive: Tablet ── */
@media (max-width: 1023px) {
  .ai-hero-headline {
    font-size: clamp(40px, 8vw, 72px);
  }

  .ai-hero-content {
    padding: 100px 20px 80px;
  }

  .ai-hero-chips {
    gap: 8px;
  }
}

/* ── Responsive: Mobile ── */
@media (max-width: 767px) {
  .ai-hero-content {
    padding: 100px 20px 60px;
  }

  .ai-hero-eyebrow {
    margin-bottom: 12px;
  }

  .ai-hero-headline {
    font-size: clamp(32px, 8vw, 44px);
    margin-bottom: 16px;
  }

  .ai-hero-subhead {
    font-size: 15px;
    margin-bottom: 24px;
  }

  .ai-hero-ctas {
    flex-direction: column;
    width: 100%;
    max-width: 260px;
  }

  .ai-hero-ctas .btn-primary,
  .ai-hero-ctas .btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 12px 24px;
    font-size: 14px;
  }

  .ai-hero-chips {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
  }

  .ai-hero .scroll-indicator {
    bottom: 20px;
  }

  .ai-hero-contrast-guard::before {
    width: 100%;
    height: 65%;
  }
}
