/* 
   DuplexGap - RF Technical Apparel 
   Theme: Industrial / Touring Tech / Spectrum / Dark
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    /* Colors */
    --bg-matte: #0a0a0a;
    --bg-rack: #141414;
    --bg-panel: #1c1c1c;

    --text-primary: #e0e0e0;
    --text-dim: #666666;
    --text-muted: #333333;

    --accent-signal: #00FF41;
    /* Signal Green */
    --accent-peak: #FF3300;
    /* Peak Red */
    --accent-warn: #FFCC00;
    /* Warning Yellow */
    --accent-idle: #0088FF;
    /* Idle Blue */

    /* Typography */
    --font-mono: 'Space Mono', monospace;
    --font-sans: 'Inter', sans-serif;

    /* Spacing */
    --unit: 4px;
    /* Base unit for tech grids */
    --gap-sm: 1rem;
    --gap-md: 2rem;
    --gap-lg: 4rem;

    /* Borders */
    --border-tech: 1px solid #333;
    --border-active: 1px solid var(--accent-signal);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-matte);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Film Grain / Noise Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9000;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3C!-- svg: first layer --%3E%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='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography Utilities */
.mono {
    font-family: var(--font-mono);
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wide {
    letter-spacing: 0.1em;
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.25rem;
}

.text-xl {
    font-size: 2rem;
}

.text-signal {
    color: var(--accent-signal);
}

.text-dim {
    color: var(--text-dim);
}

/* Layout Utilities */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.grid-tech {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Components --- */

/* Tech Borders / Decorations */
.tech-border-bottom {
    border-bottom: var(--border-tech);
}

.tech-border-top {
    border-top: var(--border-tech);
}

.corner-markers {
    position: relative;
}

.corner-markers::before,
.corner-markers::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border: 1px solid var(--text-dim);
    transition: all 0.3s ease;
}

.corner-markers::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.corner-markers::after {
    bottom: -1px;
    right: -1px;
    border-left: none;
    border-top: none;
}

.corner-markers:hover::before,
.corner-markers:hover::after {
    border-color: var(--accent-signal);
    width: 100%;
    height: 100%;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(5px);
    z-index: 1000;
    border-bottom: var(--border-tech);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-brand {
    font-weight: 700;
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background-color: var(--accent-idle);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--accent-idle);
    animation: pulse 2s infinite;
    transition: all 0.3s ease;
    cursor: pointer;
}

.status-indicator:hover,
.status-indicator:active {
    background-color: var(--accent-peak);
    box-shadow: 0 0 8px var(--accent-peak), 0 0 15px var(--accent-peak);
    animation-play-state: paused;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    opacity: 0.7;
    transition: opacity 0.2s;
    position: relative;
    cursor: pointer;
}

.nav-link:hover {
    opacity: 1;
    color: var(--accent-signal);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -22px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-signal);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}


/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: var(--bg-rack);
    border: var(--border-tech);
    padding: 0.5rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-dim);
    transition: all 0.2s;
}

.dropdown-content a:hover {
    color: var(--accent-signal);
    background: rgba(255, 255, 255, 0.05);
}

/* Hero Section */
.hero {
    height: 100vh;
    padding-top: 60px;
    /* nav height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    border-bottom: var(--border-tech);
}

.hero-content {
    z-index: 2;
}

.hero-title {
    font-family: var(--font-mono);
    font-size: clamp(2rem, 6vw, 6rem);
    line-height: 0.9;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 2rem;
    letter-spacing: -0.05em;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.hero .status-indicator {
    width: 32px;
    height: 32px;
    background-color: var(--accent-idle);
    box-shadow: 0 0 15px var(--accent-idle), 0 0 30px var(--accent-idle);
}

.hero .status-indicator:hover,
.hero .status-indicator:active {
    background-color: var(--accent-peak);
    box-shadow: 0 0 15px var(--accent-peak), 0 0 30px var(--accent-peak), 0 0 50px var(--accent-peak);
}

.hero-tagline {
    font-family: var(--font-mono);
    color: var(--accent-signal);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    border-left: 2px solid var(--accent-signal);
    padding-left: 1rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    border: 1px solid var(--accent-signal);
    color: var(--accent-signal);
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-weight: bold;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: var(--accent-signal);
    color: var(--bg-matte);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

/* Power Button */
.power-btn {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 30%, #555 0%, #111 70%);
    border: 4px solid #ff0000;
    color: #ff0000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pulse-red-intense 2s ease-in-out infinite;
    box-shadow: 0 0 20px #ff0000, inset 0 0 10px #ff0000;
}

.power-btn svg {
    width: 45px;
    height: 45px;
    filter: drop-shadow(0 0 5px #ff0000);
}

.power-btn:hover {
    background: radial-gradient(circle at 50% 30%, #666 0%, #222 70%);
}

.power-btn.flash-green {
    border-color: #00ff41;
    color: #00ff41;
    background: radial-gradient(circle at 50% 30%, #2a442a 0%, #0a110a 70%);
    box-shadow: 0 0 30px #00ff41, inset 0 0 20px #00ff41;
    animation: none;
}

.power-btn.flash-green svg {
    filter: drop-shadow(0 0 10px #00ff41);
}

@keyframes pulse-red-intense {
    0% {
        box-shadow: 0 0 15px #ff0000, inset 0 0 10px #ff0000;
    }
    50% {
        box-shadow: 0 0 40px #ff0000, inset 0 0 15px #ff0000, 0 0 60px rgba(255,0,0,0.5);
    }
    100% {
        box-shadow: 0 0 15px #ff0000, inset 0 0 10px #ff0000;
    }
}

/* Background Grid Overlay */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg width='51.9615' height='90' viewBox='0 0 51.9615 90' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='glow' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23ffcc00' stop-opacity='0.7' /%3E%3Cstop offset='30%25' stop-color='%23886600' stop-opacity='0.2' /%3E%3Cstop offset='100%25' stop-color='%23050505' stop-opacity='0.8' /%3E%3C/linearGradient%3E%3C/defs%3E%3Cg fill='%23080808' stroke='url(%23glow)' stroke-width='2' stroke-linejoin='round'%3E%3Cpolygon points='0,-30 25.9808,-15 25.9808,15 0,30 -25.9808,15 -25.9808,-15'/%3E%3Cpolygon points='25.9808,15 51.9615,30 51.9615,60 25.9808,75 0,60 0,30'/%3E%3Cpolygon points='51.9615,-30 77.9423,-15 77.9423,15 51.9615,30 25.9808,15 25.9808,-15'/%3E%3Cpolygon points='0,60 25.9808,75 25.9808,105 0,120 -25.9808,105 -25.9808,75'/%3E%3Cpolygon points='51.9615,60 77.9423,75 77.9423,105 51.9615,120 25.9808,105 25.9808,75'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 80px auto;
    opacity: 0.8;
    -webkit-mask-image: linear-gradient(to bottom right, transparent 5%, black 85%);
    mask-image: linear-gradient(to bottom right, transparent 5%, black 85%);
    pointer-events: none;
    z-index: 0;
}

/* Floating Window System */
.floating-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    max-width: 90vw;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--text-dim);
    z-index: 2000;
    display: none;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(0, 31, 10, 0.5);
    /* signal green hint */
}

.floating-window.active {
    display: flex;
}

.window-header {
    background: #252525;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    border-bottom: 1px solid #333;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    user-select: none;
}

.window-header:active {
    cursor: grabbing;
}

.header-grip {
    flex-grow: 1;
    background-image: repeating-linear-gradient(-45deg,
            transparent,
            transparent 2px,
            #444 2px,
            #444 4px);
    height: 10px;
    margin: 0 1rem;
    opacity: 0.3;
}

.window-close {
    cursor: pointer;
    width: 12px;
    height: 12px;
    background-color: var(--accent-idle);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--accent-idle);
    transition: all 0.3s ease;
}

.window-close:hover,
.window-close:active {
    background-color: var(--accent-peak);
    box-shadow: 0 0 8px var(--accent-peak), 0 0 15px var(--accent-peak);
}

.window-content {
    padding: 2rem;
    overflow-y: auto;
    max-height: 70vh;
}

.window-content h3 {
    color: var(--accent-signal);
    font-family: var(--font-mono);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
}

/* Products Section */
.products-section {
    padding: 6rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
    border-bottom: var(--border-tech);
    padding-bottom: 1rem;
}

.section-title {
    font-family: var(--font-mono);
    font-size: 2rem;
    text-transform: uppercase;
    color: var(--text-primary);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--bg-rack);
    border: var(--border-tech);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.product-card:hover {
    border-color: var(--text-dim);
    transform: translateY(-2px);
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.product-card:hover .product-image img {
    opacity: 1;
}

.product-specs {
    position: absolute;
    top: 10px;
    right: 10px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--accent-signal);
    border: 1px solid var(--accent-signal);
    padding: 2px 4px;
    background: rgba(0, 0, 0, 0.8);
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-family: var(--font-mono);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
}

.product-price {
    color: var(--text-primary);
}

/* Footer */
.main-footer {
    border-top: var(--border-tech);
    padding: 4rem 0;
    margin-top: 4rem;
    font-family: var(--font-mono);
    background: var(--bg-rack);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-col h4 {
    color: var(--text-dim);
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a:hover {
    color: var(--accent-signal);
    text-decoration: underline;
}

/* Animations */
@keyframes pulse {
    0% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(0, 136, 255, 0.4);
    }

    70% {
        opacity: 0.7;
        box-shadow: 0 0 0 10px rgba(0, 136, 255, 0);
    }

    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(0, 136, 255, 0);
    }
}

/* Tech Data Display */
.data-readout {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    position: fixed;
    bottom: 20px;
    right: 20px;
    text-align: right;
    z-index: 100;
    pointer-events: none;
}

.scan-line {
    width: 100%;
    height: 100px;
    z-index: 9999;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(255, 255, 255, 0.02) 50%, rgba(0, 0, 0, 0) 100%);
    opacity: 0.1;
    background-size: 100% 100%;
    position: fixed;
    pointer-events: none;
    animation: scan 10s linear infinite;
    top: 0;
}

@keyframes scan {
    0% {
        top: -100px;
    }

    100% {
        top: 100%;
    }
}

/* Responsive Split Layout */
@media (max-width: 1024px) {
    .split-layout {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
    }
}

/* Boot Sequence Ripple */
.bg-grid.ripple-active {
    animation: grid-ripple 2s ease-out forwards;
}

@keyframes grid-ripple {
    0% {
        clip-path: circle(0% at 50% 50%);
    }
    100% {
        clip-path: circle(150% at 50% 50%);
    }
}

/* Skip Boot Overrides */
html.skip-boot #boot-overlay {
    display: none !important;
}
html.skip-boot #main-wrapper {
    opacity: 1 !important;
    transition: none !important;
}
html.skip-boot #main-grid {
    clip-path: none !important;
}