/*
 * HERO TRIAL
 * This file intentionally contains every trial-only visual override so the
 * previous hero can be restored by removing one stylesheet link and one image.
 */

.hero {
  position: relative;
  background:
    radial-gradient(circle at 82% 24%, rgba(98, 196, 255, 0.32), transparent 31%),
    radial-gradient(circle at 58% 100%, rgba(255, 255, 255, 0.82), transparent 34%),
    linear-gradient(118deg, #e5f4ff 0%, #f8fcff 54%, #dceefb 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(7, 91, 170, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 91, 170, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 56%, #000 100%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  min-height: 470px;
  grid-template-columns: minmax(0, 1.02fr) minmax(470px, 0.98fr);
  gap: 34px;
}

.hero-grid > div:first-child {
  position: relative;
  z-index: 6;
}

.math-visual {
  --hero-boy-width: 360px;
  --hero-boy-right: -24px;
  --hero-boy-top: -2px;
  height: 400px;
  isolation: isolate;
}

.math-visual::before {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -18px;
  top: 28px;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.93) 0 47%, rgba(125, 205, 255, 0.28) 48% 61%, transparent 62%);
  filter: blur(0.2px);
}

.hero-boy-trial {
  position: absolute;
  width: var(--hero-boy-width);
  max-width: none;
  height: auto;
  right: var(--hero-boy-right);
  top: var(--hero-boy-top);
  z-index: 3;
  display: block;
  transform: rotate(1.2deg);
  transform-origin: 54% 55%;
  filter: drop-shadow(0 24px 24px rgba(15, 57, 92, 0.2));
}

.graph-card {
  width: 300px;
  height: 205px;
  left: 0;
  right: auto;
  top: 154px;
  z-index: 2;
  border-color: rgba(115, 179, 222, 0.62);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 22px 48px rgba(18, 70, 110, 0.18);
  transform: rotate(-3deg);
  backdrop-filter: blur(7px);
}

.formula {
  z-index: 4;
  padding: 5px 9px;
  border: 1px solid rgba(127, 180, 220, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 18px rgba(44, 98, 137, 0.08);
  backdrop-filter: blur(4px);
}

.f1 {
  top: 27px;
  left: 6px;
  right: auto;
}

.f2 {
  bottom: 10px;
  left: 18px;
}

.f3 {
  top: 79px;
  left: 34px;
  padding: 1px 13px 6px;
}

.orbit {
  z-index: 0;
  border-color: rgba(8, 91, 170, 0.2);
}

.orbit-one {
  width: 410px;
  height: 410px;
  right: -48px;
  top: -5px;
}

.orbit-two {
  width: 240px;
  height: 240px;
  right: 72px;
  top: 84px;
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(410px, 0.95fr);
  }

  .math-visual {
    --hero-boy-width: 330px;
    --hero-boy-right: -20px;
    --hero-boy-top: 16px;
  }

  .graph-card {
    width: 270px;
    height: 190px;
  }
}

@media (max-width: 800px) {
  .hero-grid {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 10px;
    padding-top: 52px;
    padding-bottom: 24px;
  }

  .math-visual {
    --hero-boy-width: min(305px, 76vw);
    --hero-boy-right: -10px;
    --hero-boy-top: 0px;
    height: 350px;
  }

  .math-visual::before {
    width: 300px;
    height: 300px;
    right: -18px;
    top: 18px;
  }

  .graph-card {
    width: min(245px, 64vw);
    height: 174px;
    left: 0;
    top: 145px;
  }

  .f1 {
    top: 16px;
    left: 0;
  }

  .f2 {
    bottom: 2px;
    left: 6px;
  }

  .f3 {
    top: 73px;
    left: 18px;
  }

  .orbit-one {
    width: 350px;
    height: 350px;
    right: -45px;
    top: -6px;
  }

  .orbit-two {
    width: 210px;
    height: 210px;
    right: 48px;
    top: 66px;
  }
}

@media (max-width: 450px) {
  .hero-grid {
    padding-top: 42px;
    padding-bottom: 18px;
  }

  .math-visual {
    --hero-boy-width: min(270px, 77vw);
    --hero-boy-right: -25px;
    --hero-boy-top: 16px;
    height: 320px;
  }

  .math-visual::before {
    width: 262px;
    height: 262px;
    right: -34px;
    top: 30px;
  }

  .graph-card {
    width: min(212px, 62vw);
    height: 150px;
    left: -4px;
    top: 142px;
  }

  .f1 {
    top: 7px;
    font-size: 17px;
  }

  .f2 {
    bottom: 0;
    font-size: 15px;
  }

  .f3 {
    top: 59px;
    left: 10px;
    font-size: 31px;
  }

  .orbit-one {
    width: 300px;
    height: 300px;
    right: -52px;
    top: 9px;
  }

  .orbit-two {
    width: 175px;
    height: 175px;
    right: 37px;
    top: 72px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-boy-trial {
    animation: hero-boy-float 5.5s ease-in-out infinite;
  }
}

@keyframes hero-boy-float {
  0%, 100% { transform: rotate(1.2deg) translateY(0); }
  50% { transform: rotate(0.4deg) translateY(-7px); }
}
