/* ============================================================
   AllStar: Sports Academy Hero Section
   Faithful rebuild of HR-074. Fonts: Oswald (display) +
   Familjen Grotesk (body). Scoped under .allstar-hero.
   Background image + feature-card images are CMS-driven
   (cms-content/hero.json); placeholder used until set.
============================================================ */
.allstar-hero {
  --as-yellow: #af251c;        /* Symbiosis red, primary accent */
  --as-yellow-hover: #9c2119;
  --as-indigo: #b23a2e;
  --as-ink: #14151A;
  --as-white: #FFFFFF;

  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: stretch;
  isolation: isolate;
  overflow: hidden;
  background: #1b1c22;
  font-family: 'Familjen Grotesk', system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--as-white);
}

/* full-bleed background video + legibility overlay.
   The poster paints instantly; the muted, looped clip streams in behind it
   (object-fit:cover keeps it filling the hero at any aspect ratio). */
.allstar-hero__video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #1b1c22;
  pointer-events: none;
}
.allstar-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(15,16,20,.88) 0%, rgba(15,16,20,.62) 42%, rgba(15,16,20,.20) 100%),
    linear-gradient(0deg, rgba(15,16,20,.55) 0%, rgba(15,16,20,0) 40%);
}

/* ---------- carousel arrows ---------- */
.allstar-hero__nav {
  position: absolute;
  z-index: 3;
  right: clamp(1.25rem, calc(4 * var(--fv, 1vw)), 4.5rem);
  bottom: clamp(1.75rem, 5vh, 3rem);
  display: flex;
  gap: .75rem;
}
.allstar-hero__arrow {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 50%;
  background: rgba(20, 21, 26, .3);
  backdrop-filter: blur(3px);
  color: var(--as-white);
  cursor: pointer;
  transition: background-color .25s ease, border-color .25s ease, color .25s ease, transform .25s ease;
}
.allstar-hero__arrow svg { width: 22px; height: 22px; }
.allstar-hero__arrow:hover {
  background: var(--as-yellow);
  border-color: var(--as-yellow);
  color: var(--as-white);
  transform: translateY(-2px);
}
.allstar-hero__arrow.swiper-button-disabled { opacity: .45; cursor: default; }
.allstar-hero__arrow.swiper-button-disabled:hover {
  background: rgba(20, 21, 26, .3);
  border-color: rgba(255, 255, 255, .4);
  color: var(--as-white);
  transform: none;
}

.allstar-hero__inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(6rem, 12vh, 9rem) clamp(1.25rem, calc(4 * var(--fv, 1vw)), 4.5rem) clamp(2.5rem, 6vh, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(2rem, calc(5 * var(--fv, 1vw)), 5rem);
}

/* ---------- left column ---------- */
.allstar-hero__lead {
  max-width: 640px;
}
.allstar-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--as-yellow);
  margin: 0 0 1.4rem;
}
.allstar-hero__eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--as-yellow);
}
.allstar-hero__title {
  font-family: 'Oswald', 'Familjen Grotesk', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: clamp(2.2rem, calc(5 * var(--fv, 1vw)), 4.5rem);
  line-height: 1.02;
  letter-spacing: .005em;
  margin: 0 0 1.6rem;
  text-wrap: balance;
}
.allstar-hero__para {
  font-size: clamp(1rem, calc(1.15 * var(--fv, 1vw)), 1.2rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, .82);
  max-width: 30rem;
  margin: 0 0 2.4rem;
}

.allstar-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem 1.8rem;
}
.allstar-hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .84rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s ease, background-color .25s ease, color .25s ease;
}
.allstar-hero__btn--primary {
  background: var(--as-yellow);
  color: var(--as-white);
  padding: 1.05rem 2.35rem;
  border-radius: 2px;
}
.allstar-hero__btn--primary:hover {
  background: var(--as-yellow-hover);
  transform: translateY(-2px);
}
.allstar-hero__btn--ghost {
  color: var(--as-white);
  padding: 1.05rem .15rem;
  position: relative;
}
.allstar-hero__btn--ghost::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: .7rem;
  height: 1px;
  background: rgba(255, 255, 255, .55);
  transition: background-color .25s ease;
}
.allstar-hero__btn--ghost:hover::after { background: var(--as-yellow); }
.allstar-hero__btn--ghost:hover { color: var(--as-yellow); }

/* honest-urgency microcopy under the primary CTA */
.allstar-hero__note {
  margin: 1.15rem 0 0;
  font-size: .8rem;
  line-height: 1.45;
  letter-spacing: .01em;
  color: rgba(255, 255, 255, .68);
  max-width: 34rem;
}

/* ---------- right column: feature cards ---------- */
/* SNAP apply button: heads the cards column, the boldest thing on the right */
.allstar-hero__apply {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .3rem 1rem;
  margin-bottom: .9rem;
  padding: 1.25rem 1.75rem;
  background: var(--as-yellow);
  color: var(--as-white);
  text-decoration: none;
  border-radius: 2px;
  box-shadow: 0 14px 34px -14px rgba(175, 37, 28, .75);
  transition: background-color .25s ease, transform .25s ease;
}
.allstar-hero__apply:hover { background: var(--as-yellow-hover); transform: translateY(-2px); }
.allstar-hero__apply:active { transform: translateY(0) scale(.99); }
.allstar-hero__apply:focus-visible { outline: 2px solid var(--as-white); outline-offset: 3px; }
.allstar-hero__apply-t {
  grid-column: 1;
  font-weight: 800;
  font-size: clamp(1.3rem, 1.6vw, 1.55rem);
  line-height: 1.15;
  letter-spacing: -.01em;
}
.allstar-hero__apply-n {
  grid-column: 1;
  font-size: .86rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, .88);
}
.allstar-hero__apply-arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 26px;
  height: 26px;
  transition: transform .3s ease;
}
.allstar-hero__apply:hover .allstar-hero__apply-arrow { transform: translate(3px, -3px); }
.allstar-hero__cards {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-self: center;
  margin-left: auto;
  width: min(100%, 420px);
}
.allstar-hero__card {
  display: block;
  text-decoration: none;
  color: var(--as-white);
  padding: 1.65rem 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, .18);
  background: rgba(20, 21, 26, .28);
  backdrop-filter: blur(2px);
  transition: background-color .3s ease, transform .3s ease;
}
.allstar-hero__card:last-child { border-bottom: 1px solid rgba(255, 255, 255, .18); }
.allstar-hero__card:hover { background: rgba(20, 21, 26, .5); }
.allstar-hero__card--hl {
  background: var(--as-indigo);
  border-color: transparent;
}
.allstar-hero__card--hl + .allstar-hero__card,
.allstar-hero__card--hl { border-top-color: transparent; }
.allstar-hero__card--hl:hover { background: #af251c; }

.allstar-hero__card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .55rem;
}
.allstar-hero__card-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 1.15rem;
  margin: 0;
}
.allstar-hero__card-arrow {
  flex: none;
  width: 20px;
  height: 20px;
  transition: transform .3s ease;
}
.allstar-hero__card:hover .allstar-hero__card-arrow { transform: translate(3px, -3px); }
.allstar-hero__card-desc {
  font-size: .92rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, .78);
  margin: 0;
}
.allstar-hero__card--hl .allstar-hero__card-desc { color: rgba(255, 255, 255, .9); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .allstar-hero__inner {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 2.75rem;
    padding-top: clamp(7rem, 16vh, 10rem);
  }
  .allstar-hero__cards { margin-left: 0; width: 100%; }
  .allstar-hero__scrim {
    background: linear-gradient(0deg, rgba(15,16,20,.9) 0%, rgba(15,16,20,.55) 55%, rgba(15,16,20,.4) 100%);
  }
}
@media (max-width: 520px) {
  .allstar-hero__actions { gap: .75rem 1.2rem; }
  .allstar-hero__btn--primary { flex: 1 1 auto; }
}

/* ---------- rotating text blocks (hero.json "Slides", max two) ----------
   The video stays put; only the copy changes. Slides share one grid cell so
   the block is always as tall as the longest slide: no layout shift when it
   turns over. The active slide's title rises word by word out of a mask, then
   the kicker, chips and paragraphs follow. The bar under each number is the
   timer itself: hero-rotator.js advances when it fills, so pausing the bar
   pauses the rotation. */
.hero-rot { position: relative; }
.allstar-hero__lead:has(.hero-rot) { max-width: 720px; }
.allstar-hero__inner:has(.hero-rot) { padding-top: clamp(4.5rem, 9vh, 6.5rem); }
.hero-rot ~ .allstar-hero__actions + .allstar-hero__note,
.hero-rot ~ .allstar-hero__note { margin-top: .9rem; }
.hero-rot__stage { display: grid; }
.hero-rot__slide {
  grid-area: 1 / 1;
  align-self: start;
  min-width: 0;
  opacity: 0;
  visibility: hidden;
  filter: blur(6px);
  transform: translateY(-14px);
  transition: opacity .45s ease, filter .45s ease, transform .5s ease, visibility 0s linear .5s;
}
.hero-rot__slide.is-active {
  opacity: 1;
  visibility: visible;
  filter: none;
  transform: none;
  transition: opacity .2s ease, filter 0s, transform 0s, visibility 0s;
}

.hero-rot__title {
  font-size: clamp(2rem, calc(3.5 * var(--fv, 1vw)), 3.3rem);
  line-height: 1.04;
  margin: 0 0 1.1rem;
}
/* Appearance effect. The headline arrives letter by letter and the copy
   under it word by word; each piece rises a touch and sharpens out of a
   soft blur. Letters stay inside an unbreakable word box so a line never
   wraps mid-word. The hidden state is reset only after the outgoing slide
   has faded, so a slide never visibly snaps back before it leaves. */
.hero-rot__sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.hero-rot__w { display: inline-block; white-space: nowrap; }
.hero-rot__ch,
.hero-rot__gw,
.hero-rot__in {
  display: inline-block;
  opacity: 0;
  filter: blur(var(--hr-blur, 8px));
  transform: translateY(var(--hr-rise, .35em));
  transition: opacity 0s linear .6s, filter 0s linear .6s, transform 0s linear .6s;
}
.hero-rot__ch { --hr-blur: 12px; --hr-rise: .45em; }
/* The letters are drawn from data-ch, not written as text: the heading's
   only text is then the screen-reader copy, so search engines and SEO
   tools read the headline once instead of twice. */
.hero-rot__ch::before { content: attr(data-ch); }
.hero-rot__gw { --hr-blur: 6px;  --hr-rise: .4em; }
.hero-rot__in { --hr-blur: 6px;  --hr-rise: 10px; }

.hero-rot__slide.is-active .hero-rot__ch,
.hero-rot__slide.is-active .hero-rot__gw,
.hero-rot__slide.is-active .hero-rot__in {
  opacity: 1;
  filter: blur(0);
  transform: none;
}
.hero-rot__slide.is-active .hero-rot__ch {
  transition: opacity .55s ease, filter .75s ease, transform .9s cubic-bezier(.2, .75, .15, 1);
  transition-delay: calc(.12s + var(--c, 0) * 24ms);
}
.hero-rot__slide.is-active .hero-rot__gw,
.hero-rot__slide.is-active .hero-rot__in {
  transition: opacity .5s ease, filter .6s ease, transform .7s cubic-bezier(.2, .75, .15, 1);
  transition-delay: calc(.55s + var(--g, 0) * 18ms);
}

/* first paint: CSS plays slide 1 in by itself, so it never waits on JS */
@keyframes hero-rot-appear {
  from { opacity: 0; filter: blur(var(--hr-blur, 8px)); transform: translateY(var(--hr-rise, .35em)); }
  to   { opacity: 1; filter: blur(0); transform: none; }
}
.hero-rot:not(.is-ready) .hero-rot__slide.is-active .hero-rot__ch {
  animation: hero-rot-appear .9s cubic-bezier(.2, .75, .15, 1) calc(.12s + var(--c, 0) * 24ms) both;
}
.hero-rot:not(.is-ready) .hero-rot__slide.is-active .hero-rot__gw,
.hero-rot:not(.is-ready) .hero-rot__slide.is-active .hero-rot__in {
  animation: hero-rot-appear .7s cubic-bezier(.2, .75, .15, 1) calc(.55s + var(--g, 0) * 18ms) both;
}

.hero-rot__kicker {
  margin: 0 0 1.25rem;
  font-size: clamp(1.02rem, calc(1.3 * var(--fv, 1vw)), 1.25rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--as-white);
  max-width: 40rem;
  text-wrap: balance;
}
.hero-rot__lead {
  margin: 0 0 .85rem;
  font-size: clamp(1rem, calc(1.15 * var(--fv, 1vw)), 1.12rem);
  font-weight: 600;
  color: var(--as-white);
}
.hero-rot__chips {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  max-width: 36rem;
}
.hero-rot__chips li {
  padding: .5rem .85rem;
  border: 1px solid rgba(255, 255, 255, .3);
  border-left: 2px solid var(--as-yellow);
  border-radius: 2px;
  background: rgba(20, 21, 26, .38);
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.2;
  color: var(--as-white);
}
.hero-rot__para {
  max-width: 40rem;
  font-size: clamp(.95rem, calc(1.05 * var(--fv, 1vw)), 1.05rem);
  margin: 0 0 .7rem;
  text-wrap: pretty;
}
.hero-rot__para:last-child { margin-bottom: 0; }

/* numbers + timer bars + pause */
.hero-rot__ctrl {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin: 1.2rem 0 1.6rem;
}
.hero-rot__dot {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, .55);
  font: 600 .78rem/1 'Familjen Grotesk', system-ui, sans-serif;
  letter-spacing: .14em;
  cursor: pointer;
  transition: color .25s ease;
}
.hero-rot__dot:hover,
.hero-rot__dot.is-active { color: var(--as-white); }
.hero-rot__bar {
  position: relative;
  width: 48px;
  height: 2px;
  background: rgba(255, 255, 255, .25);
  overflow: hidden;
}
.hero-rot__bar i {
  position: absolute;
  inset: 0;
  background: var(--as-yellow);
  transform: scaleX(0);
  transform-origin: left center;
}
@keyframes hero-rot-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero-rot__dot.is-active .hero-rot__bar i {
  animation: hero-rot-fill var(--rot-dur, 8s) linear forwards;
}
.hero-rot.is-paused .hero-rot__dot.is-active .hero-rot__bar i { animation-play-state: paused; }
.hero-rot__pause {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  background: transparent;
  color: var(--as-white);
  cursor: pointer;
  transition: border-color .25s ease, background-color .25s ease;
}
.hero-rot__pause:hover { border-color: var(--as-yellow); background: rgba(175, 37, 28, .25); }
.hero-rot__pause svg { width: 14px; height: 14px; }
.hero-rot__pause .i-play,
.hero-rot__pause[aria-pressed="true"] .i-pause { display: none; }
.hero-rot__pause[aria-pressed="true"] .i-play { display: block; }
.hero-rot__dot:focus-visible,
.hero-rot__pause:focus-visible { outline: 2px solid var(--as-white); outline-offset: 3px; }

@media (max-width: 520px) {
  .hero-rot__chips li { font-size: .78rem; padding: .45rem .7rem; }
  .hero-rot__ctrl { margin: 1.3rem 0 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-rot__slide,
  .hero-rot__slide.is-active,
  .hero-rot__ch,
  .hero-rot__gw,
  .hero-rot__in { transition: none !important; animation: none !important; transform: none !important; filter: none !important; }
  .hero-rot__slide:not(.is-active) { opacity: 0; }
  .hero-rot__ch, .hero-rot__gw, .hero-rot__in { opacity: 1; }
}

/* ---------- phones: headline and both buttons inside the first screen ----------
   The eyebrow repeats the name already in the header logo, the chips become
   one swipeable line instead of three wrapped rows, and each slide keeps its
   first paragraph only; the rest of that copy is said again further down. */
@media (max-width: 600px) {
  .allstar-hero__inner:has(.hero-rot) { padding-top: 2.4rem; }
  .allstar-hero__lead:has(.hero-rot) .allstar-hero__eyebrow { display: none; }
  .hero-rot__para ~ .hero-rot__para { display: none; }
  .hero-rot__chips {
    flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; max-width: none;
    scroll-snap-type: x proximity; scrollbar-width: none;
    margin-right: calc(-1 * var(--pad, 20px)); padding-right: var(--pad, 20px);
    -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
            mask-image: linear-gradient(90deg, #000 82%, transparent);
  }
  .hero-rot__chips::-webkit-scrollbar { display: none; }
  .hero-rot__chips li { flex: none; scroll-snap-align: start; }
  .hero-rot__ctrl { margin: 1rem 0 1.2rem; }
}
