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

:root {
    /* Premium Dark Palette */
    --bg-deep: #030304;
    --bg-surface: #0a0b10;
    --primary: #00f2ff;
    /* Neon Cyan */
    --secondary: #bd00ff;
    /* Neon Purple */
    --accent: #ffae00;
    /* Industrial Gold */

    --text-main: #ffffff;
    --text-muted: #8892b0;

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 15px;

    --gradient-glow: linear-gradient(135deg, rgba(0, 242, 255, 0.15) 0%, rgba(189, 0, 255, 0.15) 100%);
}

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

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

h1,
h2,
h3,
h4,
button {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.04em;
    font-weight: 500;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.gradient-text {
    background: linear-gradient(to right, #fff, #a5a5a5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.premium-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.premium-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(3, 3, 4, 0.8);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
}

.dot {
    color: var(--primary);
}

.burger {
    display: none;
}

@media (max-width: 900px) {
    .burger {
        display: block;
    }
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

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

.nav-links .btn-primary {
    background: var(--primary);
    color: #000;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
}

.nav-links .btn-primary:hover {
    background: #fff;
    box-shadow: 0 0 15px var(--primary);
}

/* Hero */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 60px;
    overflow: hidden;
}

/* Placeholder for Canvas */
#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #1a1b26 0%, #030304 70%);
    z-index: -1;
}

/* Add a subtle grid overlay to the background */
#canvas-container::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle, #000 0%, transparent 80%);
}


.hero-title {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
}

.btn-glow {
    background: var(--text-main);
    color: #000;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
}

.btn-glow:hover {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-outline:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Sections */
.section-padding {
    padding: 8rem 0;
}

.section-dark {
    padding: 8rem 0;
    background: #050608;
}

.section-header {
    margin-bottom: 4rem;
    max-width: 700px;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

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

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.icon-box {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Bento Grid */
.grid-bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 300px);
    gap: 1.5rem;
}

.bento-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-size: cover;
    background-position: center;
}

/* Specific Card Backgrounds */
.bento-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 10%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 1;
    transition: opacity 0.3s;
}

.bento-card:hover::after {
    background: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 242, 255, 0.2) 100%);
    opacity: 0.8;
}

.bento-card.large {
    grid-column: span 2;
    grid-row: span 2;
    background-image: url('../assets/industry-train.png');
}

.bento-card.medium:nth-child(2) {
    grid-column: span 1;
    grid-row: span 1;
    background-image: url('../assets/industry-marine.png');
}

.bento-card.medium:nth-child(3) {
    grid-column: span 1;
    grid-row: span 1;
    background-image: url('../assets/industry-factory.png');
}

.bento-card.small:nth-child(4) {
    grid-column: span 1;
    grid-row: span 1;
    background-image: url('../assets/industry-bus.png');
}

.bento-card.small:nth-child(5) {
    grid-column: span 1;
    grid-row: span 1;
    background-image: url('../assets/hero-bg.png');
    /* Fallback for now */
}

.bento-card .card-content {
    position: relative;
    z-index: 2;
}

.bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color);
}

.bento-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: scale(1.02);
}

.bento-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

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

.bento-card.large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-card.medium {
    grid-column: span 1;
    grid-row: span 1;
}

.bento-card.small {
    grid-column: span 1;
    grid-row: span 1;
}

/* Visual Section */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.text-cyan {
    color: var(--primary);
}

.text-purple {
    color: var(--secondary);
}

.tech-list {
    list-style: none;
    margin-top: 2rem;
}

.tech-list li {
    margin-bottom: 2rem;
    border-left: 2px solid var(--glass-border);
    padding-left: 1.5rem;
}

.tech-list strong {
    color: #fff;
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

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

/* Animation Utils */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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

/* Tech Visual Placeholder */
/* Tech Visual Placeholder */
.tech-visual-container {
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tech-image {
    width: 100%;
    max-width: 500px;
    border-radius: 20px;
    box-shadow: 0 0 50px rgba(0, 242, 255, 0.1);
    border: 1px solid var(--glass-border);
    position: relative;
    z-index: 2;
}

.glow-effect {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.2) 0%, transparent 70%);
    z-index: 1;
    filter: blur(40px);
}

/* Contact / Footer */
.cta-box {
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    padding: 4rem;
    border-radius: 30px;
    margin-bottom: 4rem;
    border: 1px solid var(--glass-border);
}

.cta-box h2 {
    margin-bottom: 2rem;
}

.contact-form {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.contact-form input {
    padding: 1rem 1.5rem;
    border-radius: 50px;
    border: none;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    width: 300px;
}

.main-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
}

/* =========================================
   SUB-PAGES & PREMIUM POLISH
   ========================================= */

/* Sub-page Header */
.page-header {
    background: url('../assets/hero-bg.png') no-repeat bottom center/cover;
    padding: 160px 0 100px 0;
    text-align: center;
    position: relative;
    margin-bottom: 4rem;
    border-bottom: 1px solid var(--glass-border);
}

.page-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-deep) 0%, rgba(3, 3, 4, 0.7) 100%);
}

.page-header .container {
    position: relative;
    z-index: 2;
}

/* Reverse Layout utility */
.reverse {
    direction: rtl;
}

.reverse>* {
    direction: ltr;
}

/* Code Visual Box */
.code-visual {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    background: rgba(10, 11, 16, 0.95);
    border: 1px solid var(--primary);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.05);
    padding: 2rem;
    border-radius: 12px;
    position: relative;
}

.code-visual::before {
    content: '● ● ●';
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 2px;
}

/* Premium Form Styling */
.premium-form {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 24px;
    backdrop-filter: blur(20px);
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.2rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.15);
    background: rgba(0, 242, 255, 0.02);
}

.active {
    color: var(--primary) !important;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.4);
}

/* Trust Indicators / Stats Bar */
.stats-bar {
    display: flex;
    justify-content: space-around;
    padding: 2rem 0;
    border-bottom: 1px solid var(--glass-border);
    margin-top: -3rem;
    /* Overlap with header slightly or just pull up */
    position: relative;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 20px;
}

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

.stat-item h3 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 0.2rem;
}

.stat-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */

/* =========================================
   MOBILE RESPONSIVENESS v2 (Strict Control)
   ========================================= */

@media (max-width: 900px) {

    /* --- Global Resets & Typography --- */
    :root {
        --mobile-padding: 1.5rem;
    }

    .container {
        padding: 0 var(--mobile-padding);
        width: 100%;
        overflow: hidden;
        /* Prevent horizontal spill */
    }

    body {
        font-size: 16px;
        /* Base size for readability */
    }

    h1,
    .hero-title {
        font-size: 2.8rem !important;
        /* Force smaller size */
        line-height: 1.2 !important;
        word-wrap: break-word;
    }

    h2,
    .section-header h2 {
        font-size: 2.2rem !important;
    }

    h3 {
        font-size: 1.5rem !important;
    }

    /* --- Navbar & Mobile Menu --- */
    .navbar {
        padding: 1rem 0;
        background: rgba(3, 3, 4, 0.95);
        /* Always dark bg on mobile */
        backdrop-filter: blur(20px);
    }

    .nav-content {
        flex-direction: row;
        /* KEEP FLEX ROW so logo and burger are side-by-side */
        flex-wrap: wrap;
        justify-content: space-between;
        /* Push them apart */
        align-items: center;
        padding-top: 5px;
        /* Alignment fix */
    }

    .logo {
        font-size: 1.5rem;
        z-index: 1001;
        /* Above mobile menu */
    }

    /* BURGER MENU ICON */
    .burger {
        display: block;
        /* Show on mobile */
        cursor: pointer;
        z-index: 1001;
        /* Above mobile menu */
    }

    .burger div {
        width: 25px;
        height: 2px;
        background-color: #fff;
        margin: 5px;
        transition: all 0.3s ease;
    }

    /* THE MENU ITSELF (HIDDEN BY DEFAULT) */
    .nav-links {
        position: fixed;
        right: 0px;
        top: 0px;
        /* Cover full screen or side? Let's do side drawer */
        height: 100vh;
        background: rgba(3, 3, 4, 0.98);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        /* FS menu is easier to touch */
        transform: translateX(100%);
        /* Hide off-screen */
        transition: transform 0.4s ease-in-out;
        z-index: 1000;
        padding-top: 0;
        margin-top: 0;
        gap: 3rem;
        /* Spacing between links */
        border-bottom: none;
    }

    /* THE ACTIVE CLASS (JS toggles this) */
    .nav-active {
        transform: translateX(0%);
    }

    .nav-links a {
        opacity: 0;
        /* Fade in effect */
        animation: navLinkFade 0.5s ease forwards 0.3s;
        font-size: 1.5rem;
        /* Larger text for mobile menu */
        margin: 0;
    }

    @keyframes navLinkFade {
        from {
            opacity: 0;
            transform: translateX(50px);
        }

        to {
            opacity: 1;
            transform: translateX(0px);
        }
    }

    /* Burger Animation toggled */
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .toggle .line2 {
        opacity: 0;
    }

    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .nav-links .btn-primary {
        margin-top: 0;
        width: auto;
        padding: 1rem 3rem;
        font-size: 1.2rem;
    }

    /* --- Hero Section Fixes (Adjusted for non-fat menu) --- */
    .hero {
        height: auto;
        min-height: 100vh;
        /* Restore full height feeling since menu is gone */
        padding-top: 100px;
        /* Less padding needed now */
        padding-bottom: 5rem;
        display: flex;
        align-items: center;
        /* Center visually */
    }

    #canvas-container {
        position: absolute;
        /* Keep it behind */
    }

    .hero-content {
        text-align: center;
        margin: 0 auto;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-width: 350px;
        /* Don't stretch infinitely */
        margin: 0 auto;
    }

    /* --- Section Padding Reduction --- */
    .section-padding,
    .section-dark,
    .page-header {
        padding: 4rem 0 !important;
        /* Drastically reduce from 8rem */
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }

    .page-header {
        padding-top: 140px !important;
        /* Standard spacing */
        background-position: center;
        background-size: cover;
    }

    /* Hide Scroll Indicator on Mobile */
    .scroll-indicator {
        display: none !important;
    }

    /* --- Grid System Collapse --- */
    .grid-3,
    .split-layout,
    .grid-bento {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }

    /* Reverse order for split sections so image is usually top (or bottom depending on context) */
    /* Let's put visual first for impact */
    .split-layout .visual-content {
        order: -1;
        width: 100%;
    }

    .split-layout .text-content {
        width: 100%;
        text-align: center;
        /* Center text on mobile usually looks cleaner */
    }

    .tech-list {
        text-align: left;
        /* Keep lists left-aligned for readability */
    }

    /* --- Bento Grid Specifics --- */
    .bento-card {
        min-height: 250px;
        width: 100%;
        grid-column: auto !important;
        grid-row: auto !important;
        aspect-ratio: 16/9;
        /* Keep cards looking like cards */
    }

    .bento-card.small {
        min-height: 200px;
    }

    /* --- Form & Footer --- */
    .contact-form {
        flex-direction: column;
        gap: 1rem;
    }

    .contact-form input,
    .premium-form {
        width: 100% !important;
    }

    .premium-form {
        padding: 1.5rem;
        /* Less internal padding */
    }

    .cta-box {
        padding: 2rem;
    }

    .main-footer {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    /* Stats Bar */
    .stats-bar {
        flex-direction: column;
        gap: 1.5rem;
        padding: 2rem;
        margin-top: 2rem;
        background: rgba(0, 0, 0, 0.8);
    }
}