:root {
    --cyan: #00FFFF;
    --orange: #FF8C00;
    --bg-dark: #0a0e17;
    --text-white: #f0f4f8;
    --text-gray: #a0aec0;
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-dark);
    font-family: 'Inter', sans-serif;
    color: var(--text-white);
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 1.5px;
    margin: 0;
}

p {
    margin: 0;
}

.font-rajdhani {
    font-family: 'Rajdhani', sans-serif;
}

.mono-text {
    font-family: 'Roboto Mono', monospace;
}

/* Utilities */
.text-cyan {
    color: var(--cyan);
}

.text-orange {
    color: var(--orange);
}

.text-white {
    color: var(--text-white);
}

.text-gray {
    color: var(--text-gray);
}

.glow-text {
    text-shadow: 0 0 10px currentColor;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mt-5 {
    margin-top: 3rem;
}

.p-5 {
    padding: 2rem;
}

.pt-4 {
    padding-top: 1.5rem;
}

.px-5 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.pb-10 {
    padding-bottom: 5rem;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.justify-around {
    justify-content: space-around;
}

.items-center {
    align-items: center;
}

.flex-center-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gap-3 {
    gap: 1rem;
}

.gap-4 {
    gap: 1.5rem;
}

.text-xs {
    font-size: 0.75rem;
}

.fs-lg {
    font-size: 1.125rem;
}

.text-3xl {
    font-size: 2rem;
}

.text-4xl {
    font-size: 2.5rem;
}

.tracking-widest {
    letter-spacing: 2px;
}

.opacity-80 {
    opacity: 0.8;
}

.max-w-500 {
    max-width: 500px;
}

.mw-800 {
    max-width: 800px;
}

.w-full {
    width: 100%;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(0, 255, 255, 0.1);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-family: 'Roboto Mono', monospace;
    color: var(--text-gray);
    font-size: 1.2rem;
    letter-spacing: 2px;
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
    background: rgba(10, 14, 23, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.main-header .logo {
    font-family: 'Rajdhani', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: 4px;
}

.nav-links a {
    color: var(--text-gray);
    text-decoration: none;
    margin-left: 2rem;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--cyan);
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
}

/* Canvas Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    /* Removed object-fit since canvas handles its own aspect ratio rendering */
}

/* Scrolling */
#scroll-container {
    height: 800vh;
    /* Adjust based on timeline length */
    width: 100%;
}

/* Fixed UI Layer */
#fixed-ui {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 10;
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    /* Hidden by default */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 70px 5% 0 5%;
    box-sizing: border-box;
}

/* Glassmorphism Panels */
.glass-panel {
    background: rgba(10, 15, 20, 0.45);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
}

/* Accent Modifiers */
.accent-cyan {
    border-color: rgba(0, 255, 255, 0.25);
    box-shadow: inset 0 0 20px rgba(0, 255, 255, 0.05), 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

.accent-orange {
    border-color: rgba(255, 140, 0, 0.25);
    box-shadow: inset 0 0 20px rgba(255, 140, 0, 0.05), 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

/* Grid Layouts */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
}

/* Specific UI Elements */
.main-title {
    font-size: 4rem;
    line-height: 1.2;
}

.ar-tag {
    position: absolute;
    top: 25%;
    left: 15%;
    transform: rotate(-5deg);
    padding: 8px 16px;
    font-size: 0.9rem;
    font-family: 'Roboto Mono', monospace;
    display: flex;
    align-items: center;
    color: var(--orange);
    border-radius: 4px;
}

.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--orange);
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 10px var(--orange);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 140, 0, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 140, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 140, 0, 0);
    }
}

.holo-dashboard {
    position: relative;
    padding-left: 25px;
}

.holo-dashboard::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    height: 80%;
    width: 4px;
    background: var(--cyan);
    box-shadow: 0 0 12px var(--cyan);
    border-radius: 0 4px 4px 0;
}

.floating-panel {
    min-width: 600px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Chart Mock */
.chart-mock {
    height: 120px;
    background: linear-gradient(180deg, rgba(0, 255, 255, 0.05) 0%, rgba(0, 255, 255, 0.15) 100%);
    margin-top: 15px;
    border-radius: 6px;
    position: relative;
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
    overflow: hidden;
}

.chart-mock .bar {
    position: absolute;
    bottom: 0;
    width: 6%;
    background: linear-gradient(0deg, var(--cyan) 0%, rgba(0, 255, 255, 0.4) 100%);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    border-radius: 2px 2px 0 0;
    transition: height 1s ease-out;
}

/* Form Styles */
.form-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 6px;
    padding: 12px 16px;
    color: var(--text-white);
    font-family: 'Roboto Mono', monospace;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.6);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.btn-cyan {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--cyan);
    color: var(--cyan);
    padding: 14px 20px;
    border-radius: 6px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-cyan:hover {
    background: var(--cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

/* Products UI */
.h-75vh {
    height: 75vh;
}

.max-w-1200 {
    max-width: 1200px;
}

.p-0 {
    padding: 0 !important;
}

.text-3xl {
    font-size: 2.2rem;
}

.fs-lg {
    font-size: 1.15rem;
    line-height: 1.4;
}

.products-ui {
    display: flex;
    overflow: hidden;
    align-items: stretch;
    background: rgba(16, 24, 32, 0.5);
    border-radius: 12px;
}

.products-sidebar {
    width: 320px;
    min-width: 320px;
    background: rgba(0, 0, 0, 0.4);
    border-right: 1px solid rgba(0, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.prod-tab {
    background: transparent;
    border: none;
    border-left: 4px solid transparent;
    color: var(--text-gray);
    padding: 22px 25px;
    text-align: left;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.prod-tab:hover {
    background: rgba(0, 255, 255, 0.05);
    color: var(--text-white);
}

.prod-tab.active {
    color: var(--cyan);
    border-left-color: var(--cyan);
    background: rgba(0, 255, 255, 0.1);
    box-shadow: inset 20px 0 30px -20px rgba(0, 255, 255, 0.4);
}

.products-content {
    flex: 1;
    padding: 3rem 4rem;
    overflow-y: auto;
    position: relative;
    background: rgba(10, 14, 23, 0.6);
    text-align: left;
}

.prod-pane {
    display: none;
    animation: fadeIn 0.5s ease;
}

.prod-pane.active {
    display: block;
}

.prod-pane ul {
    padding-left: 20px;
}

.prod-pane li {
    margin-bottom: 12px;
    line-height: 1.5;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Local scrollbar overrides */
.products-sidebar::-webkit-scrollbar,
.products-content::-webkit-scrollbar,
.case-story::-webkit-scrollbar {
    width: 4px;
}

.products-sidebar::-webkit-scrollbar-thumb,
.products-content::-webkit-scrollbar-thumb,
.case-story::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border-radius: 2px;
}

/* Case Charts (HUD Concept) */
.case-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 80px;
    margin-top: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.case-bar {
    width: 20%;
    background: rgba(0, 255, 255, 0.3);
    border-radius: 4px 4px 0 0;
    transition: height 1s ease;
}

/* Footer */
.main-footer {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        height: auto;
        padding: 10px 5%;
    }

    .main-header .logo {
        margin-bottom: 5px;
    }

    .nav-links {
        display: flex;
        overflow-x: auto;
        width: 100%;
        padding-bottom: 5px;
    }

    .nav-links a {
        margin-left: 0;
        margin-right: 1.5rem;
        white-space: nowrap;
    }

    #home {
        padding-left: 5% !important;
        padding-top: 20vh !important;
    }

    .main-title {
        font-size: 2.2rem !important;
    }

    .main-title .text-cyan {
        font-size: 1.3rem !important;
    }

    .screen {
        padding-top: 120px;
        /* Accounts for taller header */
        justify-content: flex-start !important;
        overflow-y: auto;
        padding-bottom: 10vh;
    }

    /* Services Grid */
    #services {
        display: block !important;
    }

    #services>div.w-full {
        margin-top: 2rem;
    }

    .grid-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Products UI */
    .products-ui {
        flex-direction: column;
        height: 80vh !important;
    }

    .products-sidebar {
        width: 100%;
        min-width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        border-right: none;
        border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    }

    .prod-tab {
        border-left: none;
        border-bottom: 4px solid transparent;
        padding: 12px 15px;
        font-size: 1.1rem;
        flex: 1 1 calc(33.333% - 10px);
        text-align: center;
        white-space: nowrap;
    }

    .prod-tab.active {
        box-shadow: inset 0 -20px 30px -20px rgba(0, 255, 255, 0.4);
        border-bottom-color: var(--cyan);
        border-left-color: transparent;
    }

    .products-content {
        padding: 1.5rem 1rem;
    }

    .prod-pane>div {
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    .prod-pane>div>div:last-child {
        flex: 1 1 auto !important;
    }

    /* Cases */
    #cases {
        flex-direction: column !important;
        padding: 15vh 1rem 5vh 1rem !important;
        overflow-y: auto;
        gap: 1rem !important;
        display: flex !important;
    }

    #cases .floating-panel {
        width: auto !important;
        min-width: 0 !important;
        align-self: stretch !important;
        flex: 0 0 auto !important;
        box-sizing: border-box !important;
    }

    .case-story {
        min-height: auto !important;
    }

    /* About & Stats */
    #about .stats-row {
        flex-direction: column;
        gap: 2rem;
    }

    .text-4xl {
        font-size: 2rem;
    }

    /* Form Container */
    #contacts {
        overflow-y: auto;
    }

    .form-container {
        margin-bottom: 25vh;
    }
}

/* Case Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    pointer-events: none;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    padding: 3.5rem;
    display: flex;
    flex-direction: column;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), inset 0 0 30px rgba(0, 255, 255, 0.05);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s;
}

.modal-close-btn:hover {
    color: var(--cyan);
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
    transform: scale(1.1);
}

.modal-body-scroll {
    overflow-y: auto;
    padding-right: 20px;
}

.modal-body-scroll::-webkit-scrollbar {
    width: 6px;
}

.modal-body-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.4);
    border-radius: 3px;
}

/* Update Mobile Wrapper for Cases */
@media (max-width: 768px) {
    .cases-wrapper {
        flex-direction: column !important;
        align-items: center !important;
    }

    .modal-content {
        padding: 2rem;
    }
}