@import url('variables.css');
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--white);
    font-size: 1.1rem;
    /* Increased from default */
    line-height: 1.7;
    /* Improved for readability */
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5 {
    line-height: 1.3;
    font-weight: 700;
    color: var(--white);
}

h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

h5 {
    font-size: 1.25rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

/* Layout Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    padding: var(--space-xl) 0;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--space-sm) 0;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

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

.logo img {
    height: 80px;
    /* Base height for readability */
    transition: var(--transition);
    transform: scale(1.5);
    /* Primary brand prominence */
    transform-origin: left center;
}

@media (max-width: 768px) {
    .logo img {
        height: 60px;
        /* Scaled down for mobile to prevent overlap */
    }
}

.nav-links {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)), url('../assets/images/hero.png');
    background-size: cover;
    background-position: center;
    overflow: hidden;
    background-attachment: fixed;
    /* Basic parallax fallback */
}

#sparks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    max-width: 1100px;
    /* Increased for expansive web feel */
    position: relative;
    z-index: 2;
    padding-top: 100px;
    /* Offset for fixed header */
    text-align: center;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .hero-content {
        padding-top: 60px;
        /* Smaller offset for mobile */
    }
}

.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin-bottom: var(--space-sm);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--accent);
    margin-bottom: var(--space-md);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--secondary);
    color: var(--white);
    border-radius: 4px;
    font-weight: 600;
    transition: var(--transition);
}

.btn:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

/* Common Section Components */
.section-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.section-header h2 {
    font-size: 3rem;
    /* Increased for authority */
    margin-bottom: var(--space-xs);
    color: var(--white);
}

.section-header p {
    font-size: 1.25rem;
    color: var(--accent);
    max-width: 700px;
    margin: 0 auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
}

.card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: var(--space-md);
    border-radius: 8px;
    transition: var(--transition);
    text-align: center;
    /* Centered globally for a premium look */
}

.card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--secondary);
    box-shadow: 0 10px 30px -10px rgba(49, 130, 206, 0.3);
}

.card h3 {
    font-size: 1.75rem;
    /* Increased for visibility */
    margin-bottom: var(--space-sm);
    color: var(--accent);
}

.card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-sm);
    display: block;
    margin: 0 auto var(--space-sm);
    /* Horizontal centering */
}

/* Products Section Specific */
#products {
    background: #0a0f1d;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: var(--space-sm);
}

/* Design Section */
#design .container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-lg);
}

.design-content {
    flex: 1;
}

.design-image {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.design-image img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

.design-image:hover img {
    transform: scale(1.05);
}

/* Scanner Beam Effect */
.design-image::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(transparent,
            rgba(49, 130, 206, 0.2),
            rgba(49, 130, 206, 0.4),
            rgba(49, 130, 206, 0.2),
            transparent);
    transform: rotate(-45deg);
    animation: scan 4s infinite linear;
    pointer-events: none;
    z-index: 2;
}

@keyframes scan {
    0% {
        transform: translate(-50%, -50%) rotate(-45deg);
    }

    100% {
        transform: translate(100%, 100%) rotate(-45deg);
    }
}

/* Floating UI Fragments */
.tech-fragments {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.fragment {
    position: absolute;
    background: var(--secondary);
    opacity: 0.1;
    border-radius: 1px;
    animation: float-ui 10s infinite alternate ease-in-out;
}

@keyframes float-ui {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(20px, -20px);
    }
}

/* Design List Hover */
.design-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: default;
}

.design-item:hover {
    background: rgba(49, 130, 206, 0.05);
    transform: translateX(10px);
}

.design-item i {
    color: var(--secondary);
    transition: all 0.3s ease;
}

.design-item:hover i {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 0 5px var(--secondary));
}

/* Stats / About Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.stat-item {
    text-align: center;
    padding: var(--space-md);
    background: var(--glass);
    border-radius: 8px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--secondary);
    display: inline-block;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Footer & Contact */
footer {
    padding: var(--space-xl) 0 var(--space-md);
    background: #050810;
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 equal size cells */
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-logo {
        grid-row: 2;
        /* In a 2-column layout, push to second row */
        grid-column: span 2;
        text-align: center;
        /* Centered anchor for a more balanced mobile base */
        margin-top: var(--space-lg);
    }

    .footer-logo img {
        height: 60px;
        transform-origin: center center;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        gap: var(--space-md);
    }

    .footer-links h4 {
        font-size: 1rem;
    }

    .footer-links li {
        font-size: 0.9rem;
    }
}

.footer-logo {
    text-align: left;
    /* Aligns logo and subtext consistently to the left within the rightmost column */
}

.footer-logo img {
    height: 80px;
    margin-bottom: var(--space-sm);
    transform: scale(1.15);
    /* Secondary branded anchor */
    transform-origin: left center;
}

.footer-links h4 {
    margin-bottom: var(--space-sm);
    color: var(--white);
}

.footer-links li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.contact-list i {
    width: 18px;
    height: 18px;
    color: var(--secondary);
    flex-shrink: 0;
    margin-top: 4px;
}

.copyright {
    text-align: center;
    padding-top: var(--space-md);
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Child Animation */
.reveal-stagger>* {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-stagger.active>* {
    opacity: 1;
    transform: translateY(0);
}

/* Atmospheric Accents */
.bg-glow {
    position: relative;
    overflow: hidden;
}

.bg-glow::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(49, 130, 206, 0.08) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    pointer-events: none;
    animation: floating 20s infinite alternate ease-in-out;
    z-index: 0;
}

/* AR Glass Modal Experience */
.ar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 15, 29, 0.05);
    /* 95% Transparency */
    backdrop-filter: blur(0px) saturate(180%);
    /* Total clarity when idle */
    -webkit-backdrop-filter: blur(0px) saturate(180%);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.8s ease, backdrop-filter 0.8s ease, opacity 0.5s ease;
    opacity: 0;
}

.ar-modal.active {
    display: flex;
    opacity: 1;
}

/* Scroll-Aware Refocus State */
.ar-modal.scrolling {
    background: rgba(10, 15, 29, 0.7);
    /* Darker during scroll */
    backdrop-filter: blur(30px) saturate(180%);
    /* Intense blur during scroll */
    -webkit-backdrop-filter: blur(30px) saturate(180%);
}

.ar-modal.scrolling .ar-video {
    opacity: 0.1;
    filter: blur(5px);
}

.ar-modal.scrolling .hud-layer {
    opacity: 0.3;
}

.ar-glass-pane {
    position: relative;
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16/9;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(49, 130, 206, 0.3);
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(49, 130, 206, 0.1);
    overflow: hidden;
    transform: perspective(2000px) rotateX(10deg);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.ar-modal.active .ar-glass-pane {
    transform: perspective(2000px) rotateX(0deg) scale(1.02);
}

/* Translucent Video Overlay */
.ar-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: screen;
    opacity: 0.35;
    transition: opacity 0.8s ease, filter 0.8s ease;
}

/* HUD elements */
.hud-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.8s ease;
}

/* Corner Brackets */
.hud-corner {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid var(--white);
    opacity: 0.8;
}

.hud-corner.tl {
    top: 20px;
    left: 20px;
    border-right: none;
    border-bottom: none;
}

.hud-corner.tr {
    top: 20px;
    right: 20px;
    border-left: none;
    border-bottom: none;
}

.hud-corner.bl {
    bottom: 20px;
    left: 20px;
    border-right: none;
    border-top: none;
}

.hud-corner.br {
    bottom: 20px;
    right: 20px;
    border-left: none;
    border-top: none;
}

/* Scanning Line */
.hud-scan {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--white), transparent);
    box-shadow: 0 0 15px var(--white);
    opacity: 0.3;
    top: 0;
    animation: hud-scan 4s infinite linear;
}

@keyframes hud-scan {
    0% {
        top: 0%;
    }

    100% {
        top: 100%;
    }
}

/* Telemetry Data */
.hud-telemetry {
    position: absolute;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.7rem;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.telemetry-left {
    bottom: 30px;
    left: 70px;
}

.telemetry-right {
    bottom: 30px;
    right: 70px;
    text-align: right;
}

.pulse-text {
    animation: hud-pulse 2s infinite ease-in-out;
}

@keyframes hud-pulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.8;
    }
}

/* Close Button */
.ar-close {
    position: absolute;
    top: -60px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    transition: transform 0.3s ease;
}

.ar-close:hover {
    transform: rotate(90deg) scale(1.2);
    color: var(--secondary);
}

.ar-launch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(49, 130, 206, 0.1);
    border: 1px solid var(--secondary);
    color: var(--secondary);
    padding: 1rem 2.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    line-height: 1.2;
}

.ar-launch-btn:hover {
    background: var(--secondary);
    color: #000;
    box-shadow: 0 0 20px rgba(49, 130, 206, 0.4);
}

@keyframes floating {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-100px, 100px) scale(1.1);
    }
}

.container {
    position: relative;
    z-index: 1;
}

/* Mobile Adjustments */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 992px) {
    #design .container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        padding: var(--space-md);
        border-bottom: 1px solid var(--glass-border);
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    section {
        padding: var(--space-lg) 0;
    }

    #hero {
        height: auto;
        padding: 80px 0 30px;
        /* Tighter vertical footprint */
        background-attachment: scroll;
        /* Better performance for mobile backgrounds */
    }

    .hero-content {
        padding-top: 0;
    }

    .hero-content h1 {
        font-size: 2.6rem;
        /* Restored as primary lead */
        line-height: 1.2;
    }

    .section-header h2 {
        font-size: 2rem;
        /* Clear secondary hierarchy */
    }


}