/* shared.css - linked by ALL pages */

:root {
    --black-primary: #0B0B0B;
    --black-soft: #141414;
    --red-primary: #D93240;
    --red-dark: #7A0C14;
    --gray-text: #B3B3B3;
    --gray-bg: #1C1C1C;
    --white: #FFFFFF;
    --font-mono: 'JetBrains Mono', monospace;
    --font-display: 'Space Grotesk', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-display);
    background: var(--black-primary);
    color: var(--gray-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scan line overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    z-index: 9999;
}

.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(217, 50, 64, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(217, 50, 64, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -1;
}

::selection {
    background: var(--red-primary);
    color: var(--white);
}

a {
    color: inherit;
    text-decoration: none;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--red-primary);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    z-index: 10000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid var(--red-primary);
    outline-offset: 2px;
}

/* Button styles */
.btn {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 1rem 2rem;
    border: 1px solid var(--gray-text);
    background: transparent;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--red-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn:hover {
    border-color: var(--red-primary);
}

.btn:hover::before {
    left: 0;
}

.btn-primary {
    background: var(--red-primary);
    border-color: var(--red-primary);
}

.btn-primary::before {
    background: var(--red-dark);
}

.btn-secondary {
    background: transparent;
    border-color: var(--gray-text);
    color: var(--gray-text);
}

.btn-secondary::before {
    background: var(--gray-bg);
}

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

.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Footer */
footer {
    padding: 2rem 4rem;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.highlight {
    color: var(--white);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .fade-in {
        opacity: 1;
        transform: none;
    }
}
