/* Shared, page-scoped hero treatments for the four main learning hubs. */
.home-hero,
.pillar-hero {
  --hero-accent: #0f766e;
  --hero-accent-bright: #2dd4bf;
  --hero-ink: #102a43;
  --hero-muted: #52677a;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(
      ellipse at 12% 12%,
      rgba(255, 255, 255, 0.2),
      transparent 32%
    ),
    radial-gradient(
      ellipse at 88% 82%,
      rgba(45, 212, 191, 0.32),
      transparent 34%
    ),
    linear-gradient(128deg, #083b50 0%, #0f766e 48%, #14a38b 100%);
}

.home-hero {
  min-height: min(820px, calc(100svh - 80px));
  padding: clamp(4rem, 9vw, 7.5rem) 1.25rem clamp(4.5rem, 8vw, 6.5rem);
}

.home-hero::before,
.pillar-hero::before,
.home-hero::after,
.pillar-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.home-hero::before,
.pillar-hero::before {
  width: clamp(18rem, 38vw, 34rem);
  aspect-ratio: 1;
  top: -42%;
  right: -9%;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 42% 58% 63% 37% / 42% 43% 57% 58%;
  box-shadow:
    0 0 0 2.3rem rgba(255, 255, 255, 0.035),
    0 0 0 5rem rgba(255, 255, 255, 0.025);
  transform: rotate(-18deg);
}

.home-hero::after,
.pillar-hero::after {
  width: 18rem;
  height: 18rem;
  left: -7rem;
  bottom: -11rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(2px);
}

.home-hero .hero-content,
.pillar-hero .hero-content {
  width: min(100%, 920px);
  max-width: 920px;
  padding: 0;
  color: #fff;
}

.home-hero .hero-title,
.pillar-hero__title {
  max-width: 900px;
  margin: 0 auto 1.25rem;
  color: #fff;
  font-family: "Poppins", "Inter", sans-serif;
  font-size: clamp(2.5rem, 6.3vw, 5rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-wrap: balance;
  background: none;
  -webkit-text-fill-color: currentColor;
  text-shadow: 0 3px 24px rgba(5, 35, 49, 0.22);
  animation: pillarHeroRise 650ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.home-hero .hero-subtitle,
.pillar-hero__subtitle {
  max-width: 690px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 450;
  line-height: 1.7;
  text-shadow: none;
  animation: pillarHeroRise 700ms 80ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.pillar-hero {
  height: auto;
  min-height: 430px;
  padding: clamp(4rem, 8vw, 6.5rem) 1.25rem;
  text-align: center;
  background:
    radial-gradient(
      ellipse at 14% 10%,
      rgba(255, 255, 255, 0.2),
      transparent 33%
    ),
    radial-gradient(
      ellipse at 92% 88%,
      rgba(255, 255, 255, 0.16),
      transparent 38%
    ),
    linear-gradient(
      128deg,
      var(--hero-deep) 0%,
      var(--hero-accent) 58%,
      var(--hero-accent-bright) 125%
    );
}

.pillar-hero--games {
  --hero-accent: #6351c8;
  --hero-accent-bright: #bd79ed;
  --hero-deep: #30216e;
}

.pillar-hero--resources {
  --hero-accent: #087e8b;
  --hero-accent-bright: #36c6aa;
  --hero-deep: #064b63;
}

.pillar-hero--teacher {
  --hero-accent: #bd5c19;
  --hero-accent-bright: #f3b33d;
  --hero-deep: #733211;
}

.pillar-hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pillar-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.25rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.pillar-hero__eyebrow i {
  color: #fde68a;
}

.pillar-hero__title {
  font-size: clamp(2.35rem, 5.6vw, 4.4rem);
}

.pillar-hero__subtitle {
  margin-bottom: 1.75rem;
}

.pillar-hero .search-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: min(100%, 620px);
  min-height: 62px;
  margin: 0 auto;
  padding: 0.45rem 1.25rem 0.45rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  background: #fff;
  box-shadow:
    0 18px 48px rgba(15, 23, 42, 0.22),
    0 2px 8px rgba(15, 23, 42, 0.08);
  transition:
    box-shadow 180ms ease,
    transform 180ms ease;
}

.pillar-hero .search-bar:focus-within {
  transform: translateY(-2px);
  box-shadow:
    0 22px 55px rgba(15, 23, 42, 0.28),
    0 0 0 4px rgba(255, 255, 255, 0.2);
}

.pillar-hero .search-bar input {
  width: 100%;
  min-width: 0;
  padding: 0.8rem 0.5rem 0.8rem 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #172b3a;
  font: inherit;
  font-size: 1rem;
}

.pillar-hero .search-bar input::placeholder {
  color: #778899;
  opacity: 1;
}

.pillar-hero .search-bar i {
  position: static;
  flex: 0 0 auto;
  color: var(--hero-accent);
  font-size: 1.15rem;
  transform: none;
}

.pillar-hero__note {
  margin: 1.15rem 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.92rem;
  font-weight: 600;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.home-hero__action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
  backdrop-filter: blur(8px);
}

.home-hero__action--primary {
  border-color: #fff;
  background: #fff;
  color: #075e59;
  box-shadow: 0 10px 28px rgba(4, 41, 48, 0.2);
}

.home-hero__action:hover {
  transform: translateY(-3px);
  background-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 12px 28px rgba(4, 41, 48, 0.18);
}

.home-hero__action--primary:hover {
  background: #eafffa;
}

.home-hero__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  width: min(100%, 760px);
  margin: 2rem auto 0;
}

.home-hero__stats .stat-item {
  min-width: 0;
  padding: 1rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  background: rgba(8, 48, 58, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(12px);
}

.home-hero__stats .stat-icon {
  display: block;
  font-size: 1.65rem;
}

.home-hero__stats .stat-number {
  display: block;
  margin: 0.2rem 0;
  color: #fff;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  font-weight: 800;
}

.home-hero__stats .stat-label {
  display: block;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  line-height: 1.35;
}

.home-hero .floating-element {
  opacity: 0.72;
  filter: drop-shadow(0 8px 16px rgba(3, 34, 44, 0.2));
}

.home-hero .scroll-indicator {
  color: rgba(255, 255, 255, 0.82);
}

.home-hero .scroll-indicator:hover {
  color: #fff;
}

body.dark-mode .home-hero,
body.dark-mode .pillar-hero {
  color: #fff;
}

@keyframes pillarHeroRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .home-hero {
    background:
      radial-gradient(
        ellipse at 90% 0%,
        rgba(45, 212, 191, 0.3),
        transparent 42%
      ),
      linear-gradient(145deg, #083b50 0%, #0f766e 62%, #14a38b 100%) !important;
    min-height: auto !important;
    padding: 4.5rem 1rem 4rem !important;
  }

  .home-hero .hero-content {
    padding: 0;
  }

  .home-hero .hero-title,
  .pillar-hero__title {
    font-size: clamp(2.15rem, 9vw, 3.25rem);
    line-height: 1.08;
  }

  .home-hero .hero-subtitle,
  .pillar-hero__subtitle {
    font-size: 1rem;
    line-height: 1.6;
  }

  .home-hero .floating-elements,
  .home-hero .scroll-indicator {
    display: none;
  }

  .home-hero__actions {
    gap: 0.6rem;
    margin-top: 1.4rem;
  }

  .home-hero__action {
    min-height: 46px;
    padding: 0.7rem 0.95rem;
    font-size: 0.9rem;
  }

  .home-hero__stats {
    gap: 0.55rem;
    margin-top: 1.4rem;
  }

  .home-hero__stats .stat-item {
    padding: 0.8rem 0.4rem;
    border-radius: 14px;
  }

  .home-hero__stats .stat-label {
    font-size: 0.72rem;
  }

  .pillar-hero {
    min-height: 0;
    padding: 4.25rem 1rem;
  }

  .pillar-hero .hero-content {
    padding: 0;
  }

  .pillar-hero .search-bar {
    min-height: 56px;
    border-radius: 15px;
    padding-left: 1rem;
  }
}

@media (max-width: 380px) {
  .home-hero__stats {
    grid-template-columns: 1fr;
    max-width: 230px;
  }

  .home-hero__stats .stat-item {
    display: grid;
    grid-template-columns: 2.2rem 4rem 1fr;
    align-items: center;
    gap: 0.25rem;
    text-align: left;
  }

  .home-hero__stats .stat-label {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero *,
  .pillar-hero *,
  .home-hero *::before,
  .pillar-hero *::before,
  .home-hero *::after,
  .pillar-hero *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
