:root {
    --bg-dark: #02040a;
    --bg-secondary: #0a0f1c;
    --primary-blue: #1E3A8A;
    --accent-yellow: #FFC107;
    --text-main: #ffffff;
    --text-muted: #8892b0;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    max-width: 100vw;
    /* Ensure body doesn't exceed viewport */
}

/* Loading Screen */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    /* Semi-transparent so first frame shows through */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    width: 300px;
    text-align: center;
}

.loader-text {
    font-family: var(--font-heading);
    margin-bottom: 20px;
    letter-spacing: 2px;
    font-size: 0.8rem;
    color: var(--accent-yellow);
}

.progress-bar {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--accent-yellow);
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px var(--accent-yellow);
}

.percentage {
    margin-top: 10px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 25px 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(2, 4, 10, 0.7);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

.logo-img {
    height: 22px;
    /* Drastically reduced from 30px */
    width: auto;
    display: block;
}

.accent-dot {
    color: var(--accent-yellow);
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-yellow);
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-anim {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(2, 4, 10, 0.3) 70%, rgba(2, 4, 10, 0.6) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding-top: 80px;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--accent-yellow);
    letter-spacing: 4px;
    margin-bottom: 20px;
    margin-top: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 0 20px var(--accent-yellow);
    animation: fadeInUp 0.8s ease-out 0.2s both, glowPulse 3s ease-in-out infinite;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 30px;
    text-transform: uppercase;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.glow-text {
    color: transparent;
    -webkit-text-stroke: 1px var(--text-main);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 4px 20px rgba(0, 0, 0, 0.9);
    animation: projekatGlow 4s ease-in-out infinite;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin-bottom: 40px;
    line-height: 1.8;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    animation: fadeInUp 0.8s ease-out 0.6s both, floatText 6s ease-in-out infinite;
}

.hero-buttons {
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glowPulse {

    0%,
    100% {
        text-shadow:
            0 2px 10px rgba(0, 0, 0, 0.8),
            0 0 20px rgba(0, 240, 255, 0.4),
            0 0 40px rgba(0, 240, 255, 0.2);
    }

    50% {
        text-shadow:
            0 2px 10px rgba(0, 0, 0, 0.8),
            0 0 30px rgba(0, 240, 255, 0.8),
            0 0 60px rgba(0, 240, 255, 0.4);
    }
}

@keyframes projekatGlow {

    0%,
    100% {
        -webkit-text-stroke: 1px rgba(255, 255, 255, 0.8);
        text-shadow:
            0 0 10px rgba(255, 255, 255, 0.2),
            0 0 20px rgba(255, 255, 255, 0.1),
            0 4px 20px rgba(0, 0, 0, 0.9);
    }

    50% {
        -webkit-text-stroke: 1px rgba(255, 255, 255, 1);
        text-shadow:
            0 0 20px rgba(255, 255, 255, 0.6),
            0 0 40px rgba(0, 240, 255, 0.3),
            0 4px 20px rgba(0, 0, 0, 0.9);
    }
}

@keyframes floatText {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 40px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--bg-dark);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 2px;
}

.btn-primary {
    background: var(--text-main);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: var(--accent-yellow);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.4);
}

/* Social Hero */
.social-hero {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 4;
}

.social-hero a {
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-decoration: none;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    right: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 4;
}

.scroll-indicator p {
    writing-mode: vertical-rl;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--text-muted);
}

/* Sections General */
.section {
    padding: 120px 0;
    background: var(--bg-dark);
    position: relative;
    border-top: 1px solid var(--glass-border);
}

.section-header {
    margin-bottom: 80px;
    position: relative;
}

.section-idx {
    font-family: var(--font-heading);
    font-size: 5rem;
    color: var(--glass-bg);
    position: absolute;
    top: -40px;
    left: -20px;
    z-index: 0;
}

.section-title {
    position: relative;
    z-index: 1;
    font-size: 2.5rem;
    color: var(--text-main);
    letter-spacing: 2px;
    padding-left: 20px;
    border-left: 3px solid var(--accent-yellow);
}

/* Layouts */
.content-grid {
    display: grid;
    gap: 60px;
}

.two-col {
    grid-template-columns: 1fr 1fr;
    align-items: center;
}

.text-block p {
    margin-bottom: 20px;
    color: var(--text-muted);
    line-height: 1.8;
}

.text-block h3 {
    margin-bottom: 20px;
    color: var(--accent-yellow);
}

.holographic-card {
    background: rgba(10, 15, 28, 0.6);
    border: 1px solid var(--accent-yellow);
    padding: 30px;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.holographic-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--accent-yellow);
    border-left: 2px solid var(--accent-yellow);
}

.data-line {
    font-family: 'Courier New', monospace;
    color: var(--text-main);
    padding: 10px 0;
    border-bottom: 1px solid var(--glass-border);
}

/* Technology Cards */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.tech-card {
    background: var(--bg-secondary);
    padding: 40px;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.tech-card:hover {
    border-color: var(--accent-yellow);
    transform: translateY(-10px);
}

.tech-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.tech-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.tech-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Team */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.team-member {
    text-align: center;
}

.member-img {
    height: 300px;
    background: var(--bg-secondary);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-yellow);
    opacity: 0.8;
}

.team-member h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.team-member p {
    color: var(--accent-yellow);
    font-size: 0.9rem;
    font-family: var(--font-heading);
}

/* Vision */
.vision-section {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-secondary) 100%);
    text-align: center;
}

.large-text {
    font-size: 3rem;
    font-weight: 300;
    color: var(--text-main);
    margin-top: 40px;
    font-style: italic;
}

/* Contact */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    background: var(--bg-secondary);
    padding: 60px;
    border: 1px solid var(--glass-border);
}

.contact-details h3 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.contact-list {
    list-style: none;
    margin-top: 40px;
}

.contact-list li {
    margin-bottom: 15px;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
    color: var(--text-main);
    font-family: var(--font-heading);
    margin-bottom: 30px;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-bottom-color: var(--accent-yellow);
}

/* Footer */
.footer {
    background: #000;
    padding: 60px 0;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-right: 20px;
    font-size: 0.8rem;
}

.footer-copy {
    color: #444;
    font-size: 0.8rem;
}

/* Process Section */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.process-step {
    background: var(--bg-secondary);
    padding: 30px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    text-align: center;
    transition: var(--transition);
}

.process-step:hover {
    border-color: var(--accent-yellow);
    transform: translateY(-5px);
}

.step-number {
    font-size: 3rem;
    font-family: var(--font-heading);
    color: var(--accent-yellow);
    margin-bottom: 15px;
    opacity: 0.3;
}

.process-step h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.process-step p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Territory Section */
.territory-section {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-secondary) 100%);
    padding: 80px 0;
}

.large-text-alt {
    font-size: 1.3rem;
    font-weight: 300;
    color: var(--text-muted);
    margin-top: 30px;
    line-height: 1.8;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-item {
    background: transparent;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.03);
    border-color: var(--accent-yellow);
}

.gallery-item p {
    padding: 0 20px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* FAQ Section */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.faq-item {
    background: rgba(255, 193, 7, 0.05);
    padding: 25px;
    border-left: 3px solid var(--accent-yellow);
    border-radius: 4px;
}

.faq-item h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.faq-item p {
    color: var(--text-muted);
    line-height: 1.6;
}

.faq-questions {
    background: var(--bg-secondary);
    padding: 40px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
}

.faq-questions h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--accent-yellow);
}

.question {
    padding: 15px 0;
    border-bottom: 1px solid var(--glass-border);
}

.question:last-child {
    border-bottom: none;
}

.question strong {
    color: var(--text-main);
    display: block;
    margin-bottom: 8px;
}

.question p {
    color: var(--text-muted);
    margin: 0;
}

/* Mobile */
@media (max-width: 768px) {

    /* Global overflow prevention */
    * {
        max-width: 100vw;
    }

    html,
    body {
        overflow-x: hidden !important;
        width: 100%;
    }

    .nav-links {
        display: none;
    }

    .logo-img {
        height: 35px;
        /* Reduced from 60px */
    }

    /* Fix canvas/hero for mobile */
    .hero-anim {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    #hero-canvas {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
        max-width: 100vw;
    }

    .hero {
        min-height: 100vh;
        overflow: hidden;
        width: 100%;
    }

    .hero-title {
        font-size: 2rem;
        word-wrap: break-word;
        max-width: 100%;
    }

    .hero-subtitle {
        font-size: 0.8rem;
        word-wrap: break-word;
    }

    .hero-desc {
        font-size: 1rem;
        max-width: 100%;
    }

    /* Fix FAQ grid overflow */
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .faq-item {
        padding: 20px;
        max-width: 100%;
        overflow: hidden;
    }

    .faq-item h3 {
        font-size: 0.9rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .faq-questions {
        padding: 25px;
        max-width: 100%;
    }

    .section-title {
        font-size: 2rem;
        word-wrap: break-word;
    }

    .two-col,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 20px;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Ensure all grids don't overflow */
    .tech-grid,
    .process-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    /* Fix text elements */
    h1,
    h2,
    h3,
    h4,
    p {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    /* Images and media */
    img,
    canvas,
    video {
        max-width: 100% !important;
        height: auto;
    }

    /* Button sizing */
    .btn {
        font-size: 0.8rem;
        padding: 12px 24px;
    }
}