/* ═══════════════════════════════════════════════
   LOT INVADERS — Marketing Site
   GBC CRT Retro Aesthetic + Animated Sprites
   ═══════════════════════════════════════════════ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Space+Mono:wght@400;700&display=swap');

/* --- Tokens --- */
:root {
    --bg-deep:       #0a0c10;
    --bg-surface:    #111420;
    --bg-card:       #161a28;
    --bg-card-hover: #1c2236;

    --green-primary: #39ff14;
    --green-dim:     #2bcc10;
    --green-glow:    rgba(57, 255, 20, 0.25);
    --green-subtle:  rgba(57, 255, 20, 0.08);

    --yellow-accent: #ffd633;
    --yellow-dim:    #c8a82e;

    --orange-hot:    #ff6b35;
    --red-danger:    #ff4040;

    --text-primary:  #e8e6e1;
    --text-dim:      #8a8a7a;
    --text-faint:    #555550;

    --font-pixel:    'Press Start 2P', monospace;
    --font-mono:     'Space Mono', 'Courier New', monospace;

    --scanline-alpha: 0.04;
    --border-radius:  2px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.65;
    overflow-x: hidden;
    min-height: 100vh;
}

/* === PIXEL GRID BACKGROUND === */
#pixelBg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
}

/* === FLOATING SPRITE LAYER === */
.sprite-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-sprite {
    position: absolute;
    image-rendering: pixelated;
    filter: brightness(0.4) saturate(0.5);
    opacity: 0;
    animation: spriteFloat linear infinite;
    will-change: transform, opacity;
}

@keyframes spriteFloat {
    0% {
        opacity: 0;
        transform: translateY(110vh) rotate(0deg);
    }
    5% {
        opacity: 0.25;
    }
    90% {
        opacity: 0.25;
    }
    100% {
        opacity: 0;
        transform: translateY(-10vh) rotate(360deg);
    }
}

/* === SCANLINES OVERLAY === */
.scanlines {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, var(--scanline-alpha)) 2px,
        rgba(0, 0, 0, var(--scanline-alpha)) 4px
    );
}

/* === CRT VIGNETTE === */
.vignette {
    position: fixed;
    inset: 0;
    z-index: 9997;
    pointer-events: none;
    background: radial-gradient(
        ellipse at center,
        transparent 50%,
        rgba(0, 0, 0, 0.45) 100%
    );
}

/* === MAIN CONTAINER === */
main {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ═══════════════════════════
   HERO SECTION
   ═══════════════════════════ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 0 40px;
    gap: 12px;
}

.hero-badge {
    font-family: var(--font-pixel);
    font-size: 8px;
    letter-spacing: 3px;
    color: var(--bg-deep);
    background: var(--green-primary);
    padding: 5px 16px 4px;
    border-radius: var(--border-radius);
    text-transform: uppercase;
    animation: badge-pulse 3s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 12px var(--green-glow); }
    50% { box-shadow: 0 0 28px var(--green-glow), 0 0 60px rgba(57, 255, 20, 0.1); }
}

.hero-icon-wrap {
    position: relative;
    margin: 20px 0 8px;
}

.hero-icon {
    width: 128px;
    height: 128px;
    border-radius: 28px;
    image-rendering: pixelated;
    border: 3px solid var(--green-dim);
    position: relative;
    z-index: 2;
    animation: icon-float 4s ease-in-out infinite;
}

@keyframes icon-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.hero-icon-glow {
    position: absolute;
    inset: -20px;
    border-radius: 40px;
    background: radial-gradient(circle, var(--green-glow) 0%, transparent 70%);
    z-index: 1;
    animation: glow-breathe 4s ease-in-out infinite;
}

@keyframes glow-breathe {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

.hero-title {
    font-family: var(--font-pixel);
    line-height: 1.4;
    margin-top: 8px;
}

.title-lot {
    display: block;
    font-size: clamp(28px, 8vw, 48px);
    color: var(--yellow-accent);
    text-shadow:
        3px 3px 0 rgba(0, 0, 0, 0.7),
        0 0 30px rgba(255, 214, 51, 0.3);
    letter-spacing: 8px;
}

.title-invaders {
    display: block;
    font-size: clamp(18px, 5vw, 30px);
    color: var(--green-primary);
    text-shadow:
        2px 2px 0 rgba(0, 0, 0, 0.7),
        0 0 20px var(--green-glow);
    letter-spacing: 5px;
}

.hero-subtitle {
    font-family: var(--font-pixel);
    font-size: 8px;
    letter-spacing: 3px;
    color: var(--text-dim);
    margin-top: 4px;
}

.hero-tagline {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-dim);
    max-width: 420px;
    line-height: 1.7;
    margin-top: 12px;
}

/* CTA Button */
.cta-group {
    margin-top: 24px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-pixel);
    font-size: 10px;
    letter-spacing: 1px;
    text-decoration: none;
    padding: 16px 32px;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.cta-button.primary {
    background: var(--text-primary);
    color: var(--bg-deep);
    box-shadow: 4px 4px 0 var(--green-dim);
}

.cta-button.primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--green-primary), 0 0 40px var(--green-glow);
}

.cta-button.primary:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--green-dim);
}

.apple-logo {
    width: 18px;
    height: 18px;
}

.hero-meta {
    font-family: var(--font-pixel);
    font-size: 7px;
    letter-spacing: 2px;
    color: var(--text-faint);
    margin-top: 12px;
}

/* ═══════════════════════════
   VEHICLE SHOWCASE SECTION
   ═══════════════════════════ */
.showcase {
    padding: 80px 0 60px;
}

.showcase-subtitle {
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
    margin-top: -32px;
    margin-bottom: 40px;
    line-height: 1.6;
}

.vehicle-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

.vehicle-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--border-radius);
    padding: 20px 12px 16px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.vehicle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--green-dim);
    opacity: 0;
    transition: opacity 0.3s;
}

.vehicle-card:hover,
.vehicle-card.active {
    background: var(--bg-card-hover);
    border-color: var(--green-dim);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(57, 255, 20, 0.08);
}

.vehicle-card:hover::before,
.vehicle-card.active::before {
    opacity: 1;
}

.vehicle-sprite-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.vehicle-sprite {
    width: 64px;
    height: 64px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 6px rgba(57, 255, 20, 0.15));
}

.vehicle-card:hover .vehicle-sprite,
.vehicle-card.active .vehicle-sprite {
    transform: scale(1.15);
    filter: drop-shadow(0 0 12px rgba(57, 255, 20, 0.3));
}

.vehicle-info h3 {
    font-family: var(--font-pixel);
    font-size: 8px;
    letter-spacing: 1px;
    color: var(--yellow-accent);
    margin-bottom: 6px;
}

.vehicle-info p {
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.5;
}

/* ═══════════════════════════
   ALIEN SHOWCASE
   ═══════════════════════════ */
.aliens-section {
    padding: 40px 0 80px;
}

.alien-showcase-row {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.alien-display {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid rgba(57, 255, 20, 0.1);
    border-radius: var(--border-radius);
    position: relative;
    transition: all 0.3s ease;
}

.alien-display::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 4px;
    background: radial-gradient(circle, rgba(57, 255, 20, 0.08), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.alien-display:hover {
    border-color: var(--green-primary);
    transform: scale(1.1);
}

.alien-display:hover::after {
    opacity: 1;
}

.alien-sprite {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(57, 255, 20, 0.2));
}

.alien-caption {
    text-align: center;
    font-size: 12px;
    color: var(--text-dim);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ═══════════════════════════
   FEATURES SECTION
   ═══════════════════════════ */
.features {
    padding: 80px 0;
}

.section-title {
    font-family: var(--font-pixel);
    font-size: 11px;
    letter-spacing: 4px;
    color: var(--yellow-accent);
    text-align: center;
    margin-bottom: 48px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-left: 3px solid var(--green-dim);
    padding: 24px 20px;
    border-radius: var(--border-radius);
    transition: all 0.25s ease;
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-left-color: var(--green-primary);
    transform: translateX(4px);
    box-shadow: -4px 0 20px var(--green-subtle);
}

.feature-card h3 {
    font-family: var(--font-pixel);
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--green-primary);
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.7;
}

/* Pixel Icons */
.feature-pixel-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 14px;
    image-rendering: pixelated;
}

.feature-pixel-icon[data-icon="crown"] {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Crect x='1' y='5' width='6' height='2' fill='%23ffd633'/%3E%3Crect x='0' y='3' width='2' height='2' fill='%23ffd633'/%3E%3Crect x='3' y='2' width='2' height='3' fill='%23ffd633'/%3E%3Crect x='6' y='3' width='2' height='2' fill='%23ffd633'/%3E%3C/svg%3E") center/contain no-repeat;
}

.feature-pixel-icon[data-icon="drift"] {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Crect x='2' y='0' width='4' height='6' fill='%2339ff14'/%3E%3Crect x='1' y='6' width='2' height='2' fill='%23555'/%3E%3Crect x='5' y='6' width='2' height='2' fill='%23555'/%3E%3Crect x='0' y='7' width='1' height='1' fill='%23333'/%3E%3Crect x='7' y='7' width='1' height='1' fill='%23333'/%3E%3C/svg%3E") center/contain no-repeat;
}

.feature-pixel-icon[data-icon="pixel"] {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Crect x='0' y='0' width='4' height='4' fill='%2339ff14'/%3E%3Crect x='4' y='0' width='4' height='4' fill='%232bcc10'/%3E%3Crect x='0' y='4' width='4' height='4' fill='%232bcc10'/%3E%3Crect x='4' y='4' width='4' height='4' fill='%2339ff14'/%3E%3C/svg%3E") center/contain no-repeat;
}

.feature-pixel-icon[data-icon="combo"] {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Crect x='3' y='0' width='2' height='8' fill='%23ffd633'/%3E%3Crect x='0' y='3' width='8' height='2' fill='%23ffd633'/%3E%3Crect x='1' y='1' width='2' height='2' fill='%23ff6b35'/%3E%3Crect x='5' y='5' width='2' height='2' fill='%23ff6b35'/%3E%3C/svg%3E") center/contain no-repeat;
}

.feature-pixel-icon[data-icon="cars"] {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Crect x='1' y='1' width='6' height='6' fill='%23ff4040'/%3E%3Crect x='2' y='0' width='4' height='1' fill='%23ff4040'/%3E%3Crect x='2' y='7' width='4' height='1' fill='%23ff4040'/%3E%3Crect x='2' y='2' width='4' height='2' fill='%23446'/%3E%3Crect x='0' y='1' width='1' height='2' fill='%23ccc'/%3E%3Crect x='7' y='1' width='1' height='2' fill='%23ccc'/%3E%3C/svg%3E") center/contain no-repeat;
}

.feature-pixel-icon[data-icon="bolt"] {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpolygon points='5,0 2,4 4,4 3,8 6,3 4,3' fill='%23ffd633'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ═══════════════════════════
   GAMEPLAY SECTION
   ═══════════════════════════ */
.gameplay {
    padding: 60px 0 80px;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 520px;
    margin: 0 auto;
}

.step {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius);
    transition: all 0.25s ease;
    position: relative;
}

.step:hover {
    border-color: var(--green-dim);
    box-shadow: 0 0 20px var(--green-subtle);
}

.step-number {
    font-family: var(--font-pixel);
    font-size: 20px;
    color: var(--green-primary);
    text-shadow: 0 0 16px var(--green-glow);
    flex-shrink: 0;
    min-width: 48px;
}

.step-text {
    flex: 1;
}

.step-text h3 {
    font-family: var(--font-pixel);
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--yellow-accent);
    margin-bottom: 6px;
}

.step-text p {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.7;
}

.step-sprite {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-car {
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    object-fit: contain;
}

.step-alien {
    width: 36px;
    height: 36px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    object-fit: contain;
}

/* Step sprite animations */
.rotating-car {
    animation: carSpin 3s steps(1) infinite;
}

@keyframes carSpin {
    /* We'll swap src via JS instead for actual rotation frames */
    0%, 100% { transform: rotate(0deg); filter: drop-shadow(0 0 4px rgba(255, 214, 51, 0.4)); }
    25% { transform: rotate(0deg); filter: drop-shadow(0 0 8px rgba(255, 214, 51, 0.6)); }
    50% { transform: rotate(0deg); filter: drop-shadow(0 0 4px rgba(255, 214, 51, 0.4)); }
    75% { transform: rotate(0deg); filter: drop-shadow(0 0 8px rgba(255, 214, 51, 0.6)); }
}

.bouncing-alien {
    animation: alienBounce 0.8s ease-in-out infinite;
}

@keyframes alienBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.crash-fx {
    font-size: 32px;
    animation: crashPulse 1.2s ease-in-out infinite;
}

@keyframes crashPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; }
}

/* ═══════════════════════════
   FOOTER
   ═══════════════════════════ */
.footer {
    padding: 48px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 20px;
}

.footer-links a {
    font-family: var(--font-pixel);
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--green-dim);
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--green-primary);
    text-shadow: 0 0 10px var(--green-glow);
}

.footer-copy {
    font-size: 11px;
    color: var(--text-faint);
    margin-bottom: 6px;
}

.footer-tech {
    font-family: var(--font-pixel);
    font-size: 7px;
    letter-spacing: 2px;
    color: var(--text-faint);
}

/* ═══════════════════════════
   SUBPAGE STYLES (privacy, support)
   ═══════════════════════════ */
.page-header {
    padding: 48px 0 24px;
    text-align: center;
}

.page-header .back-link {
    font-family: var(--font-pixel);
    font-size: 8px;
    color: var(--green-dim);
    text-decoration: none;
    letter-spacing: 2px;
}

.page-header .back-link:hover {
    color: var(--green-primary);
}

.page-header h1 {
    font-family: var(--font-pixel);
    font-size: 16px;
    color: var(--yellow-accent);
    letter-spacing: 4px;
    margin-top: 20px;
}

.page-header .page-meta {
    font-size: 11px;
    color: var(--text-faint);
    margin-top: 8px;
}

.page-content {
    padding: 24px 0 80px;
    max-width: 600px;
    margin: 0 auto;
}

.page-content h2 {
    font-family: var(--font-pixel);
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--green-primary);
    margin: 32px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(57, 255, 20, 0.15);
}

.page-content p {
    color: var(--text-dim);
    margin-bottom: 12px;
    font-size: 13px;
    line-height: 1.75;
}

.page-content ul {
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.75;
    padding-left: 20px;
    margin-bottom: 12px;
}

.page-content li {
    margin-bottom: 6px;
}

.page-content a {
    color: var(--green-dim);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.page-content a:hover {
    color: var(--green-primary);
}

.highlight-box {
    background: var(--bg-card);
    border-left: 3px solid var(--green-dim);
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: var(--border-radius);
}

.highlight-box p {
    font-family: var(--font-pixel);
    font-size: 8px;
    letter-spacing: 1px;
    color: var(--green-primary);
    line-height: 2;
}

/* ═══════════════════════════
   RESPONSIVE
   ═══════════════════════════ */
@media (max-width: 480px) {
    main { padding: 0 16px; }
    .hero { padding: 40px 0 32px; min-height: 90vh; }
    .hero-icon { width: 96px; height: 96px; border-radius: 22px; }
    .title-lot { letter-spacing: 4px; }
    .title-invaders { letter-spacing: 3px; }
    .feature-grid { grid-template-columns: 1fr; }
    .cta-button { padding: 14px 24px; font-size: 9px; }
    .step { flex-direction: column; gap: 8px; }
    .step-number { min-width: auto; }
    .vehicle-carousel { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
    .alien-showcase-row { gap: 16px; }
    .alien-display { width: 64px; height: 64px; }
    .alien-sprite { width: 40px; height: 40px; }
    .step-sprite { display: none; }
}
