/* ═══════════════════════════════════════════════════════════════
   ECEL Homepage Polish v1 — Premium esports org visual layer
   Loaded AFTER style.css. Pure overlay; no layout rewrites.
   =============================================================== */

/* ───────── Design tokens (scoped to homepage areas) ───────── */
:root {
    --polish-red: #ff1f3a;
    --polish-red-deep: #c8102e;
    --polish-red-glow: rgba(255, 31, 58, 0.55);
    --polish-amber: #ffb547;
    --polish-cyan: #25e0ff;
    --polish-ink: #050507;
    --polish-line: rgba(255, 31, 58, 0.18);
    --polish-line-soft: rgba(255, 255, 255, 0.06);
    --polish-card-bg: linear-gradient(160deg, rgba(20, 22, 28, 0.92), rgba(10, 11, 16, 0.96));
}

/* ════════════════════════════════════════════════════════════════
   1) GUEST HERO — broadcast-feed treatment
   ════════════════════════════════════════════════════════════════ */
.hero {
    position: relative;
    isolation: isolate;
}

/* Animated tactical grid overlay over the video */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 31, 58, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 31, 58, 0.07) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at center, #000 35%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, transparent 75%);
    z-index: 2;
    pointer-events: none;
    animation: polishGridDrift 24s linear infinite;
}

/* Subtle scanlines (broadcast feed feel) */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 3px,
        rgba(0, 0, 0, 0.18) 4px
    );
    z-index: 2;
    pointer-events: none;
    mix-blend-mode: overlay;
    opacity: 0.35;
}

@keyframes polishGridDrift {
    0%   { background-position: 0 0, 0 0; }
    100% { background-position: 56px 56px, 56px 56px; }
}

/* Black overlay (no red tint), more transparent so video shows through */
.hero-video-overlay {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.55) 100%) !important;
}

/* Glowing left accent bar on hero content */
.hero-content {
    position: relative;
    padding-left: clamp(0px, 2vw, 24px);
}
.hero-content::before {
    content: "";
    position: absolute;
    left: -8px;
    top: 12%;
    bottom: 12%;
    width: 3px;
    background: linear-gradient(180deg, transparent, var(--polish-red) 30%, var(--polish-red) 70%, transparent);
    box-shadow: 0 0 18px var(--polish-red-glow);
    border-radius: 3px;
    opacity: 0.85;
    animation: polishBarPulse 3.4s ease-in-out infinite;
}
@keyframes polishBarPulse {
    0%, 100% { opacity: 0.55; transform: scaleY(0.92); }
    50%      { opacity: 1; transform: scaleY(1.05); }
}

/* Live "ON AIR" indicator above the title */
.hero-pill-row {
    position: relative;
}
.hero-pill-row::before {
    content: "● LIVE BROADCAST";
    display: inline-flex;
    align-items: center;
    margin-right: 12px;
    padding: 4px 10px;
    font-family: 'Rajdhani', 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    color: #fff;
    background: linear-gradient(135deg, var(--polish-red), var(--polish-red-deep));
    border-radius: 4px;
    box-shadow: 0 0 16px var(--polish-red-glow), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    animation: polishLivePulse 1.6s ease-in-out infinite;
    vertical-align: middle;
}
@keyframes polishLivePulse {
    0%, 100% { box-shadow: 0 0 12px var(--polish-red-glow), inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
    50%      { box-shadow: 0 0 26px var(--polish-red-glow), inset 0 0 0 1px rgba(255, 255, 255, 0.32); }
}

/* Pills — sharper, more on-brand */
.hero-pill {
    background: rgba(10, 12, 18, 0.55) !important;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid rgba(255, 31, 58, 0.32) !important;
    color: #f5f5f7 !important;
    font-family: 'Rajdhani', 'Exo 2', sans-serif;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.hero-pill:hover {
    transform: translateY(-2px);
    border-color: var(--polish-red) !important;
    box-shadow: 0 8px 24px rgba(255, 31, 58, 0.25);
}
.hero-pill i {
    color: var(--polish-red) !important;
    text-shadow: 0 0 8px var(--polish-red-glow);
}

/* Reinforce the title with a layered glow */
.title-main {
    filter: drop-shadow(0 4px 18px rgba(255, 31, 58, 0.45));
}
.title-sub {
    filter: drop-shadow(0 2px 10px rgba(255, 31, 58, 0.28));
}

/* CTA buttons — premium glow + arrow micro-interaction */
.hero-buttons .btn {
    position: relative;
    overflow: hidden;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}
.hero-buttons .btn-primary {
    background: linear-gradient(135deg, var(--polish-red) 0%, var(--polish-red-deep) 100%) !important;
    border: none !important;
    box-shadow:
        0 10px 24px rgba(255, 31, 58, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.hero-buttons .btn-primary::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.32) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform .7s ease;
}
.hero-buttons .btn-primary:hover::after { transform: translateX(120%); }
.hero-buttons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 14px 30px rgba(255, 31, 58, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.hero-buttons .btn-secondary {
    background: rgba(10, 12, 18, 0.55) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: #fff !important;
}
.hero-buttons .btn-secondary:hover {
    border-color: var(--polish-red) !important;
    background: rgba(255, 31, 58, 0.12) !important;
}

/* ════════════════════════════════════════════════════════════════
   2) STATS SECTION — gradient-bordered ranking cards
   ════════════════════════════════════════════════════════════════ */
.stat-card {
    position: relative;
    background: linear-gradient(160deg, rgba(18, 20, 26, 0.85), rgba(8, 9, 14, 0.92)) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    overflow: hidden;
    transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .35s ease, box-shadow .35s ease;
}
.stat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--polish-red), transparent 40%, transparent 60%, var(--polish-red));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}
.stat-card::after {
    content: "";
    position: absolute;
    top: -40%;
    right: -40%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(255, 31, 58, 0.18), transparent 60%);
    pointer-events: none;
    transition: transform .6s ease, opacity .35s ease;
    opacity: 0;
}
.stat-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 31, 58, 0.4) !important;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 31, 58, 0.18);
}
.stat-card:hover::before { opacity: 1; }
.stat-card:hover::after  { opacity: 1; transform: scale(1.1); }

.stat-number {
    font-family: 'Exo 2', 'Rajdhani', sans-serif;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, #ff5466 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 18px rgba(255, 31, 58, 0.25);
}
.stat-label {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.62) !important;
    font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════
   3) SECTION HEADINGS — dramatic, broadcast-styled
   ════════════════════════════════════════════════════════════════ */
.section-header {
    position: relative;
}
.section-header h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 14px;
}
.section-header h2::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--polish-red), transparent);
    box-shadow: 0 0 14px var(--polish-red-glow);
    border-radius: 3px;
}
.section-header p {
    color: rgba(255, 255, 255, 0.6) !important;
    letter-spacing: 0.04em;
}
.text-gradient {
    background: linear-gradient(135deg, var(--polish-red), var(--polish-amber)) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    filter: drop-shadow(0 2px 12px rgba(255, 31, 58, 0.35));
}

/* ════════════════════════════════════════════════════════════════
   4) FEATURE / FLOW / SHOWCASE CARDS — cyber border
   ════════════════════════════════════════════════════════════════ */
.feature-card,
.flow-card,
.showcase-card {
    position: relative;
    background: var(--polish-card-bg) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    overflow: hidden;
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.feature-card::before,
.flow-card::before,
.showcase-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 36px;
    height: 36px;
    border-top: 2px solid var(--polish-red);
    border-left: 2px solid var(--polish-red);
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
}
.feature-card::after,
.flow-card::after,
.showcase-card::after {
    content: "";
    position: absolute;
    bottom: 0; right: 0;
    width: 36px;
    height: 36px;
    border-bottom: 2px solid var(--polish-red);
    border-right: 2px solid var(--polish-red);
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
}

.feature-card:hover,
.flow-card:hover,
.showcase-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 31, 58, 0.28) !important;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.5);
}
.feature-card:hover::before,
.flow-card:hover::before,
.showcase-card:hover::before,
.feature-card:hover::after,
.flow-card:hover::after,
.showcase-card:hover::after {
    opacity: 1;
}

/* ════════════════════════════════════════════════════════════════
   5) PLAYER HUB (HQ) — premium organisation feel
   ════════════════════════════════════════════════════════════════ */
.hq {
    position: relative;
}
.hq::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(255, 31, 58, 0.08), transparent 45%),
        radial-gradient(circle at 88% 82%, rgba(37, 224, 255, 0.05), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.hq-welcome {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 31, 58, 0.08), rgba(20, 22, 28, 0.6) 60%) !important;
    border: 1px solid rgba(255, 31, 58, 0.18) !important;
    backdrop-filter: blur(8px);
    overflow: hidden;
}
.hq-welcome::after {
    content: "";
    position: absolute;
    top: 0; right: 0;
    width: 220px; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 31, 58, 0.10) 50%, transparent);
    pointer-events: none;
}

.hq-greeting {
    font-family: 'Exo 2', 'Rajdhani', sans-serif;
    letter-spacing: 0.01em;
}
.hq-ign {
    background: linear-gradient(135deg, var(--polish-red), #ffb1b1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 8px rgba(255, 31, 58, 0.35));
}

.hq-avatar-ring {
    position: relative;
}
.hq-avatar-ring::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--polish-red), transparent 30%, var(--polish-red) 60%, transparent);
    animation: polishRingSpin 6s linear infinite;
    z-index: -1;
    filter: blur(2px);
    opacity: 0.55;
}
@keyframes polishRingSpin {
    to { transform: rotate(360deg); }
}

.hq-online {
    box-shadow: 0 0 0 2px #050507, 0 0 12px #22c55e !important;
}

/* HUD stat tiles — make them glow on hover */
.hq-hud-item {
    position: relative;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.hq-hud-item:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 31, 58, 0.35) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}
.hq-hud-icon {
    box-shadow: 0 6px 18px rgba(255, 31, 58, 0.18);
}
.hq-hud-val {
    font-family: 'Exo 2', 'Rajdhani', sans-serif;
    font-weight: 800;
    letter-spacing: 0.02em;
}

/* Quick nav links — animated underline */
.hq-nav-link {
    position: relative;
    transition: transform .2s ease, background .2s ease;
}
.hq-nav-link::after {
    content: "";
    position: absolute;
    left: 14px; right: 14px; bottom: 6px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--polish-red), transparent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .3s ease;
}
.hq-nav-link:hover { transform: translateY(-2px); }
.hq-nav-link:hover::after { transform: scaleX(1); }
.hq-nav-link--cta {
    background: linear-gradient(135deg, var(--polish-red), var(--polish-red-deep)) !important;
    color: #fff !important;
    box-shadow: 0 8px 22px rgba(255, 31, 58, 0.32);
    animation: polishCtaPulse 2.4s ease-in-out infinite;
}
@keyframes polishCtaPulse {
    0%, 100% { box-shadow: 0 8px 22px rgba(255, 31, 58, 0.32); }
    50%      { box-shadow: 0 10px 30px rgba(255, 31, 58, 0.55); }
}

/* HQ cards — uniform premium polish */
.hq-card {
    position: relative;
    background: var(--polish-card-bg) !important;
    border: 1px solid var(--polish-line-soft) !important;
    transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
}
.hq-card::before {
    content: "";
    position: absolute;
    top: 0; left: 24px;
    width: 56px;
    height: 2px;
    background: linear-gradient(90deg, var(--polish-red), transparent);
    border-radius: 2px;
}
.hq-card:hover {
    border-color: rgba(255, 31, 58, 0.22) !important;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45);
}
.hq-card-title {
    font-family: 'Rajdhani', 'Exo 2', sans-serif;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.92rem;
}
.hq-card-title i {
    color: var(--polish-red);
    text-shadow: 0 0 10px var(--polish-red-glow);
}

/* Stats sidebar — subtle highlight on accent values */
.hq-stat-val--accent { color: var(--polish-amber) !important; text-shadow: 0 0 8px rgba(255, 181, 71, 0.35); }
.hq-stat-val--gold   { color: #ffd166 !important; text-shadow: 0 0 10px rgba(255, 209, 102, 0.4); }

/* Tournament card — flag corner ribbon */
.hq-tourney-card {
    position: relative;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}
.hq-tourney-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}
.hq-tourney-status {
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.7rem;
}

/* ════════════════════════════════════════════════════════════════
   6) Mobile guards — keep the polish lighter on small screens
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .hero-pill-row::before { display: none; }
    .hero::before { background-size: 36px 36px; }
    .feature-card::before, .feature-card::after,
    .flow-card::before,    .flow-card::after,
    .showcase-card::before,.showcase-card::after { width: 22px; height: 22px; }
    .hq-welcome::after { display: none; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero::before,
    .hero-pill-row::before,
    .hero-content::before,
    .hq-avatar-ring::before,
    .hq-nav-link--cta {
        animation: none !important;
    }
}
