:root{
    --accent:#e53935;
    --bg-overlay: rgba(0,0,0,0.36);
    --muted:#e6e6e6;
    --surface: rgba(6,10,16,0.9);
}
/* Animated background gradient for 'wow' effect */
.bg-animated {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(14,22,36,0.55), rgba(6,10,16,0.45));
    background-size: 300% 300%;
    animation: gradientShift 18s ease infinite;
    mix-blend-mode: overlay;
    opacity: 0.9;
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Primary CTA */
.cta-btn {
    display: inline-block;
    padding: 14px 22px;
    border-radius: 12px;
    background: linear-gradient(90deg,var(--accent),#ffb347);
    color: #111;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 30px rgba(229,57,53,0.18), 0 2px 8px rgba(0,0,0,0.6);
    transform: translateY(0);
    transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}
.cta-btn:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 18px 60px rgba(229,57,53,0.22), 0 6px 18px rgba(0,0,0,0.6);
    filter: saturate(1.08);
}

/* Typewriter cursor */
#typewriter-title::after {
    content: '|';
    margin-left: 6px;
    color: rgba(255,255,255,0.9);
    opacity: 0.95;
    animation: blink 900ms steps(1) infinite;
}
@keyframes blink { 0%,50% { opacity: 1; } 51%,100% { opacity: 0; } }

/* hero shapes */
.hero-shapes { position: absolute; inset: auto 0 0 0; display: flex; gap: 20px; justify-content: center; pointer-events: none; z-index:1; transform: translateZ(0); }
.hero-shapes .shape { transform: translate3d(0,0,0); transition: transform 420ms cubic-bezier(.2,.9,.25,1); }
.hero-shapes .shape-1 { filter: blur(18px); transform-origin: center; }
.hero-shapes .shape-2 { filter: blur(8px); transform-origin: center; }

/* CTA ripple */
.cta-btn { position: relative; overflow: hidden; }
.cta-btn .ripple { position: absolute; border-radius: 50%; transform: translate(-50%, -50%) scale(0.1); opacity: 0.7; pointer-events:none; background: rgba(255,255,255,0.35); animation: ripple 700ms ease-out; }
@keyframes ripple { to { transform: translate(-50%, -50%) scale(10); opacity: 0; } }

/* prefers-reduced-motion and touch fallback */
@media (prefers-reduced-motion: reduce) {
    .bg-animated, .reveal, #typewriter-title::after, .hero-shapes .shape { animation: none !important; transition: none !important; }
}
@media (hover: none) and (pointer: coarse) {
    .cursor { display: none !important; }
}

/* reveal animations for on-scroll entrance */
.reveal { opacity: 0; transform: translateY(18px) scale(0.99); transition: opacity 640ms cubic-bezier(.2,.9,.25,1), transform 640ms cubic-bezier(.2,.9,.25,1); will-change: opacity, transform; }
.reveal.active { opacity: 1; transform: translateY(0) scale(1); }

/* custom cursor */
.cursor {
    position: fixed;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(90deg,var(--accent),#ffb347);
    box-shadow: 0 6px 20px rgba(229,57,53,0.25), 0 2px 6px rgba(0,0,0,0.6);
    transform: translate(-50%, -50%) scale(1);
    pointer-events: none;
    z-index: 99999;
    transition: transform 160ms ease, width 160ms ease, height 160ms ease, opacity 180ms ease;
    mix-blend-mode: screen;
}
.cursor.big { transform: translate(-50%, -50%) scale(2.4); width: 34px; height: 34px; opacity: 0.95; }

/* make images scale within their containers */
img { max-width: 100%; height: auto; display: block; }
            .feature-box {
                background: rgba(30,30,40,0.85);
                border-radius: 12px;
                padding: 18px 32px;
                display: flex;
                align-items: center;
                box-shadow: 0 2px 12px #0008;
                font-size: 1.1rem;
                color: #fff;
                transition: background 0.2s, box-shadow 0.2s, color 0.2s;
            }
            .feature-box:hover {
                background: linear-gradient(90deg, #e53935 20%, #ffb347 60%, #fff 100%);
                box-shadow: 0 4px 16px #e53935cc, 0 2px 8px #0006;
                color: #fff;
                text-shadow: 0 4px 16px #e53935cc, 0 1px 0 #fff4;
            }
        .alt-section {
            background: var(--section-bg, rgba(20, 25, 40, 0.85));
            border-radius: 0;
            box-shadow: none;
            padding: 48px 20px;
            margin: 0;
            transition: background 280ms ease;
        }
        .alt-section-light {
            background: var(--section-bg, rgba(40, 45, 60, 0.65));
            border-radius: 0;
            box-shadow: none;
            padding: 48px 20px;
            margin: 0;
            transition: background 280ms ease;
        }

        /* Per-section theme tints (subtle, related to accent) */
        #services { --section-bg: linear-gradient(135deg, rgba(229,57,53,0.12), rgba(6,10,16,0.55)); }
        #products { --section-bg: linear-gradient(135deg, rgba(41,121,255,0.08), rgba(6,10,16,0.55)); }
        #about { --section-bg: linear-gradient(135deg, rgba(34,197,94,0.085), rgba(6,10,16,0.55)); }
        #clients { --section-bg: linear-gradient(135deg, rgba(168,85,247,0.06), rgba(6,10,16,0.55)); }
        #career { --section-bg: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(6,10,16,0.55)); }
        #faqs { --section-bg: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(6,10,16,0.55)); }

        /* Make each section appear full-bleed while keeping content centered.
           This uses a ::before pseudo-element that spans the viewport width. */
        .container > section {
            position: relative;
            z-index: 2;
            padding-left: 24px;
            padding-right: 24px;
        }
        .container > section::before {
            content: '';
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            width: 100vw;
            top: 0;
            bottom: 0;
            z-index: -1;
            pointer-events: none;
            transition: background 320ms ease, opacity 320ms ease;
        }
        /* exclude the hero (#home) from the alternating scheme so it remains transparent */
        .container > section:not(#home):nth-of-type(odd)::before {
            background: linear-gradient(180deg, rgba(8,12,20,0.92), rgba(18,22,32,0.86));
        }
        .container > section:not(#home):nth-of-type(even)::before {
            background: linear-gradient(180deg, rgba(6,9,18,0.9), rgba(28,34,46,0.88));
        }
        /* subtle accent overlay on alternating sections for a tech feel */
        .container > section:not(#home):nth-of-type(odd)::after,
        .container > section:not(#home):nth-of-type(even)::after {
            content: '';
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            width: 100vw;
            top: 0;
            bottom: 0;
            z-index: -1;
            pointer-events: none;
            mix-blend-mode: overlay;
            opacity: 0.06;
        }
        .container > section:not(#home):nth-of-type(odd)::after {
            background: linear-gradient(90deg, rgba(229,57,53,0.12), rgba(41,121,255,0.02));
        }
        .container > section:not(#home):nth-of-type(even)::after {
            background: linear-gradient(90deg, rgba(34,197,94,0.06), rgba(168,85,247,0.02));
        }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    color: #fff;
    background: url('img/background.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
}
.overlay {
    background: var(--bg-overlay); /* soft dark overlay for readable foreground */
    min-height: 100vh;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
}
.container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0; /* spacing moved into sections */
}
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.04));
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(6px);
}

.nav-toggle {
    display: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #fff;
    padding: 8px 10px;
    user-select: none;
    border-radius: 8px;
    border: 1px solid transparent;
    background: rgba(255,255,255,0.02);
    transition: transform 0.18s ease, background 0.18s ease;
}

.nav-toggle:active { transform: scale(0.98); }

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* nav list */
nav { margin-left: 24px; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; align-items: center; }
.nav-list li { margin: 0; }
.nav-list a {
    color: var(--muted);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-block;
    transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease, color 0.12s ease;
}
.nav-list a:hover {
    color: #fff;
    background: rgba(255,255,255,0.04);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

.logo {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent);
    display: flex;
    align-items: center;
}
.logo::before {
    content: '';
    display: inline-block;
    width: 48px;
    height: 48px;
    background: url('img/logo.png') center/cover no-repeat;
    border-radius: 8px;
    margin-right: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.45);
}
/* logo text and show/hide behavior when viewing the hero/home section */
.logo { gap: 12px; color: var(--muted); }
.logo::after {
    content: 'Trace Alarm & Security System Inc.';
    color: var(--muted);
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: opacity 240ms ease, transform 240ms ease;
}
header.at-home .logo::before,
header.at-home .logo::after {
    opacity: 0;
    transform: translateY(-6px) scale(0.95);
}
header .logo::before { transition: opacity 240ms ease, transform 240ms ease; }

/* floating badge (Emergent-like) */
#made-badge{
    display:inline-flex;box-sizing:border-box;width:auto;height:40px;padding:8px 12px;align-items:center;gap:8px;border-radius:40px;background:#000;position:fixed;bottom:16px;right:16px;text-decoration:none;font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;z-index:9999;color:#fff;font-weight:600;font-size:13px
}
#made-badge svg{width:16px;height:16px}
.hero {
    text-align: center;
    margin: 0;
    animation: fadeInHero 1.2s ease;
    padding: 56px 18px;
}
@keyframes fadeInHero {
    0% { opacity: 0; transform: translateY(-40px); }
    100% { opacity: 1; transform: translateY(0); }
}
.hero h1 {
    font-size: clamp(2rem, 6vw, 3.2rem);
    margin-bottom: 10px;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.4px;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    text-shadow: none;
}
.hero p {
    font-size: 1.3rem;
    color: #eee;
    margin-bottom: 30px;
    font-family: 'Roboto', Arial, sans-serif;
}
.section {
    margin: 0;
    padding: 48px 20px;
}
.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: #fff;
}
.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #ccc;
    margin-bottom: 32px;
}
.card-group {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
    margin-bottom: 40px;
}
.card {
    background: rgba(30, 30, 40, 0.92);
    border-radius: 18px;
    box-shadow: 0 4px 24px #0008;
    padding: 36px 28px;
    max-width: 370px;
    min-width: 260px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: 1px solid #222;
    transition: transform 0.18s cubic-bezier(.4,1.4,.6,1), box-shadow 0.18s cubic-bezier(.4,1.4,.6,1);
    animation: fadeInCard 1s ease;
}
@keyframes fadeInCard {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}
.card:hover {
    transform: scale(1.06);
    box-shadow: 0 8px 32px #e53935cc, 0 4px 24px #0008;
    z-index: 2;
}
.card-icon {
    width: 48px;
    height: 48px;
    background: #e53935;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    font-size: 2rem;
    color: #fff;
    box-shadow: 0 2px 8px #0006;
}
.card-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: #fff;
}
.card-desc {
    color: #ccc;
    font-size: 1rem;
    margin-bottom: 18px;
}
.card-link {
    color: #e53935;
    font-weight: 500;
    text-decoration: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
}
.card-link:hover {
    text-decoration: underline;
}
.clients, .products {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}
/* carousel wrapper for clients section */
.clients-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
}
.clients-slider {
    display: flex;
    gap: 30px;
    flex-wrap: nowrap;
    animation: slideClients 20s linear infinite;
}
@keyframes slideClients {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.client-logo, .product-card {
    background: rgba(30, 30, 40, 0.7);
    border-radius: 10px;
    padding: 18px 28px;
    margin: 10px;
    box-shadow: 0 2px 12px #0008;
    text-align: center;
    transition: transform 0.18s cubic-bezier(.4,1.4,.6,1), box-shadow 0.18s cubic-bezier(.4,1.4,.6,1);
}
.product-logo-card {
    background: rgba(30, 30, 40, 0.7);
    border-radius: 10px;
    padding: 18px 28px;
    margin: 10px;
    box-shadow: 0 2px 12px #0008;
    text-align: center;
    transition: transform 0.18s cubic-bezier(.4,1.4,.6,1), box-shadow 0.18s cubic-bezier(.4,1.4,.6,1);
}
.product-logo-card:hover {
    transform: scale(1.08);
    background: linear-gradient(90deg, #e53935 20%, #ffb347 60%, #fff 100%);
    box-shadow: 0 4px 16px #e53935cc, 0 2px 8px #0006;
    z-index: 2;
    color: #fff;
    text-shadow: 0 4px 16px #e53935cc, 0 1px 0 #fff4;
}
.client-logo:hover, .product-card:hover {
      transform: scale(1.08);
      background: linear-gradient(90deg, #e53935 20%, #ffb347 60%, #fff 100%);
      box-shadow: 0 4px 16px #e53935cc, 0 2px 8px #0006;
      z-index: 2;
      color: #fff;
      text-shadow: 0 4px 16px #e53935cc, 0 1px 0 #fff4;
}
.client-logo img, .product-card img {
    max-width: 120px;
    max-height: 60px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}
.product-card h3 {
    color: #e53935;
    margin-bottom: 8px;
}
footer {
    text-align: center;
    padding: 36px 0 16px 0;
    color: #aaa;
    font-size: 1.05rem;
    background: linear-gradient(180deg, rgba(12,14,20,0.96), rgba(20,24,32,0.98));
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw; /* make footer full-bleed */
    z-index: 2;
}
@media (max-width: 900px) {
    .card-group { flex-direction: column; align-items: center; }
    .container { padding: 20px 5px; }
}
/* Desktop: full-bleed navbar background while keeping content centered */
@media (min-width: 901px) {
    header {
        position: sticky;
        top: 0;
        z-index: 60;
        padding: 14px 40px;
        overflow: visible;
    }
    .nav-toggle {
        display: none !important;
    }
    header::before {
        content: '';
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: 0;
        width: 100vw;
        height: 100%;
        /* glassmorphism: semi-transparent dark surface with subtle gradient */
        background: linear-gradient(180deg, rgba(10,14,20,0.56), rgba(8,12,18,0.48));
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
        border: 1px solid rgba(255,255,255,0.04);
        box-shadow: 0 10px 30px rgba(2,6,12,0.6);
        z-index: -1;
    }

    /* make nav occupy remaining space and align items */
    .nav-right {
        position: static !important;
        width: auto !important;
        height: auto !important;
        background: none !important;
        backdrop-filter: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        z-index: auto;
    }
    .nav-list {
        gap: 22px;
        flex-direction: row !important;
        align-items: center !important;
        padding: 0 !important;
    }
    .nav-list li { width: auto; }
    .nav-list a {
        padding: 10px 14px;
        font-size: 0.98rem;
        color: var(--muted);
        transform: none !important;
        background: none !important;
    }
    .nav-list a::before { display: none; }
    .nav-list a:hover {
        background: rgba(255,255,255,0.04);
        color: #fff;
        transform: none;
    }

    /* subtle underline for active link look */
    .nav-list a.active { position: relative; color: #fff; }
    .nav-list a.active::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -8px; height: 3px; border-radius: 3px; background: linear-gradient(90deg,var(--accent),#ffb347); opacity: 0.95; }
    
    .nav-right::before { display: none; }
}
@media (max-width: 700px) {
    .container { padding: 20px 5px; }
    /* hero h1 now uses clamp, no need explicit size */
    .section-title { font-size: 1.5rem; }
    .clients, .products { flex-direction: column; align-items: center; }
}
/* Prevent body scroll when mobile menu is open */
body.nav-open { overflow: hidden; }

/* additional responsive tweaks */
@media (max-width: 800px) {
    header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.04));
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .nav-toggle {
        display: block;
        position: relative;
        margin-left: auto;
        z-index: 1001;
        background: transparent;
        border-radius: 8px;
        padding: 6px 10px;
        font-size: 1.25rem;
        cursor: pointer;
        border: 1px solid transparent;
        transition: all 0.2s ease;
    }
    .nav-toggle:active,
    .nav-toggle[aria-expanded="true"] {
        background: rgba(229,57,53,0.25);
        color: #e53935;
        transform: scale(1.05);
    }
    /* Hide hamburger when menu is open */
    body.nav-open .nav-toggle {
        display: none;
    }
    /* full-screen mobile nav overlay */
    .nav-right {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, rgba(6,10,16,0.98) 0%, rgba(14,22,36,0.96) 100%);
        backdrop-filter: blur(12px);
        z-index: 999;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 100px;
        opacity: 0;
        visibility: hidden;
        transition: opacity 420ms cubic-bezier(.2,.9,.25,1), visibility 420ms ease;
        pointer-events: none;
        overflow-y: auto;
        overflow-x: hidden;
    }
    /* Enhanced background layers */
    .nav-right::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: 
            radial-gradient(circle at 30% 50%, rgba(229,57,53,0.12) 0%, transparent 40%),
            radial-gradient(circle at 70% 30%, rgba(41,121,255,0.08) 0%, transparent 45%);
        pointer-events: none;
        z-index: 0;
    }
    .nav-right.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        animation: overlayFadeIn 420ms cubic-bezier(.2,.9,.25,1) forwards;
    }
    
    @keyframes overlayFadeIn {
        0% {
            opacity: 0;
            backdrop-filter: blur(0px);
        }
        100% {
            opacity: 1;
            backdrop-filter: blur(12px);
        }
    }
    /* Close button (×) in top-right corner */
    .nav-right::after {
        content: '✕';
        position: fixed;
        top: 20px;
        right: 20px;
        font-size: 2.2rem;
        color: #e6e6e6;
        cursor: pointer;
        padding: 8px 14px;
        border-radius: 8px;
        user-select: none;
        transition: all 240ms cubic-bezier(.2,.9,.25,1);
        z-index: 1002;
        pointer-events: auto;
        line-height: 1;
        height: 44px;
        width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
    }
    .nav-right.active::after {
        opacity: 1;
        visibility: visible;
        color: #e53935;
        animation: closeButtonFadeIn 400ms 100ms cubic-bezier(.2,.9,.25,1) forwards;
    }
    
    @keyframes closeButtonFadeIn {
        0% {
            opacity: 0;
            transform: scale(0.8) rotate(-45deg);
        }
        100% {
            opacity: 1;
            transform: scale(1) rotate(0deg);
        }
    }
    .nav-right.active::after:hover {
        background: rgba(229,57,53,0.2);
        transform: scale(1.18) rotate(90deg);
        box-shadow: 0 4px 16px rgba(229,57,53,0.3);
    }
    .nav-list {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        width: 100%;
        max-width: 100%;
        padding: 40px 20px;
        opacity: 0;
        transform: scale(0.92) translateY(10px);
        transition: opacity 500ms 150ms cubic-bezier(.2,.9,.25,1), transform 500ms 150ms cubic-bezier(.2,.9,.25,1);
        position: relative;
        z-index: 10;
        display: flex;
        flex-direction: column;
        align-items: center;
        list-style: none;
        margin: 0;
    }
    .nav-right.active .nav-list {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    .nav-list li { width: 100%; }
    .nav-list a {
        display: block;
        text-align: center;
        margin: 0;
        padding: 16px 28px;
        border-radius: 12px;
        font-size: 1.2rem;
        font-weight: 600;
        color: #e6e6e6;
        text-decoration: none;
        transition: all 240ms cubic-bezier(.2,.9,.25,1);
        position: relative;
        overflow: hidden;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transform: translateY(15px);
        white-space: nowrap;
    }
    .nav-right.active .nav-list a {
        opacity: 1;
        transform: translateY(0);
    }
    /* Staggered animation for each link */
    .nav-list li:nth-child(1) a { animation: linkSlideIn 480ms 280ms cubic-bezier(.2,.9,.25,1) forwards; }
    .nav-list li:nth-child(2) a { animation: linkSlideIn 480ms 340ms cubic-bezier(.2,.9,.25,1) forwards; }
    .nav-list li:nth-child(3) a { animation: linkSlideIn 480ms 400ms cubic-bezier(.2,.9,.25,1) forwards; }
    .nav-list li:nth-child(4) a { animation: linkSlideIn 480ms 460ms cubic-bezier(.2,.9,.25,1) forwards; }
    .nav-list li:nth-child(5) a { animation: linkSlideIn 480ms 520ms cubic-bezier(.2,.9,.25,1) forwards; }
    
    @keyframes linkSlideIn {
        0% {
            opacity: 0;
            transform: translateY(15px) scale(0.95);
        }
        100% {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
    .nav-list a::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, #e53935 20%, #ffb347 100%);
        opacity: 0;
        z-index: -1;
        transition: opacity 240ms ease;
    }
    .nav-list a:hover {
        color: #fff;
        transform: scale(1.08);
        background: rgba(229,57,53,0.15);
    }
    .nav-list a:hover::before { opacity: 0.1; }
}
@media (max-width: 500px) {
    header { padding: 16px 20px 16px 0; }
    .nav-list a { font-size: 0.85rem; padding: 6px 8px; }
}
/* falling text effect */
.falling-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.falling-letter {
    position: absolute;
    color: rgba(255,255,255,0.7);
    font-size: 1.2rem;
    font-weight: bold;
    /* allow vertical stacking when using line breaks */
    white-space: pre;
    text-align: center;
    animation: fall linear forwards;
}
@keyframes fall {
    to {
        transform: translateY(110vh);
        opacity: 0;
    }
}

/* Desktop override: ensure nav-open doesn't block scrolling on desktop */
@media (min-width: 901px) {
    body.nav-open {
        overflow: auto !important;
    }
}

/* Mobile landscape and small screens optimization */
@media (max-height: 600px) and (max-width: 800px) {
    .nav-right {
        padding-top: 80px;
    }
    .nav-list {
        gap: 12px;
        padding: 20px 16px;
    }
    .nav-list a {
        padding: 12px 20px;
        font-size: 1rem;
        min-height: 40px;
    }
    .nav-right::after {
        font-size: 1.8rem;
    }
    
}

/* Extra small screens */
@media (max-width: 360px) {
    .nav-list {
        padding: 0 16px;
    }
    .nav-list a {
        font-size: 1rem;
        padding: 12px 18px;
    }
    .nav-right::after {
        top: 16px;
        right: 16px;
        padding: 6px 10px;
    }
}
/* ================================
   MOBILE RESPONSIVE FINAL POLISH
   Safe overrides only (no desktop break)
================================ */

/* ---------- HERO CLEANUP ---------- */
@media (max-width: 768px) {
  .hero {
    min-height: 85vh;
    padding: 80px 16px 48px;
  }

  .hero h1 {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
    line-height: 1.25;
    margin-bottom: 12px;
    text-align: center;
  }

  .hero p {
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 22px;
    max-width: 92%;
  }

  .cta-btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
}

/* ---------- FEATURE BOX STACK ---------- */
@media (max-width: 768px) {
  .hero .reveal[style*="display:flex"] {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    align-items: stretch;
  }

  .feature-box {
    padding: 14px 16px;
    font-size: 0.9rem;
    justify-content: center;
    text-align: center;
  }

  .feature-box img {
    height: 36px;
    width: 36px;
    margin-right: 8px;
  }
}

/* ---------- SECTION GLOBAL ---------- */
@media (max-width: 768px) {
  .section {
    padding: 36px 16px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section-subtitle {
    font-size: 0.95rem;
    margin-bottom: 24px;
  }
}

/* ---------- SERVICE / INFO CARDS ---------- */
@media (max-width: 768px) {
  .card-group {
    gap: 20px;
    margin-bottom: 28px;
  }

  .card {
    width: 100%;
    max-width: 100%;
    min-width: unset;
    padding: 22px 18px;
    border-radius: 14px;
    transform: none !important;
  }

  .card:hover {
    transform: none;
    box-shadow: 0 4px 18px rgba(0,0,0,0.5);
  }

  .card-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    margin-bottom: 12px;
  }

  .card-title {
    font-size: 1.05rem;
  }

  .card-desc {
    font-size: 0.9rem;
    line-height: 1.55;
  }
}

/* ---------- PRODUCTS ---------- */
@media (max-width: 768px) {
  .product-group {
    gap: 16px;
  }

  .product-logo-card {
    width: 100%;
    padding: 16px;
    margin: 0;
  }

  .product-logo-card img {
    width: 120px !important;
    height: 120px !important;
    border-radius: 18px;
    margin: auto;
  }
}

/* ---------- ABOUT TEXT READABILITY ---------- */
@media (max-width: 768px) {
  #about .card {
    padding: 22px 18px;
  }

  #about .card-desc {
    font-size: 0.9rem;
    line-height: 1.65;
    text-align: left;
  }
}

/* ---------- CLIENT SLIDER ---------- */
@media (max-width: 768px) {
  .clients-slider {
    gap: 18px;
  }

  .client-logo {
    padding: 14px 18px;
    margin: 0;
  }

  .client-logo img {
    max-width: 110px;
    max-height: 50px;
  }
}

/* ---------- CAREER IMAGE ---------- */
@media (max-width: 768px) {
  #career img {
    border-radius: 14px;
  }
}




/* ===============================
   COMPANY LOCATION SECTION
================================ */

#location {
    position: relative;
}

.location-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 32px;
    align-items: stretch;
    margin-top: 32px;
}

/* LEFT PANEL */
.location-info {
    background: rgba(20, 24, 36, 0.92);
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: 0 8px 36px rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.05);
}

.location-badge {
    display: inline-block;
    background: linear-gradient(90deg, var(--accent), #ffb347);
    color: #111;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.location-info h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: #fff;
}

.location-address {
    font-size: 1.05rem;
    color: #e6e6e6;
    line-height: 1.6;
    margin-bottom: 22px;
}

.location-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: #ccc;
    margin-bottom: 28px;
}

.location-btn {
    display: inline-block;
    margin-top: 8px;
}

/* RIGHT PANEL – MAP */
.location-map {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 8px 36px rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.05);
    background: #000;
}

.location-map iframe {
    width: 100%;
    height: 100%;
    min-height: 360px;
    border: 0;
    filter: grayscale(20%) contrast(1.1);
}

/* Subtle glow accent */
.location-map::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        120deg,
        rgba(229,57,53,0.15),
        rgba(41,121,255,0.05)
    );
    mix-blend-mode: overlay;
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 900px) {
    .location-wrapper {
        grid-template-columns: 1fr;
    }

    .location-map iframe {
        min-height: 300px;
    }
}

/* ------------END LOCATION--------- */
/* ---------- FOOTER ---------- */
@media (max-width: 768px) {
  footer {
    font-size: 0.85rem;
    line-height: 1.5;
    padding: 28px 16px 20px;
    text-align: center;
  }
}

/* ---------- TOUCH DEVICE UX FIX ---------- */
@media (hover: none) and (pointer: coarse) {
  .card:hover,
  .client-logo:hover,
  .product-logo-card:hover {
    transform: none !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.45) !important;
    background: rgba(30,30,40,0.92) !important;
  }
}
/* ================================
   ANDROID / INFINIX HAMBURGER FIX
================================ */
@media (max-width: 420px) {
    .nav-toggle {
        position: fixed;
        top: 14px;
        right: 14px;
        z-index: 2001; /* higher than header + overlay */
        background: rgba(10,14,20,0.85);
        backdrop-filter: blur(6px);
        border: 1px solid rgba(255,255,255,0.12);
        box-shadow: 0 6px 18px rgba(0,0,0,0.55);
    }

    header {
        padding-right: 64px; /* space para hindi matabunan */
    }
}