*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
:root {
    --bg: #080a0f;
    --surface: #0d1017;
    --surface2: #131820;
    --border: #1e2633;
    --accent: #7c3aed;
    --accent2: #7c3aed;
    --text: #e8edf5;
    --muted: #6b7a99;
    --green: #00ff88;
}
html {
    scroll-behavior: smooth;
}
body {
    background: var(--bg);
    color: var(--text);
    font-family: "JetBrains Mono", monospace;
    overflow-x: hidden;
}

#hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-bg-img {
    position: absolute;
    inset: 0;
    background-image: url("img/bg.png");
    background-size: cover;
    background-position: center;
    opacity: 0.08;
    filter: blur(2px) saturate(0.4);
    transform: scale(1.05);
}

.grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(124, 58, 237, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 58, 237, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(
        ellipse 80% 70% at 50% 50%,
        black 30%,
        transparent 100%
    );
}

.scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(124, 58, 237, 0.08) 0%,
        transparent 70%
    );
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse {
    0%,
    100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 90% 80% at 50% 50%,
        transparent 40%,
        rgba(8, 10, 15, 0.85) 100%
    );
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.logo {
    font-family: "JetBrains Mono", monospace;
    font-size: clamp(4rem, 13vw, 10rem);
    font-weight: 800;
    letter-spacing: 2px;
    line-height: 1;
    color: var(--text);
    position: relative;
    cursor: default;
    user-select: none;
    text-shadow: 0 0 30px rgba(124, 58, 237, 0.3);
}
.logo::before,
.logo::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    opacity: 0;
}
.logo::before {
    color: #ff0055;
    animation: glitch1 3.5s infinite;
}
.logo::after {
    color: var(--accent);
    animation: glitch2 3.5s infinite;
}
@keyframes glitch1 {
    0%,
    90%,
    100% {
        opacity: 0;
        transform: none;
    }
    91% {
        opacity: 0.8;
        transform: translate(-3px, 1px);
        clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
    }
    93% {
        opacity: 0;
    }
    95% {
        opacity: 0.6;
        transform: translate(3px, -1px);
        clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
    }
    97% {
        opacity: 0;
    }
}
@keyframes glitch2 {
    0%,
    92%,
    100% {
        opacity: 0;
        transform: none;
    }
    93% {
        opacity: 0.7;
        transform: translate(3px, -1px);
        clip-path: polygon(0 40%, 100% 40%, 100% 60%, 0 60%);
    }
    96% {
        opacity: 0;
    }
}
.logo-dot {
    color: var(--accent);
}

.btn-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 14px 32px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}
.btn-primary {
    background: var(--accent);
    color: #000;
}
.btn-primary:hover {
    background: #fff;
    box-shadow: 0 0 24px rgba(124, 58, 237, 0.5);
    transform: translateY(-2px);
}
.btn-discord {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-discord:hover {
    border-color: #5865f2;
    color: #5865f2;
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.3);
    transform: translateY(-2px);
}

/* discord overlay */
.discord-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.discord-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.discord-embed {
    background: #1e2124;
    border-radius: 12px;
    width: 340px;
    overflow: hidden;
    transform: scale(0.92) translateY(16px);
    transition: transform 0.25s ease;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}
.discord-overlay.open .discord-embed {
    transform: scale(1) translateY(0);
}

.embed-banner {
    height: 80px;
    background: linear-gradient(135deg, #5865f2 0%, #3b82f6 50%, #7c3aed 100%);
    position: relative;
}
.embed-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid #1e2124;
    background: #36393f;
    position: absolute;
    bottom: -36px;
    left: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.embed-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.embed-body {
    padding: 48px 20px 20px;
}
.embed-name {
    font-family: "JetBrains Mono", monospace;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}
.embed-desc {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    color: #b9bbbe;
    line-height: 1.5;
    margin-bottom: 16px;
}
.embed-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}
.stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    color: #b9bbbe;
}
.stat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.stat-dot.online {
    background: #3ba55d;
    box-shadow: 0 0 6px #3ba55d;
}
.stat-dot.offline {
    background: #747f8d;
}
.embed-join {
    display: block;
    width: 100%;
    background: #5865f2;
    color: #fff;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
    text-decoration: none;
    padding: 12px;
    border-radius: 4px;
    transition: background 0.15s ease;
}
.embed-join:hover {
    background: #4752c4;
}
.embed-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.embed-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.fade-up {
    opacity: 0;
    transform: translateY(24px);
    animation: fadeUp 0.7s ease forwards;
}
.fade-up:nth-child(1) {
    animation-delay: 0.1s;
}
.fade-up:nth-child(2) {
    animation-delay: 0.25s;
}
.fade-up:nth-child(3) {
    animation-delay: 0.4s;
}
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 24px;
    font-size: 0.75rem;
    color: var(--muted);
}
