/* Dank theme — dark, neon, glitch */
:root {
    --bg: #0a0a0f;
    --surface: #12121a;
    --neon-green: #00ff88;
    --neon-cyan: #00d4ff;
    --neon-purple: #b366ff;
    --text: #e0e0e8;
    --muted: #6b6b7a;
    --glitch-1: #00ff88;
    --glitch-2: #ff0088;
    --glitch-3: #00d4ff;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Mono', 'JetBrains Mono', monospace;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* Background effects */
.scanlines {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 4px
    );
    pointer-events: none;
    z-index: 2;
}

.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}

.noise {
    position: fixed;
    inset: 0;
    opacity: 0.03;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

.container {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 2rem;
    max-width: 560px;
}

.badge {
    display: inline-block;
    margin-bottom: 1.5rem;
}

.badge img {
    display: block;
    height: 40px;
    width: auto;
}

/* Glitch heading */
.glitch {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    position: relative;
    color: var(--neon-cyan);
    text-shadow:
        0 0 20px rgba(0, 212, 255, 0.4),
        0 0 40px rgba(0, 212, 255, 0.2);
}

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

.glitch::before {
    animation: glitch-1 2s infinite linear alternate-reverse;
    color: var(--glitch-1);
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
    transform: translate(-2px, 2px);
}

.glitch::after {
    animation: glitch-2 3s infinite linear alternate-reverse;
    color: var(--glitch-2);
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
    transform: translate(2px, -2px);
}

@keyframes glitch-1 {
    0% { transform: translate(-2px, 2px); opacity: 0.8; }
    20% { transform: translate(2px, -2px); opacity: 0.9; }
    40% { transform: translate(-2px, -2px); opacity: 0.7; }
    60% { transform: translate(2px, 2px); opacity: 0.9; }
    80% { transform: translate(-1px, 1px); opacity: 0.8; }
    100% { transform: translate(-2px, 2px); opacity: 0.8; }
}

@keyframes glitch-2 {
    0% { transform: translate(2px, -2px); opacity: 0.8; }
    25% { transform: translate(-2px, 2px); opacity: 0.7; }
    50% { transform: translate(2px, 2px); opacity: 0.9; }
    75% { transform: translate(-2px, -2px); opacity: 0.8; }
    100% { transform: translate(2px, -2px); opacity: 0.8; }
}

.tagline {
    font-size: 1rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.origin {
    margin-bottom: 1.5rem;
    text-align: center;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: fade-in 1s ease forwards 0.6s;
}

@keyframes fade-in {
    to { opacity: 1; }
}

.origin-heading {
    display: inline-block;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--neon-green);
    border: 1px solid rgba(0, 255, 136, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.origin-text {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.7;
}

.credit-link {
    color: var(--neon-green);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 255, 136, 0.4);
}

.credit-link:hover {
    color: var(--neon-cyan);
    border-bottom-color: var(--neon-cyan);
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-green), var(--neon-cyan), transparent);
    opacity: 0.5;
    margin: 1.5rem auto;
    max-width: 200px;
}

.contact-text {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.email-link {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neon-green);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0, 255, 136, 0.4);
    border-radius: 2px;
    transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.email-link:hover {
    color: var(--neon-cyan);
    border-color: rgba(0, 212, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.footer {
    margin-top: 2.5rem;
    font-size: 0.75rem;
    color: var(--muted);
}

/* Error pages + in-container links */
.container a:not(.email-link):not(.credit-link) {
    color: var(--neon-cyan);
    text-decoration: none;
}

.container a:not(.email-link):not(.credit-link):hover {
    text-decoration: underline;
}
