/* --- CORE VARIABLES --- */
:root {
    --bg-core: #0f0f0f;
    --bg-surface: #161616;
    --text-primary: #f0f0f0;
    --text-secondary: #858595;
    
    /* Product Identity Colors */
    --col-quant: #00f0ff;
    --col-hameleon: #bc13fe;
    --col-bardo: #ffae00;
    --col-typexex: #00ff64;
    --col-typexex-glow: rgba(0, 255, 100, 0.4);
    --col-typexex-glass: rgba(0, 255, 100, 0.03);
    
    --font-ui: 'Inter', system-ui, sans-serif;
    --font-code: 'JetBrains Mono', monospace;
    
    --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

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

::selection {
    background: #ffffff;
    color: #000000;
}

::-moz-selection {
    background: #ffffff;
    color: #000000;
}

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

a { text-decoration: none; color: inherit; transition: color 0.3s var(--ease); }
ul { list-style: none; }

/* --- GLOBAL UI ELEMENTS --- */

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 40px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: sticky;
    top: 0;
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(12px);
    z-index: 100;
}

.brand {
    font-family: var(--font-code);
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.05em;
}

.nav-menu { display: flex; gap: 32px; }
.nav-link {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
}

.nav-link:hover { color: var(--text-primary); }
.nav-link.active { color: var(--text-primary); }
/* Active dot indicator */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -26px; /* Align with navbar border */
    left: 0; width: 100%; height: 2px;
    background: currentColor;
}

/* Specific Colors for active states */
body.page-quant .nav-link.active { color: var(--col-quant); }
body.page-hameleon .nav-link.active { color: var(--col-hameleon); }
body.page-bardo .nav-link.active { color: var(--col-bardo); }
body.page-typexex .nav-link.active { color: var(--col-typexex); }

/* --- HERO SECTIONS --- */
.hero-wrapper {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10%;
    position: relative;
}

.hero-tag {
    font-family: var(--font-code);
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    display: block;
}

.hero-title {
    font-size: 5rem;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 30px;
    max-width: 900px;
}

.hero-desc {
    font-size: 1.5rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 48px;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 16px 32px;
    font-family: var(--font-code);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    transition: all 0.3s var(--ease);
}
.btn:hover {
    background: var(--text-primary);
    color: var(--bg-core);
    border-color: var(--text-primary);
}

/* --- TECHNICAL GRIDS (For sub-pages) --- */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    padding: 80px 10%;
    border-top: 1px solid #2a2a2a;
    justify-items: center;
}

.stat-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-card h3 {
    font-family: var(--font-code);
    font-size: 3.5rem;
    margin-bottom: 12px;
}
.stat-card span {
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.content-section {
    padding: 100px 10%;
    max-width: 1200px;
    margin: 0 auto;
}
.content-section h2 { font-size: 2.5rem; margin-bottom: 24px; }
.content-section p { color: var(--text-secondary); margin-bottom: 24px; font-size: 1.1rem; line-height: 1.7; }

/* --- FOOTER --- */
footer {
    padding: 60px 10%;
    border-top: 1px solid #2a2a2a;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.01);
}

.footer-links {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    transition: color 0.3s var(--ease);
}

.footer-links a:hover {
    color: var(--text-primary);
}

.glass-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s var(--ease);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--col-typexex);
    box-shadow: 0 0 30px var(--col-typexex-glow);
}

.product-card {
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-card:hover {
    transform: translateY(-5px);
}

.grid-border-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.grid-item {
    background: var(--bg-core);
    padding: 40px;
    transition: all 0.3s var(--ease);
}

.grid-item:hover {
    background: rgba(0, 255, 100, 0.02);
}

.horizontal-scroll-container {
    display: flex;
    gap: 1px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.horizontal-scroll-container .grid-item {
    flex: 1;
    min-width: 0;
    background: var(--bg-core);
    padding: 40px;
    transition: all 0.3s var(--ease);
    display: flex;
    flex-direction: column;
}

.horizontal-scroll-container .grid-item h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin: 16px 0;
}

.horizontal-scroll-container .grid-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.step-num {
    font-family: var(--font-code);
    color: var(--col-typexex);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.decor-item {
    background: linear-gradient(to bottom right, var(--bg-core), rgba(0, 255, 100, 0.02)) !important;
    border-left: 1px solid rgba(0, 255, 100, 0.1);
}

.products-row {
    display: flex;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

.products-row .glass-card {
    flex: 1;
    min-width: 0;
}

@media (max-width: 1024px) {
    .horizontal-scroll-container, .products-row {
        flex-direction: column;
        gap: 24px;
        background: none;
        border: none;
    }
    .horizontal-scroll-container .grid-item {
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 8px;
    }
}

.glitch-text { position: relative; }
.color-quant { color: var(--col-quant); }
.color-hameleon { color: var(--col-hameleon); }
.color-bardo { color: var(--col-bardo); }
.color-typexex { color: var(--col-typexex); }

/* --- BARDO SPECIFIC STYLES --- */
.bardo-card {
    background: rgba(255, 174, 0, 0.03);
    border: 1px solid rgba(255, 174, 0, 0.1);
    padding: 32px;
    border-radius: 16px;
    transition: all 0.4s var(--ease);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.bardo-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top left, rgba(255, 174, 0, 0.08), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
}

.bardo-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 174, 0, 0.06);
    border-color: rgba(255, 174, 0, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 174, 0, 0.05);
}

.bardo-card:hover::before {
    opacity: 1;
}

.bardo-card-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 174, 0, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--col-bardo);
    margin-bottom: 8px;
    transition: transform 0.4s var(--ease);
}

.bardo-card:hover .bardo-card-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--col-bardo);
    color: var(--bg-core);
}

.bardo-card h3 {
    font-size: 1.4rem;
    margin: 0;
    font-weight: 600;
}

.bardo-card p {
    font-size: 1.05rem;
    margin: 0;
    opacity: 0.8;
}

.feature-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .navbar { padding: 20px; }
    .nav-menu { gap: 16px; }
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    opacity: 0; /* Start hidden */
    animation: fadeInUp 0.8s var(--ease) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* --- News Carousel Section --- */
.news-section {
    padding: 80px 10%;
    border-top: 1px solid #2a2a2a;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.news-header h2 {
    font-size: 2.5rem;
}

.news-nav-btn {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    width: 48px;
    height: 48px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-nav-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-primary);
    color: var(--text-primary);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.news-nav-btn:active {
    transform: translateY(1px);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}

.news-nav-btn svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.5;
}

.news-carousel-wrapper {
    overflow: hidden;
    position: relative;
    padding: 20px 0;
}

.news-carousel {
    display: flex;
    gap: 24px;
    transition: transform 0.5s var(--ease);
}

.news-item {
    flex: 0 0 calc(33.333% - 16px);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s var(--ease);
}

.news-item:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}

.news-item-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-item-content h3 {
    font-size: 1.25rem;
    font-weight: 500;
}

.news-item-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

.news-item .btn {
    align-self: flex-start;
    margin-top: 8px;
    padding: 12px 24px;
    font-size: 0.9rem;
}


@media (max-width: 1024px) {
    .news-item {
        flex: 0 0 calc(50% - 12px);
    }
}

@media (max-width: 768px) {
    .news-item {
        flex: 0 0 100%;
    }
    .news-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
}

/* --- Article Navigation --- */
.article-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 40px 10%;
    border-top: 1px solid #2a2a2a;
}

.article-nav:empty {
    display: none;
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-surface);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.3s var(--ease);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-content h3 {
    margin-bottom: 16px;
    font-size: 1.5rem;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.news-nav {
    display: flex;
    gap: 12px;
}
