/* 메인 화면 — 슬라이드 배너. 테마 토큰은 admin.css의 --c-* 커스텀 프로퍼티를
   그대로 쓴다(라이트/다크 정의를 다시 하지 않는다).

   기능 카드·통계·대회 카드·CTA는 Tailwind 유틸리티(home-tailwind.css,
   app/Views/home.php)로 옮겨서 여기서는 다루지 않는다. 배너가 없을 때의
   히어로(아래 .hero-*)만 예외다 — ::before 오버레이·JS 클래스 토글에 따른
   전환이 필요해 Tailwind 유틸리티만으로는 못 하고 순수 CSS가 있어야 한다. */

/* ── 슬라이드 배너 ── */
.banner-slider {
    position: relative; margin: 0 0 24px; border-radius: 8px; overflow: hidden;
    background: var(--c-surface);
}
.banner-track-clip { overflow: hidden; }
.banner-track { display: flex; transition: transform .4s ease; }
.banner-slide { flex: 0 0 100%; position: relative; }
.banner-slide a, .banner-slide > div { display: block; position: relative; }
.banner-img { display: block; width: 100%; height: auto; aspect-ratio: 21 / 6; object-fit: cover; }

.banner-caption {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 20px;
    background: linear-gradient(0deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
    color: #fff;
}
.banner-caption h2 { margin: 0 0 4px; font-size: 18px; }
.banner-caption p { margin: 0; font-size: 13px; opacity: .9; }

.banner-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 32px; height: 32px; border: 0; border-radius: 999px;
    background: rgba(0, 0, 0, .35); color: #fff; font-size: 18px; line-height: 1; cursor: pointer;
}
.banner-nav:hover { background: rgba(0, 0, 0, .55); }
.banner-prev { left: 10px; }
.banner-next { right: 10px; }

.banner-playtoggle {
    position: absolute; top: 10px; right: 10px;
    width: 28px; height: 28px; border: 0; border-radius: 999px;
    background: rgba(0, 0, 0, .35); color: #fff; font-size: 13px; cursor: pointer;
}
.banner-playtoggle:hover { background: rgba(0, 0, 0, .55); }

.banner-dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 6px; }
.banner-dot {
    width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px;
    background: rgba(255, 255, 255, .5); cursor: pointer;
}
.banner-dot[aria-current="true"] { background: #fff; }

@media (prefers-reduced-motion: reduce) {
    .banner-track { transition: none; }
}

@media (max-width: 640px) {
    .banner-img { aspect-ratio: 16 / 9; }
    .banner-nav { display: none; }
}

/* ── 히어로(배너 없음 폴백) — /main4 랜딩 실험(Challonge·Toornament 참고)에서
   그대로 옮겨왔다(2026-08-31). 코트라인 패턴 오버레이 + 스크롤 등장 +
   대진표 그리기 애니메이션. 색상 값은 tailwind.config.js의 court-500/
   smash-500과 반드시 맞춘다. */
:root {
    --hero-court: #0f9d58;
    --hero-smash: #f97316;
}

.hero-court-lines {
    position: relative;
}
.hero-court-lines::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .07) 0, rgba(255, 255, 255, .07) 1px, transparent 1px, transparent 64px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .07) 0, rgba(255, 255, 255, .07) 1px, transparent 1px, transparent 64px);
}

/* 스크롤 등장 — JS가 없으면(.hero-js 없음) 항상 보인다(점진적 향상). */
.hero-js .hero-reveal {
    opacity: 0; transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
}
.hero-js .hero-reveal.is-visible { opacity: 1; transform: none; }

/* 대진표 연결선 — pathLength="1"로 정규화해 실제 좌표와 무관하게 그려지는 비율을 다룬다. */
.hero-js .hero-bracket .hero-line {
    stroke-dasharray: 1; stroke-dashoffset: 1;
    transition: stroke-dashoffset .9s ease;
}
.hero-js .hero-bracket.is-visible .hero-line { stroke-dashoffset: 0; }
.hero-js .hero-bracket .hero-box {
    opacity: 0; transform: translateY(6px);
    transition: opacity .5s ease, transform .5s ease;
}
.hero-js .hero-bracket.is-visible .hero-box { opacity: 1; transform: none; }

/* 팀 박스 호버 — 결승까지 이어지는 경로를 스매시 오렌지로 강조. */
.hero-bracket .hero-hot.hero-line { stroke: var(--hero-smash) !important; stroke-width: 3; }
.hero-bracket .hero-hot.hero-box rect { stroke: var(--hero-smash); stroke-width: 2.5; }
.hero-bracket .hero-hot.hero-box text { fill: var(--hero-smash); font-weight: 700; }
.hero-bracket .hero-team { cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
    .hero-js .hero-reveal,
    .hero-js .hero-bracket .hero-line,
    .hero-js .hero-bracket .hero-box { opacity: 1; transform: none; transition: none; stroke-dashoffset: 0; }
}
