/* ==========================================================================
   Home page hero banner
   Scoped under .hero so it does not leak into the rest of the theme.
   ========================================================================== */

.hero {
  --hero-blue: hsl(var(--main));
  --hero-blue-dark: var(--main-800);
  --hero-orange: hsl(var(--main-two));
  --hero-ink: var(--neutral-700);
  --hero-muted: var(--neutral-500);

  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 50px 0 clamp(40px, 5vw, 64px);
  background:
    radial-gradient(60% 60% at 100% 0%, rgba(254, 138, 71, 0.14) 0%, rgba(254, 138, 71, 0) 70%),
    radial-gradient(60% 70% at 0% 100%, rgba(6, 108, 203, 0.12) 0%, rgba(6, 108, 203, 0) 70%),
    linear-gradient(180deg, #f6faff 0%, #ffffff 100%);
}

/* The theme paints its own blurred circles on .banner; this section uses its own decoration. */
.hero::before,
.hero::after {
  content: none;
}

/* Dotted texture, faded out towards the edges */
.hero__pattern {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(6, 108, 203, 0.16) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 70% 45%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 70% 45%, #000 0%, transparent 75%);
  pointer-events: none;
}

/* ---------- Content ---------- */

.hero__content {
  max-width: 620px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  margin-bottom: 24px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--hero-blue);
  background: #fff;
  border: 1px solid var(--main-100);
  border-radius: 999px;
  box-shadow: 0 6px 20px -8px rgba(6, 108, 203, 0.35);
}

.hero__eyebrow-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 1rem;
  color: #fff;
  background: var(--hero-blue);
  border-radius: 50%;
}

.hero__title {
  margin: 0 0 24px;
  font-size: clamp(2.25rem, 1.35rem + 3.6vw, 4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--hero-ink);
}

.hero__title-line {
  display: block;
}

.hero__title-accent {
  position: relative;
  display: inline-block;
  color: var(--hero-orange);
}

/* Hand-drawn style underline beneath "Expert" */
.hero__title-accent::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -0.08em;
  height: 0.16em;
  background: currentColor;
  opacity: 0.22;
  border-radius: 999px;
}

/* Rotating keyword. The colour rules in the footer script styles use !important, so match that here. */
.hero .hero__title .rotating-text {
  color: transparent !important;
  background: linear-gradient(90deg, #16a34a 0%, #0ea5a4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  white-space: nowrap;
  padding-bottom: 0.06em;
}

/* Sits on the same line as the rotating keyword */
.hero__title-today {
  display: inline-block;
  color: var(--hero-blue);
}

.hero__lead {
  margin: 0;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.7;
  color: var(--hero-muted);
}

/* ---------- Actions ---------- */

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
}

.hero__actions .btn {
  padding: 18px 32px;
  font-size: 1rem;
  font-weight: 600;
}

.hero__actions .btn-main {
  box-shadow: 0 14px 28px -12px rgba(6, 108, 203, 0.65);
}

.hero__actions .btn-outline-main {
  background-color: #fff !important;
}

.hero__actions .btn-outline-main:hover {
  background-color: var(--main-25) !important;
}

/* ---------- Highlights ---------- */

.hero__points {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 36px 0 0;
  padding: 28px 0 0;
  list-style: none;
  border-top: 1px solid rgba(34, 46, 72, 0.1);
}

.hero__points li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--hero-ink);
}

.hero__points i {
  display: inline-flex;
  font-size: 1.25rem;
  color: #16a34a;
}

/* ---------- Visual ---------- */

.hero__visual {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  aspect-ratio: 1 / 1;
}

/* Soft gradient disc behind the student */
.hero__disc {
  position: absolute;
  inset: 8% 4% 0;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--main-50) 0%, #ffe9dc 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.hero__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed rgba(6, 108, 203, 0.28);
  animation: hero-spin 60s linear infinite;
}

.hero__ring::after {
  content: "";
  position: absolute;
  top: 12%;
  inset-inline-start: 8%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--hero-orange);
  box-shadow: 0 0 0 6px rgba(254, 138, 71, 0.2);
}

.hero__img {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 1;
  width: 88%;
  height: auto;
  margin-inline: auto;
  filter: drop-shadow(0 24px 30px rgba(34, 46, 72, 0.18));
  /* The cutout ends in a hard flat edge; fade it out so it melts into the background */
  -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
}

/* Floating info cards */
.hero__chip {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 12px;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  box-shadow: 0 18px 40px -14px rgba(34, 46, 72, 0.35);
  animation: hero-float 6s ease-in-out infinite;
}

.hero__chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  font-size: 1.375rem;
  border-radius: 12px;
}

.hero__chip-icon--blue {
  color: var(--hero-blue);
  background: var(--main-50);
}

.hero__chip-icon--orange {
  color: var(--hero-orange);
  background: var(--main-two-50);
}

.hero__chip-title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--hero-ink);
}

.hero__chip-text {
  display: block;
  margin-top: 2px;
  font-size: 0.8125rem;
  line-height: 1.2;
  color: var(--hero-muted);
}

.hero__chip--top {
  top: 14%;
  inset-inline-start: -4%;
}

.hero__chip--bottom {
  bottom: 12%;
  inset-inline-end: -2%;
  animation-delay: -3s;
}

@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

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

@media (prefers-reduced-motion: reduce) {
  .hero__ring,
  .hero__chip {
    animation: none;
  }
}

/* ---------- Responsive ---------- */

/* Desktop / laptop: size everything from the viewport so the whole hero fits on one screen.
   The longest heading line ("Class Support Today!") is ~11.7em wide, so the font size is
   capped to keep it on a single line inside the half-width column. */
@media (min-width: 1200px) {
  .hero {
    padding-bottom: 40px;
  }

  .hero__content {
    max-width: 640px;
  }

  .hero__eyebrow {
    margin-bottom: 20px;
  }

  .hero__title {
    margin-bottom: 20px;
    font-size: clamp(2.5rem, min(3.3vw, 7vh), 3.3rem);
  }

  .hero__lead {
    font-size: 1.0625rem;
    line-height: 1.65;
  }

  .hero__actions {
    margin-top: 28px;
  }

  .hero__actions .btn {
    padding: 16px 30px;
  }

  .hero__points {
    margin-top: 24px;
    padding-top: 20px;
  }

  /* Keep the picture inside the visible height */
  .hero__visual {
    width: min(100%, 560px, max(340px, calc(100vh - 210px)));
  }
}

/* Tablet and below: single column, content first, centred */
@media (max-width: 1199.98px) {
  .hero__content {
    max-width: 680px;
    margin-inline: auto;
    text-align: center;
  }

  .hero__actions,
  .hero__points {
    justify-content: center;
  }

  .hero__visual {
    max-width: 480px;
  }
}

@media (max-width: 767.98px) {
  .hero__eyebrow {
    margin-bottom: 20px;
    font-size: 0.8125rem;
  }

  .hero__actions {
    gap: 12px;
    margin-top: 28px;
  }

  .hero__points {
    margin-top: 28px;
    padding-top: 24px;
    gap: 10px 20px;
  }

  .hero__chip {
    padding: 8px 14px 8px 8px;
    gap: 10px;
    border-radius: 14px;
  }

  .hero__chip-icon {
    width: 36px;
    height: 36px;
    font-size: 1.125rem;
    border-radius: 10px;
  }

  .hero__chip-title {
    font-size: 0.8125rem;
  }

  .hero__chip-text {
    font-size: 0.6875rem;
  }

  .hero__chip--top {
    inset-inline-start: 0;
  }

  .hero__chip--bottom {
    inset-inline-end: 0;
  }
}

@media (max-width: 575.98px) {
  /* Not enough width for keyword + "Today!" on one line, so "Today!" drops to its own line */
  .hero__title-today {
    display: block;
  }

  /* Full-width stacked buttons are easier to tap; undo the theme's icon hiding on small screens */
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
    padding: 16px 24px;
  }

  .hero__actions .btn i {
    display: inline-flex !important;
  }

  .hero__points {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}
