/* =========================================================
   AI HERO — "Let AI Handle the Market for You"
   Premium AI / financial-market hero styling
   ========================================================= */

.hero.hero-ai {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  align-items: center;
  gap: 48px;
  min-height: 100vh;
  padding: 80px 80px 88px;
  overflow: hidden;
  background: #02090d;
  color: #ffffff;
}

/* ---------- Layered background ---------- */
.hero-ai::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -4;
  background:
    radial-gradient(ellipse 55% 75% at 12% 42%, rgba(15, 138, 148, 0.34), transparent 62%),
    radial-gradient(ellipse 48% 62% at 84% 46%, rgba(34, 224, 214, 0.16), transparent 66%),
    radial-gradient(ellipse 40% 45% at 70% 100%, rgba(246, 201, 107, 0.08), transparent 70%),
    linear-gradient(118deg, #010507 0%, #031318 44%, #06262c 100%);
}

.hero-ai::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 150px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(2, 9, 13, 0), #02090d 92%);
}

.hero-ai-bg,
.hero-ai .hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-ai-bg {
  z-index: -3;
  overflow: hidden;
}

.hero-ai .hero-grid {
  background-image:
    linear-gradient(rgba(116, 243, 247, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(116, 243, 247, 0.055) 1px, transparent 1px);
  background-size: 74px 74px;
  -webkit-mask-image: radial-gradient(ellipse 72% 74% at 55% 48%, #000 12%, transparent 76%);
  mask-image: radial-gradient(ellipse 72% 74% at 55% 48%, #000 12%, transparent 76%);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  animation: aiOrbDrift 16s ease-in-out infinite alternate;
}

.hero-orb--one {
  width: 420px;
  height: 420px;
  top: 6%;
  left: -140px;
  background: rgba(14, 148, 156, 0.5);
}

.hero-orb--two {
  width: 340px;
  height: 340px;
  right: -100px;
  bottom: 12%;
  background: rgba(34, 224, 214, 0.22);
  animation-delay: -6s;
}

.hero-scanline {
  position: absolute;
  left: 0;
  right: 0;
  top: -30%;
  height: 30%;
  background: linear-gradient(to bottom, transparent, rgba(90, 244, 242, 0.055), transparent);
  animation: aiScan 9s linear infinite;
}

.hero-market-chart {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 72%;
  z-index: -1;
  opacity: 0.8;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 2%, #000 45%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 2%, #000 45%, #000 100%);
}

.market-line {
  stroke-dasharray: 2600;
  stroke-dashoffset: 2600;
  animation: aiDrawLine 3.2s ease-out 0.3s forwards;
  filter: drop-shadow(0 0 7px rgba(34, 224, 214, 0.55));
}

.market-candles rect {
  opacity: 0.34;
}

.market-candles line {
  opacity: 0.34;
}

.candle-up rect,
.candle-up line {
  fill: #1fd9a0;
  stroke: #1fd9a0;
}

.candle-down rect,
.candle-down line {
  fill: #ff6b81;
  stroke: #ff6b81;
}

/* ---------- Left content ---------- */
.hero-ai .hero-content {
  position: relative;
  z-index: 3;
  max-width: 690px;
  animation: fadeInLeft 0.9s ease forwards;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 17px 9px 13px;
  border: 1px solid rgba(94, 242, 238, 0.24);
  border-radius: 999px;
  background: rgba(5, 31, 36, 0.56);
  box-shadow: inset 0 0 26px rgba(34, 224, 214, 0.07);
  backdrop-filter: blur(12px);
  color: #8ff7f1;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 2.6px;
  line-height: 1;
  text-transform: uppercase;
}

.eyebrow-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34ffe9;
  box-shadow: 0 0 12px rgba(52, 255, 233, 0.9);
  animation: aiPulseDot 2.2s ease-in-out infinite;
}

.hero-ai .hero-tagline {
  margin: 26px 0 22px;
  max-width: 700px;
  font-family: "Exo 2", "Poppins", sans-serif;
  font-size: clamp(48px, 4.6vw, 68px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -2.2px;
  color: #f4ffff;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.hero-ai .hero-tagline .tag-ai,
.hero-ai .hero-tagline .tag-market {
  position: relative;
  display: inline-block;
  background: linear-gradient(110deg, #ffffff 0%, #9bfbf6 35%, #22e0d6 68%, #0fa4ae 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-ai .hero-tagline .tag-market {
  background: linear-gradient(110deg, #f6c96b 0%, #ffe6a8 38%, #22e0d6 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-ai .hero-tagline .tag-ai::after {
  content: "";
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 2px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(34, 224, 214, 0.55), transparent 70%);
  filter: blur(5px);
}

.hero-ai .hero-description {
  max-width: 560px;
  margin: 0 0 32px;
  color: #a8c7cc;
  font-size: 16.5px;
  line-height: 1.82;
}

.hero-ai .hero-description strong {
  color: #eaffff;
  font-weight: 600;
}

/* ---------- Buttons ---------- */
.hero-ai .hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.hero-ai .hero-buttons a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 27px;
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  line-height: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.hero-ai .hero-buttons a i {
  font-size: 15px;
  transition: transform 0.3s ease;
}

.hero-ai .hero-buttons a:hover i {
  transform: translateX(3px);
}

.hero-ai .hero-buttons a.hero-btn-primary {
  overflow: hidden;
  border: 1px solid rgba(181, 255, 250, 0.55);
  background: linear-gradient(115deg, #22e0d6 0%, #6bf7ee 52%, #0fb3bd 100%);
  color: #021014;
  box-shadow:
    0 16px 40px rgba(24, 214, 206, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.hero-ai .hero-buttons a.hero-btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: aiShine 5.2s ease-in-out infinite;
}

.hero-ai .hero-buttons a.hero-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow:
    0 22px 52px rgba(24, 214, 206, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.hero-ai .hero-buttons a.hero-btn-secondary {
  border: 1px solid rgba(121, 236, 233, 0.24);
  background: rgba(6, 32, 37, 0.55);
  backdrop-filter: blur(10px);
  color: #d8fbf9;
}

.hero-ai .hero-buttons a.hero-btn-secondary:hover {
  border-color: rgba(121, 236, 233, 0.55);
  background: rgba(11, 52, 58, 0.8);
  color: #ffffff;
  transform: translateY(-3px);
}

/* ---------- Trust metrics ---------- */
.hero-ai .hero-metrics {
  display: flex;
  gap: 42px;
  margin-top: 38px;
  padding-top: 25px;
  border-top: 1px solid rgba(126, 235, 235, 0.12);
  max-width: 545px;
}

.hero-ai .hero-metrics > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hero-ai .hero-metrics strong {
  font-family: "Exo 2", "Poppins", sans-serif;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.6px;
  line-height: 1;
  color: #f2ffff;
}

.hero-ai .hero-metrics span {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #76959b;
}

/* ---------- Right visual ---------- */
.hero-ai .hero-visual {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 600px;
  animation: fadeInRight 1s ease forwards;
}

.ai-hud {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 580px);
  aspect-ratio: 1 / 1.04;
}

.ai-hud::before {
  content: "";
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 224, 214, 0.22) 0%, rgba(7, 52, 58, 0.18) 45%, transparent 70%);
  filter: blur(26px);
}

.hud-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hud-ring--one {
  inset: 2%;
  border: 1px solid rgba(92, 238, 235, 0.16);
  box-shadow:
    inset 0 0 80px rgba(34, 224, 214, 0.06),
    0 0 70px rgba(34, 224, 214, 0.07);
}

.hud-ring--one::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: conic-gradient(from 20deg, transparent 0 68%, rgba(34, 224, 214, 0.85) 82%, transparent 92%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  animation: aiSpin 16s linear infinite;
}

.hud-ring--two {
  inset: 10%;
  border: 1px dashed rgba(126, 243, 240, 0.2);
  animation: aiSpinReverse 34s linear infinite;
}

.hud-ring--two::before,
.hud-ring--two::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #46f4e8;
  box-shadow: 0 0 16px rgba(70, 244, 232, 0.9);
}

.hud-ring--two::before {
  top: 11%;
  right: 21%;
}

.hud-ring--two::after {
  bottom: 8%;
  left: 26%;
  background: #f6c96b;
  box-shadow: 0 0 16px rgba(246, 201, 107, 0.8);
}

.hud-ring--three {
  inset: 19%;
  border: 1px solid rgba(34, 224, 214, 0.1);
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(88, 236, 233, 0.15) 50%, transparent 50.2%),
    linear-gradient(transparent 49.8%, rgba(88, 236, 233, 0.15) 50%, transparent 50.2%);
}

.ai-robot {
  position: relative;
  z-index: 2;
  width: 80%;
  height: auto;
  overflow: visible;
  filter:
    drop-shadow(0 26px 44px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 34px rgba(34, 224, 214, 0.2));
  animation: aiFloat 6.4s ease-in-out infinite;
}

/* ---------- Floating glass cards ---------- */
.ai-chip {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border: 1px solid rgba(113, 243, 238, 0.2);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(7, 39, 44, 0.88), rgba(3, 18, 22, 0.8));
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  white-space: nowrap;
}

.ai-chip .chip-label {
  display: block;
  margin-bottom: 3px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  line-height: 1;
  text-transform: uppercase;
  color: #7aa1a7;
}

.ai-chip strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
  color: #f0ffff;
}

.chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid rgba(68, 244, 234, 0.28);
  border-radius: 10px;
  background: rgba(34, 224, 214, 0.1);
  color: #6ffaf2;
  font-size: 14px;
  box-shadow: inset 0 0 16px rgba(34, 224, 214, 0.12);
}

.chip-positive {
  color: #56f0a4;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.chip-muted {
  color: #78989d;
  font-size: 9.5px;
  font-weight: 500;
}

.ai-chip--signal {
  top: 9%;
  left: -2%;
  animation: aiFloatChip 7s ease-in-out infinite;
}

.ai-chip--signal .chip-positive {
  margin-left: 4px;
  padding: 5px 8px;
  border: 1px solid rgba(86, 240, 164, 0.25);
  border-radius: 999px;
  background: rgba(86, 240, 164, 0.09);
}

.ai-chip--portfolio {
  right: -3%;
  bottom: 11%;
  display: block;
  width: 208px;
  animation: aiFloatChip 8.4s ease-in-out -2.4s infinite;
}

.ai-chip--portfolio > strong {
  margin-top: 2px;
  font-family: "Exo 2", "Poppins", sans-serif;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.8px;
  color: #ffffff;
}

.ai-chip--portfolio .chip-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
}

.ai-chip--portfolio .sparkline {
  display: block;
  width: 100%;
  height: 42px;
  margin-top: 8px;
  overflow: visible;
}

.ai-chip--engine {
  bottom: 0;
  left: 2%;
  width: 214px;
  white-space: normal;
  animation: aiFloatChip 6.8s ease-in-out -1.2s infinite;
}

.ai-chip--engine .chip-icon {
  color: #f6c96b;
  border-color: rgba(246, 201, 107, 0.28);
  background: rgba(246, 201, 107, 0.08);
  box-shadow: inset 0 0 16px rgba(246, 201, 107, 0.1);
}

/* ---------- Animations ---------- */
@keyframes aiOrbDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(30px, -26px, 0) scale(1.12); }
}

@keyframes aiScan {
  from { transform: translateY(0); }
  to { transform: translateY(430%); }
}

@keyframes aiDrawLine {
  to { stroke-dashoffset: 0; }
}

@keyframes aiSpin {
  to { transform: rotate(360deg); }
}

@keyframes aiSpinReverse {
  to { transform: rotate(-360deg); }
}

@keyframes aiFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@keyframes aiFloatChip {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

@keyframes aiPulseDot {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(52, 255, 233, 0.55), 0 0 12px rgba(52, 255, 233, 0.9);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(52, 255, 233, 0), 0 0 18px rgba(52, 255, 233, 1);
  }
}

@keyframes aiShine {
  0%, 62% { left: -60%; }
  100% { left: 130%; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1240px) {
  .hero.hero-ai {
    gap: 28px;
    padding: 145px 52px 78px;
  }

  .hero-ai .hero-tagline {
    font-size: clamp(46px, 4.5vw, 60px);
  }

  .hero-ai .hero-visual {
    min-height: 540px;
  }

  .ai-chip--signal {
    left: 0;
  }

  .ai-chip--portfolio {
    right: 0;
  }
}

@media (max-width: 1024px) {
  .hero.hero-ai {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    padding: 132px 34px 70px;
  }

  .hero-ai .hero-tagline {
    font-size: clamp(40px, 4.8vw, 52px);
    letter-spacing: -1.6px;
  }

  .hero-ai .hero-description {
    font-size: 15px;
  }

  .hero-ai .hero-metrics {
    gap: 28px;
  }

  .hero-ai .hero-visual {
    min-height: 500px;
  }

  .ai-chip {
    transform: scale(0.92);
  }
}

@media (max-width: 900px) {
  .hero.hero-ai {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 120px 22px 64px;
    min-height: auto;
    text-align: center;
  }

  .hero-ai .hero-content {
    max-width: 660px;
    margin: 0 auto;
  }

  .hero-ai .hero-eyebrow {
    margin: 0 auto;
  }

  .hero-ai .hero-tagline {
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(38px, 7.2vw, 54px);
    letter-spacing: -1.4px;
  }

  .hero-ai .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-ai .hero-buttons {
    justify-content: center;
  }

  .hero-ai .hero-metrics {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-ai .hero-visual {
    min-height: 520px;
    margin-top: 20px;
  }

  .ai-hud {
    width: min(100%, 500px);
  }

  .hero-market-chart {
    height: 55%;
    opacity: 0.55;
  }
}

@media (max-width: 600px) {
  .hero.hero-ai {
    padding: 122px 18px 54px;
  }

  .hero-ai .hero-eyebrow {
    font-size: 8.5px;
    letter-spacing: 1.8px;
    padding: 8px 13px 8px 10px;
  }

  .hero-ai .hero-tagline {
    margin: 20px auto 18px;
    font-size: clamp(33px, 10.2vw, 46px);
    line-height: 1.07;
    letter-spacing: -1px;
  }

  .hero-ai .hero-description {
    font-size: 14px;
    line-height: 1.75;
    margin-bottom: 26px;
  }

  .hero-ai .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-ai .hero-buttons a {
    justify-content: center;
    width: 100%;
    padding: 15px 20px;
  }

  .hero-ai .hero-metrics {
    gap: 18px;
    margin-top: 28px;
    padding-top: 20px;
  }

  .hero-ai .hero-metrics strong {
    font-size: 19px;
  }

  .hero-ai .hero-metrics span {
    font-size: 8px;
    letter-spacing: 0.7px;
  }

  .hero-ai .hero-visual {
    min-height: 430px;
    margin-top: 14px;
  }

  .ai-robot {
    width: 86%;
  }

  .hud-ring--two {
    inset: 8%;
  }

  .ai-chip {
    padding: 10px 11px;
    border-radius: 12px;
  }

  .ai-chip--signal {
    top: 2%;
    left: -1%;
    transform: scale(0.85);
    transform-origin: top left;
  }

  .ai-chip--portfolio {
    right: -1%;
    bottom: 8%;
    width: 168px;
    transform: scale(0.84);
    transform-origin: bottom right;
  }

  .ai-chip--portfolio > strong {
    font-size: 19px;
  }

  .ai-chip--portfolio .sparkline {
    height: 32px;
  }

  .ai-chip--engine {
    bottom: auto;
    top: 2%;
    left: 50%;
    transform: translateX(-50%) scale(0.85);
    transform-origin: top center;
    width: 190px;
  }

  .chip-icon {
    width: 29px;
    height: 29px;
    flex-basis: 29px;
    font-size: 12px;
  }

  .ai-chip strong {
    font-size: 11px;
  }
}

@media (max-width: 390px) {
  .hero-ai .hero-metrics {
    gap: 12px;
  }

  .hero-ai .hero-metrics span {
    font-size: 7px;
    letter-spacing: 0.4px;
  }

  .hero-ai .hero-visual {
    min-height: 370px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-ai .hero-content,
  .hero-ai .hero-visual {
    animation: none;
  }

  .hero-orb,
  .hero-scanline,
  .hud-ring--one::before,
  .hud-ring--two,
  .ai-robot,
  .ai-chip,
  .hero-ai .hero-buttons a.hero-btn-primary::after,
  .eyebrow-dot {
    animation: none;
  }

  .market-line {
    stroke-dashoffset: 0;
    animation: none;
  }
}
