/* --- Reset & Retro Variables --- */
:root {
    --bg-dark: #050505;
    --bg-card: #0c0c0c;
    --text-primary: #f0f0f0;
    --text-secondary: #888888;
    --accent-primary: #FF3399;
    --accent-secondary: #00F2FF;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(5, 5, 5, 0.9);
    --glass-border: rgba(255, 255, 255, 0.1);

    --container-width: 1200px;
    --section-padding: 120px;
    --border-radius: 2px;
    /* Hard edges for retro feel */

    --font-heading: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --side-gap: 60px;
    /* Base desktop gap */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: crosshair;
}

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
}

/* CRT Scanline Overlay */
body::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    z-index: 9999;
    background-size: 100% 3px, 3px 100%;
    pointer-events: none;
    opacity: 0.4;
}

/* CRT Flicker */
@keyframes flicker {
    0% {
        opacity: 0.98;
    }

    5% {
        opacity: 0.95;
    }

    10% {
        opacity: 0.99;
    }

    100% {
        opacity: 1;
    }
}

body {
    font-family: var(--font-mono);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: none;
    animation: flicker 0.15s infinite;
    padding: 0 var(--side-gap);
}

/* Background Noise Texture */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.06;
    pointer-events: none;
    z-index: 9998;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.0;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

h1 {
    font-size: clamp(3rem, 10vw, 6rem);
    text-shadow: 3px 3px 0px var(--accent-primary);
    margin-bottom: 24px;
}

h2 {
    font-size: clamp(2rem, 6vw, 4rem);
    border-left: 10px solid var(--accent-primary);
    padding-left: 20px;
    margin-bottom: 40px;
}

h3 {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    text-shadow: 2px 2px 0 var(--accent-primary);
}

p {
    color: var(--text-secondary);
    font-size: 1rem;
    letter-spacing: -0.01em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s steps(4);
}

.section-spacing {
    padding: var(--section-padding) 0;
}

/* --- Sticky Header --- */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 24px var(--side-gap);
    transition: all 0.2s steps(2);
    border-bottom: 1px solid var(--border-color);
}

.sticky-header.scrolled {
    padding: 12px var(--side-gap);
    background: var(--bg-dark);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--text-primary);
    text-shadow: 2px 2px 0 var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-desktop ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-desktop a {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.nav-desktop a:hover {
    color: var(--accent-primary);
    text-shadow: 0 0 10px var(--accent-primary);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 1001;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background-color: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
}

/* Mobile Navigation Popup */
.nav-mobile {
    position: fixed;
    top: 80px;
    right: var(--side-gap);
    width: 280px;
    height: auto;
    background-color: var(--bg-card);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 30px;
    border: 2px solid var(--accent-primary);
    /* Layered 3D Shadow with Cyan accent */
    box-shadow: 6px 6px 0px var(--bg-dark), 10px 10px 0px var(--accent-secondary);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.3s steps(4);
}

.nav-mobile.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.nav-mobile ul {
    list-style: none;
    text-align: left;
}

.nav-mobile li {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s steps(4);
}

.nav-mobile.active li {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered Animations */
.nav-mobile.active li:nth-child(1) {
    transition-delay: 0.1s;
}

.nav-mobile.active li:nth-child(2) {
    transition-delay: 0.2s;
}

.nav-mobile.active li:nth-child(3) {
    transition-delay: 0.3s;
}

.nav-mobile.active li:nth-child(4) {
    transition-delay: 0.4s;
}

.nav-mobile a {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    text-transform: uppercase;
    margin: 10px 0;
    display: block;
    color: var(--text-primary);
    border-bottom: 1px solid transparent;
}

.nav-mobile a:hover {
    color: var(--accent-primary);
    border-bottom: 2px solid var(--accent-primary);
}

/* --- Hero Section --- */
.hero-section {
    padding: calc(var(--section-padding) + 40px) 0 var(--section-padding);
}

.pink-highlight {
    color: var(--accent-primary);
    text-shadow: 0 0 15px var(--accent-primary);
    font-style: normal;
}

.hero-subtext {
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 48px;
    border-left: 2px solid var(--accent-secondary);
    padding-left: 20px;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 16px 36px;
    border-radius: 0;
    font-weight: 700;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    position: relative;
    border: 1px solid var(--accent-primary);
    transition: all 0.2s steps(2);
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--bg-dark);
    box-shadow: 4px 4px 0px var(--accent-secondary);
}

.btn-primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--accent-secondary);
}

.btn-outline {
    background: transparent;
    color: var(--accent-primary);
}

.btn-outline:hover {
    background: rgba(255, 51, 153, 0.1);
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0px var(--accent-primary);
}

/* --- Stats/Tags Row --- */
.category-tags-wrapper {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 24px 0;
}

.category-tags {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.category-tag {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* --- Products Section --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 60px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 24px;
    transition: all 0.2s steps(2);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 8px 8px 0px var(--accent-primary);
    transform: translate(-4px, -4px);
}

.product-image-container {
    width: 100%;
    aspect-ratio: 16 / 10;
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    filter: grayscale(1) contrast(1.1);
    transition: all 0.3s ease;
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card:hover .product-image-container {
    filter: none;
    border-color: var(--accent-primary);
}

.product-content h3 {
    margin-bottom: 16px;
    font-family: var(--font-mono);
}

.product-content p {
    margin-bottom: 24px;
    font-size: 0.85rem;
}

.product-link {
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-size: 0.85rem;
    border-bottom: 1px dashed var(--accent-primary);
    margin-top: auto;
    display: inline-block;
    width: fit-content;
}

/* --- Bento Grid Services --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 15px;
}

.service-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.1s steps(2);
}

.service-item:hover {
    background: var(--bg-dark);
    border-color: var(--accent-secondary);
    box-shadow: 4px 4px 0px var(--accent-secondary);
}

.service-item ion-icon {
    font-size: 2.5rem;
    color: var(--accent-secondary);
}

.service-item span {
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
}

.service-item:hover * {
    color: var(--accent-secondary);
}

.service-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.service-item.tall {
    grid-row: span 2;
}

/* --- Contact & Footer --- */
.contact-section {
    text-align: center;
}

.big-link {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 10vw, 6rem);
    font-weight: 800;
    display: block;
    line-height: 1.1;
    color: var(--accent-primary);
    text-shadow: 4px 4px 0px var(--accent-secondary);
    transition: all 0.4s steps(4);
}

.big-link:hover {
    transform: scale(1.05);
}

footer {
    padding: 60px 0;
    border-top: 1px dashed var(--border-color);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-info {
    flex: 1;
    min-width: 200px;
}

.footer-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 2;
}

.footer-chip {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    transition: all 0.2s steps(2);
    white-space: nowrap;
}

.footer-chip:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(255, 51, 153, 0.05);
    box-shadow: 4px 4px 0px var(--accent-primary);
    transform: translate(-2px, -2px);
}

/* --- About Section --- */
.about-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.about-item h2 {
    font-size: 2.5rem;
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: scale(0.98) translateY(20px);
    filter: blur(5px);
    transition: all 0.6s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    :root {
        --side-gap: 30px;
        /* Reduced gap for tablets */
    }

    .nav-desktop {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-section h1 {
        font-size: 3.5rem;
    }

    .hero-btns {
        flex-direction: column;
        gap: 15px;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .about-section {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 480px) {
    :root {
        --side-gap: 20px;
        /* Uniform gap for mobile */
    }

    footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 24px;
    }

    .footer-links {
        justify-content: center;
        width: 100%;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}