/* --- GLOBAL VARIABLES (THE OS) --- */
:root {
    --color-bg-void: #050505;
    --color-bg-panel: #0F1115;
    --color-neon-cyan: #00F0FF;
    --color-neon-cyan-dim: rgba(0, 240, 255, 0.2);
    --color-neon-yellow: #FAFF00;
    --color-neon-red: #FF2A6D;
    --color-text-primary: #E0E0E0;
    --color-text-muted: #6B7A8F;
    --color-text-inverse: #050505;

    --font-heading: 'Bangers', cursive;
    --font-body: 'Space Mono', monospace;

    --glass-blur: blur(12px);
    --clip-corner: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}

/* --- RESET & BASE --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg-void);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.1;
}

h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    color: #fff;
    text-shadow: 4px 4px 0px #000;
}

h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--color-text-primary);
    margin-bottom: 1rem;
}

h3 {
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--color-neon-cyan);
    letter-spacing: 1px;
    font-size: 1.2rem;
}

p {
    color: var(--color-text-muted);
    max-width: 65ch;
    margin-bottom: 1.5rem;
}

/* --- UI COMPONENTS --- */
.btn-primary {
    display: inline-block;
    background: transparent;
    border: 2px solid var(--color-neon-cyan);
    color: var(--color-neon-cyan);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    padding: 1rem 2.5rem;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    clip-path: var(--clip-corner);
    margin-top: 1rem;
}

.btn-primary:hover {
    background: var(--color-neon-cyan);
    color: var(--color-bg-void);
    box-shadow: 0 0 30px var(--color-neon-cyan-dim);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-neon-cyan-dim);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-neon-cyan);
    text-shadow: 0 0 10px var(--color-neon-cyan-dim);
}

.mobile-menu-btn {
    display: none;
    color: var(--color-neon-cyan);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- PAGE STRUCTURE --- */
.page-section {
    display: none;
    /* Hidden by default */
    min-height: 100vh;
    padding-top: 100px;
    animation: fadeIn 0.5s ease;
    padding-bottom: 4rem;
}

.page-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- HOMEPAGE SPECIFIC --- */
.hero {
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at center, #1a1a2e 0%, #050505 70%);
    position: relative;
    overflow: hidden;
}

/* The Reactor Core Logo Animation */
.reactor-container {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    z-index: 0;
    opacity: 0.8;
    display: flex;
    justify-content: center;
    align-items: center;
}

.reactor-core-text {
    font-family: var(--font-heading);
    font-size: 12rem;
    color: var(--color-neon-cyan);
    text-shadow: 0 0 30px var(--color-neon-cyan), 0 0 60px var(--color-neon-cyan);
    z-index: 2;
    animation: pulse 3s infinite ease-in-out;
}

.reactor-ring {
    position: absolute;
    border: 2px solid var(--color-neon-cyan);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--color-neon-cyan-dim);
}

.ring-1 {
    width: 350px;
    height: 350px;
    border-style: dashed;
    animation: spin 20s linear infinite;
}

.ring-2 {
    width: 450px;
    height: 150px;
    animation: spinReverse 15s linear infinite;
    border-color: var(--color-neon-cyan-dim);
}

.ring-3 {
    width: 150px;
    height: 450px;
    animation: spin 15s linear infinite;
    border-color: var(--color-neon-cyan-dim);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin-top: 100px;
}

.hero-sub {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
    margin-top: 2rem;
}

/* The Comic Strip Visuals */
.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.comic-panel {
    border: 3px solid #fff;
    padding: 2rem;
    background: #0a0a0a;
    position: relative;
    box-shadow: 8px 8px 0px var(--color-neon-red);
    overflow: hidden;
}

.comic-panel::before {
    /* Halftone effect overlay */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, #222 1px, transparent 1px);
    background-size: 10px 10px;
    opacity: 0.5;
    z-index: 0;
}

.comic-content {
    position: relative;
    z-index: 1;
}

.comic-panel h3 {
    color: var(--color-neon-red);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.comic-visual {
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 5rem;
    color: var(--color-neon-red);
    text-shadow: 0 0 20px var(--color-neon-red);
    border: 2px dashed var(--color-neon-red);
    background: rgba(255, 42, 109, 0.1);
}

.comic-image {
    width: 100%;
    height: auto;
    display: block;
    border: 2px solid #fff;
}

/* --- SERVICES PAGE --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--color-bg-panel);
    padding: 3rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
    position: relative;
    overflow: hidden;
    clip-path: var(--clip-corner);
}

.service-card:hover {
    border-color: var(--color-neon-cyan);
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.1);
}

.service-card:hover h3 {
    text-shadow: 0 0 10px var(--color-neon-cyan);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--color-neon-cyan);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 1.5rem;
}

.status-stamp {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.7rem;
    border: 1px solid var(--color-neon-yellow);
    color: var(--color-neon-yellow);
    padding: 2px 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- ABOUT PAGE VISUALS --- */
.founders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 4rem;
    margin-top: 5rem;
}

.founder-card {
    background: linear-gradient(45deg, #0f1115 0%, #001214 100%);
    border-left: 4px solid var(--color-neon-cyan);
    padding: 2rem;
    position: relative;
    text-align: center;
}

/* Replacing text placeholder with a designed "Hologram Scan" visual */
.founder-visual {
    width: 100%;
    height: 350px;
    background: #050505;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--color-neon-cyan-dim);
}

.founder-silhouette {
    font-size: 12rem;
    color: rgba(0, 240, 255, 0.1);
    z-index: 1;
}

.hologram-scanline {
    position: absolute;
    width: 100%;
    height: 10px;
    background: var(--color-neon-cyan);
    opacity: 0.5;
    box-shadow: 0 0 20px var(--color-neon-cyan);
    animation: scanDown 4s linear infinite;
    z-index: 2;
}

.hologram-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(0deg, rgba(0, 240, 255, 0.05) 0px, rgba(0, 240, 255, 0.05) 1px, transparent 1px, transparent 4px);
    z-index: 3;
    pointer-events: none;
}

.stat-block {
    margin-top: 1.5rem;
    background: rgba(0, 240, 255, 0.05);
    padding: 1rem;
    font-size: 0.85rem;
    border: 1px solid var(--color-neon-cyan-dim);
    font-family: var(--font-body);
}

/* --- CASE STUDIES --- */
.mission-log {
    border: 1px dashed var(--color-text-muted);
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    background: rgba(15, 17, 21, 0.5);
}

.mission-log::before {
    content: 'TOP SECRET // DECLASSIFIED';
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--color-bg-void);
    padding: 0 10px;
    color: var(--color-neon-yellow);
    font-weight: bold;
    font-size: 0.8rem;
    letter-spacing: 2px;
}

.log-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #333;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    font-family: var(--font-body);
}

/* --- CONTACT --- */
.terminal-form {
    max-width: 600px;
    margin: 0 auto;
    background: #000;
    padding: 3rem;
    border: 1px solid var(--color-neon-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
    position: relative;
}

.terminal-form::before {
    content: '// SECURE UPLINK TERMINAL v1.0';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-bg-void);
    padding: 0 1rem;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--color-neon-cyan);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    background: #0a0a0a;
    border: 1px solid #333;
    color: #fff;
    padding: 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-neon-yellow);
    box-shadow: 0 0 15px rgba(250, 255, 0, 0.2);
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 4rem 2rem;
    border-top: 1px solid #222;
    margin-top: auto;
    background: #080808;
}

.footer-branding {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 1rem;
}

.footer-branding h3 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 0;
}

.footer-branding h3 span {
    color: var(--color-neon-cyan);
}

.footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 0;
}

/* --- ANIMATIONS --- */
@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes spinReverse {
    100% {
        transform: rotate(-360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
        text-shadow: 0 0 40px var(--color-neon-cyan);
    }
}

@keyframes scanDown {
    0% {
        top: -10%;
    }

    100% {
        top: 110%;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 3.5rem;
    }

    .founders-grid {
        grid-template-columns: 1fr;
    }

    .mobile-menu-btn {
        display: block;
        z-index: 1001;
    }

    .nav-links {
        display: flex;
        /* Changed from none */
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background: rgba(5, 5, 5, 0.98);
        border-left: 1px solid var(--color-neon-cyan);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        transition: right 0.4s ease-in-out;
        z-index: 1000;
        backdrop-filter: blur(15px);
    }

    .nav-links.nav-active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    /* Simplified for demo */
    .hero-content {
        margin-top: 50px;
    }

    .reactor-container {
        transform: translate(-50%, -50%) scale(0.6);
    }
}

/* --- FULL PANEL MODIFIER --- */
.comic-panel.comic-panel-full {
    padding: 0;
    border: none;
}

.comic-panel.comic-panel-full .comic-image {
    border: none;
}

.founder-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* --- COOKIE BANNER --- */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    /* Hidden by default */
    left: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.95);
    border-top: 1px solid var(--color-neon-cyan);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10000;
    transition: bottom 0.5s ease-in-out;
    box-shadow: 0 -5px 20px rgba(0, 240, 255, 0.1);
}

.cookie-banner.visible {
    bottom: 0;
}

.cookie-banner p {
    margin-bottom: 0;
    color: var(--color-text-primary);
    font-size: 0.9rem;
}

.cookie-banner a {
    color: var(--color-neon-cyan);
    text-decoration: none;
    border-bottom: 1px dashed var(--color-neon-cyan);
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
}

.btn-small {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    margin-top: 0;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--color-text-muted);
    color: var(--color-text-muted);
    font-family: var(--font-body);
    /* Using body font for secondary layout */
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
    clip-path: var(--clip-corner);
}

.btn-secondary:hover {
    border-color: var(--color-neon-red);
    color: var(--color-neon-red);
    box-shadow: 0 0 10px rgba(255, 42, 109, 0.2);
}