/* =========================================
   RESPONSIVE - TABLET (Max 1024px)
   ========================================= */
@media (max-width: 1024px) {
    .hero { gap: 40px; }
    .hero-right h1 { font-size: 2.4rem; }
    .typing-container { font-size: 1.5rem; min-height: 40px; }
    .dev-visual { height: 380px; max-width: 400px; }
    .nav-links { gap: 25px; }
    .hero-stats { gap: 30px; }

    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
    .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }

    .about-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    .about-visual { height: 400px; max-width: 500px; margin: 0 auto; width: 100%; }
    .section-header h2 { font-size: 2.2rem; }
}

/* =========================================
   RESPONSIVE - MOBILE / SMALL TABLET (Max 900px)
   ========================================= */
@media (max-width: 900px) {
    section { padding: 60px 0; }

    header {
        min-height: 72px;
        padding: 12px 5%;
    }

    header nav {
        display: flex;
        align-items: center;
    }

    .logo {
        min-width: 0;
    }

    .logo img {
        height: 42px;
        width: auto;
    }

    .top-nav {
        flex-direction: row;
        gap: 10px;
        padding: 12px 5%;
        text-align: center;
    }

    .menu-toggle { display: flex; }
    .desktop-cta { display: none; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 320px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 100px 30px 30px;
        gap: 10px;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1050;
        overflow-y: auto;
    }

    .nav-links.active { right: 0; }
    .nav-links li { width: 100%; }
    .nav-links a {
        font-size: 1.1rem;
        display: block;
        padding: 14px 0;
        border-bottom: 1px solid var(--border-light);
        width: 100%;
    }
    .nav-links a::after { display: none; }

    .hero {
        flex-direction: column-reverse;
        padding: 50px 5%;
        min-height: auto;
        text-align: center;
        gap: 60px;
    }

    .hero-right {
        max-width: 100%;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-right p { margin-left: auto; margin-right: auto; }
    .hero-btns { justify-content: center; width: 100%; }
    .typing-container { justify-content: center; }
    .hero-stats { justify-content: center; flex-wrap: wrap; width: 100%; }

    .dev-visual {
        width: 100%;
        max-width: 400px;
        height: 340px;
        margin: 0 auto;
        padding: 0 20px;
    }

    .code-card { padding: 20px; }
    .code-body { gap: 12px; }
    .line-inner { height: 10px; }
    .code-num { font-size: 0.7rem; }

    .icon-1 { top: -10px; right: 0; width: 52px; height: 52px; font-size: 1.1rem; }
    .icon-2 { bottom: 20px; left: 0; width: 52px; height: 52px; font-size: 1.1rem; }
    .icon-3 { top: 45%; right: -10px; width: 52px; height: 52px; font-size: 1.1rem; }
    .icon-4 { bottom: -10px; right: 40px; width: 52px; height: 52px; font-size: 1.1rem; }

    .about-content h2 { font-size: 2rem; }
    .about-list { grid-template-columns: 1fr; }
    .cta-banner-content { flex-direction: column; text-align: center; }
    .cta-banner-text h2 { font-size: 1.6rem; }
    .cta-banner-btns { justify-content: center; width: 100%; }
    .contact-wrapper { grid-template-columns: 1fr; }
    .section-header { margin-bottom: 40px; }
}

/* =========================================
   RESPONSIVE - SMALL PHONES (Max 600px)
   ========================================= */
@media (max-width: 600px) {
    .top-nav { font-size: 0.75rem; }
    .social-icons a { width: 28px; height: 28px; font-size: 0.75rem; }

    .hero-right h1 { font-size: 1.9rem; letter-spacing: -0.5px; }
    .typing-container { font-size: 1.15rem; min-height: 32px; }
    .cursor { height: 1.1rem; }
    .hero-right p { font-size: 0.95rem; }

    .hero-btns { flex-direction: column; width: 100%; gap: 12px; }
    .cta-btn, .btn-outline { width: 100%; justify-content: center; }

    .dev-visual {
        width: 100%;
        max-width: 340px;
        height: 300px;
        padding: 0 25px;
        margin: 0 auto;
    }

    .code-card { padding: 16px; border-radius: 14px; }
    .code-header { padding-bottom: 10px; gap: 6px; }
    .code-header .dot { width: 10px; height: 10px; }
    .code-body { gap: 9px; padding-top: 4px; }
    .code-line { gap: 8px; }
    .line-inner { height: 8px; border-radius: 4px; }
    .code-num { font-size: 0.65rem; min-width: 12px; }

    .floating-icon {
        width: 44px; height: 44px;
        font-size: 0.95rem;
        border-radius: 12px;
    }

    .icon-1 { top: -8px; right: 5px; }
    .icon-2 { bottom: 15px; left: 5px; }
    .icon-3 { top: 45%; right: 0; }
    .icon-4 { bottom: -8px; right: 35px; }

    .hero-stats { gap: 20px; }
    .stat-item h3 { font-size: 1.4rem; }
    .stat-item p { font-size: 0.75rem; }

    .nav-links { width: 85%; padding: 90px 25px 25px; }

    .services-grid,
    .why-grid,
    .portfolio-grid,
    .testimonial-grid { grid-template-columns: 1fr; }

    .footer-grid { grid-template-columns: 1fr; gap: 30px; }

    footer { padding: 55px 0 20px; }
    .footer-col { min-width: 0; }
    .footer-contact li,
    .footer-contact a {
        overflow-wrap: anywhere;
    }

    .section-header h2 { font-size: 1.7rem; }
    .section-header p { font-size: 0.95rem; }

    .about-visual { height: 340px; }
    .about-card-main { width: 240px; padding: 35px 25px; }
    .about-card-small { font-size: 0.8rem; padding: 12px 16px; }
    .about-content h2 { font-size: 1.7rem; }

    .form-row { grid-template-columns: 1fr; gap: 0; }
    .contact-form { padding: 25px 20px; }

    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; }

    .back-to-top {
        bottom: 20px; right: 20px;
        width: 42px; height: 42px;
    }

    .cta-banner-text h2 { font-size: 1.4rem; }
    .cta-banner-btns { flex-direction: column; }
    .cta-banner-btns .cta-btn, .cta-banner-btns .btn-outline { width: 100%; justify-content: center; }
}

/* =========================================
   RESPONSIVE - EXTRA SMALL (Max 400px)
   ========================================= */
@media (max-width: 400px) {
    .hero-right h1 { font-size: 1.7rem; }
    .typing-container { font-size: 1rem; }
    .logo img { height: 38px; }

    .dev-visual {
        max-width: 300px;
        height: 270px;
        padding: 0 20px;
    }

    .code-card { padding: 14px; gap: 9px; }
    .code-body { gap: 8px; }
    .line-inner { height: 7px; }
    .code-num { font-size: 0.6rem; min-width: 10px; }

    .floating-icon {
        width: 40px; height: 40px;
        font-size: 0.85rem;
        border-radius: 10px;
    }

    .icon-1 { top: -6px; right: 8px; }
    .icon-2 { bottom: 12px; left: 8px; }
    .icon-3 { top: 45%; right: 4px; }
    .icon-4 { bottom: -6px; right: 30px; }
}

/* =========================================
    DUPLICATED RESPONSIVE RULES DISABLED
    ========================================= */
@media (min-width: 99999px) {
    .hero { gap: 40px; }
    .hero-right h1 { font-size: 2.4rem; }
    .typing-container { font-size: 1.5rem; min-height: 40px; }
    .dev-visual { height: 380px; max-width: 400px; }
    .nav-links { gap: 25px; }
    .hero-stats { gap: 30px; }

    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
    .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .process-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
    .process-grid::before { display: none; }
    
    .about-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    .about-visual { height: 400px; max-width: 500px; margin: 0 auto; width: 100%; }
    .section-header h2 { font-size: 2.2rem; }
}

/* =========================================
   RESPONSIVE - MOBILE / SMALL TABLET (Max 900px)
   ========================================= */
@media (max-width: 900px) {

    section { padding: 60px 0; }

    .top-nav {
        flex-direction: row;
        gap: 10px;
        padding: 12px 5%;
        text-align: center;
    }

    .menu-toggle { display: flex; }
    .desktop-cta { display: none; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 320px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 100px 30px 30px;
        gap: 10px;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1050;
        overflow-y: auto;
    }

    .nav-links.active { right: 0; }
    .nav-links li { width: 100%; }
    .nav-links a {
        font-size: 1.1rem;
        display: block;
        padding: 14px 0;
        border-bottom: 1px solid var(--border-light);
        width: 100%;
    }
    .nav-links a::after { display: none; }

    /* HERO: STACK COLUMN-REVERSE */
    .hero {
        flex-direction: column-reverse;
        padding: 50px 5%;
        min-height: auto;
        text-align: center;
        gap: 60px;
    }

    .hero-right {
        max-width: 100%;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-right p { margin-left: auto; margin-right: auto; }
    .hero-btns { justify-content: center; width: 100%; }
    .typing-container { justify-content: center; }
    .hero-stats { justify-content: center; flex-wrap: wrap; width: 100%; }

    .pattern-grid,
    .hero-pattern::before { opacity: 0.5; }

    .dev-visual {
        width: 100%;
        max-width: 400px;
        height: 340px;
        margin: 0 auto;
        padding: 0 20px;
    }

    .code-card { padding: 20px; gap: 14px; }
    .code-body { gap: 12px; }
    .line-inner { height: 10px; }
    .code-num { font-size: 0.7rem; }

    .icon-1 { top: -10px; right: 0; width: 52px; height: 52px; font-size: 1.1rem; }
    .icon-2 { bottom: 20px; left: 0; width: 52px; height: 52px; font-size: 1.1rem; }
    .icon-3 { top: 45%; right: -10px; width: 52px; height: 52px; font-size: 1.1rem; }
    .icon-4 { bottom: -10px; right: 40px; width: 52px; height: 52px; font-size: 1.1rem; }

    .about-content h2 { font-size: 2rem; }
    .about-list { grid-template-columns: 1fr; }
    .cta-banner-content { flex-direction: column; text-align: center; }
    .cta-banner-text h2 { font-size: 1.6rem; }
    .cta-banner-btns { justify-content: center; width: 100%; }
    .contact-wrapper { grid-template-columns: 1fr; }
    .section-header { margin-bottom: 40px; }
}

/* =========================================
   RESPONSIVE - SMALL PHONES (Max 600px)
   ========================================= */
@media (max-width: 600px) {
    .top-nav { font-size: 0.75rem; }
    .social-icons a { width: 28px; height: 28px; font-size: 0.75rem; }

    .hero-right h1 { font-size: 1.9rem; letter-spacing: -0.5px; }
    .typing-container { font-size: 1.15rem; min-height: 32px; }
    .cursor { height: 1.1rem; }
    .hero-right p { font-size: 0.95rem; }

    .hero-btns { flex-direction: column; width: 100%; gap: 12px; }
    .cta-btn, .btn-outline { width: 100%; justify-content: center; }

    .dev-visual {
        width: 100%;
        max-width: 340px;
        height: 300px;
        padding: 0 25px;
        margin: 0 auto;
    }

    .code-card { padding: 16px; gap: 10px; border-radius: 14px; }
    .code-header { padding-bottom: 10px; gap: 6px; }
    .code-header .dot { width: 10px; height: 10px; }
    .code-body { gap: 9px; padding-top: 4px; }
    .code-line { gap: 8px; }
    .line-inner { height: 8px; border-radius: 4px; }
    .code-num { font-size: 0.65rem; min-width: 12px; }

    .floating-icon {
        width: 44px; height: 44px;
        font-size: 0.95rem;
        border-radius: 12px;
    }

    .icon-1 { top: -8px; right: 5px; }
    .icon-2 { bottom: 15px; left: 5px; }
    .icon-3 { top: 45%; right: 0; }
    .icon-4 { bottom: -8px; right: 35px; }

    .hero-stats { gap: 20px; }
    .stat-item h3 { font-size: 1.4rem; }
    .stat-item p { font-size: 0.75rem; }

    .nav-links { width: 85%; padding: 90px 25px 25px; }

    .services-grid,
    .why-grid,
    .portfolio-grid,
    .testimonial-grid { grid-template-columns: 1fr; }
    
    .process-grid { grid-template-columns: 1fr; }
    
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    
    .section-header h2 { font-size: 1.7rem; }
    .section-header p { font-size: 0.95rem; }
    
    .about-visual { height: 340px; }
    .about-card-main { width: 240px; padding: 35px 25px; }
    .about-card-small { font-size: 0.8rem; padding: 12px 16px; }
    .about-content h2 { font-size: 1.7rem; }
    
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .contact-form { padding: 25px 20px; }
    
    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; }
    
    .back-to-top {
        bottom: 20px; right: 20px;
        width: 42px; height: 42px;
    }
    
    .cta-banner-text h2 { font-size: 1.4rem; }
    .cta-banner-btns { flex-direction: column; }
    .cta-banner-btns button { width: 100%; justify-content: center; }

    .trusted-logos { gap: 25px; }
    .trusted-logo { font-size: 0.9rem; }
}

/* =========================================
   RESPONSIVE - EXTRA SMALL (Max 400px)
   ========================================= */
@media (max-width: 400px) {
    .hero-right h1 { font-size: 1.7rem; }
    .typing-container { font-size: 1rem; }
    .logo img { height: 38px; }

    .dev-visual {
        max-width: 300px;
        height: 270px;
        padding: 0 20px;
    }

    .code-card { padding: 14px; gap: 9px; }
    .code-body { gap: 8px; }
    .line-inner { height: 7px; }
    .code-num { font-size: 0.6rem; min-width: 10px; }

    .floating-icon {
        width: 40px; height: 40px;
        font-size: 0.85rem;
        border-radius: 10px;
    }

    .icon-1 { top: -6px; right: 8px; }
    .icon-2 { bottom: 12px; left: 8px; }
    .icon-3 { top: 45%; right: 4px; }
    .icon-4 { bottom: -6px; right: 30px; }
}
/* UI POLISH (2026-10-23): text is centred on small screens, so darken evenly */
@media (max-width: 900px) {
    .hero-background-slider::after { background: rgba(8, 13, 36, 0.78); }
}

/* UI POLISH (2026-10-23): on phones the floating badges covered the mission card;
   stack them as chips under it instead */
@media (max-width: 600px) {
    .about-visual {
        height: auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .about-card-main {
        position: static;
        transform: none;
        width: 100%;
        max-width: 320px;
        margin-bottom: 6px;
    }
    .about-card-small {
        position: static;
        animation: none;
    }
}
