/* Unified 3D Platform Stylesheet (Amber & Warm Stone Theme) */

:root {
    --color-deep: #0c0a09; /* stone-950 */
    --color-graphite: #1c1917; /* stone-900 */
    --color-graphite-light: #292524; /* stone-800 */
    --color-blue: #d97706; /* amber-600 */
    --color-cyan: #f59e0b; /* amber-500 */
    --color-red: #ef4444; /* red-500 */
    --color-slate: #fafaf9; /* stone-50 */
    --color-slate-muted: rgba(214, 211, 209, 0.6); /* stone-300 */
    --color-border: rgba(245, 158, 11, 0.15);
    
    --font-header: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --shadow-hud: 0 0 20px rgba(245, 158, 11, 0.15);
    --shadow-glow: 0 0 12px rgba(217, 119, 6, 0.5);
}

/* Global Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-deep);
    color: var(--color-slate);
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
}

/* 3D Canvas Layer */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    background-color: var(--color-deep);
}

/* Fixed HUD Overlay System */
.hud-overlay {
    position: fixed;
    inset: 0;
    z-index: 20;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: var(--font-mono);
    color: var(--color-cyan);
    font-size: 0.75rem;
    pointer-events: none;
}

/* HUD Top Header (Hidden because it is integrated inside header.html navbar) */
.hud-header {
    display: none !important;
}

/* HUD Bottom Footer - Reformatted as floating corner widgets */
.hud-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    background: transparent;
    padding: 0;
    border-top: none;
    pointer-events: none;
}

.hud-azimuth, .hud-encryption {
    background: rgba(12, 10, 9, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    pointer-events: auto;
    box-shadow: var(--shadow-hud);
}

.hud-muted-label {
    display: block;
    color: var(--color-slate-muted);
    font-size: 0.6rem;
    margin-bottom: 0.1rem;
    letter-spacing: 0.05em;
}

.hud-footer strong {
    font-size: 0.75rem;
}

/* Solid Navigation Bar to prevent text from overlapping underneath */
.glass-nav {
    background: #0c0a09 !important; /* Solid stone-950 */
    backdrop-filter: none !important;
    border-bottom: 1px solid rgba(245, 158, 11, 0.25);
}

/* Scrollable narrative contents */
#scroll-container {
    position: relative;
    z-index: 10;
    width: 100%;
}

.narrative-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 140px 10% 120px 10%; /* Safe zone clearance: 140px top clears navbar, 120px bottom clears HUD */
    position: relative;
    box-sizing: border-box;
}

/* Layout Alignments */
.narrative-section.align-right {
    justify-content: flex-end;
}

.narrative-section.align-center {
    justify-content: center;
}

/* Glassmorphic Narrative Card */
.narrative-card {
    background: rgba(28, 25, 23, 0.7); /* stone-900 */
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 3rem;
    max-width: 540px;
    width: 100%;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-hud);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(217, 119, 6, 0.15);
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    font-size: 0.7rem;
    color: var(--color-cyan);
    letter-spacing: 0.08em;
    width: max-content;
    text-transform: uppercase;
}

.section-badge.red {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--color-red);
}

.section-badge i {
    width: 12px;
    height: 12px;
}

.narrative-card h1, .narrative-card h2 {
    font-size: 2.2rem;
    line-height: 1.15;
    font-family: var(--font-header);
    text-transform: uppercase;
    font-weight: 700;
}

.amber-gradient {
    background: linear-gradient(to right, var(--color-cyan), var(--color-slate));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.narrative-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-slate-muted);
}

.btn-deploy {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-blue);
    border: 1px solid var(--color-cyan);
    border-radius: 8px;
    padding: 0.8rem 1.6rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-slate);
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: all 0.3s ease;
}

.btn-deploy:hover {
    background: var(--color-cyan);
    color: var(--color-deep);
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.4);
}

.btn-deploy i {
    width: 14px;
    height: 14px;
}

/* Mission & About styles */
.mission-quote {
    border-left: 4px solid var(--color-cyan);
    background: rgba(245, 158, 11, 0.05);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
}

.mission-quote strong {
    font-size: 0.75rem;
    color: var(--color-cyan);
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.3rem;
}

.mission-quote p {
    color: var(--color-slate);
    font-style: italic;
    font-size: 0.9rem;
}

.spec-bullet-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    color: var(--color-cyan);
}

.spec-bullet-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.bullet-dot {
    width: 6px;
    height: 6px;
    background: var(--color-cyan);
    border-radius: 50%;
}

/* Products Section Inventory grids */
.inventory-pill-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.inv-pill {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid var(--color-border);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    color: var(--color-slate);
}

/* Section 5: Target Scan Game Panel */
.mini-game-wrapper {
    max-width: 900px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 5;
}

.game-header h2 {
    font-size: 2rem;
    font-family: var(--font-header);
    text-transform: uppercase;
}

#target-scan-game {
    position: relative;
    width: 100%;
    height: 480px;
    background: rgba(28, 25, 23, 0.55);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    overflow: hidden;
    cursor: crosshair;
    box-shadow: var(--shadow-hud);
}

/* Light cone cursor glow */
.light-cone-cursor {
    position: absolute;
    width: 180px;
    height: 180px;
    margin-top: -90px;
    margin-left: -90px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0) 70%);
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.3);
    transition: transform 0.05s linear;
}

/* Laser sweep grid line */
.game-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, rgba(245, 158, 11, 0) 10%, rgba(245, 158, 11, 0.8) 50%, rgba(245, 158, 11, 0) 90%);
    animation: sweep-line 4s linear infinite;
    pointer-events: none;
}

@keyframes sweep-line {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}

/* Target Points */
.target-point {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.target-ping {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(245, 158, 11, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(12, 10, 9, 0.4);
    animation: ping-ring 1.8s infinite ease-in-out;
}

@keyframes ping-ring {
    0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.target-icon {
    width: 18px;
    height: 18px;
    color: rgba(245, 158, 11, 0.7);
}

.target-details {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(217, 119, 6, 0.85);
    border: 1px solid var(--color-cyan);
    border-radius: 6px;
    padding: 0.5rem 0.9rem;
    font-size: 0.7rem;
    color: var(--color-slate);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-glow);
}

/* Active Detected Target States */
.target-point.detected .target-ping {
    background: rgba(245, 158, 11, 0.3);
    border-color: var(--color-cyan);
    animation: pulse-badge 1s infinite alternate;
}

.target-point.detected .target-icon {
    color: var(--color-slate);
}

.target-point.detected .target-details {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

.target-point.detected .target-details i {
    width: 14px;
    height: 14px;
    color: var(--color-slate);
}

/* Score Banner bottom of game */
.game-score-banner {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    background: rgba(12, 10, 9, 0.9);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    pointer-events: none;
}

.banner-alert {
    display: flex;
    align-items: center;
    color: var(--color-cyan);
}

.red-text {
    color: var(--color-red);
}

.banner-counter {
    color: var(--color-slate);
}

/* Awards items listing */
.awards-inline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.award-item {
    background: rgba(28, 25, 23, 0.4);
    border: 1px solid rgba(245, 158, 11, 0.08);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
}

.award-item strong {
    color: var(--color-slate);
    font-size: 0.8rem;
}

/* Section 7: Specification & CTA Card */
.cta-card {
    background: rgba(28, 25, 23, 0.85); /* stone-900 */
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 24px;
    padding: 3rem;
    max-width: 680px;
    width: 100%;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-hud);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 5;
}

.cta-card h2 {
    font-size: 1.8rem;
    line-height: 1.25;
    font-family: var(--font-header);
    text-transform: uppercase;
    font-weight: 700;
}

.tech-stats-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 0.25rem 0;
}

.tech-stat-pill {
    flex: 1;
    border: 1px solid rgba(245, 158, 11, 0.15);
    background: rgba(12, 10, 9, 0.4);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
}

.tech-stat-pill strong {
    display: block;
    color: var(--color-cyan);
    font-size: 1.5rem;
    line-height: 1.2;
}

.tech-stat-pill span {
    font-size: 0.6rem;
    color: var(--color-slate-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Project Radar Pins */
.project-pin {
    width: 14px;
    height: 14px;
    transform: translate(-50%, -50%);
    cursor: pointer;
    background: transparent;
    border: none;
    outline: none;
    z-index: 10;
    pointer-events: auto;
}

.project-pin.active span.relative {
    background-color: #fafaf9 !important; /* white */
    border-color: var(--color-cyan) !important; /* amber-500 */
    box-shadow: 0 0 15px var(--color-cyan);
}

.project-pin span {
    transition: all 0.3s ease;
}

/* Configurator Game Option Buttons */
.game-option-btn {
    background: rgba(28, 25, 23, 0.6);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--color-slate-muted);
    text-align: left;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
}

.game-option-btn:hover {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(28, 25, 23, 0.95);
    color: var(--color-slate);
}

.game-option-btn.selected {
    border-color: var(--color-cyan) !important;
    background: rgba(245, 158, 11, 0.08) !important;
    color: #fff !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.game-option-btn .opt-badge {
    font-size: 8px;
    color: var(--color-cyan);
    font-weight: bold;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

/* Scrollbar styling for terminal logs */
.scrollbar-thin::-webkit-scrollbar {
    width: 4px;
}
.scrollbar-thin::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
.scrollbar-thin::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.3);
    border-radius: 2px;
}
.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 158, 11, 0.5);
}

/* Interactive Quote/Enquiry form controls */
.quote-form-wrapper {
    position: relative;
}

.form-input {
    background: rgba(12, 10, 9, 0.5);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    color: var(--color-slate);
    outline: none;
    font-size: 0.75rem;
    width: 100%;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: var(--color-cyan);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.btn-submit {
    background: var(--color-blue);
    border: 1px solid var(--color-cyan);
    border-radius: 6px;
    color: var(--color-slate);
    font-family: var(--font-mono);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem;
    align-self: flex-end;
}

.btn-submit:hover {
    background: var(--color-cyan);
    color: var(--color-deep);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

/* Success Modal Overlay */
.form-overlay {
    position: absolute;
    inset: 0;
    background: rgba(28, 25, 23, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    z-index: 10;
    transition: all 0.3s ease;
    text-align: center;
}

.form-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
}

.success-icon {
    width: 48px;
    height: 48px;
    color: var(--color-cyan);
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.4));
}

.form-overlay h4 {
    font-size: 1.25rem;
}

.form-overlay p {
    font-size: 0.85rem;
}

/* Lenis scroll styles */
html.lenis {
    height: auto;
}

.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis-stopped {
    overflow: hidden;
}

.lenis-scrolling iframe {
    pointer-events: none;
}

/* Pulse badge keyframes */
@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.3); opacity: 1; }
}

/* Responsive Mobile Viewports Optimizations */
@media (max-width: 768px) {
    /* Hide floating HUD overlay telemetry widgets on mobile viewports to prevent clutter */
    .hud-overlay {
        display: none !important;
    }

    /* Safe zones for top/bottom overlay elements */
    .narrative-section {
        padding: 100px 1rem 80px 1rem !important;
    }
    
    /* Minimize margins/padding to fit smaller viewports */
    .narrative-card {
        padding: 1.5rem !important;
        border-radius: 14px !important;
        gap: 1rem !important;
    }
    
    .cta-card {
        padding: 1.5rem !important;
        border-radius: 16px !important;
        gap: 1rem !important;
    }
    
    /* Scale down headings to avoid wrapping bugs */
    .narrative-card h1, 
    .narrative-card h2, 
    .cta-card h2 {
        font-size: 1.5rem !important;
    }
    
    .narrative-card p, 
    .cta-card p {
        font-size: 0.85rem !important;
    }
    
    /* Radar scanner game dimension limits */
    #target-scan-game {
        height: 320px !important;
    }
    
    .game-score-banner {
        padding: 0.5rem !important;
        font-size: 0.65rem !important;
    }
    
    .game-score-banner .banner-alert span {
        display: none; /* Hide long instructions text on narrow screens */
    }
    
    /* Tech stats metrics column wrapping */
    .tech-stats-row {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .tech-stat-pill {
        padding: 0.5rem !important;
    }
    
    .tech-stat-pill strong {
        font-size: 1.25rem !important;
    }
}

/* --- Added Shopping Cart & Quote Popup Styles --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in {
    animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scrollbar-thin::-webkit-scrollbar {
    width: 4px;
}
.scrollbar-thin::-webkit-scrollbar-track {
    background: rgba(12, 10, 9, 0.5);
    border-radius: 2px;
}
.scrollbar-thin::-webkit-scrollbar-thumb {
    background: #d97706;
    border-radius: 2px;
}
.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: #f59e0b;
}

.cart-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(28, 25, 23, 0.95);
    border: 1px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: #fafaf9;
    z-index: 9999;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
    opacity: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.cart-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.cart-item-card {
    background: rgba(12, 10, 9, 0.6);
    border: 1px solid rgba(245, 158, 11, 0.08);
    border-radius: 10px;
    padding: 0.6rem;
    transition: border-color 0.2s, background-color 0.2s;
}
.cart-item-card:hover {
    background: rgba(12, 10, 9, 0.8);
    border-color: rgba(245, 158, 11, 0.2);
}

