/* ========================================
   LEITMOTIF GAMES - Retro Pixel Art Styles
   ======================================== */

/* CSS Reset & Variables */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --deep-space: #0a0a1a;
    --arcade-purple: #6b21a8;
    --neon-magenta: #d946ef;
    --electric-cyan: #22d3ee;
    --pixel-white: #f0f0f0;
    --crt-green: #4ade80;

    /* Typography */
    --font-pixel: 'Press Start 2P', monospace;
    --size-hero: 32px;
    --size-heading: 16px;
    --size-body: 12px;
    --size-small: 10px;

    /* Spacing */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 48px;
    --space-xl: 80px;

    /* Transitions */
    --transition-instant: 0s;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

body {
    font-family: var(--font-pixel);
    font-size: var(--size-body);
    line-height: 1.8;
    color: var(--pixel-white);
    background-color: var(--deep-space);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--arcade-purple);
    color: var(--pixel-white);
    padding: var(--space-sm);
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    top: var(--space-sm);
}

/* Container */
.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ========================================
   Scanline Overlay
   ======================================== */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
}

/* ========================================
   Floating Pixel Particles
   ======================================== */
#pixel-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.pixel-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--neon-magenta);
    opacity: 0.6;
    animation: float-up 8s linear infinite;
}

.pixel-particle:nth-child(odd) {
    background: var(--electric-cyan);
    animation-duration: 10s;
}

.pixel-particle:nth-child(3n) {
    background: var(--crt-green);
    animation-duration: 12s;
    width: 6px;
    height: 6px;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* ========================================
   Header & Navigation
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 26, 0.95);
    border-bottom: 4px solid var(--arcade-purple);
    box-shadow: 0 4px 0 var(--neon-magenta);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--pixel-white);
    font-size: var(--size-heading);
}

.logo-bracket {
    color: var(--electric-cyan);
}

.logo-text {
    color: var(--neon-magenta);
    text-shadow: 0 0 10px var(--neon-magenta);
    padding: 0 4px;
}

/* Navigation */
.nav-list {
    display: flex;
    list-style: none;
    gap: var(--space-md);
}

.nav-link {
    color: var(--pixel-white);
    text-decoration: none;
    font-size: var(--size-body);
    padding: var(--space-xs) var(--space-sm);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: var(--electric-cyan);
    transition: width 0s;
}

.nav-link:hover::after,
.nav-link:focus::after {
    width: 100%;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--electric-cyan);
    outline: none;
}

/* Hamburger Menu */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}

.hamburger {
    display: block;
    width: 24px;
    height: 4px;
    background: var(--pixel-white);
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 4px;
    background: var(--pixel-white);
    left: 0;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    position: relative;
}

.hero-title {
    font-size: var(--size-hero);
    line-height: 1.4;
    margin-bottom: var(--space-md);
}

.title-line {
    display: block;
    text-shadow:
        0 0 10px var(--neon-magenta),
        0 0 20px var(--neon-magenta),
        0 0 40px var(--arcade-purple),
        4px 4px 0 var(--arcade-purple);
}

.title-line:last-child {
    color: var(--electric-cyan);
    text-shadow:
        0 0 10px var(--electric-cyan),
        0 0 20px var(--electric-cyan),
        0 0 40px var(--arcade-purple),
        4px 4px 0 var(--arcade-purple);
}

.hero-tagline {
    font-size: var(--size-heading);
    color: var(--crt-green);
    margin-bottom: var(--space-lg);
    text-shadow: 0 0 10px var(--crt-green);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-pixel);
    font-size: var(--size-body);
    text-decoration: none;
    padding: var(--space-sm) var(--space-md);
    border: none;
    cursor: pointer;
    position: relative;
}

.btn-primary {
    background: var(--arcade-purple);
    color: var(--pixel-white);
    box-shadow:
        4px 4px 0 var(--neon-magenta),
        8px 8px 0 rgba(217, 70, 239, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--neon-magenta);
    transform: translate(4px, 4px);
    box-shadow: none;
    outline: none;
}

.btn-arrow {
    color: var(--electric-cyan);
}

/* ========================================
   Pixel Border Styles
   ======================================== */
.pixel-border {
    background: rgba(107, 33, 168, 0.2);
    border: 4px solid var(--arcade-purple);
    position: relative;
    padding: var(--space-md);
}

.pixel-border::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 4px solid transparent;
    border-top-color: var(--neon-magenta);
    border-left-color: var(--neon-magenta);
    pointer-events: none;
}

.pixel-border::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--electric-cyan);
}

.pixel-border-inner {
    border: 4px solid var(--arcade-purple);
    background: var(--deep-space);
}

.pixel-border-sm {
    border: 2px solid var(--arcade-purple);
    position: relative;
}

.pixel-border-sm::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 4px;
    height: 4px;
    background: var(--neon-magenta);
}

/* ========================================
   Game Section
   ======================================== */
.game-section {
    padding: var(--space-xl) 0;
    position: relative;
    z-index: 2;
}

.game-card {
    max-width: 800px;
    margin: 0 auto;
}

.game-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px dashed var(--arcade-purple);
}

.game-title {
    font-size: var(--size-heading);
}

.neon-glow {
    color: var(--neon-magenta);
    text-shadow:
        0 0 5px var(--neon-magenta),
        0 0 10px var(--neon-magenta),
        0 0 20px var(--arcade-purple);
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--size-small);
}

.badge-coming-soon {
    background: var(--crt-green);
    color: var(--deep-space);
    box-shadow: 2px 2px 0 rgba(74, 222, 128, 0.5);
}

.cursor-blink {
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Game Content */
.game-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-md);
    align-items: start;
}

/* App Mockup */
.game-mockup {
    width: 160px;
}

.mockup-placeholder {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-md);
}

.mockup-icon {
    font-size: 48px;
    color: var(--electric-cyan);
    text-shadow: 0 0 10px var(--electric-cyan);
}

.mockup-number {
    font-size: 32px;
    color: var(--neon-magenta);
    text-shadow: 0 0 10px var(--neon-magenta);
}

/* Feature List */
.feature-list {
    list-style: none;
    margin-bottom: var(--space-md);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

.feature-bullet {
    color: var(--electric-cyan);
    flex-shrink: 0;
}

/* Store Badges */
.store-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.store-badge {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--deep-space);
    color: var(--pixel-white);
    text-decoration: none;
    opacity: 0.7;
}

.store-badge:hover,
.store-badge:focus {
    opacity: 1;
    border-color: var(--electric-cyan);
    outline: none;
}

.store-icon {
    font-size: 20px;
    color: var(--electric-cyan);
}

.store-text {
    display: flex;
    flex-direction: column;
}

.store-label {
    font-size: 8px;
    color: var(--crt-green);
}

.store-name {
    font-size: var(--size-small);
}

/* ========================================
   About Section
   ======================================== */
.about-section {
    padding: var(--space-xl) 0;
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: var(--size-heading);
    text-align: center;
    margin-bottom: var(--space-md);
    color: var(--electric-cyan);
    text-shadow: 0 0 10px var(--electric-cyan);
}

.about-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    margin-bottom: var(--space-sm);
    line-height: 2;
}

.about-text:last-child {
    margin-bottom: 0;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: var(--space-lg) 0;
    text-align: center;
    position: relative;
    z-index: 2;
}

.footer-content {
    margin-bottom: var(--space-md);
}

.contact-email {
    display: inline-block;
    color: var(--electric-cyan);
    text-decoration: none;
    font-size: var(--size-body);
    padding: var(--space-xs) var(--space-sm);
    border: 2px solid var(--electric-cyan);
    margin-bottom: var(--space-sm);
}

.contact-email:hover,
.contact-email:focus {
    background: var(--electric-cyan);
    color: var(--deep-space);
    outline: none;
}

.footer-tagline {
    font-size: var(--size-small);
    color: var(--arcade-purple);
}

.footer-border {
    height: 8px;
    background: repeating-linear-gradient(
        90deg,
        var(--arcade-purple) 0px,
        var(--arcade-purple) 8px,
        transparent 8px,
        transparent 16px
    );
}

/* ========================================
   Responsive Styles
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --size-hero: 24px;
    }

    .game-content {
        grid-template-columns: 1fr;
    }

    .game-mockup {
        width: 120px;
        margin: 0 auto;
    }

    .game-info {
        text-align: center;
    }

    .feature-item {
        justify-content: center;
    }

    .store-badges {
        justify-content: center;
    }
}

/* Mobile */
@media (max-width: 640px) {
    :root {
        --size-hero: 18px;
        --size-heading: 14px;
        --size-body: 10px;
    }

    .header .container {
        height: 60px;
    }

    /* Mobile Navigation */
    .nav-toggle {
        display: block;
        z-index: 101;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--deep-space);
        border-left: 4px solid var(--arcade-purple);
        padding: var(--space-xl) var(--space-md);
        transition: right 0.3s ease;
    }

    .nav.is-open {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: var(--space-md);
    }

    .nav-link {
        font-size: var(--size-heading);
        display: block;
    }

    /* Mobile Nav Toggle Animation */
    .nav-toggle[aria-expanded="true"] .hamburger {
        background: transparent;
    }

    .nav-toggle[aria-expanded="true"] .hamburger::before {
        top: 0;
        transform: rotate(45deg);
    }

    .nav-toggle[aria-expanded="true"] .hamburger::after {
        top: 0;
        transform: rotate(-45deg);
    }

    /* Hero adjustments */
    .hero {
        padding-top: calc(60px + var(--space-lg));
    }

    .title-line {
        text-shadow:
            0 0 5px var(--neon-magenta),
            0 0 10px var(--neon-magenta),
            2px 2px 0 var(--arcade-purple);
    }

    /* Game section adjustments */
    .game-header {
        flex-direction: column;
        text-align: center;
    }

    .pixel-border {
        padding: var(--space-sm);
    }

    .mockup-icon {
        font-size: 32px;
    }

    .mockup-number {
        font-size: 24px;
    }

    .store-badges {
        flex-direction: column;
        align-items: center;
    }

    .store-badge {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
}

/* Focus Styles for Accessibility */
*:focus-visible {
    outline: 4px solid var(--electric-cyan);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--neon-magenta);
    color: var(--deep-space);
}
