﻿
/* style.css ----------------------------------------------------------- */

/* -------------------- Reset & globals -------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html { scroll-behavior: smooth; }
body {
    font-family: 'VT323', monospace;
    background: #000;
    color: #fff;
    line-height: 1.5;
    overflow-x: hidden;
}

/* -------------------- Background layers -------------------- */
/* Star‑field (farther back) */
#starfield {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -2;               /* farthest back */
    pointer-events: none;
}
.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    opacity: .8;
    animation: twinkle 2s infinite ease-in-out;
}
@keyframes twinkle {
    0%,100% { opacity:.5; }
    50%      { opacity:1;   }
}

/* Asteroids canvas – just above the star‑field */
#asteroids-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;               /* above stars, below site content */
    pointer-events: none;
}

/* -------------------- Header & navigation -------------------- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 2rem;
    background: rgba(20,20,30,.9);
    position: sticky;
    top: 0;
    z-index: 100;
}
.logo {
    font-family: 'Press Start 2P', cursive;
    color: #0ff;
    text-shadow: 0 0 6px #0ff, 0 0 12px #0ff;
}

/* Desktop navigation */
.nav__list {
    display: flex;
    gap: 1.5rem;
}
.nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    position: relative;
}
.nav a::after {
    content: "";
    position: absolute;
    left:0; right:0; bottom:-3px;
    height:2px;
    background:#0ff;
    transform: scaleX(0);
    transition: transform .25s ease;
}
.nav a:hover::after { transform:scaleX(1); }

/* Burger (mobile) */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}
.burger span {
    width: 28px;
    height: 3px;
    background:#fff;
}

/* -------------------- Side menu (mobile overlay) -------------------- */
.side-menu {
    position: fixed;
    inset: 0;
    top:0; left:-260px;
    width:250px;
    height:100vh;
    background:#222;
    padding:2rem 1rem;
    transition: transform .4s ease-in-out;
    z-index:200;
}
.side-menu.open { transform: translateX(260px); }

.close-btn {
    background:none;
    border:none;
    color:#fff;
    font-size:1.5rem;
    position:absolute;
    top:1rem; right:1rem;
    cursor:pointer;
}
.side-list {
    list-style:none;
    margin-top:4rem;
}
.side-list li { margin:1rem 0; }
.side-list a {
    color:#fff;
    text-decoration:none;
    font-size:1.2rem;
}

/* -------------------- Hero / Home section -------------------- */
.hero {
    min-height:100vh;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    padding:0 2rem;
}
.glitch {
    position:relative;
    font-family:'Press Start 2P',cursive;
    font-size:3.5rem;
    color:#0ff;
}
.glitch::before,
.glitch::after {
    content: attr(data-text);
    position:absolute;
    left:0; top:0;
    width:100%; height:100%;
    overflow:hidden;
}
.glitch::before {
    left:-2px;
    text-shadow: -2px 0 #f00;
    animation: glitchTop .3s infinite linear alternate-reverse;
}
.glitch::after {
    left:2px;
    text-shadow: -2px 0 #0ff;
    animation: glitchBottom .3s infinite linear alternate-reverse;
}
@keyframes glitchTop{
    0%{clip:rect(0,900px,5px,0); transform:translate(-1px,-1px);}
    100%{clip:rect(15px,900px,20px,0); transform:translate(1px,1px);}
}
@keyframes glitchBottom{
    0%{clip:rect(30px,900px,35px,0); transform:translate(-1px,1px);}
    100%{clip:rect(45px,900px,50px,0); transform:translate(1px,-1px);}
}

/* Typewriter effect */
.typewriter {
    margin-top:1rem;
    font-size:1.3rem;
    color:#fff;
    min-height:2em;
}

/* Call‑to‑action button */
.cta-btn {
    display:inline-block;
    margin-top:2rem;
    padding:.8rem 2rem;
    background:#0ff;
    color:#111;
    font-family:'Press Start 2P',cursive;
    text-decoration:none;
    border-radius:4px;
    box-shadow:0 0 10px #0ff, 0 0 20px #0ff;
    transition:background .3s ease, transform .2s;
}
.cta-btn:hover {
    background:#fff;
    transform:scale(1.05);
}

/* -------------------- Generic sections (services, about, contact) -------------------- */
.section {
    padding:4rem 2rem;
    max-width:1100px;
    margin:auto;
    opacity:0;               /* will fade in via JS */
    transform:translateY(30px);
    transition:opacity .8s ease-out, transform .8s ease-out;
}
.section.visible { opacity:1; transform:none; }

.section h2 {
    font-family:'Press Start 2P',cursive;
    text-align:center;
    margin-bottom:2rem;
    color:#0ff;
}

/* Services grid */
.services-grid {
    display:grid;
    gap:1.5rem;
    grid-template-columns:repeat(auto-fit, minmax(250px,1fr));
}
.service-card {
    background:#222;
    border-radius:6px;
    padding:1.5rem;
    transition:transform .3s ease, box-shadow .3s ease;
}
.service-card:hover {
    transform:translateY(-5px);
    box-shadow:0 0 15px #0ff;
}
.service-card h3 {
    font-family:'Press Start 2P',cursive;
    margin-bottom:.8rem;
    color:#fff;
}

/* Contact form */
.contact-form {
    display:flex;
    flex-direction:column;
    gap:.6rem;
    max-width:500px;
    margin:auto;
}
.contact-form label { font-size:.9rem; }
.contact-form input,
.contact-form textarea {
    padding:.8rem;
    border:none;
    background:#333;
    color:#fff;
    font-family:inherit;
    border-radius:4px;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color:#aaa; }

/* Footer */
.footer {
    text-align:center;
    padding:1.5rem;
    background:#111;
    font-size:.9rem;
}

/* -------------------- Responsive tweaks -------------------- */
@media (max-width:768px) {
    .nav { display:none; }
    .burger { display:flex; }

    .hero h1 { font-size:2.8rem; }
}