:root {
    --bg-dark: #020814;
    --bg-light: #050B1A;
    --text-white: #FFFFFF;
    --text-gray: #E0E0E0;
    --accent-cyan: #00F0FF;
    --accent-blue: #00AEEF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Touch-friendly improvements */
a,
button,
input,
textarea {
    touch-action: manipulation;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    /* Deep radial background */
    background: radial-gradient(circle at 60% 50%, #0d1b33 0%, #020814 65%, #000000 100%);
    background-attachment: fixed;
    /* Keep background fixed while scrolling */
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    overflow-y: auto;
    /* Enable vertical scroll */
    display: flex;
    flex-direction: column;
}

/* Navigation */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(2, 8, 20, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.3s ease;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 101;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-white);
    margin: 3px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation Overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 98;
}

.nav-overlay.active {
    display: block;
}

/* Mobile Navigation Menu */
nav.mobile-open {
    display: flex !important;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: rgba(5, 11, 26, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 80px;
    z-index: 99;
    transform: translateX(0);
    transition: transform 0.3s ease;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
}

nav.mobile-open ul {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 20px;
}

nav.mobile-open ul li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav.mobile-open ul li:last-child {
    border-bottom: none;
}

nav.mobile-open a {
    display: block;
    padding: 20px 15px;
    font-size: 1.15rem;
    color: var(--text-white);
    opacity: 1;
    transition: background 0.2s ease;
}

nav.mobile-open a:hover,
nav.mobile-open a:active {
    background: rgba(0, 174, 239, 0.1);
    color: var(--accent-blue);
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0px;
    text-decoration: none;
}

.logo-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logo-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.logo-text {
    font-weight: 600;
    font-size: 1.1rem;
    color: #F5F5F5;
    letter-spacing: -0.5px;
    margin-left: 4px;
}

@media (min-width: 768px) {
    .logo-icon-wrapper {
        width: 48px;
        height: 48px;
    }

    .logo-text {
        font-size: 1.5rem;
    }
}

.logo-mask {
    height: 0.85em;
    /* ~85% of font height */
    width: auto;
    /* Allow natural aspect ratio */
    background-color: transparent;
    /* Remove background */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 0;
    /* Remove circle */
    overflow: visible;
    /* Show full shape */
}

.logo-icon {
    width: auto;
    height: 100%;
    object-fit: contain;
    object-position: center;
    /* Add a subtle drop shadow to simulate depth if the image is transparent */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

@media (max-width: 768px) {
    .logo-mask {
        height: 0.85em;
        /* Keep consistent on mobile */
        width: auto;
    }
}

nav ul {
    display: none;
    /* Hidden on mobile by default or styled differently */
    list-style: none;
    gap: 20px;
}

/* Mobile Nav - Simple horizontal scroll or just hidden if too complex, 
   but requirements say "simple mobile layout (e.g., nav links in a single row with reduced padding)" */
@media (max-width: 767px) {
    nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    body.menu-open {
        overflow: hidden;
    }
}

nav a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    opacity: 0.8;
}

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

/* Language Toggle Button */
.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.lang-btn:hover {
    background: rgba(0, 174, 239, 0.2);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

@media (max-width: 767px) {
    .lang-btn {
        margin: 20px 15px;
        width: fit-content;
    }
}

/* Main Content Wrapper */
main {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* --- SECTIONS --- */
section {
    width: 100%;
    position: relative;
    scroll-margin-top: 100px;
    /* Offset for fixed header */
}

/* Hero Section */
#home {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 70px;
    overflow: visible;
}

.hero-container {
    display: flex;
    flex-direction: column;
    /* Stacked on mobile */
    width: 100%;
    height: 100%;
    min-height: auto;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    align-items: center;
    position: relative;
}

/* Left Column */
.hero-text {
    flex: none;
    width: 100%;
    z-index: 10;
    padding: 0 15px;
    margin-top: 10px;
    margin-bottom: 10px;
    text-align: center;
}

h1 {
    font-size: clamp(2.2rem, 11vw, 3.5rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 12px;
    margin-left: 0;
    display: flex;
    flex-direction: column;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

.title-secondary {
    color: transparent;
    -webkit-text-stroke: 1px var(--text-white);
    /* Thinner stroke on mobile */
    font-weight: 800;
    opacity: 0.95;
    margin-top: 5px;
}

.mission-text {
    font-size: 13px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.65);
    max-width: 100%;
    font-weight: 300;
    margin: 15px auto 0;
    text-align: center;
    padding: 0 5px;
}

.mission-text:first-of-type {
    margin-top: 20px;
}

/* Hide some paragraphs on very small screens for cleaner look */
@media (max-width: 380px) {
    .mission-text:nth-of-type(3) {
        display: none;
    }
}

/* Right Column (3D) */
.hero-visual {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    height: 60vh;
    min-height: 350px;
    max-height: 500px;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    margin-top: 15px;
    overflow: visible;
}

#canvas-container {
    width: 100%;
    height: 100%;
    pointer-events: auto;
    display: block;
    transform: none;
    will-change: transform;
    overflow: visible;
}

/* --- SOLUTIONS SECTION --- */
.solutions-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 15px;
}

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

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 40px;
}

@media (min-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr 1.5fr;
        gap: 80px;
        align-items: start;
    }
}

@media (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: 0.6fr 1fr;
        /* Left 35-40%, Right 60-65% */
        gap: 80px;
        align-items: start;
    }
}

/* Left Column: Info */
.contact-info-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent-blue);
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .contact-info-title {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }
}

.contact-details {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--text-gray);
    font-size: 0.95rem;
}

@media (min-width: 768px) {
    .contact-item {
        gap: 15px;
        margin-bottom: 24px;
        font-size: 1.1rem;
    }
}

.contact-icon {
    width: 22px;
    height: 22px;
    color: var(--accent-blue);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .contact-icon {
        width: 24px;
        height: 24px;
    }
}

/* Right Column: Form */
.contact-form-wrapper {
    background: rgba(2, 8, 20, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
    .contact-form-wrapper {
        padding: 40px;
        border-radius: 24px;
    }
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-bottom: 20px;
    }
}

.form-group {
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .form-group {
        margin-bottom: 20px;
    }
}

.form-input,
.form-textarea {
    width: 100%;
    background: #050B1A;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
    min-height: 52px;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(0, 174, 239, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 140px;
}

.submit-btn {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #0077cc 100%);
    color: white;
    border: none;
    padding: 18px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    margin-top: 10px;
    min-height: 56px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 174, 239, 0.4);
}

.submit-btn:active {
    transform: scale(0.98);
}

/* Footer (Redesigned) */
footer {
    background: #020814;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 80px 20px 40px;
    margin-top: 80px;
    font-size: 0.95rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 768px) {
    .footer-container {
        grid-template-columns: 1.5fr 1fr 1fr;
        gap: 60px;
    }
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 10px;
}

.footer-tagline {
    color: var(--text-gray);
    opacity: 0.7;
    line-height: 1.6;
    max-width: 300px;
}

.footer-heading {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 15px;
}

.footer-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s ease;
    opacity: 0.8;
}

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

.social-icons {
    display: flex;
    gap: 15px;
}

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

.social-btn:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    transform: translateY(-3px);
}

.social-svg {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 60px auto 0;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

/* --- SECTION HEADERS --- */
.section-header {
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 10px;
}

.section-label {
    color: var(--accent-blue);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 12px;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .section-header {
        margin-bottom: 60px;
    }

    .section-label {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 2.2rem;
    }
}

.section-description {
    font-size: 1rem;
    color: var(--text-gray);
    line-height: 1.6;
    opacity: 0.8;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 10px;
}

.solutions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.service-card {
    background: rgba(5, 11, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 18px;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Remove hover transform on mobile for better UX */
@media (max-width: 767px) {
    .service-card:hover {
        transform: none;
    }

    .service-card:active {
        background: rgba(5, 11, 26, 0.9);
        border-color: var(--accent-blue);
    }
}

.service-card:hover {
    background: rgba(5, 11, 26, 0.9);
    border-color: var(--accent-blue);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-icon {
    width: 36px;
    height: 36px;
    background: rgba(0, 174, 239, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    font-size: 1.2rem;
}

.icon-svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-white);
}

.card-desc {
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.6;
    opacity: 0.75;
}

@media (min-width: 768px) {
    .card-icon {
        width: 40px;
        height: 40px;
    }

    .icon-svg {
        width: 24px;
        height: 24px;
    }

    .card-title {
        font-size: 1.15rem;
    }

    .card-desc {
        font-size: 0.9rem;
    }
}

/* --- PLACEHOLDER SECTIONS --- */
.placeholder-section {
    padding: 80px 20px;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- TABLET & DESKTOP OVERRIDES --- */

/* Tablet (min-width: 768px) */
@media (min-width: 768px) {
    header {
        padding: 25px 50px;
        background: rgba(2, 8, 20, 0.8);
    }

    .menu-toggle {
        display: none;
    }

    nav {
        display: block;
    }

    nav ul {
        display: flex;
        gap: 30px;
    }

    #home {
        padding-top: 65px;
    }

    .hero-container {
        flex-direction: row;
        /* Side by side */
        padding: 0 40px;
        min-height: 80vh;
    }

    .hero-text {
        flex: 0 0 50%;
        text-align: left;
        margin-top: -20px;
        margin-bottom: 0;
        padding-right: 20px;
    }

    h1 {
        font-size: clamp(3.5rem, 6.5vw, 6rem);
        line-height: 1.1;
        margin-left: 20px;
    }

    .title-secondary {
        -webkit-text-stroke: 1.5px var(--text-white);
    }

    .mission-text {
        font-size: 15px;
        max-width: 440px;
        margin-top: 60px;
        margin-left: 0;
        text-align: left;
        padding: 0;
    }

    .hero-visual {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        width: 55%;
        height: 100%;
        margin-top: 0;
        justify-content: center;
        align-items: center;
        overflow: visible;
    }

    .solutions-section {
        padding: 100px 40px;
    }

    .solutions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px;
    }

    #platform .solutions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Desktop (min-width: 1024px) */
@media (min-width: 1024px) {
    nav ul {
        gap: 40px;
    }

    .hero-container {
        padding: 0 50px;
    }

    .hero-text {
        flex: 0 0 45%;
    }

    h1 {
        font-size: clamp(3.5rem, 6.5vw, 7.5rem);
        margin-left: 52px;
        /* 30px + 22px offset */
    }

    .mission-text {
        margin-top: 10px;
        margin-left: 52px;
        /* Align with h1 */
    }

    .hero-visual {
        width: 65%;
    }

    .solutions-section {
        padding: 120px 40px;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .service-card {
        padding: 40px;
    }

    .card-title {
        font-size: 1.25rem;
    }

    .card-desc {
        font-size: 0.95rem;
    }

    #platform .solutions-grid,
    #about .solutions-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}