/* --- VARIABLES & RESET --- */
:root {
    --primary-bg: #1A1A2E;
    /* Midnight Indigo */
    --secondary-bg: #161625;
    /* Slightly darker */
    --accent: #E94560;
    /* Quantum Magenta */
    --accent-hover: #c0354c;
    --text-main: #F0F0F0;
    /* Helios White */
    --text-muted: #7F7F9E;
    /* Slate Grey */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --demo-red: #D32F2F;
    --demo-border-width: 8px;
    --transition-speed: 0.3s;
    --hero-bg: url('images/Background_Studio-2560x1400.jpg');
    --transfer-bg: #13131f;
    --footer-bg: #0d0d17;
}

:root.light-mode {
    --primary-bg: #F8F9FA;
    --secondary-bg: #FFFFFF;
    --text-main: #1A1A2E;
    --text-muted: #4A4A6A;
    --hero-bg: url('images/Background_light 2560x1440.jpg');
    --transfer-bg: var(--primary-bg);
    --footer-bg: #E9ECEF;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--primary-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    padding: var(--demo-border-width);
    /* Push content inside the border */
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- UTILITIES --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.text-center {
    text-align: center;
}

.text-accent {
    color: var(--accent);
}

.text-muted {
    color: var(--text-muted);
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
    border: 2px solid var(--accent);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent);
}

.btn-outline {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background-color: white;
    color: var(--primary-bg);
}

/* --- DEMO ELEMENTS --- */
.demo-frame {
    position: fixed;
    inset: 0;
    border: var(--demo-border-width) solid var(--demo-red);
    pointer-events: none;
    z-index: 11000;
    /* Above modal overlays */
}

.demo-banner {
    background-color: var(--demo-red);
    color: white;
    text-align: center;
    padding: 12px 20px;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 1px;
    position: fixed;
    top: var(--demo-border-width);
    left: var(--demo-border-width);
    right: var(--demo-border-width);
    z-index: 11001;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- FLOATING WIDGET --- */
.floating-widget {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9997;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.widget-icon {
    background-color: var(--accent);
    color: white;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border-radius: 4px 0 0 4px;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
}

.widget-label {
    background-color: var(--accent);
    color: white;
    padding: 0 20px;
    height: 50px;
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    border-radius: 4px 0 0 4px;
    margin-right: -50px;
    /* Hidden initially */
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.3);
}

.floating-widget:hover .widget-label {
    margin-right: 0;
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {

    /* On mobile, maybe show slightly more or different behavior? 
       For now, let's keep it simple: click to open modal handles it. */
    .widget-label {
        display: none;
        /* Keep it compact for mobile */
    }
}

/* --- MODAL SYSTEM --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.modal-content {
    position: relative;
    background: var(--secondary-bg);
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 95vw;
    max-height: 95vh;
}

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

.modal-content.left-align {
    margin-left: calc(var(--demo-border-width) + 20px);
    margin-right: auto;
}

.modal-content.right-align {
    margin-right: calc(var(--demo-border-width) + 20px);
    margin-left: auto;
}

.modal-content.center-align {
    margin: auto;
}

.modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 35px;
    height: 35px;
    background: var(--accent);
    border: none;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1;
    transition: transform 0.2s ease;
}

.modal-close:hover {
    transform: scale(1.1);
}

.modal-body {
    overflow: hidden;
    border-radius: 8px;
    background: white;
    /* Better for iframe contrast usually */
}

.modal-body iframe {
    display: block;
}

:root.light-mode .modal-body {
    background: #f0f0f0;
}

/* --- HEADER & NAV --- */
header {
    position: fixed;
    top: calc(var(--demo-border-width) + 48px);
    /* Border + Banner Height */
    left: var(--demo-border-width);
    right: var(--demo-border-width);
    z-index: 1000;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color var(--transition-speed) ease;
}

:root.light-mode header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-links {
    display: flex;
    align-items: center;
    /* Center items vertically */
    gap: 40px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 150px;
    width: 150px;
    object-fit: contain;
    border-radius: 4px;
}

.logo span {
    color: var(--accent);
}


.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
    opacity: 0.8;
}

.nav-links a:hover {
    color: var(--accent);
    opacity: 1;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-main);
    transition: color 0.3s ease;
}

.mobile-menu-btn:hover {
    color: var(--accent);
}

/* --- MOBILE DRAWER styles --- */
.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(5px);
    z-index: 12000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    background: var(--primary-bg);
    z-index: 12001;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

:root.light-mode .mobile-drawer {
    background: white;
    border-left: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-drawer.active {
    transform: translateX(0);
}

.drawer-header {
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

:root.light-mode .drawer-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.drawer-close {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 2rem;
    cursor: pointer;
}

.drawer-body {
    flex: 1;
    padding: 40px 30px;
    overflow-y: auto;
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-links li {
    margin-bottom: 25px;
}

.mobile-nav-links a {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-nav-links a:hover {
    color: var(--accent);
}

.drawer-footer {
    padding: 30px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

:root.light-mode .drawer-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(0, 0, 0, 0.02);
}

/* --- TOGGLES --- */
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 20px;
}

.toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.lang-switcher {
    display: flex;
    gap: 5px;
    font-weight: 600;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-btn {
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.lang-btn.active {
    opacity: 1;
    color: var(--accent);
}

:root.light-mode .toggle-btn,
:root.light-mode .lang-switcher {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    margin-top: calc(var(--demo-border-width) + 48px);
    /* Top space for banner */
    background-image: linear-gradient(rgba(26, 26, 46, 0.7), rgba(26, 26, 46, 0.9)), var(--hero-bg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 20px;
    letter-spacing: -2px;
    background: linear-gradient(to right, #fff, #b0b0b0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: #d1d1d1;
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* --- ABOUT / OVERVIEW --- */
.about {
    background-color: var(--primary-bg);
    position: relative;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-img img {
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.section-tag {
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    margin-bottom: 10px;
    display: block;
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 25px;
}

/* --- TRANSFER SECTION --- */
.transfer {
    background-color: var(--transfer-bg);
    /* A darker, distinct background */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.transfer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.transfer-info h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.transfer-widget-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.transfer-widget-container iframe {
    border: none;
    max-width: 100%;
}

.transfer-features {
    margin-top: 30px;
}

.transfer-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: var(--text-main);
    font-weight: 500;
    font-size: 1.05rem;
}

.transfer-features li i {
    color: var(--accent);
    font-size: 1.4rem;
}

/* --- SERVICES --- */
.services {
    background-color: var(--secondary-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.service-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 8px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
}

.service-icon {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- PIPELINE/TECH --- */
.pipeline {
    background-image: linear-gradient(rgba(26, 26, 46, 0.9), rgba(26, 26, 46, 0.95)), url('SpectraVerse.jpg');
    background-size: cover;
    background-position: center;
    text-align: center;
    color: white !important;
    /* Force white text as section remains dark */
}

.pipeline h2 {
    margin-bottom: 40px;
}

.stats-grid {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.stat-item h3 {
    font-size: 3.5rem;
    color: var(--accent);
    margin-bottom: 10px;
}

.stat-item p {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
}

/* --- TEAM/LEADERSHIP --- */
.team {
    background-color: var(--primary-bg);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.team-card {
    background: var(--secondary-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.team-img-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #2a2a3d;
    overflow: hidden;
}

.team-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.5s ease;
}

.team-card:hover .team-img-wrapper img {
    transform: scale(1.05);
}

.team-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.team-info h4 {
    font-size: 1.25rem;
    margin-bottom: 5px;
    color: var(--text-main);
}

.team-info span {
    color: var(--accent);
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* --- COMPREHENSIVE FOOTER --- */
footer {
    background-color: var(--footer-bg);
    padding-top: 80px;
    padding-bottom: calc(40px + var(--demo-border-width));
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color var(--transition-speed) ease;
}

:root.light-mode footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    grid-column: 1;
    grid-row: 1;
}

.footer-col {
    grid-row: 1;
}

.footer-description {
    grid-column: 1 / span 2;
    grid-row: 2;
}

.footer-description p {
    color: var(--text-muted);
    margin-top: 20px;
}

.footer-col h5 {
    color: var(--text-main);
    margin-bottom: 25px;
    font-size: 1rem;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--text-muted);
}

.footer-col ul li a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.footer-partner {
    grid-column: 3 / span 3;
    grid-row: 2;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 20px;
}

.footer-partner img {
    width: 220px;
    height: auto;
    transition: transform 0.3s ease;
}

.footer-partner img:hover {
    transform: scale(1.05);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    font-size: 1.2rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3.5rem;
    }

    .footer-top {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }

    .footer-logo {
        grid-column: 1 / -1;
    }

    .footer-col {
        grid-row: auto;
    }

    .footer-description {
        grid-column: 1 / span 3;
    }

    .footer-partner {
        grid-column: 1 / span 3;
        grid-row: auto;
        margin-top: 20px;
    }

    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .demo-banner {
        font-size: 8px;
        padding: 8px 15px;
        height: 32px;
    }

    header {
        top: calc(var(--demo-border-width) + 32px);
    }

    .hero {
        margin-top: calc(var(--demo-border-width) + 32px);
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .transfer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .transfer-features {
        justify-content: center;
        display: inline-block;
        text-align: left;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-logo,
    .footer-col,
    .footer-description,
    .footer-partner {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .footer-partner {
        justify-content: center;
        margin-top: 20px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}