/* ============================================================
   LIONS MMA CLUB — ANIMATION PREP
   GSAP target classes · Hero video · Parallax · Page transitions
   ============================================================ */

/* ── Hero section ────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Video background */
.hero__video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  border: 0;
}

/* Texture fallback — shown when no video */
.hero__video-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/bg-texture.png');
  background-size: cover;
  background-position: center;
  /* Hidden by default; shown via JS if video absent */
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease-out);
  z-index: 0;
}

.hero__video-wrap.no-video::after {
  opacity: 1;
}

/* Gradient overlay — darkens bottom for text legibility */
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(13,13,13,0.4) 0%,
      rgba(13,13,13,0.3) 40%,
      rgba(13,13,13,0.75) 80%,
      rgba(13,13,13,0.95) 100%);
  z-index: 1;
}

/* Hero content sits above video */
.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: var(--nav-height);
}

/* ── Headline split lines (GSAP SplitText target) ───────────── */
.hero__headline {
  overflow: hidden;
}

.hero__headline .line {
  display: block;
  overflow: hidden;
}

/* Each line's inner span is the GSAP target */
.hero__headline .line span {
  display: block;
  transform: translateY(100%);
  opacity: 0;
}

/* ── Parallax target ─────────────────────────────────────────── */
.parallax-bg {
  will-change: transform;
}

/* ── Section reveal base states ──────────────────────────────── */
/* (Also defined in global.css — kept here for animation clarity) */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  will-change: opacity, transform;
}

[data-reveal="left"] {
  transform: translateX(-60px);
}

[data-reveal="right"] {
  transform: translateX(60px);
}

[data-reveal="scale"] {
  transform: scale(0.92);
}

/* ── CTA arrow animation ─────────────────────────────────────── */
@keyframes arrow-bounce {
  0%, 100% { transform: translateX(0); }
  50%       { transform: translateX(5px); }
}

.btn .btn-arrow {
  display: inline-block;
  animation: arrow-bounce 1.8s var(--ease-power) infinite;
}

/* ── Scroll indicator ────────────────────────────────────────── */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  opacity: 0.6;
}

.scroll-indicator__text {
  font-family: var(--font-heading);
  font-size: var(--text-label);
  text-transform: uppercase;
  letter-spacing: var(--tracking-xwide);
  color: var(--color-lion-silver);
}

.scroll-indicator__line {
  width: 1px;
  height: 40px;
  background: var(--color-lion-silver);
  position: relative;
  overflow: hidden;
}

.scroll-indicator__line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-fight-red);
  animation: scroll-line 1.5s var(--ease-power) infinite;
}

@keyframes scroll-line {
  0%   { top: -100%; }
  100% { top: 100%; }
}

/* ── Image overlay treatment ─────────────────────────────────── */
.img-wrap {
  position: relative;
  overflow: hidden;
}

.img-wrap img,
.img-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.82) contrast(1.05);
}

.img-wrap img {
  transition: transform var(--dur-slow) var(--ease-power);
}

.img-wrap:hover img {
  transform: scale(1.03);
}

/* Color treatment layer */
.img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(204, 23, 23, 0.08);
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* Bottom gradient for text legibility */
.img-wrap--gradient::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(13,13,13,0.85), transparent);
  z-index: 1;
  pointer-events: none;
}

/* ── Marquee strip ───────────────────────────────────────────── */
.marquee-strip {
  overflow: hidden;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding-block: 1rem;
  background: var(--color-surface);
}

.marquee-track {
  display: flex;
  gap: var(--space-lg);
  width: max-content;
  animation: marquee 24s linear infinite;
}

.marquee-item {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: clamp(0.875rem, 1.5vw, 1rem);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-lion-silver);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.marquee-item::after {
  content: '•';
  color: var(--color-fight-red);
}

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Discipline split section ────────────────────────────────── */
.discipline-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.discipline-section--reverse .discipline-section__img { order: 2; }
.discipline-section--reverse .discipline-section__text { order: 1; }

.discipline-section__img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  align-self: start;
}

.discipline-section__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.8) contrast(1.05);
  transition: transform var(--dur-slow) var(--ease-power);
}

.discipline-section:hover .discipline-section__img img {
  transform: scale(1.03);
}

.discipline-section__text {
  background: var(--color-surface);
  padding: var(--space-md) clamp(var(--space-md), 5vw, var(--space-lg));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .discipline-section {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .discipline-section__img { aspect-ratio: 4/3; min-height: 0; align-self: auto; }
  .discipline-section--reverse .discipline-section__img { order: unset; }
  .discipline-section--reverse .discipline-section__text { order: unset; }
}

/* ── Stagger children utility ────────────────────────────────── */
/* Used by JS to find and stagger child reveals */
[data-stagger] > * {
  opacity: 0;
  transform: translateY(30px);
}
