/* =====================================================================
   40 - HOME PAGE
   Hero, live stats, section headings, news, trailer, CTA.
   Texts and images come from config/theme.php.
   ===================================================================== */

/* ---------- Hero ------------------------------------------------------ */
.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: flex-end;   /* the logo and buttons sit low, so the faces at the top of the art stay clear */
    justify-content: center;
    padding: calc(var(--nav-h) + 30px) 20px 140px;
}

/* Background art: slow zoom + follows the mouse a little (--px/--py set by parallax.js) */
.hero-bg {
    position: absolute;
    /* the art starts under the menu bar (the faces are at its top edge) and grows from there */
    inset: var(--nav-h) -3% -4%;
    z-index: -3;
    background: var(--hero-image) center top / cover no-repeat;
    transform-origin: 50% 0;
    transform: translate3d(var(--px, 0), var(--py, 0), 0) scale(1.08);
    animation: kenburns 28s ease-in-out infinite alternate;
    will-change: transform;
}
.hero-video { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: 0; mix-blend-mode: screen; transition: opacity 1.2s; }
.hero-video.is-ready { opacity: .2; }
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse at 50% 40%, transparent 0, rgba(6, 6, 8, .25) 45%, rgba(6, 6, 8, .9) 100%),
        linear-gradient(180deg, rgba(6, 6, 8, .55) 0, transparent 30%, transparent 55%, var(--ink-950) 100%);
}
.hero-fog {
    position: absolute;
    inset: auto -20% 0;
    z-index: -1;
    height: 45%;
    pointer-events: none;
    opacity: .5;
    filter: blur(20px);
    background:
        radial-gradient(ellipse at 30% 60%, rgba(160, 180, 220, .14), transparent 60%),
        radial-gradient(ellipse at 75% 70%, rgba(255, 120, 80, .1), transparent 60%);
    animation: fog 22s ease-in-out infinite alternate;
}
.embers { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

.hero-inner { max-width: 980px; text-align: center; }
.hero-logo-wrap { margin-top: clamp(24px, 16vh, 200px); }   /* below the main character's face */
.hero-logo { width: min(720px, 94vw); height: auto; max-height: 38vh; object-fit: contain; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .7)); animation: logo-in 1.4s var(--ease-out) both; }
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 16px;
    border-radius: 2px;
    color: var(--accent-2);
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: rgba(214, 199, 165, .08);
    border: 1px solid rgba(214, 199, 165, .4);
    animation: fade-up .8s .2s var(--ease-out) both;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse-ok 1.8s infinite; }

/* Text title, used when there is no logo image */
.hero-title { margin: 22px 0 10px; font-family: var(--font-display); font-weight: 400; font-size: clamp(64px, 13vw, 176px); line-height: .86; letter-spacing: 4px; color: #fff; text-shadow: 0 10px 40px rgba(0, 0, 0, .6); }
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span { display: inline-block; animation: rise 1.1s var(--ease-out) both; }
.hero-title .line:nth-child(2) > span { animation-delay: .15s; }
.hero-title .accent { color: var(--accent); filter: drop-shadow(0 0 28px rgba(184, 19, 27, .5)); }

.hero-sub {
    max-width: 640px; margin: 18px auto 34px; padding: 8px 18px; color: #ece6da; font-size: clamp(16px, 2vw, 20px); text-shadow: 0 2px 10px #000, 0 0 2px #000;
    background: radial-gradient(closest-side, rgba(6, 6, 8, .78), rgba(6, 6, 8, .5) 70%, transparent); animation: fade-up 1s .45s var(--ease-out) both;
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; animation: fade-up 1s .6s var(--ease-out) both; }

.scroll-cue { position: absolute; left: 50%; bottom: 104px; transform: translateX(-50%); color: var(--text-dim); font-size: 12px; letter-spacing: 3px; text-align: center; animation: fade-up 1s 1s both; }
.scroll-cue i { position: relative; display: block; width: 22px; height: 36px; margin: 8px auto 0; border: 2px solid var(--line-strong); border-radius: 12px; }
.scroll-cue i::after { content: ''; position: absolute; left: 50%; top: 6px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--accent); animation: wheel 1.6s infinite; }

.hero.is-short { min-height: 80vh; padding-bottom: 60px; }

/* ---------- Live stats strip ----------------------------------------- */
.stats {
    position: relative;
    z-index: 2;
    max-width: 1080px;
    margin: -80px auto 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: hidden;
    border-top: 3px solid var(--accent);
    /* game art under a dark film + worn paint; image from tools/make_ui_textures.py */
    background:
        var(--tex-grunge) 0 0 / 300px repeat,
        linear-gradient(90deg, rgba(10, 10, 12, .82), rgba(10, 10, 12, .55) 50%, rgba(10, 10, 12, .82)),
        var(--stats-art) center / cover,
        var(--ink-900);
    box-shadow: var(--shadow);
}
.stat { position: relative; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 24px 18px; text-align: left; }
.stat + .stat::before { content: ''; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: linear-gradient(180deg, transparent, rgba(220, 31, 41, .6), transparent); }
.stat.is-live .stat-icon { background: var(--tex-grunge) 0 0 / 200px repeat, linear-gradient(180deg, #4be3a2, #1d8f5f); }
.stat-value { font-family: var(--font-display); font-size: clamp(34px, 5vw, 52px); line-height: 1; letter-spacing: 2px; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.stat.is-live .stat-value { color: var(--ok); text-shadow: 0 0 22px rgba(61, 220, 151, .4); }
.stat-label { margin-top: 4px; color: var(--text); font-size: 14px; font-weight: 600; letter-spacing: .5px; }
@media (max-width: 767.98px) {
    .stats { grid-template-columns: 1fr; margin-top: -60px; }
    .stat { justify-content: flex-start; padding-left: 28px; }
    .stat + .stat::before { left: 10%; right: 10%; top: 0; bottom: auto; width: auto; height: 1px; background: rgba(220, 31, 41, .4); }
}

/* ---------- Sections -------------------------------------------------- */
.section { position: relative; padding: clamp(70px, 10vw, 120px) 0; }
.section-head { margin-bottom: 40px; text-align: left; }
.section-head.is-center { text-align: center; }
.eyebrow { display: inline-block; margin-bottom: 6px; color: var(--accent-hot); font-size: 13px; font-weight: 600; letter-spacing: 4px; text-transform: uppercase; }
.section-title { display: flex; align-items: center; gap: 16px; margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(40px, 6vw, 64px); line-height: 1; letter-spacing: 1.5px; }
.is-center .section-title { justify-content: center; }
.title-bar { flex: none; width: 14px; height: .82em; background: linear-gradient(180deg, var(--accent-hot), var(--accent-dark)); -webkit-mask: var(--mask-edge) 0 0 / 100% 100%; mask: var(--mask-edge) 0 0 / 100% 100%; }
.section-lead { max-width: 640px; margin: 10px 0 0; color: #fff; font-size: 20px; font-weight: 700; font-stretch: var(--stretch-tight); }
.is-center .section-lead { margin-left: auto; margin-right: auto; }
.divider { display: none; }

/* Old templates' heading style */
.section-header { position: relative; display: inline-block; padding-bottom: 14px; font-family: var(--font-display); font-size: clamp(34px, 5vw, 54px); line-height: 1; letter-spacing: 2px; color: #fff; }
.section-header::after { content: ''; position: absolute; left: 25%; right: 25%; bottom: 0; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }

/* ---------- News: tab bar + banner cards ------------------------------ */
.news-filter { margin-bottom: 26px; }

.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #141417;
    border: 1px solid var(--line);
    transition: transform .35s var(--ease-out), box-shadow .35s, border-color .35s;
}
.news-card:hover { transform: translateY(-6px); border-color: rgba(184, 19, 27, .55); box-shadow: 0 22px 50px rgba(0, 0, 0, .55); }
.news-card-media { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; background: #0b0b0d; }
.news-card-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .8s var(--ease-out); }
.news-card:hover .news-card-media img { transform: scale(1.06); }
.news-card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.news-card-tag { align-self: flex-start; margin-bottom: 8px; color: var(--accent-hot); font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.news-card-tag i { margin-right: 6px; }
.news-card-title { margin: 0 0 8px; color: #fff; font-size: 19px; line-height: 1.3; }
.news-card-text { margin: 0 0 14px; color: var(--text-dim); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card-date { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); color: var(--text-faint); font-size: 13px; }

/* ---------- Trailer & CTA ---------------------------------------------- */
.trailer { overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line-strong); box-shadow: var(--shadow), 0 0 80px rgba(184, 19, 27, .1); }
/* banner box (download page) */
.cta-band {
    position: relative;
    overflow: hidden;
    padding: clamp(40px, 6vw, 70px);
    text-align: center;
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
    background: linear-gradient(120deg, rgba(184, 19, 27, .35), rgba(214, 199, 165, .15) 50%, rgba(74, 163, 255, .15)), var(--hero-image) center / cover;
}
.cta-band::after { content: ''; position: absolute; inset: 0; z-index: 0; background: rgba(6, 6, 8, .6); }
.cta-band > * { position: relative; z-index: 1; }
/* closing call to action: "survivor recruitment" panel */
.join-band {
    position: relative;
    overflow: hidden;
    padding: clamp(34px, 5vw, 60px) clamp(22px, 4vw, 56px);
    border: 1px solid var(--line-strong);
    background:
        linear-gradient(90deg, rgba(6, 6, 8, .94) 0%, rgba(6, 6, 8, .78) 45%, rgba(40, 6, 9, .55) 100%),
        var(--hero-image) center 35% / cover;
    clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px));
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .8);
}
/* scanlines + a crimson slash behind the steps */
.join-band::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 4px),
        linear-gradient(115deg, transparent 52%, rgba(184, 19, 27, .22) 52%, rgba(184, 19, 27, .08) 78%, transparent 78%);
}
.join-band::after { content: ''; position: absolute; right: 18px; bottom: 18px; width: 70px; height: 70px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); opacity: .7; pointer-events: none; }
/* hazard tape along the top edge */
.join-tape { position: absolute; left: 0; right: 0; top: 0; height: 8px; background: repeating-linear-gradient(-45deg, var(--accent) 0 14px, #0b0b0d 14px 28px); opacity: .9; }
.join-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(26px, 4vw, 56px); align-items: center; }

.join-eyebrow { display: inline-flex; align-items: center; color: var(--accent-hot); font-family: var(--font-display); font-size: 16px; letter-spacing: 4px; }
.join-title { margin: 10px 0 12px; color: #fff; font-family: var(--font-display); font-weight: 400; font-size: clamp(36px, 4.2vw, 58px); letter-spacing: 1.5px; line-height: 1; word-break: keep-all; text-shadow: 0 6px 30px rgba(0, 0, 0, .7); }
.join-text { max-width: 440px; margin: 0 0 22px; color: var(--text-dim); font-size: 16px; line-height: 1.7; }

.join-steps { position: relative; margin: 0; padding: 0; list-style: none; counter-reset: none; }
/* the line that ties 01 → 02 → 03 */
.join-steps::before { content: ''; position: absolute; left: 31px; top: 34px; bottom: 34px; width: 2px; background: linear-gradient(180deg, var(--accent-hot), rgba(184, 19, 27, .15)); }
.join-step + .join-step { margin-top: 12px; }
.join-step { animation: join-in .6s var(--d, 0s) var(--ease-out) both; }
.join-step-link {
    position: relative; display: flex; align-items: center; gap: 16px;
    padding: 14px 20px 14px 14px; overflow: hidden;
    color: #fff;
    background: linear-gradient(90deg, rgba(14, 14, 17, .92), rgba(14, 14, 17, .7));
    border: 1px solid rgba(255, 255, 255, .1);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
    transition: border-color .25s, transform .3s var(--ease-out);
}
/* red sweep on hover */
.join-step-link::before { content: ''; position: absolute; inset: 0; z-index: 0; background: linear-gradient(90deg, var(--accent), var(--accent-hot)); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease-out); }
.join-step-link > * { position: relative; z-index: 1; }
.join-step-link:hover, .join-step-link:focus-visible { color: #fff; text-decoration: none; border-color: var(--accent-hot); transform: translateX(6px); outline: none; }
.join-step-link:hover::before, .join-step-link:focus-visible::before { transform: none; }
.join-step-no { display: grid; place-items: center; flex: 0 0 36px; height: 36px; color: #fff; font-family: var(--font-display); font-size: 20px; letter-spacing: 1px; background: #0b0b0d; border: 2px solid var(--accent-hot); border-radius: 50%; box-shadow: 0 0 0 4px rgba(184, 19, 27, .18); }
.join-step-icon { display: grid; place-items: center; flex: 0 0 48px; height: 48px; color: #fff; font-size: 22px; background: linear-gradient(160deg, var(--accent-hot), #6b0b10); clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px); transition: background .3s; }
.join-step-link:hover .join-step-icon { background: rgba(0, 0, 0, .35); }
.join-step-text { display: flex; flex-direction: column; min-width: 0; }
.join-step-title { font-family: var(--font-display); font-size: 26px; letter-spacing: 1.5px; line-height: 1.05; }
.join-step-sub { color: var(--text-dim); font-size: 13.5px; transition: color .25s; }
.join-step-link:hover .join-step-sub { color: rgba(255, 255, 255, .85); }
.join-step-go { margin-left: auto; color: var(--accent-hot); font-size: 16px; transition: color .25s, transform .3s var(--ease-out); }
.join-step-link:hover .join-step-go { color: #fff; transform: translateX(4px); }
@keyframes join-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .join-step { animation: none; } .join-step-link, .join-step-link::before { transition: none; } }
@media (max-width: 991.98px) {
    .join-grid { grid-template-columns: minmax(0, 1fr); }
    .join-band { background: linear-gradient(180deg, rgba(6, 6, 8, .9), rgba(6, 6, 8, .82)), var(--hero-image) center 30% / cover; }
}
@media (max-width: 575.98px) {
    .join-step-icon { display: none; }
    .join-step-title { font-size: 22px; }
    .join-band::after { display: none; }
}
@media (max-height: 900px) { .scroll-cue { display: none; } }   /* the logo sits low now: no room under the buttons */

/* news card as a whole link */
.news-card { position: relative; }
.news-card-link { position: absolute; inset: 0; z-index: 3; }

/* ---------- Server status chip (hero) ------------------------------- */
.srv-status {
    --srv: var(--ok);
    --srv-glow: rgba(61, 220, 151, .55);
    position: relative;
    display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px;
    padding: 8px 18px 8px 14px;
    color: #fff;
    font-family: var(--font-display);
    font-size: 15px; letter-spacing: 2.5px; line-height: 1.2;
    background: linear-gradient(90deg, rgba(8, 9, 12, .82), rgba(20, 12, 14, .72));
    border: 1px solid rgba(255, 255, 255, .1);
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    box-shadow: inset 3px 0 0 var(--srv);
    backdrop-filter: blur(6px);
    animation: rise .9s var(--ease-out) both;
}
/* corner brackets */
.srv-status::before, .srv-status::after { content: ''; position: absolute; width: 14px; height: 14px; border: 2px solid var(--accent); pointer-events: none; }
.srv-status::before { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.srv-status::after { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.srv-status.is-offline { --srv: var(--danger); --srv-glow: rgba(255, 77, 90, .55); }
.srv-status.is-maintenance { --srv: #f2b33d; --srv-glow: rgba(242, 179, 61, .55); }
.srv-status.is-plain { box-shadow: none; }
.srv-led { position: relative; flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--srv); box-shadow: 0 0 10px var(--srv-glow), 0 0 2px #fff inset; }
.srv-led::after { content: ''; position: absolute; inset: -5px; border: 2px solid var(--srv); border-radius: 50%; opacity: 0; animation: srv-ring 2s ease-out infinite; }
.srv-status.is-offline .srv-led::after { animation-duration: 1.2s; }
.srv-state { color: var(--srv); text-shadow: 0 0 12px var(--srv-glow); }
.srv-players { display: inline-flex; align-items: center; gap: 7px; color: rgba(255, 255, 255, .85); font-family: var(--font-body, inherit); font-size: 14px; letter-spacing: .5px; }
.srv-players i { color: var(--accent-2); font-size: 12px; }
.srv-players b { color: #fff; font-family: var(--font-display); font-size: 17px; font-weight: 400; letter-spacing: 1px; }
.srv-sep { width: 1px; height: 16px; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .35), transparent); }
.srv-tag-wrap { display: inline-flex; align-items: center; gap: 10px; }
.srv-tag { color: var(--accent-2); }
@keyframes srv-ring { 0% { opacity: .8; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.8); } }
@media (prefers-reduced-motion: reduce) { .srv-led::after { animation: none; } }
@media (max-width: 575.98px) {
    .srv-status { gap: 8px; padding: 7px 14px 7px 12px; font-size: 13px; letter-spacing: 1.8px; }
    .srv-tag-wrap { display: none; }
}
