/*
Copyright (c) 2026:
vatofichor - Sebastian Mass     [>_<]
& Assisted By Gemini Antigravity /|\  
*/

:root {
    /* Brand-Aligned Pitch-Black / Monochromatic Palette */
    --brand-primary: #ff9500;
    /* The Amber "Pop" Color */
    --brand-bg: #000000;
    /* Pitch-Black background */
    --brand-surface: #0a0a0a;
    /* Container background */
    --brand-text-main: #d1d1d6;
    --brand-text-muted: #8e8e93;

    --brand-gray-light: #333333;
    --brand-gray-dark: #111111;
    --brand-border: var(--brand-gray-light);

    /* Keep old names for compatibility if referenced in module pages */
    --bg-desktop: var(--brand-bg);
    --bg-window: var(--brand-surface);
    --border-light: var(--brand-gray-light);
    --border-dark: var(--brand-gray-dark);
    --text-main: var(--brand-text-main);
    --text-secondary: var(--brand-text-muted);
    --accent-amber: var(--brand-primary);
    --accent-dim: #804c00;
    --title-bg: #0a0a0a;
    --input-bg: #000000;
    --btn-bg: #111111;
    --btn-active: var(--brand-primary);

    /* Form Sizing Variables */
    --input-height-min: 70px;
    --input-height-max: 90px;
    --input-width-min: 200px;
    --input-width-max: 400px;
    --input-padding: 1rem 2rem;
    --radio-check-size: 60px;

    /* Typography */
    --font-ui: Tahoma, "Segoe UI", sans-serif;
    --font-data: Consolas, "ui-monospace", SFMono-Regular, Menlo, Monaco, monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-desktop);
    color: var(--text-main);
    font-family: var(--font-ui);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* The Window Shell */
.window {
    background-color: var(--bg-window);
    border: 2px solid var(--border-light);
    border-radius: 6px;
    box-shadow: none;
    /* No box shadows by default */
    margin: 2rem auto;
    max-width: 900px;
    width: 95%;
    display: flex;
    flex-direction: column;
}

.window-title {
    background-color: var(--title-bg);
    color: var(--accent-amber);
    font-family: var(--font-data);
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-bottom: 2px solid var(--border-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.window-content {
    padding: 2rem;
    flex: 1;
}

/* ==========================================================================
   Page Header & Layout Branding
   ========================================================================== */

.page-header {
    background-color: var(--bg-window);
    border-bottom: 2px solid var(--border-light);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    clear: both;
}

.page-header .logo {
    font-family: var(--font-data);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--brand-primary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.page-header .header-middle {
    flex: 1;
}

.page-header .header-tools {
    font-family: var(--font-data);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   Navigation Overhaul (Desktop & Mobile)
   ========================================================================== */

.nav-bar {
    display: flex;
    align-items: center;
    background-color: #050505;
    /* slightly darker toolbar background */
    border-bottom: 2px solid var(--border-light);
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    /* Spans 100% width, clearing both sides with no side margins */
    clear: both;
}

.desktop-nav {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

.nav-item {
    background-color: var(--btn-bg);
    color: var(--text-main);
    text-decoration: none;
    padding: 1rem 1.5rem;
    /* Large padding */
    font-family: var(--font-ui);
    font-weight: bold;
    font-size: 0.95rem;
    /* Large text */
    border: none;
    border-right: 2px solid var(--border-light);
    border-bottom: 2px solid var(--border-light);
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    flex: 0 0 20%;
    text-align: center;
    box-sizing: border-box;
}

.desktop-nav .nav-item:nth-child(5n) {
    border-right: none;
}

.nav-item:hover {
    background-color: #111111;
    color: var(--brand-primary);
}

.nav-item.active {
    background-color: var(--brand-primary);
    color: #000;
}

/* Mobile Hamburger Button Styling */
.hamburger-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 1rem 1.5rem;
    flex-direction: column;
    gap: 6px;
    border-right: 2px solid var(--border-light);
}

.hamburger-btn .bar {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--text-main);
    transition: background-color 0.2s ease;
}

.hamburger-btn:hover .bar {
    background-color: var(--brand-primary);
}

/* ==========================================================================
   Mobile Nav Drawer & Overlay
   ========================================================================== */

.nav-drawer {
    position: fixed;
    top: 0;
    left: -100%;
    /* Hidden on left */
    width: 75%;
    max-width: 400px;
    height: 100%;
    background-color: #050505;
    /* Perfectly mirrors/slightly darker than header */
    border-right: 2px solid var(--border-light);
    z-index: 1000;
    transition: left 0.35s ease;
    /* Under 400ms transition */
    display: flex;
    flex-direction: column;
    box-shadow: none;
    /* No box shadow per spec */
}

.nav-drawer.open {
    left: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-light);
}

.drawer-header span {
    font-family: var(--font-data);
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--brand-primary);
    text-transform: uppercase;
}

.drawer-close-btn {
    background: transparent;
    border: none;
    font-size: 2.5rem;
    color: var(--text-main);
    cursor: pointer;
    line-height: 1;
}

.drawer-close-btn:hover {
    color: var(--brand-primary);
}

.drawer-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
}

.drawer-item {
    display: block;
    padding: 1.5rem;
    /* Generous height */
    font-family: var(--font-ui);
    font-size: 1.15rem;
    font-weight: bold;
    color: var(--text-main);
    text-decoration: none;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.drawer-item:hover,
.drawer-item:active {
    background-color: #111111;
    color: var(--brand-primary);
}

.drawer-item.active {
    background-color: var(--brand-primary);
    color: #000;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.drawer-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* Back Button (Tactile) */
.btn-secondary {
    display: inline-block;
    background-color: var(--btn-bg);
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    font-family: var(--font-data);
    font-size: 0.8rem;
    border: 2px solid;
    border-color: var(--border-light) var(--border-dark) var(--border-dark) var(--border-light);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.btn-secondary:active {
    background-color: var(--input-bg);
    color: var(--accent-amber);
    border-color: var(--border-dark) var(--border-light) var(--border-light) var(--border-dark);
}

/* Headings & Typography */
h1,
h2,
h3 {
    font-family: var(--font-data);
    margin-bottom: 1rem;
}

h1 {
    color: var(--text-main);
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.5rem;
}

h2 {
    color: var(--accent-amber);
    font-size: 1.2rem;
    margin-top: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

.subtitle {
    color: var(--text-secondary);
    font-family: var(--font-data);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Recessed Data Grid */
.data-well {
    background-color: var(--input-bg);
    border: 2px solid;
    border-color: var(--border-dark) var(--border-light) var(--border-light) var(--border-dark);
    padding: 1rem;
    font-family: var(--font-data);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.data-well ul {
    list-style: none;
}

.data-well li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.2rem;
}

.data-well li::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--accent-amber);
}

/* Footer */
footer {
    margin-top: auto;
    border-top: 2px solid var(--border-dark);
    background-color: var(--title-bg);
    padding: 0.5rem 2rem;
    font-family: var(--font-data);
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blink {
    animation: blinker 1s linear infinite;
    color: var(--accent-amber);
    display: inline-block;
    width: 8px;
    height: 12px;
    background-color: var(--accent-amber);
    vertical-align: middle;
    margin-left: 4px;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* Disabled tactile form controls styling */
input:disabled,
select:disabled,
textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #050505 !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-dark) !important;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--btn-bg) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-dark) !important;
}

/* ==========================================================================
   Tactile Console Grid & Form Standard Utilites (Removes inline clutter)
   ========================================================================== */

.row {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.col-left {
    flex: 1.2;
    min-width: 280px;
}

.col-right {
    flex: 1;
    min-width: 280px;
}

.tactile-card {
    background-color: var(--bg-window);
    border: 2px solid var(--border-light);
    border-radius: 6px;
    padding: 1.5rem;
    box-shadow: none;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Base styling for interactive inputs based on Standard Input specification */
.form-control,
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
select,
textarea {
    /* Dimensions & Spacing */
    min-height: var(--input-height-min);
    max-height: var(--input-height-max);
    min-width: var(--input-width-min);
    max-width: var(--input-width-max);
    padding: var(--input-padding);
    margin: 0;
    /* No assumptions on sibling elements */

    /* Typography */
    font-size: 1.16rem;
    /* Large accessible text (scaled slightly for console fit) */
    font-family: inherit;

    /* Borders and Embellishments (No shadows) */
    box-shadow: none;
    border: 2px solid var(--brand-border);
    border-radius: 4px;
    /* Rounded borders are OK */
    background-color: var(--input-bg);
    color: var(--text-main);

    /* Layout */
    box-sizing: border-box;
    width: 100%;
    outline: none;
    transition: border-color 0.2s ease, border-left-width 0.2s ease;
}

/* Mobile/Tablet Adjustments */
@media screen and (max-width: 768px) {

    .form-control,
    button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    select,
    textarea {
        min-width: 60vw;
        /* 60% of viewport width */
        max-width: 100%;
        width: 100%;
    }
}

/* Radios and Checkboxes */
input[type="radio"],
input[type="checkbox"] {
    min-width: var(--radio-check-size) !important;
    min-height: var(--radio-check-size) !important;
    width: var(--radio-check-size) !important;
    height: var(--radio-check-size) !important;
    margin: 0 10px 0 0;
    /* Slight margin for adjacent text label */
    padding: 0;
    box-shadow: none;
    cursor: pointer;
    accent-color: var(--brand-primary);
    /* Uses pop color for active state */
}

/* Label styling to ensure alignment with large controls */
label {
    display: inline-flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: bold;
    text-transform: uppercase;
    font-family: var(--font-data);
    color: var(--text-secondary);
    margin: 0;
}

/* Focus States for Accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
.form-control:focus {
    outline: none;
    /* One-sided border coloring to simulate depth/focus as requested */
    border-left: 6px solid var(--brand-primary);
    border-color: var(--brand-primary);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: none;
    line-height: 1.4;
}

/* ==========================================================================
   Mobile Responsiveness Media Queries
   ========================================================================== */

/* Tablet & Smaller Layouts */
@media (max-width: 768px) {
    .row {
        flex-direction: column;
        gap: 1.5rem;
    }

    .col-left,
    .col-right {
        flex: 1 1 100%;
        min-width: 0 !important;
    }

    .desktop-nav {
        display: none;
    }

    .hamburger-btn {
        display: flex;
    }
}

/* Mobile Layouts */
@media (max-width: 600px) {
    .window {
        margin: 1rem auto;
        width: 98%;
    }

    .window-title {
        font-size: 0.8rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .window-content {
        padding: 1.25rem 1rem;
    }

    footer {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        padding: 1rem;
    }
}

/* Tactile GitHub Badge */
.github-badge {
    background-color: var(--input-bg);
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.2rem 0.5rem;
    font-family: var(--font-data);
    font-size: 0.75rem;
    border: 1px solid var(--border-light);
    display: inline-block;
}

.github-badge:hover,
.github-badge:active {
    color: var(--accent-amber);
    border-color: var(--accent-amber);
    background-color: var(--btn-bg);
}

/* ==========================================================================
   Hero Section & Interactive Carousel (Phase 1)
   ========================================================================== */

.hero-wrapper {
    position: relative;
    width: 100%;
    clear: both;
}

.hero-section {
    position: relative;
    width: 100%;
    height: 40vh;
    background-color: #000000;
    border-bottom: 2px solid var(--border-light);
    overflow: hidden;
    clear: both;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 30%;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.8s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

/* Carousel manual navigation buttons */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background-color: rgba(10, 10, 10, 0.45);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-family: var(--font-data);
    font-size: 1.5rem;
    font-weight: bold;
    width: 44px !important;
    height: 44px !important;
    min-height: auto !important;
    max-height: auto !important;
    min-width: auto !important;
    max-width: auto !important;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0.35;
    transition: opacity 0.2s ease, color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    user-select: none;
}

.carousel-control:hover {
    opacity: 1;
    color: var(--accent-amber);
    border-color: var(--accent-amber);
    background-color: rgba(10, 10, 10, 0.9);
}

.carousel-control.prev-btn {
    left: 15px;
}

.carousel-control.next-btn {
    right: 15px;
}

/* Make manual controls smaller on mobile screen sizes */
@media (max-width: 600px) {
    .carousel-control {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.25rem;
    }
}


/* Semi-opaque overlay to make sure brand feels monochromatic and industrial */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.1) 60%, rgba(0, 0, 0, 0.7) 100%);
    pointer-events: none;
    z-index: 3;
}

/* Attribution triggering button */
.attrib-trigger {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 10;
    background-color: rgba(10, 10, 10, 0.75);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-family: var(--font-data);
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.2s ease, color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    min-height: auto !important;
    /* Override standard input min-height */
    max-height: auto !important;
    min-width: auto !important;
    max-width: auto !important;
    width: auto !important;
}

.attrib-trigger:hover {
    opacity: 1;
    color: var(--accent-amber);
    border-color: var(--accent-amber);
    background-color: rgba(10, 10, 10, 0.95);
}

/* Industrial Attribution Card Overlay */
.attrib-card {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 20;
    width: 320px;
    max-width: calc(100% - 30px);
    background-color: rgba(10, 10, 10, 0.95);
    border: 2px solid var(--brand-primary);
    border-radius: 6px;
    font-family: var(--font-data);
    color: var(--text-main);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
}

.attrib-card-header {
    background-color: #121212;
    border-bottom: 1px solid var(--border-light);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 0.75rem;
    color: var(--accent-amber);
    letter-spacing: 0.05em;
}

.attrib-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    min-height: auto !important;
    max-height: auto !important;
    min-width: auto !important;
    max-width: auto !important;
    width: auto !important;
}

.attrib-close-btn:hover {
    color: var(--accent-amber);
}

.attrib-card-body {
    padding: 0.8rem 1rem;
    max-height: 160px;
    overflow-y: auto;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

.attrib-card-body a {
    color: var(--accent-amber);
    text-decoration: none;
}

.attrib-card-body a:hover {
    text-decoration: underline;
}

.attrib-card-body p {
    margin-bottom: 0.6rem;
}

.attrib-card-body p:last-child {
    margin-bottom: 0;
}

/* Responsiveness adjustments for Hero Carousel */
@media (max-width: 768px) {
    .hero-section {
        height: 110px;
    }

    .attrib-card {
        width: calc(100% - 30px);
    }
}

@media (max-width: 480px) {
    .hero-section {
        height: 85px;
    }
}

/* Desktop-specific typography scaling for higher density */
@media screen and (min-width: 769px) {
    body {
        font-size: 14px;
    }
}

/* ==========================================================================
   Navigation Expandable Menu & Style Switcher (v2.5.0)
   ========================================================================== */

.nav-more-btn {
    display: inline-block;
}

.nav-expanded-set {
    display: none;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    flex: 0 0 100%;
}

.style-switcher-container {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.change-style-btn {
    cursor: pointer;
    display: inline-block;
    background: transparent;
    height: auto !important;
    min-height: auto !important;
    max-height: auto !important;
    width: auto !important;
    min-width: auto !important;
    max-width: auto !important;
    padding: 0.2rem 0.5rem !important;
    line-height: normal;
    font-size: 0.75rem !important;
    border: 1px solid var(--border-light);
}

.style-selector-dropdown {
    display: none;
    background: var(--input-bg);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    font-family: var(--font-data);
    font-size: 0.75rem;
    padding: 0.1rem 0.3rem;
    height: auto !important;
    width: auto !important;
    min-height: auto !important;
    min-width: auto !important;
    max-width: auto !important;
    cursor: pointer;
    border-radius: 4px;
    outline: none;
}

.style-info-btn {
    cursor: pointer;
    display: none;
    background: transparent;
    height: auto !important;
    min-height: auto !important;
    max-height: auto !important;
    width: auto !important;
    min-width: auto !important;
    max-width: auto !important;
    padding: 0.2rem 0.5rem !important;
    line-height: normal;
    font-size: 0.75rem !important;
    border: 1px solid var(--border-light);
    font-family: var(--font-data);
}

.style-copyright-overlay-card {
    display: none;
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    border: 2px solid var(--brand-primary);
    z-index: 1010;
    background-color: rgba(10, 10, 10, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

/* Display Utility Helpers for Dynamic JS Toggling */
.js-hidden {
    display: none !important;
}
.js-visible-inline {
    display: inline-block !important;
}
.js-visible-flex {
    display: flex !important;
}
