/* XTEND-inspired Tactical Futuristic CSS for ToranixPower */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=Space+Grotesk:wght@400;500;700&display=swap');

:root {
    --bg-dark: #1a1a1a;
    --accent-gold: #0050d5; /* Dark Blue from Logo */
    --accent-cyan: #1bb5f5; /* Light Blue from Logo */
    --text-main: #ffffff;
    --text-muted: #b3b3b3;
    --grid-line: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(26, 26, 26, 0.8);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, .tactical-font {
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Background & Grid Lines */
.grid-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: 
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 100px 100px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.5;
}

/* Navbar */
header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--grid-line);
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
}

nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

nav a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 30px;
    font-size: 14px;
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: 1px;
    transition: color 0.3s;
}
nav a:hover {
    color: var(--accent-gold);
}

/* Buttons */
.btn {
    background: transparent;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 12px 24px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}
.btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: var(--accent-cyan);
    transition: left 0.3s;
    z-index: -1;
}
.btn:hover {
    color: var(--bg-dark);
}
.btn:hover::before {
    left: 0;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    color: var(--text-main);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 140px 40px 40px 40px;
    background-color: #ffffff;
}

.hero-content {
    flex: 1;
    z-index: 2;
    max-width: 55%;
}

.hero-visual {
    flex: 1;
    position: relative;
    height: 60vh;
    z-index: 1;
}

.hero-carousel {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}
.carousel-slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    animation: fadeCycle 15s infinite;
}
.slide-1 { background-image: url('../media/engine-only.png'); animation-delay: 0s; }
.slide-2 { background-image: url('../media/base-module.png'); animation-delay: 5s; }
.slide-3 { background-image: url('../media/Stack.png'); animation-delay: 10s; }

@keyframes fadeCycle {
    0%, 25% { opacity: 1; }
    33.33%, 91.66% { opacity: 0; }
    100% { opacity: 1; }
}

.hero-content h1 {
    font-size: 64px;
    margin-bottom: 20px;
    line-height: 1.1;
    color: var(--accent-gold);
}
.hero-subtitle {
    font-size: 1.1em;
    color: var(--accent-cyan);
    max-width: 90%;
    line-height: 1.6;
}

/* Telemetry Stats */
.telemetry {
    position: absolute;
    bottom: 40px;
    left: 10%;
    display: flex;
    gap: 40px;
}
.stat-box {
    border-left: 2px solid var(--accent-gold);
    padding-left: 15px;
}
.stat-box h4 {
    color: var(--accent-gold);
    font-size: 12px;
    margin-bottom: 5px;
}
.stat-box p {
    font-size: 24px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}

/* Sections */
.section {
    padding: 100px 10%;
    position: relative;
}

.section-title {
    font-size: 32px;
    margin-bottom: 60px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.section-title::before {
    content: '';
    width: 40px;
    height: 2px;
    background: var(--accent-gold);
}

/* Light Section Theme */
.light-section {
    background-color: #ffffff;
    color: var(--bg-dark);
}
.light-section .section-title,
.light-section h2,
.light-section h3,
.light-section p,
.light-section td,
.light-section th {
    color: var(--bg-dark);
}
.light-section .feature-card {
    background: #f9f9f9;
    border-color: #e0e0e0;
}
.light-section .feature-card:hover {
    background: #f1f1f1;
    border-color: var(--accent-gold);
}
.light-section .app-icon {
    background: var(--accent-gold);
}
.light-section .app-icon svg {
    stroke: #ffffff;
}

/* ------------------- TECH SECTION SCROLL ANIMATION ------------------- */
.tech-sticky-bg {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    z-index: 0;
    background: var(--bg-dark);
}
.tech-sticky-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 30% center; /* Push image slightly left so it isn't completely covered by right panel */
}
.tech-content-overlay {
    position: relative;
    z-index: 1;
    width: 50%;
    margin-left: 50%;
}
.tech-spacer {
    height: 100vh; /* Allow viewing the full image before data scrolls up */
}
.tech-scroll-data {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-height: 100vh;
    padding: 60px 40px;
    border-left: 1px solid var(--grid-line);
    box-shadow: -20px 0 50px rgba(0,0,0,0.5);
}

/* Interactive Engine Vis */
.engine-container {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}
.engine-img {
    flex: 1;
    position: sticky;
    top: 120px;
    display: flex;
    justify-content: center;
}
.engine-img img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(28, 158, 185, 0.1));
}
.engine-details {
    flex: 1;
}

/* Core Table */
.core-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.02);
}
.core-table th, .core-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--grid-line);
}
.core-table th {
    background: #1c5273;
    color: var(--text-main);
    font-weight: 700;
    font-size: 16px;
    border-bottom: none;
}
.core-table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.04);
}
.core-table td:first-child {
    font-weight: 600;
    color: var(--text-main);
    width: 35%;
}

.hotspot {
    position: absolute;
    width: 20px; height: 20px;
    background: var(--accent-gold);
    border-radius: 50%;
    cursor: pointer;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(234, 179, 52, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(234, 179, 52, 0); }
    100% { box-shadow: 0 0 0 0 rgba(234, 179, 52, 0); }
}

.hotspot:nth-child(1) { top: 30%; left: 40%; }
.hotspot:nth-child(2) { top: 60%; left: 60%; }

/* Grid Cards */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}
.applications-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.app-icon {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px; height: 50px;
    background: rgba(28, 158, 185, 0.1);
    border-radius: 12px;
}
.feature-card {
    border: 1px solid var(--grid-line);
    background: rgba(255,255,255,0.02);
    padding: 40px 30px;
    position: relative;
    transition: all 0.3s;
}
.feature-card:hover {
    border-color: var(--accent-gold);
    background: rgba(234,179,52,0.05);
    transform: translateY(-5px);
}
.feature-card::before, .feature-card::after {
    content: '';
    position: absolute;
    width: 10px; height: 10px;
    border: 1px solid var(--accent-gold);
    opacity: 0;
    transition: opacity 0.3s;
}
.feature-card::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.feature-card::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.feature-card:hover::before, .feature-card:hover::after { opacity: 1; }

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--accent-gold);
}

/* Fuel Switcher */
.fuel-switcher {
    margin-top: 30px;
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border: 1px solid var(--grid-line);
}
.slider-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
}
input[type=range] {
    flex: 1;
    accent-color: var(--accent-gold);
}

/* Video Section */
.internal-video-sec {
    position: relative;
    width: 100%;
    margin-top: 50px;
}
.internal-video-sec video {
    width: 100%;
    border: 1px solid var(--grid-line);
}

/* Modal Form */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 999;
    justify-content: center;
    align-items: center;
}
.modal.active { display: flex; }
.modal-content {
    background: var(--bg-dark);
    padding: 50px;
    border: 1px solid var(--accent-gold);
    width: 400px;
    position: relative;
}
.close-modal {
    position: absolute;
    top: 20px; right: 20px;
    color: var(--accent-gold);
    cursor: pointer;
    font-size: 20px;
}
.modal input, .modal textarea {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--grid-line);
    color: white;
    padding: 10px;
    margin-bottom: 15px;
    font-family: 'Inter', sans-serif;
}

/* Footer */
.site-footer {
    background-color: #111111;
    border-top: 1px solid var(--grid-line);
    padding: 80px 10% 20px 10%;
    font-family: 'Inter', sans-serif;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-column p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.8;
}

.footer-column h4 {
    color: var(--text-main);
    font-size: 16px;
    margin-bottom: 20px;
    letter-spacing: 1.5px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 14px;
}

.footer-column ul li strong {
    color: var(--accent-cyan);
    margin-right: 8px;
}

.footer-column ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: var(--accent-cyan);
}

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

.legal-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s;
}

.legal-links a:hover {
    color: var(--accent-cyan);
}

/* Responsive */
@media (max-width: 768px) {
    /* Header & Nav */
    header {
        padding: 10px 15px;
        transition: transform 0.3s ease;
    }
    header.header-hidden {
        transform: translateY(-100%);
    }
    .mobile-menu-btn {
        display: block;
    }
    header .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        max-width: 45%;
        display: flex;
        justify-content: center;
    }
    header .logo img {
        height: auto !important;
        max-height: 35px !important;
        width: 100%;
        object-fit: contain;
    }
    header .btn {
        font-size: 10px;
        padding: 6px 12px;
        white-space: nowrap;
    }
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 20px 0;
        border-bottom: 1px solid var(--grid-line);
        z-index: 99;
    }
    nav.mobile-active {
        display: flex;
    }
    nav a {
        margin: 15px 0;
        text-align: center;
    }

    /* Hero */
    .hero {
        flex-direction: column-reverse;
        padding: 100px 20px 40px 20px;
        text-align: center;
        min-height: auto;
    }
    .hero-content {
        max-width: 100%;
        margin-top: 20px;
    }
    .hero-content h1 {
        font-size: 40px;
    }
    .hero-subtitle {
        margin: 0 auto;
    }
    .hero-visual {
        width: 100%;
        height: 40vh;
        min-height: 250px;
    }

    /* Tech Section */
    .engine-container {
        flex-direction: column;
        gap: 30px;
        padding: 0 20px;
    }
    .sticky-col {
        position: relative;
        top: 0;
        height: auto;
        min-height: 300px;
    }
    .scroll-col {
        margin-top: 0;
    }
    .core-table {
        display: block;
        overflow-x: auto;
    }
    
    .tech-params-banner {
        padding: 60px 20px 40px 20px !important;
    }

    .section {
        padding: 60px 20px;
    }

    /* Cards */
    .applications-grid, .features-grid {
        grid-template-columns: 1fr;
    }

    /* Telemetry */
    .telemetry {
        flex-direction: column;
        gap: 15px;
        bottom: 20px;
        position: relative;
        left: 0;
        margin-top: 30px;
    }

    /* Footer */
    .footer-container {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}
