/* ============================================================
   HOMEPAGE — NEXUS-7 v2
   Prefix: hp-*
   Redesigned: left-aligned hero, minimal ambient, solid containers
   ============================================================ */

/* === BASE OVERRIDES === */
body.home-page {
    background: var(--hp-bg, #07070a) !important;
    color: var(--hp-text, #f0eeeb) !important;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body.home-page::before {
    display: none !important;
}

body.home-page .container {
    max-width: none;
    padding: 0;
}

body.home-page .site-footer {
    border-top: 1px solid var(--hp-border);
    background: var(--hp-bg);
}

/* === VARIABLES === */
:root {
    --hp-bg: #07070a;
    --hp-surface: #0c0c12;
    --hp-surface-raised: #101018;
    --hp-accent: #dc2626;
    --hp-accent-soft: rgba(220, 38, 38, 0.08);
    --hp-border: #1a1824;
    --hp-border-subtle: rgba(255, 255, 255, 0.04);
    --hp-text: #f0eeeb;
    --hp-text-dim: #8a8698;
    --hp-text-muted: #5a5768;
    --hp-success: #22c55e;
    --hp-danger: #ef4444;
    --hp-font: 'Rajdhani', sans-serif;
    --hp-font-display: 'Oxanium', sans-serif;
    --hp-font-mono: 'Share Tech Mono', monospace;
}

/* ============================================================
   AMBIENT GLOW (subtle, 2 orbs only)
   ============================================================ */
.hp-glow {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.hp-glow__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.1;
}

.hp-glow__orb--1 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, #dc2626, transparent 70%);
    top: -120px;
    left: -80px;
    animation: hpDrift1 20s ease-in-out infinite alternate;
}

.hp-glow__orb--2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #7f1d1d, transparent 70%);
    bottom: -100px;
    right: -60px;
    animation: hpDrift2 26s ease-in-out infinite alternate;
}

@keyframes hpDrift1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(80px, 100px) scale(1.1); }
}

@keyframes hpDrift2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-60px, -90px) scale(1.05); }
}

/* ============================================================
   HERO — full viewport, left-aligned content at bottom
   ============================================================ */
.hp-hero {
    position: relative;
    z-index: 2;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: flex-end;
    padding: 0 clamp(28px, 5vw, 80px) 100px;
    overflow: hidden;
}

/* Image slider (crossfade) */
.hp-hero-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hp-hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease;
    will-change: opacity;
}

.hp-hero-slide--active {
    opacity: 1;
}

/* Gradient overlay — strong bottom-left for text readability */
.hp-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg,
            rgba(7, 7, 10, 0.25) 0%,
            rgba(7, 7, 10, 0.45) 35%,
            rgba(7, 7, 10, 0.88) 75%,
            rgba(7, 7, 10, 0.98) 100%),
        linear-gradient(90deg,
            rgba(7, 7, 10, 0.6) 0%,
            transparent 55%);
    pointer-events: none;
}

/* Content block — left-aligned */
.hp-hero__content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hp-hero__title {
    font-family: var(--hp-font-display);
    font-size: clamp(3.5rem, 9vw, 7rem);
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hp-text);
    margin: 0 0 20px;
    animation: hpSlideUp 0.8s 0.15s both;
}

.hp-hero__desc {
    font-family: var(--hp-font);
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    font-weight: 500;
    color: var(--hp-text-dim);
    line-height: 1.5;
    margin: 0 0 22px;
    max-width: 520px;
    animation: hpSlideUp 0.8s 0.35s both;
}

/* Feature tag pills */
.hp-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 34px;
    animation: hpSlideUp 0.8s 0.5s both;
}

.hp-hero__tag {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(220, 38, 38, 0.07);
    border: 1px solid rgba(220, 38, 38, 0.18);
    border-radius: 100px;
    font-family: var(--hp-font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--hp-accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* CTA buttons */
.hp-hero__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    animation: hpSlideUp 0.8s 0.65s both;
}

.hp-hero__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 30px;
    border-radius: 8px;
    font-family: var(--hp-font);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
}

.hp-hero__btn--primary {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: #fff;
    border-color: rgba(220, 38, 38, 0.45);
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.2);
}

.hp-hero__btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(220, 38, 38, 0.3);
}

.hp-hero__btn--ghost {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--hp-text-dim);
}

.hp-hero__btn--ghost:hover {
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--hp-text);
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-1px);
}

/* === Server status — bottom-right of hero === */
.hp-server-status {
    position: absolute;
    z-index: 3;
    bottom: 100px;
    right: clamp(28px, 5vw, 80px);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(12, 12, 18, 0.85);
    border: 1px solid var(--hp-border);
    border-radius: 8px;
    font-family: var(--hp-font-mono);
    font-size: 0.75rem;
    color: var(--hp-text-dim);
    backdrop-filter: blur(12px);
    animation: hpSlideUp 0.8s 0.9s both;
}

.hp-server-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--hp-text-muted);
    flex-shrink: 0;
}

.hp-server-dot--online {
    background: var(--hp-success);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
    animation: hpPulse 2s infinite;
}

.hp-server-dot--offline {
    background: var(--hp-danger);
}

.hp-server-status__sep {
    width: 1px;
    height: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.hp-server-status__map {
    color: var(--hp-text-muted);
}

/* === Scroll cue — center bottom === */
.hp-scroll-cue {
    position: absolute;
    z-index: 3;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--hp-text-muted);
    font-family: var(--hp-font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.5;
    animation: hpSlideUp 0.8s 1.1s both;
}

.hp-scroll-cue__line {
    width: 1px;
    height: 30px;
    background: linear-gradient(to bottom, var(--hp-accent), transparent);
    animation: hpScrollPulse 2.5s ease-in-out infinite;
}

/* Thin separator line below hero */
.hp-hero__divider {
    position: relative;
    z-index: 2;
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, var(--hp-border) 30%, var(--hp-border) 70%, transparent 95%);
}

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes hpSlideUp {
    from { opacity: 0; transform: translateY(26px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes hpPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes hpScrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ============================================================
   CONTENT SECTIONS
   ============================================================ */
.hp-section {
    position: relative;
    z-index: 2;
    padding: 56px clamp(28px, 5vw, 80px);
    max-width: 1200px;
    margin: 0 auto;
}

.hp-section + .hp-section {
    padding-top: 0;
}

/* Heading with extending line */
.hp-section__heading {
    font-family: var(--hp-font-display);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--hp-text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.hp-section__heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--hp-border), transparent);
}

/* ============================================================
   LEADERSHIP — Führungsübersicht
   ============================================================ */
.hp-leadership {
    display: flex;
    gap: 0;
    background: var(--hp-surface);
    border: 1px solid var(--hp-border);
    border-radius: 12px;
    overflow: hidden;
}

.hp-lead-card {
    flex: 1;
    padding: 20px 24px;
    border-right: 1px solid var(--hp-border-subtle);
    transition: background 0.2s ease;
}

.hp-lead-card:last-child {
    border-right: none;
}

.hp-lead-card:hover {
    background: rgba(255, 255, 255, 0.015);
}

.hp-lead-card__label {
    font-family: var(--hp-font-mono);
    font-size: 0.62rem;
    color: var(--hp-text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hp-lead-card__person {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hp-lead-card__rank-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(220, 38, 38, 0.2));
}

.hp-lead-card__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hp-accent);
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(220, 38, 38, 0.4);
}

.hp-lead-card__dot--empty {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

.hp-lead-card__ctid {
    font-family: var(--hp-font-mono);
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.45);
}

.hp-lead-card__name {
    font-family: var(--hp-font-display);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--hp-text);
}

.hp-lead-card__rank {
    font-size: 0.72rem;
    color: var(--hp-text-muted);
    margin-top: 4px;
    padding-left: 16px;
}

/* ============================================================
   STATISTICS — Homepage stats section
   ============================================================ */

.hp-section__heading-kw {
    font-family: var(--hp-font-mono);
    font-size: 0.62rem;
    color: var(--hp-text-muted);
    letter-spacing: 1px;
    margin-left: 10px;
    vertical-align: middle;
    opacity: 0.6;
}

.hp-stats-empty {
    background: var(--hp-surface);
    border: 1px solid var(--hp-border);
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.25);
}

/* Overview metric cards */
.hp-stats-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    background: var(--hp-surface);
    border: 1px solid var(--hp-border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.hp-stats-card {
    padding: 20px 18px;
    border-right: 1px solid var(--hp-border-subtle);
    text-align: center;
}

.hp-stats-card:last-child {
    border-right: none;
}

.hp-stats-card__value {
    font-family: var(--hp-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--hp-text);
    line-height: 1;
    margin-bottom: 6px;
}

.hp-stats-card__label {
    font-family: var(--hp-font-mono);
    font-size: 0.58rem;
    color: var(--hp-text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Rankings (shared for NO TOP 3 and general TOP 3) */
.hp-stats-rankings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0;
    background: var(--hp-surface);
    border: 1px solid var(--hp-border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.hp-stats-ranking {
    padding: 16px 20px;
    border-right: 1px solid var(--hp-border-subtle);
}

.hp-stats-ranking:last-child {
    border-right: none;
}

.hp-stats-ranking__label {
    font-family: var(--hp-font-mono);
    font-size: 0.58rem;
    color: var(--hp-text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hp-stats-ranking__empty {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.2);
    padding: 8px 0;
}

.hp-stats-ranking__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.hp-stats-ranking__row:last-child {
    border-bottom: none;
}

.hp-stats-ranking__pos {
    font-family: var(--hp-font-display);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--hp-accent);
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.hp-stats-ranking__name {
    font-size: 0.82rem;
    color: var(--hp-text);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hp-stats-ranking__time {
    font-family: var(--hp-font-mono);
    font-size: 0.72rem;
    color: var(--hp-text-muted);
    flex-shrink: 0;
}

/* Relocation bars */
.hp-stats-reloc {
    background: var(--hp-surface);
    border: 1px solid var(--hp-border);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.hp-stats-reloc__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.hp-stats-reloc__title {
    font-family: var(--hp-font-mono);
    font-size: 0.58rem;
    color: var(--hp-text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.hp-stats-reloc__total {
    font-family: var(--hp-font-mono);
    font-size: 0.68rem;
    color: var(--hp-text-muted);
}

.hp-stats-reloc__row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.hp-stats-reloc__row:last-child {
    margin-bottom: 0;
}

.hp-stats-reloc__unit {
    font-family: var(--hp-font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--hp-text);
    width: 32px;
    flex-shrink: 0;
}

.hp-stats-reloc__bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 3px;
    overflow: hidden;
}

.hp-stats-reloc__bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hp-stats-reloc__nums {
    font-family: var(--hp-font-mono);
    font-size: 0.66rem;
    color: var(--hp-text-muted);
    width: 44px;
    flex-shrink: 0;
    text-align: right;
}

/* Footer link */
.hp-stats-footer {
    text-align: center;
}

.hp-stats-footer__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--hp-accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.hp-stats-footer__link:hover {
    color: #ef4444;
}

/* ============================================================
   QUICK LINKS — horizontal cards with left accent border
   ============================================================ */
.hp-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 10px;
}

.hp-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    background: var(--hp-surface);
    border: 1px solid var(--hp-border);
    border-left: 3px solid var(--hp-accent);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hp-link:hover {
    background: rgba(220, 38, 38, 0.025);
    border-left-color: #ef4444;
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hp-link__icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(220, 38, 38, 0.06);
    border-radius: 10px;
    color: var(--hp-accent);
    flex-shrink: 0;
}

.hp-link__body {
    flex: 1;
    min-width: 0;
}

.hp-link__title {
    font-family: var(--hp-font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--hp-text);
    margin-bottom: 2px;
}

.hp-link__desc {
    font-size: 0.8rem;
    color: var(--hp-text-dim);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hp-link__arrow {
    color: var(--hp-text-muted);
    flex-shrink: 0;
    opacity: 0.3;
    transition: all 0.3s ease;
}

.hp-link:hover .hp-link__arrow {
    opacity: 0.8;
    color: var(--hp-accent);
    transform: translateX(2px);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.hp-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hp-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
    .hp-hero {
        padding-bottom: 110px;
    }

    .hp-hero__title {
        font-size: clamp(2.8rem, 8vw, 5rem);
    }

    .hp-stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }

    .hp-stats-card:nth-child(2) {
        border-right: none;
    }

    .hp-stats-card:nth-child(-n+2) {
        border-bottom: 1px solid var(--hp-border-subtle);
    }

    .hp-links {
        grid-template-columns: 1fr 1fr;
    }

    .hp-server-status {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 20px;
        animation-delay: 0.7s;
    }
}

@media (max-width: 640px) {
    .hp-hero {
        align-items: flex-end;
        padding: 0 20px 100px;
        min-height: 88vh;
    }

    .hp-hero__title {
        font-size: clamp(2.2rem, 12vw, 3.5rem);
    }

    .hp-hero__desc {
        font-size: 0.95rem;
    }

    .hp-hero__actions {
        flex-direction: column;
        width: 100%;
    }

    .hp-hero__btn {
        width: 100%;
        justify-content: center;
    }

    .hp-scroll-cue {
        bottom: 18px;
    }

    .hp-section {
        padding: 40px 18px;
    }

    .hp-leadership {
        flex-direction: column;
    }

    .hp-lead-card {
        border-right: none;
        border-bottom: 1px solid var(--hp-border-subtle);
    }

    .hp-lead-card:last-child {
        border-bottom: none;
    }

    .hp-stats-overview {
        grid-template-columns: 1fr 1fr;
    }

    .hp-stats-rankings {
        grid-template-columns: 1fr;
    }

    .hp-stats-ranking {
        border-right: none;
        border-bottom: 1px solid var(--hp-border-subtle);
    }

    .hp-stats-ranking:last-child {
        border-bottom: none;
    }

    .hp-links {
        grid-template-columns: 1fr;
    }

    .hp-glow__orb--1 {
        width: 320px;
        height: 320px;
    }

    .hp-glow__orb--2 {
        width: 220px;
        height: 220px;
    }
}

@media (max-width: 400px) {
    .hp-hero__title {
        font-size: 2.2rem;
    }

    .hp-hero__tags {
        gap: 6px;
    }

    .hp-hero__tag {
        font-size: 0.6rem;
        padding: 4px 10px;
    }

    .hp-links {
        grid-template-columns: 1fr;
    }
}
