/* =========================================
   CSS VARIABLES - DIGITAL BLACK BOX THEME
   ========================================= */
:root {
    /* Color Palette */
    --primary-base: #0D1117;      /* Onyx */
    --primary-text: #E5E9F0;      /* Ghost White */
    --blueprint-accent: #00AFFF;   /* Luminous Blue */
    --glitch-accent: #FFAA00;      /* Warning Amber */
    --secondary-ui: #2C3A47;       /* Dark Grid */

    /* Typography */
    --font-main: 'Roboto Mono', 'Courier New', monospace;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* =========================================
   GLOBAL RESET & BASE STYLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--primary-base);
    color: var(--primary-text);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* =========================================
   BACKGROUND PATTERN
   ========================================= */
.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/background-pattern.webp');
    background-repeat: repeat;
    background-size: 300px 300px;
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

/* =========================================
   LANDING PAGE STYLES
   ========================================= */
.landing-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.landing-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: var(--spacing-md);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    animation: fadeIn 1s ease-in;
}

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

/* Hero Image with Glitch Effect */
.hero-image-container {
    position: relative;
    margin-bottom: var(--spacing-lg);
    display: inline-block;
}

.hero-image {
    max-width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 30px rgba(0, 175, 255, 0.3));
}

/* Glitch Overlay Animation */
.glitch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, var(--glitch-accent), transparent);
    opacity: 0;
    mix-blend-mode: screen;
    animation: glitchPulse 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glitchPulse {
    0%, 100% {
        opacity: 0;
        transform: scale(0.98);
    }
    50% {
        opacity: 0.08;
        transform: scale(1.02);
    }
}

/* Landing Page Typography */
.landing-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--primary-text);
    margin-bottom: var(--spacing-sm);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.landing-subtitle {
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 400;
    color: var(--primary-text);
    margin-bottom: var(--spacing-lg);
    opacity: 0.9;
}

/* =========================================
   MANIFESTO PAGE STYLES
   ========================================= */
.manifesto-page {
    padding: var(--spacing-lg) var(--spacing-md);
}

.nav-home {
    position: fixed;
    top: var(--spacing-md);
    right: var(--spacing-md);
    z-index: 100;
}

.nav-link {
    color: var(--blueprint-accent);
    text-decoration: none;
    font-size: 1rem;
    transition: var(--transition-fast);
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid transparent;
}

.nav-link:hover {
    border-color: var(--blueprint-accent);
    background-color: rgba(0, 175, 255, 0.1);
}

.manifesto-container {
    max-width: 800px;
    margin: 0 auto;
    padding-top: var(--spacing-xl);
}

.manifesto-content {
    margin-bottom: var(--spacing-xl);
    animation: fadeIn 0.8s ease-in;
}

.manifesto-content h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--primary-text);
    margin-bottom: var(--spacing-lg);
    line-height: 1.3;
    text-align: center;
}

.manifesto-content p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--primary-text);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
    text-align: justify;
}

/* Highlighted Keywords */
.highlight {
    color: var(--blueprint-accent);
    font-weight: 600;
}

/* Blockquote Styling */
.manifesto-content blockquote {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-style: italic;
    color: var(--primary-text);
    border-left: 4px solid var(--glitch-accent);
    padding-left: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    opacity: 0.95;
}

/* CTA Section */
.cta-section {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    justify-content: center;
    margin-top: var(--spacing-xl);
}

/* =========================================
   BUTTONS & CTA STYLING
   ========================================= */
.cta-button {
    background: transparent;
    color: var(--primary-text);
    border: 2px solid var(--blueprint-accent);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-family: var(--font-main);
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    min-width: 150px;
}

.cta-button:hover {
    background-color: rgba(0, 175, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 175, 255, 0.4);
}

/* Glitch Effect on Hover */
.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--glitch-accent), transparent);
    transition: var(--transition-fast);
    opacity: 0;
}

.cta-button:hover::before {
    left: 100%;
    opacity: 0.5;
    animation: glitchSweep 0.6s ease;
}

@keyframes glitchSweep {
    0% {
        left: -100%;
        opacity: 0;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

.cta-button:active {
    transform: scale(0.98);
}

/* Submit Button Specific Styling */
.submit-button {
    background: var(--blueprint-accent);
    color: var(--primary-base);
    border: 2px solid var(--blueprint-accent);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1.125rem;
    font-family: var(--font-main);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    width: 100%;
    margin-top: var(--spacing-sm);
}

.submit-button:hover {
    background-color: #0099DD;
    box-shadow: 0 0 20px rgba(0, 175, 255, 0.6);
}

.submit-button:active {
    transform: scale(0.98);
}

.submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =========================================
   MODAL STYLES
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(13, 17, 23, 0.9);
    backdrop-filter: blur(5px);
    animation: fadeIn var(--transition-normal);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--primary-base);
    border: 2px solid var(--blueprint-accent);
    padding: var(--spacing-lg);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn var(--transition-normal);
    box-shadow: 0 0 50px rgba(0, 175, 255, 0.3);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: transparent;
    border: none;
    color: var(--primary-text);
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: var(--glitch-accent);
    transform: rotate(90deg);
}

/* =========================================
   CONTACT FORM STYLES
   ========================================= */
.contact-form-wrapper h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--primary-text);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    color: var(--primary-text);
    margin-bottom: var(--spacing-xs);
    font-size: 1rem;
}

.required {
    color: var(--glitch-accent);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background-color: var(--secondary-ui);
    color: var(--primary-text);
    border: 1px solid var(--blueprint-accent);
    padding: var(--spacing-sm);
    font-size: 1rem;
    font-family: var(--font-main);
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--blueprint-accent);
    box-shadow: 0 0 10px rgba(0, 175, 255, 0.3);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(229, 233, 240, 0.5);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.error-message {
    display: block;
    color: var(--glitch-accent);
    font-size: 0.875rem;
    margin-top: var(--spacing-xs);
    min-height: 1.2em;
}

.form-status {
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm);
    text-align: center;
    border-radius: 4px;
    font-weight: 600;
}

.form-status.success {
    background-color: rgba(0, 175, 255, 0.2);
    border: 1px solid var(--blueprint-accent);
    color: var(--blueprint-accent);
}

.form-status.error {
    background-color: rgba(255, 170, 0, 0.2);
    border: 1px solid var(--glitch-accent);
    color: var(--glitch-accent);
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 768px) {
    :root {
        font-size: 14px;
    }

    .nav-home {
        top: var(--spacing-sm);
        right: var(--spacing-sm);
    }

    .manifesto-container {
        padding-top: var(--spacing-lg);
    }

    .manifesto-content p {
        text-align: left;
    }

    .cta-section {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-button {
        width: 100%;
    }

    .modal-content {
        width: 95%;
        padding: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .landing-title {
        font-size: 1.75rem;
    }

    .landing-subtitle {
        font-size: 1.125rem;
    }

    .manifesto-content h1 {
        font-size: 1.75rem;
    }
}

/* =========================================
   ACCESSIBILITY
   ========================================= */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--blueprint-accent);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-text: #FFFFFF;
        --blueprint-accent: #00D4FF;
    }
}

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