:root {
    --bg: #070707;
    --text: #ffffff;
    --text-muted: #888888;
    --accent: #5865F2;
    /* Discord branding color for highlights */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
    overflow-x: hidden;
    /* Prevent snapping to keep scroll smooth for 3D */
}

/* Background 3D Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    /* Let clicks pass through to links */
}

.scroll-container {
    position: relative;
    z-index: 1;
}

/* Panels */
.panel {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 10vw;
}

.right-align {
    justify-content: flex-end;
    text-align: right;
}

.center-align {
    justify-content: center;
    text-align: center;
}

.content {
    max-width: 600px;
}

h1,
h2 {
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 20px;
}

h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: -2px;
}

h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.subtitle {
    font-family: 'Syncopate', sans-serif;
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 4px;
    margin-top: -10px;
}

/* Scroll indicator */
.scroll-indicator {
    margin-top: 10vh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    opacity: 0.6;
}

.scroll-indicator span {
    font-size: 0.7rem;
    letter-spacing: 2px;
}

.scroll-indicator .line {
    width: 1px;
    height: 60px;
    background: #fff;
    animation: scroll-down 2s infinite;
    transform-origin: top;
}

@keyframes scroll-down {
    0% {
        transform: scaleY(0);
        opacity: 0;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }

    100% {
        transform: translateY(60px) scaleY(0);
        opacity: 0;
    }
}

/* Discord Button */
.discord-btn {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 15px 35px;
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    text-decoration: none;
    font-family: 'Syncopate', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.discord-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent);
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.discord-btn:hover {
    border-color: var(--accent);
    color: white;
}

.discord-btn:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* Optional Glitch effect for H1 to look raw/digital */
.glitch {
    position: relative;
    color: white;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--accent);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #20E3B2;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(10px, 9999px, 83px, 0);
    }

    20% {
        clip: rect(65px, 9999px, 120px, 0);
    }

    40% {
        clip: rect(2px, 9999px, 45px, 0);
    }

    60% {
        clip: rect(98px, 9999px, 13px, 0);
    }

    80% {
        clip: rect(44px, 9999px, 99px, 0);
    }

    100% {
        clip: rect(72px, 9999px, 35px, 0);
    }
}

@media (max-width: 768px) {
    .panel {
        padding: 5vw;
        justify-content: flex-start;
        text-align: left;
    }
}