/* ==========================================================================
   1. CSS VARIABLES & SYSTEM SETUP (Page 4-6) [cite: 62, 72]
   ========================================================================== */
:root {
    /* Brand Colors [cite: 63] */
    --rebel-red: #C10B0B;
    --deep-crimson: #8A0000;
    --ember-glow: #FF2A00;

    /* Background Hierarchy [cite: 67] */
    --midnight-black: #050505;
    --graphite: #111111;
    --dark-slate: #1B1B1B;

    /* Typography Typography [cite: 70] */
    --bone-white: #F2EFE8;
    --ivory: #D7D2C7;

    /* Fonts [cite: 78, 80] */
    --font-heading: 'Cinzel', Georgia, serif;
    --font-body: 'Inter', Arial, sans-serif;
}

/* Base Reset & Core Styles [cite: 101, 105] */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--midnight-black);
    /* Dark theme only [cite: 101] */
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ivory);
    overflow-x: hidden;
    position: relative;
}

/* Prevent empty white spaces and rounded bubble components [cite: 112, 113] */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--bone-white);
    /* [cite: 58] */
    letter-spacing: 1px;
    margin-bottom: 1rem;
    z-index: 999;
}

p {
    margin-bottom: 1.25rem;
    font-weight: 400;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

/* ==========================================================================
   2. RETRO VISUAL EFFECTS & PIXEL SIDEBARS (Consolidated & Fixed)
   ========================================================================== */

/* Subtle CRT Scanline Overlay */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.12) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
    background-size: 100% 10px, 12px 100%;
    z-index: 999;
    pointer-events: none;
    opacity: 1;
}

#rebel-noise-canvas {
    position: fixed;
    /* Fixes it to the viewport */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    /* Puts it behind all other content */
    pointer-events: none;
    /* Essential: prevents the canvas from blocking clicks */
    background-color: var(--midnight-black);
    /* Matches the 'Midnight Black' brand color */
    opacity: .05;
}

/* Smooth Element Transitions */
.fade-in-element {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-element.visible {
    opacity: 1;
    transform: translateY(0);
}

.text-glow {
    text-shadow: 0 0 10px rgba(193, 11, 11, 0.6);
}

/* Scrollbar edits */
/* Width of the scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

/* The track background */
::-webkit-scrollbar-track {
    background: var(--midnight-black);
    /* Midnight Black to match the background [cite: 303] */
}

/* The draggable */
::-webkit-scrollbar-thumb {
    background: var(--rebel-red);
    border-radius: 0px;
}

/* Hover state for the thumb */
::-webkit-scrollbar-thumb:hover {
    background: var(--deep-crimson);
}

/* ==========================================================================
   3. NAVIGATION (Page 11) [cite: 197]
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(5, 5, 5, 0.95);
    border-bottom: 1px solid var(--graphite);
    z-index: 90;
    padding: 1rem 2rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-rebel {
    color: var(--rebel-red);
    margin-right: 4px;
}

/* [cite: 34] */
.logo-pixel {
    color: var(--bone-white);
}

/* [cite: 35] */

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--ivory);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--rebel-red);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 6px;
}

.mobile-toggle .bar {
    width: 24px;
    height: 2px;
    background-color: var(--bone-white);
    transition: all 0.3s ease;
}

/* ==========================================================================
   4. LAYOUT COMPONENTS & SECTIONS (Page 7-10) [cite: 114, 147]
   ========================================================================== */

/* Hero Area [cite: 115] */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: radial-gradient(circle at center, var(--graphite) 0%, var(--midnight-black) 100%);
    position: relative;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.hero-content .subheadline {
    font-size: 1.25rem;
    max-width: 750px;
    margin: 0 auto 2.5rem auto;
    color: var(--ivory);
}

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.ninja-icon-placeholder {
    /* Change width to fit the content or use auto/max-content */
    width: fit-content;
    height: auto;
    margin: 0 auto 1.5rem auto;
    /* This correctly centers the container */
}

.ninja-icon-placeholder img {
    display: block;
    width: 300px;
    /* This is now the actual width of your logo */
    height: auto;
    border-radius: 0px;
    object-fit: contain;
    /* opacity: 0.9; */
    transition: opacity 0.3s ease;
}

/* Sharp Cards & Grid Structuring [cite: 106, 158] */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.card {
    background-color: var(--graphite);
    border: 1px solid var(--dark-slate);
    padding: 3rem;
    position: relative;
}

.section-title {
    font-size: 0.9rem;
    color: var(--rebel-red);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.accent-headline {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.highlight-text {
    border-left: 3px solid var(--rebel-red);
    padding-left: 1.5rem;
    font-style: italic;
    color: var(--bone-white);
}

.ticker-badges {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
}

.badge {
    background-color: var(--dark-slate);
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-left: 2px solid var(--ember-glow);
}

/* Featured Projects Grid [cite: 220] */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-top: 3rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 350px;
    transition: border-color 0.3s ease;
}

.project-card:hover {
    border-color: var(--rebel-red);
}

.project-tag {
    position: absolute;
    top: 0;
    right: 2rem;
    transform: translateY(-50%);
    background-color: var(--rebel-red);
    color: var(--bone-white);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    letter-spacing: 1px;
}

.project-tag.tag-alt {
    background-color: var(--dark-slate);
    border: 1px solid var(--ivory);
    color: var(--ivory);
}

.project-footer-note {
    font-size: 0.85rem;
    color: var(--bone-white);
    border-top: 1px solid var(--dark-slate);
    padding-top: 1rem;
    margin-top: auto;
}

.coming-soon {
    opacity: 0.6;
}

/* Values List [cite: 228] */
.values-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.values-list li {
    position: relative;
    padding-left: 1.5rem;
}

.values-list li::before {
    content: "■";
    /* Sharp pixel-inspired bullet [cite: 187] */
    position: absolute;
    left: 0;
    color: var(--rebel-red);
    font-size: 0.8rem;
    top: 2px;
}

/* Vision Setup [cite: 231] */
.display-headline {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.max-width-md {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Form Design [cite: 94, 141] */
.retro-form {
    margin: 2.5rem 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-group label {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--bone-white);
}

.form-group input,
.form-group textarea {
    background-color: var(--midnight-black);
    border: 1px solid var(--dark-slate);
    padding: 1rem;
    color: var(--bone-white);
    font-family: var(--font-body);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--rebel-red);
}

.fallback-contact {
    font-size: 0.9rem;
}

.fallback-contact a {
    color: var(--rebel-red);
    text-decoration: none;
    margin-left: 0.5rem;
    font-weight: 600;
}

/* ==========================================================================
   5. BUTTON ARCHITECTURE (Page 9) [cite: 147]
   ========================================================================== */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    /* Maximum 4px radius requirement [cite: 156] */
    border: none;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.2s ease;
    letter-spacing: 1px;
    text-align: center;
}

.btn-primary {
    background-color: var(--rebel-red);
    /* [cite: 150] */
    color: var(--bone-white);
    /* [cite: 152] */
}

.btn-primary:hover {
    background-color: var(--deep-crimson);
    /* [cite: 154] */
}

.btn-secondary {
    background-color: transparent;
    color: var(--bone-white);
    border: 2px solid var(--rebel-red);
}

.btn-secondary:hover {
    background-color: var(--graphite);
    border-color: var(--ivory);
}

.btn-sharp {
    border-radius: 0px;
    /* Fully explicit sharp design [cite: 158] */
}

.btn-block {
    display: block;
    width: 100%;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================================================
   6. SITE FOOTER (Page 17) [cite: 234]
   ========================================================================== */
.site-footer {
    background-color: var(--midnight-black);
    border-top: 1px solid var(--graphite);
    padding: 4rem 2rem;
    font-size: 0.85rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-branding .tagline {
    color: var(--rebel-red);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.footer-legal {
    text-align: right;
}

.confidential-tag {
    color: var(--rebel-red);
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

/* ==========================================================================
   7. ANIMATIONS & RESPONSIVE DESIGN (Page 11) [cite: 198]
   ========================================================================== */

.text-center {
    text-center: center;
    text-align: center;
}

@media (max-width: 900px) {

    .pixel-sidebar-left,
    .pixel-sidebar-right {
        display: none;
    }

    .grid-2col,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .pixel-border-left,
    .pixel-border-right {
        display: none;
        /* Hide frame parameters on low res to optimize real estate */
    }

    /* Collapsible Navigation Processing [cite: 198] */
    .mobile-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--midnight-black);
        border-bottom: 1px solid var(--graphite);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        display: none;
    }

    .nav-links.active {
        display: flex;
    }

    /* Easy Touch Targets for Mobile Devices [cite: 198] */
    .nav-links a {
        display: block;
        padding: 0.75rem 0;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-legal {
        text-align: center;
    }
}