/* ==========================================================================
   HERO CAROUSEL — kinetic, cinematic, zero-dependency
   ========================================================================== */

.hero-carousel {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 620px;
  max-height: 880px;
  overflow: hidden;
  background: #0a0f1e;
  isolation: isolate;
  margin-top: 0;
}

/* Track holds all slides layered on top of each other */
.hc-track {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* --- Slide ---------------------------------------------------------------- */
.hc-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 900ms cubic-bezier(0.65, 0, 0.35, 1),
              visibility 900ms;
  display: flex;
  align-items: center;
  z-index: 1;
}
.hc-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}
.hc-slide.is-leaving {
  z-index: 1;
}

/* --- Background image (Ken Burns) ----------------------------------------- */
.hc-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.hc-bg img {
  position: absolute;
  inset: -6%;
  width: 112%;
  height: 112%;
  object-fit: cover;
  transform: scale(1.05) translate3d(0, 0, 0);
  transition: transform 900ms ease;
  filter: saturate(1.05) contrast(1.02);
  will-change: transform;
}
.hc-slide.is-active .hc-bg img {
  animation: hc-kenburns 12s ease-out forwards;
}
@keyframes hc-kenburns {
  0%   { transform: scale(1.08) translate3d(-1.5%, -1%, 0); }
  100% { transform: scale(1.18) translate3d(1.5%,  1%, 0); }
}

/* Colour scrims — bring brand identity to each slide */
.hc-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hc-scrim-blue {
  background:
    linear-gradient(100deg, rgba(6,14,35,0.85) 0%, rgba(6,14,35,0.55) 42%, rgba(11,92,171,0.35) 78%, rgba(0,166,200,0.28) 100%),
    radial-gradient(1200px 700px at 82% 25%, rgba(0,166,200,0.28), transparent 60%);
}
.hc-scrim-teal {
  background:
    linear-gradient(100deg, rgba(4,20,26,0.82) 0%, rgba(4,20,26,0.5) 40%, rgba(6,182,212,0.35) 78%, rgba(16,185,129,0.28) 100%),
    radial-gradient(1200px 700px at 20% 30%, rgba(6,182,212,0.28), transparent 60%);
}
.hc-scrim-green {
  background:
    linear-gradient(100deg, rgba(6,26,18,0.82) 0%, rgba(6,26,18,0.5) 40%, rgba(16,185,129,0.32) 78%, rgba(6,182,212,0.24) 100%),
    radial-gradient(1200px 700px at 78% 32%, rgba(16,185,129,0.28), transparent 60%);
}
.hc-scrim-purple {
  background:
    linear-gradient(100deg, rgba(14,10,36,0.85) 0%, rgba(14,10,36,0.55) 40%, rgba(99,102,241,0.32) 76%, rgba(139,92,246,0.3) 100%),
    radial-gradient(1200px 700px at 24% 26%, rgba(139,92,246,0.28), transparent 60%);
}

/* Subtle film grain */
.hc-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 140px 140px;
}

/* --- Content -------------------------------------------------------------- */
.hc-content {
  position: relative;
  z-index: 5;
  width: 100%;
  color: #fff;
  padding-top: 96px;
  padding-bottom: 120px;
  max-width: 1200px;
}
.hc-content > * { max-width: 780px; }

.hc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 100px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 26px;
  opacity: 0;
  transform: translateY(14px);
}
.hc-slide.is-active .hc-eyebrow {
  animation: hc-rise 700ms 200ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}
.hc-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee, #a78bfa);
  box-shadow: 0 0 12px rgba(34,211,238,0.7);
  animation: hc-pulse 1.8s ease-in-out infinite;
}
@keyframes hc-pulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.5); opacity: 0.55; }
}

/* Title — line-by-line word mask reveal */
.hc-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2.1rem, 5.4vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #fff;
  margin-bottom: 28px;
  text-shadow: 0 2px 30px rgba(0,0,0,0.35);
}
.hc-line {
  display: block;
  overflow: hidden;
  padding: 0.05em 0;
}
.hc-word {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  will-change: transform, opacity;
}
.hc-slide.is-active .hc-word {
  animation: hc-word-in 900ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}
.hc-slide.is-active .hc-line:nth-child(1) .hc-word:nth-child(1) { animation-delay: 350ms; }
.hc-slide.is-active .hc-line:nth-child(1) .hc-word:nth-child(2) { animation-delay: 430ms; }
.hc-slide.is-active .hc-line:nth-child(1) .hc-word:nth-child(3) { animation-delay: 510ms; }
.hc-slide.is-active .hc-line:nth-child(2) .hc-word:nth-child(1) { animation-delay: 580ms; }
.hc-slide.is-active .hc-line:nth-child(2) .hc-word:nth-child(2) { animation-delay: 660ms; }
.hc-slide.is-active .hc-line:nth-child(2) .hc-word:nth-child(3) { animation-delay: 740ms; }
@keyframes hc-word-in {
  to { transform: translateY(0); opacity: 1; }
}
.hc-highlight {
  background: linear-gradient(135deg, #22d3ee 0%, #a78bfa 55%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* Description */
.hc-desc {
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.65;
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
  max-width: 620px;
  opacity: 0;
  transform: translateY(16px);
}
.hc-slide.is-active .hc-desc {
  animation: hc-rise 800ms 820ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

/* Actions */
.hc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
  opacity: 0;
  transform: translateY(16px);
}
.hc-slide.is-active .hc-actions {
  animation: hc-rise 800ms 940ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}
.hc-btn {
  padding: 15px 28px;
  font-size: 0.95rem;
  box-shadow: 0 12px 30px rgba(11,92,171,0.35);
}
.hc-btn-ghost {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 14px 26px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  font-family: 'DM Sans', sans-serif;
}
.hc-btn-ghost:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-1px);
}

/* Chips */
.hc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  opacity: 0;
  transform: translateY(12px);
}
.hc-slide.is-active .hc-chips {
  animation: hc-rise 800ms 1060ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}
.hc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.9);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@keyframes hc-rise {
  to { opacity: 1; transform: translateY(0); }
}

/* --- Live stats overlay (bottom-left glass card) -------------------------- */
.hc-stats {
  position: absolute;
  left: 0; right: 0;
  bottom: 96px;
  z-index: 6;
  display: flex;
  gap: 20px;
  pointer-events: none;
  justify-content: flex-end;
}
.hc-stat {
  min-width: 92px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: #fff;
  text-align: center;
  box-shadow: 0 10px 32px rgba(0,0,0,0.25);
  animation: hc-float 5s ease-in-out infinite;
}
.hc-stat:nth-child(2) { animation-delay: 0.6s; }
.hc-stat:nth-child(3) { animation-delay: 1.2s; }
.hc-stat:nth-child(4) { animation-delay: 1.8s; }
.hc-stat-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #22d3ee, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hc-stat-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
@keyframes hc-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* --- Arrows --------------------------------------------------------------- */
.hc-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
}
.hc-arrow:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.45);
  transform: translateY(-50%) scale(1.06);
}
.hc-arrow:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 3px;
}
.hc-arrow svg { width: 22px; height: 22px; }
.hc-arrow-prev { left: 26px; }
.hc-arrow-next { right: 26px; }

/* --- Dot nav w/ progress -------------------------------------------------- */
.hc-nav {
  position: absolute;
  left: 0; right: 0;
  bottom: 32px;
  z-index: 9;
  display: flex;
  gap: 14px;
  justify-content: center;
  padding: 0 24px;
  flex-wrap: wrap;
}
.hc-dot-btn {
  position: relative;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 12px 4px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  min-width: 96px;
  transition: color 0.25s;
}
.hc-dot-btn:hover { color: #fff; }
.hc-dot-btn.is-active { color: #fff; }
.hc-dot-btn::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255,255,255,0.22);
  border-radius: 2px;
}
.hc-dot-fill {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, #22d3ee, #a78bfa);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(34,211,238,0.6);
}
.hc-dot-btn.is-active .hc-dot-fill {
  animation: hc-progress 6800ms linear forwards;
}
.hero-carousel.is-paused .hc-dot-btn.is-active .hc-dot-fill {
  animation-play-state: paused;
}
@keyframes hc-progress {
  from { width: 0; }
  to   { width: 100%; }
}
.hc-dot-btn:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 4px;
  border-radius: 6px;
}

/* --- Scroll cue ----------------------------------------------------------- */
.hc-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  z-index: 8;
  width: 26px;
  height: 42px;
  border-radius: 100px;
  border: 1.5px solid rgba(255,255,255,0.4);
  display: flex;
  justify-content: center;
  padding-top: 6px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  display: none; /* only shown on wide screens where nav has room */
}
.hc-scroll-cue:hover { opacity: 1; }
.hc-scroll-cue span {
  width: 3px;
  height: 8px;
  background: #fff;
  border-radius: 3px;
  animation: hc-scroll-dot 1.6s ease-in-out infinite;
}
@keyframes hc-scroll-dot {
  0%   { transform: translateY(0);   opacity: 0.9; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0);   opacity: 0.9; }
}

/* Nav appearance on top of carousel */
.hero-carousel + .trust-bar,
.hero-carousel ~ .trust-bar { position: relative; z-index: 2; }

/* --- Responsive ----------------------------------------------------------- */
@media (min-width: 1440px) {
  .hc-scroll-cue { display: flex; }
}

@media (max-width: 1024px) {
  .hero-carousel { height: 92vh; min-height: 580px; }
  .hc-content { padding-top: 100px; padding-bottom: 150px; }
  .hc-arrow { width: 46px; height: 46px; }
  .hc-arrow-prev { left: 14px; }
  .hc-arrow-next { right: 14px; }
  .hc-stats { bottom: 108px; justify-content: center; flex-wrap: wrap; }
  .hc-stat { min-width: 78px; padding: 10px 14px; }
  .hc-stat-num { font-size: 1.15rem; }
}

@media (max-width: 768px) {
  .hero-carousel { height: auto; min-height: 640px; max-height: none; padding-bottom: 20px; }
  .hc-slide { position: absolute; }
  .hc-content { padding-top: 110px; padding-bottom: 220px; }
  .hc-title { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .hc-desc { font-size: 0.98rem; }
  .hc-btn, .hc-btn-ghost { padding: 12px 20px; font-size: 0.88rem; }
  .hc-arrow { display: none; }
  .hc-stats { position: static; padding: 0 20px; margin: -160px auto 24px; justify-content: center; }
  .hc-stat { min-width: 72px; padding: 8px 12px; }
  .hc-stat-num { font-size: 1.05rem; }
  .hc-stat-label { font-size: 0.65rem; }
  .hc-nav { bottom: 20px; gap: 6px; }
  .hc-dot-btn { min-width: 68px; font-size: 0.7rem; padding: 10px 2px 12px; }
  .hc-eyebrow { font-size: 0.7rem; padding: 6px 12px; margin-bottom: 18px; }
  .hc-chips .hc-chip { font-size: 0.72rem; padding: 6px 10px; }
}

@media (max-width: 480px) {
  .hero-carousel { min-height: 620px; }
  .hc-content { padding-top: 100px; padding-bottom: 220px; }
  .hc-actions { gap: 10px; }
  .hc-actions .btn, .hc-actions .hc-btn-ghost { flex: 1 1 100%; justify-content: center; }
  .hc-dot-btn .hc-dot-label { display: none; }
  .hc-dot-btn { min-width: 44px; padding: 14px 4px 16px; }
  .hc-dot-btn::before, .hc-dot-fill { left: 4px; right: 4px; }
}

/* --- Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .hc-slide, .hc-word, .hc-desc, .hc-actions, .hc-chips, .hc-eyebrow, .hc-stat, .hc-bg img {
    animation: none !important;
    transition: opacity 300ms linear !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .hc-slide { opacity: 0; }
  .hc-slide.is-active { opacity: 1; }
  .hc-dot-fill { display: none; }
}
