/* =========================================================
   RESPONSIVE STYLES
   ========================================================= */

/* Large Desktops (Up to 1440px) */
@media screen and (max-width: 1440px) {
    .container {
        max-width: 1200px;
    }
    .hero-title {
        font-size: 3.25rem;
    }
}

/* Desktops & Laptops (Up to 1280px) */
@media screen and (max-width: 1280px) {
    .container {
        max-width: 1024px;
        padding: 0 1.5rem;
    }
    .hero-title {
        font-size: 3rem;
    }
    .hero-desc {
        font-size: 1.05rem;
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        gap: 2rem;
    }
    .footer-col:last-child {
        grid-column: span 4;
        margin-top: 1.5rem;
        max-width: 450px;
    }
}

/* Tablets Landscape (Up to 1024px) */
@media screen and (max-width: 1024px) {
    .container {
        max-width: 960px;
    }
    .hero-grid {
        gap: 2.5rem;
    }
    .hero-title {
        font-size: 2.75rem;
    }
    .about-grid {
        gap: 3rem;
    }
    .about-title {
        font-size: 2.5rem;
    }
    .process-grid {
        gap: 2rem;
    }
    .process-line {
        display: none;
    }
}

/* Tablets Portrait (Up to 991px) */
@media screen and (max-width: 991px) {
    /* Header & Navigation Mobile Toggler Activation */
    .mobile-nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--dark-card);
        border-left: 1px solid var(--dark-border);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 6rem 2.5rem 3rem 2.5rem;
        gap: 1.75rem;
        transition: var(--transition-normal);
        z-index: 1000;
        overflow-y: auto;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        font-size: 1.1rem;
        width: 100%;
        justify-content: space-between;
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .nav-dropdown-arrow {
        top: 25px;
        right: 0;
    }
    
    .dropdown-menu {
        position: static;
        transform: none !important;
        opacity: 1;
        visibility: visible;
        width: 100%;
        background: rgba(0,0,0,0.2);
        box-shadow: none;
        border: none;
        padding: 0 0 0 1rem;
        display: none; /* Controlled via JS click toggle */
        margin-top: 0.5rem;
    }
    
    .nav-item.active .dropdown-menu {
        display: block;
    }

    .services-nav-item.arrow-open .dropdown-menu,
    .industries-nav-item.arrow-open .dropdown-menu,
    .technologies-nav-item.arrow-open .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .industries-mega-menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        max-height: min(56vh, 520px);
        overflow-y: auto;
        padding: 8px;
        border: 1px solid rgba(96, 165, 250, 0.14);
        border-radius: 12px;
        background: rgba(0, 0, 0, 0.2);
    }

    .industries-nav-item.active .industries-mega-menu,
    .industries-nav-item.arrow-open .industries-mega-menu {
        display: grid;
    }

    .industry-mega-item a {
        min-height: 54px;
        padding: 8px;
        font-size: 0.78rem;
    }

    .industry-mega-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }
    
    /* Hamburger Transform to X */
    .mobile-nav-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .mobile-nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-nav-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Hero Stacking */
    .hero {
        padding-top: 120px;
        padding-bottom: 80px;
    }
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3.5rem;
        text-align: center;
    }
    .hero-content {
        align-items: center;
    }
    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-stats-row {
        justify-content: center;
        flex-wrap: wrap;
        gap: 2rem;
    }
    .hero-visual {
        height: 400px;
        order: -1; /* visual on top for mobile/tablet */
    }
    
    /* About Stacking */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
        width: 100%;
        max-width: 1280px;
        margin: 0 auto;
        padding: 0 1.25rem;
    }
    .about-section::after {
        display: none;
    }
    .about-content {
        padding-left: 0;
        padding-right: 0;
        border-right: none;
    }
    .about-visual {
        order: -1;
        max-width: 600px;
        margin: 0 auto;
        padding-left: 0;
    }
    
    /* Process Split Row Layout Stacking */
    .process-row-layout {
        flex-direction: column;
        gap: 3.5rem;
    }
    .process-left-col {
        position: static;
        text-align: center;
        width: 100%;
    }
    .process-left-col .section-title {
        text-align: center;
    }
    .title-line {
        white-space: normal;
    }
    .process-line {
        display: none;
    }
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem 2rem;
        width: 100%;
    }

    /* Portfolio Carousel tablet adjustments */
    .portfolio-slider-window {
        overflow-x: auto;
        scrollbar-width: none;
    }
    .portfolio-slider-window::-webkit-scrollbar {
        display: none;
    }
    .portfolio-card {
        flex: 0 0 290px;
        width: 290px;
    }
    .slider-side-btn {
        display: none;
    }
    .portfolio-section .section-title {
        white-space: normal;
    }

    /* CTA Stacking */
    .cta-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 2.5rem;
        padding: 3rem 2rem;
    }
    .cta-left {
        flex-direction: column;
        gap: 1.5rem;
    }
    .cta-icon-badge {
        width: 70px;
        height: 70px;
    }
    
    /* Footer Grid */
    .footer-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 3rem 2rem;
    }
    .footer-col:first-child {
        grid-column: span 3;
    }
    .footer-col:last-child {
        grid-column: span 3;
        max-width: 100%;
    }
    .footer-col:not(:last-child) {
        border-right: none;
        padding-right: 0;
    }
}

/* Small Tablets & Large Mobiles (Up to 768px) */
@media screen and (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .section-title {
        font-size: 2.15rem;
    }
    .about-title {
        font-size: 2.15rem;
    }
    .portfolio-header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }
    .portfolio-slider-window {
        margin: 0 -1.25rem;
        padding: 0.5rem 1.25rem;
    }
    .portfolio-visual-container {
        height: 150px;
    }
}

/* Mobile Screens (Up to 576px) */
@media screen and (max-width: 576px) {
    .services-title-line {
        width: auto;
        white-space: normal;
        transform: none !important;
    }

    .hero-title {
        font-size: 2.25rem;
    }
    .hero-desc {
        font-size: 1rem;
    }
    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    .hero-stats-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding-top: 1.5rem;
    }
    .stat-item-small {
        width: 100%;
    }
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .process-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        max-width: 320px;
        margin: 4rem auto 0 auto;
    }
    .process-step {
        align-items: center;
        text-align: center;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .footer-col:first-child {
        grid-column: span 1;
    }
    .footer-col:last-child {
        grid-column: span 1;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    .footer-bottom-links {
        justify-content: center;
        flex-wrap: wrap;
    }
    .cta-title {
        font-size: 1.75rem;
    }
    .cta-desc {
        font-size: 0.95rem;
    }
}

/* Ultra Small Mobiles (Up to 375px) */
@media screen and (max-width: 375px) {
    .hero-title {
        font-size: 2rem;
    }
    .section-title {
        font-size: 1.85rem;
    }
    .about-title {
        font-size: 1.85rem;
    }
}

/* =========================================================
   FIGMA-ACCURATE DESKTOP COMPOSITION
   The reference frame is a compact 1440px desktop layout.
   These measurements intentionally keep every section on the
   same visual rhythm instead of stretching it vertically.
   ========================================================= */
@media screen and (min-width: 1281px) {
    :root {
        --primary: #0878f9;
        --primary-hover: #0669df;
        --dark-bg: #020713;
        --light-bg: #fbfbfd;
        --text-gray-light: #aab4c7;
        --section-space: 100px;
    }

    .container {
        max-width: 1440px;
        padding-left: 54px;
        padding-right: 54px;
    }

    .section-padding {
        padding: var(--section-space) 0;
    }

    header {
        padding: 26px 0;
    }

    header.sticky {
        padding: 14px 0;
        background: rgba(2, 7, 19, 0.92);
    }

    .logo {
        align-items: flex-start;
    }

    .logo-main {
        font-size: 30px;
        letter-spacing: -1.1px;
    }

    .logo-main span {
        margin-left: 5px;
    }

    .logo-sub {
        width: 100%;
        margin-top: 3px;
        font-size: 10px;
    }

    .nav-menu {
        gap: 42px;
    }

    .nav-link,
    .cta-button {
        font-size: 14px;
    }

    .cta-button {
        min-width: 146px;
        justify-content: center;
        padding: 13px 22px;
    }

    .hero {
        height: 768px;
        min-height: 768px;
        padding: 118px 0 30px;
        align-items: stretch;
    }

    .hero-grid {
        grid-template-columns: 52% 48%;
        gap: 0;
        height: 100%;
        align-items: center;
    }

    .hero-content {
        z-index: 2;
        max-width: 720px;
    }

    .hero-tag {
        padding: 0;
        margin-bottom: 18px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        font-size: 12px;
        letter-spacing: 1.2px;
    }

    .hero-title {
        max-width: 650px;
        margin-bottom: 24px;
        font-size: 52px;
        line-height: 1.1;
        letter-spacing: -1.8px;
    }

    .hero-title .text-gradient-blue {
        white-space: nowrap;
    }

    .hero-desc {
        max-width: 555px;
        margin-bottom: 28px;
        font-size: 17px;
        line-height: 1.7;
        color: #f2f5fb;
    }

    .hero-actions {
        gap: 16px;
        margin-bottom: 48px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 14px 28px;
        font-size: 14px;
    }

    .hero-stats-row {
        gap: 26px;
        padding-top: 0;
        border-top: 0;
    }

    .stat-item-small {
        gap: 10px;
        min-width: 130px;
    }

    .stat-item-small .stat-icon {
        width: 38px;
        height: 38px;
        border: 0;
        background: rgba(7, 105, 244, 0.08);
        color: #1684ff;
    }

    .stat-item-small .stat-number {
        font-size: 22px;
    }

    .stat-item-small .stat-label {
        margin-top: 3px;
        font-size: 10px;
        text-transform: none;
        letter-spacing: 0;
        white-space: nowrap;
    }

    .hero-visual {
        align-self: stretch;
        height: 100%;
        width: calc(100% + 54px);
        margin-right: -54px;
        overflow: hidden;
    }

    .hero-image {
        width: 100%;
        height: 100%;
        max-width: none;
        object-fit: cover;
        animation: floatHomeVisual 7s ease-in-out infinite;
        filter: none;
        object-position: 58% center;
        -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 90%, transparent 100%);
        mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 90%, transparent 100%);
    }

    .services-section {
        height: auto;
    }

    .section-header {
        margin-bottom: 26px;
    }

    .section-tag {
        margin-bottom: 8px;
        font-size: 12px;
        letter-spacing: 1.3px;
    }

    .section-title {
        font-size: 34px;
        line-height: 1.18;
        letter-spacing: -0.9px;
    }

    .services-title {
        width: 590px;
    }

    .services-grid {
        gap: 28px;
    }

    .service-card {
        min-height: 382px;
        padding: 26px 22px 22px;
        border-radius: 14px;
        border-color: #e3e6eb;
        box-shadow: 0 3px 12px rgba(15, 23, 42, 0.05);
    }

    .service-icon-box {
        width: 74px;
        height: 74px;
        margin: 0 0 12px -7px;
    }

    .service-icon-box svg {
        width: 54px;
        height: 54px;
    }

    .service-card-title {
        margin-bottom: 16px;
        font-size: 20px;
        line-height: 1.25;
    }

    .service-card-desc {
        margin-bottom: 18px;
        font-size: 13px;
        line-height: 1.62;
    }

    .service-link {
        font-size: 13px;
    }

    .about-section {
        height: auto;
    }

    .about-section::after {
        left: 40%;
    }

    .about-grid {
        grid-template-columns: 40% 60%;
        height: auto;
    }

    .about-content {
        height: auto;
        justify-content: center;
        padding-left: max(54px, calc((100vw - 1440px) / 2 + 54px));
        padding-right: 42px;
    }

    .about-title {
        max-width: 520px;
        margin-bottom: 16px;
        font-size: 34px;
        line-height: 1.2;
        letter-spacing: -0.9px;
    }

    .about-desc {
        max-width: 515px;
        margin-bottom: 28px;
        font-size: 14px;
        line-height: 1.65;
    }

    .features-grid {
        gap: 22px 24px;
    }

    .feature-item {
        gap: 6px;
    }

    .feature-header {
        gap: 9px;
    }

    .feature-icon-wrapper {
        width: 34px;
        height: 34px;
    }

    .feature-item h4 {
        font-size: 13px;
    }

    .feature-item p {
        padding-left: 43px;
        font-size: 14px;
        line-height: 1.55;
    }

    .about-visual {
        height: 100%;
        padding-left: 0;
        overflow: hidden;
    }

    .about-map-image {
        width: 100%;
        height: 100%;
        max-width: none;
        object-fit: fill;
        object-position: center;
        mix-blend-mode: screen;
        filter: opacity(0.9) drop-shadow(0 0 30px rgba(37, 99, 235, 0.16));
    }

    .portfolio-section {
        height: auto;
    }

    .portfolio-header-container {
        margin-bottom: 16px;
    }

    .portfolio-header-container .section-tag {
        margin-bottom: 7px;
    }

    .portfolio-view-all {
        font-size: 13px;
    }

    .portfolio-slider-wrapper {
        margin-top: 0;
    }

    .portfolio-slider-wrapper .slider-side-btn {
        top: 105px;
        width: 42px;
        height: 42px;
        color: #0878f9;
        border-color: rgba(8, 120, 249, 0.08);
        box-shadow: 0 5px 18px rgba(15, 23, 42, 0.10);
    }

    .portfolio-slider-wrapper .slider-side-btn.left {
        left: -21px;
    }

    .portfolio-slider-wrapper .slider-side-btn.right {
        right: -21px;
    }

    .portfolio-slider-wrapper .slider-side-btn:hover,
    .portfolio-slider-wrapper .slider-side-btn:focus-visible {
        background: #0878f9;
        color: #ffffff;
        border-color: #0878f9;
    }

    .portfolio-slider-window {
        padding: 0;
    }

    .portfolio-track {
        gap: 20px;
    }

    .portfolio-card {
        flex-basis: calc((100% - 3 * 20px) / 4);
        width: calc((100% - 3 * 20px) / 4);
    }

    .portfolio-visual-container {
        height: 210px;
        padding: 12px;
        border-radius: 18px;
        overflow: hidden;
    }

    .portfolio-img {
        border-radius: 12px;
        object-fit: cover;
        object-position: center;
        background-repeat: no-repeat;
        overflow: hidden;
    }

    .portfolio-info {
        padding: 16px 4px 0;
    }

    .portfolio-card-title {
        font-size: 16px;
    }

    .portfolio-category {
        font-size: 12px;
    }

    .control-btn {
        width: 42px;
        height: 42px;
    }

    .process-section {
        height: auto;
    }

    .process-row-layout {
        gap: 58px;
        align-items: flex-start;
    }

    .process-left-col {
        flex: 0 0 365px;
    }

    .process-left-col .section-tag {
        margin-bottom: 13px;
        font-size: 12px;
    }

    .process-left-col .section-title {
        font-size: 34px;
        line-height: 1.3;
    }

    .process-right-col {
        padding-top: 5px;
    }

    .process-grid {
        gap: 24px;
    }

    .process-line {
        top: 31px;
        left: 31px;
    }

    .step-icon-container {
        width: 62px;
        height: 62px;
        margin-bottom: 14px;
    }

    .step-number {
        margin-bottom: 2px;
        font-size: 11px;
    }

    .step-title {
        margin-bottom: 4px;
        font-size: 14px;
    }

    .step-desc {
        font-size: 11px;
        line-height: 1.48;
        color: #d6dce8;
    }

    .cta-section {
        height: auto;
    }

    .cta-wrapper {
        min-height: 130px;
        padding: 22px 48px;
        border-radius: 18px;
    }

    .cta-left {
        gap: 28px;
    }

    .cta-icon-badge {
        width: 64px;
        height: 64px;
    }

    .cta-rocket-icon {
        width: 58px;
        height: 58px;
    }

    .cta-title {
        margin-bottom: 2px;
        font-size: 24px;
    }

    .cta-desc {
        font-size: 14px;
    }

    footer {
        min-height: 322px;
        padding: 38px 0 16px;
    }

    .footer-grid {
        grid-template-columns: 1.2fr 0.72fr 1.22fr 0.85fr 1.35fr;
        gap: 24px;
        margin-bottom: 20px;
    }

    .footer-col:not(:last-child) {
        padding-right: 20px;
    }

    footer .logo {
        margin-bottom: 10px !important;
    }

    .footer-desc {
        margin: 6px 0 10px;
        font-size: 14px;
        line-height: 1.65;
    }

    .social-links {
        gap: 10px;
        padding-top: 7px;
    }

    .social-icon {
        width: 32px;
        height: 32px;
    }

    .footer-col h4,
    .newsletter-heading {
        margin-bottom: 12px;
        font-size: 15px;
    }

    .footer-links {
        gap: 5px;
    }

    .footer-links a,
    .contact-info-item,
    .newsletter-subdesc,
    .newsletter-input {
        font-size: 13px;
    }

    .contact-info-list {
        gap: 7px;
    }

    .contact-info-list[style] {
        margin-bottom: 12px !important;
    }

    .contact-info-item {
        gap: 8px;
    }

    .contact-info-item .icon-wrapper {
        width: 22px;
        height: 22px;
        border: 0;
        background: transparent;
    }

    .contact-info-item .icon-wrapper svg {
        width: 13px;
        height: 13px;
    }

    .newsletter-subdesc {
        margin-bottom: 8px;
    }

    .newsletter-input {
        padding: 8px 42px 8px 12px;
    }

    .newsletter-submit {
        top: 3px;
        right: 3px;
        width: 28px;
        height: 28px;
    }

    .footer-bottom {
        padding-top: 10px;
        font-size: 12px;
    }
}

/* Compact laptop layout: retain the responsive grids without the former
   oversized outer gutters and eight-rem section gaps. */
@media screen and (min-width: 992px) and (max-width: 1280px) {
    :root {
        --section-space: 100px;
    }

    .container {
        max-width: 1200px;
        padding-left: 24px;
        padding-right: 24px;
    }

    .section-padding {
        padding: var(--section-space) 0;
    }

    header {
        padding: 20px 0;
    }

    .nav-menu {
        gap: 20px;
    }

    .hero {
        padding: 130px 0 54px;
    }

    .hero-grid {
        gap: 28px;
    }

    .hero-title {
        font-size: 44px;
    }

    .hero-actions {
        margin-bottom: 42px;
    }

    .hero-stats-row {
        gap: 18px;
    }

    .stat-item-small {
        gap: 8px;
    }

    .stat-item-small .stat-icon {
        width: 36px;
        height: 36px;
    }

    .stat-item-small .stat-label {
        font-size: 10px;
        text-transform: none;
        white-space: nowrap;
    }

    .service-card {
        padding: 28px 26px;
    }

    .portfolio-header-container {
        margin-bottom: 30px;
    }

    .process-row-layout {
        align-items: flex-start;
    }

    .process-left-col .section-title {
        font-size: 34px;
    }

    .cta-wrapper {
        padding: 28px 36px;
    }

    .cta-title {
        font-size: 28px;
    }

    footer {
        padding-top: 58px;
    }
}

/* =========================================================
   PRODUCTION TABLET + MOBILE LAYOUT
   These overrides intentionally come last so the exact desktop
   Figma composition remains unchanged above 991px.
   ========================================================= */
@media screen and (max-width: 991px) {
    :root {
        --section-space: 48px;
    }

    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    html {
        scroll-padding-top: 82px;
    }

    .container {
        max-width: 760px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .section-padding {
        padding: var(--section-space) 0;
    }

    header,
    header.sticky {
        padding: 14px 0;
        background: rgba(2, 7, 19, 0.92);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .logo {
        align-items: flex-start;
    }

    .logo-main {
        font-size: 26px;
    }

    .logo-main span {
        margin-left: 4px;
    }

    .logo-sub {
        width: 100%;
        margin-top: 3px;
        font-size: 9px;
    }

    .navbar-container {
        gap: 14px;
    }

    .navbar-container > .cta-button {
        margin-left: auto;
        padding: 10px 18px;
        font-size: 13px;
    }

    .mobile-nav-toggle {
        flex-shrink: 0;
    }

    .nav-menu {
        right: -110%;
        width: min(340px, 88vw);
        padding: 88px 28px 36px;
        gap: 12px;
        background: #050b18;
        box-shadow: -18px 0 42px rgba(0, 0, 0, 0.48);
    }

    .nav-link {
        font-size: 16px;
    }

    .dropdown-item a {
        padding: 10px 12px;
        font-size: 13px;
    }

    .hero {
        min-height: 0;
        padding: 95px 0 35px;
    }

    .hero-grid {
        gap: 24px;
    }

    .hero-visual {
        order: -1;
        width: 100%;
        height: clamp(260px, 48vw, 360px);
        margin: 0;
        overflow: hidden;
    }

    .hero-image {
        width: 100%;
        height: 100%;
        max-width: none;
        object-fit: cover;
        object-position: center;
        animation: none;
        -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
        mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
    }

    .hero-content {
        width: 100%;
    }

    .hero-tag {
        margin-bottom: 12px;
    }

    .hero-title {
        max-width: 680px;
        margin-bottom: 16px;
        font-size: clamp(34px, 5.8vw, 46px);
        line-height: 1.12;
    }

    .hero-desc {
        max-width: 610px;
        margin-bottom: 22px;
        line-height: 1.6;
    }

    .hero-actions {
        margin-bottom: 28px;
    }

    .hero-stats-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        width: 100%;
        padding-top: 18px;
    }

    .stat-item-small {
        min-width: 0;
    }

    .stat-item-small .stat-label {
        text-transform: none;
        white-space: normal;
    }

    .services-section,
    .portfolio-section,
    .process-section {
        height: auto;
    }

    .section-header {
        margin-bottom: 22px;
    }

    .services-title {
        width: min(100%, 590px);
    }

    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        max-width: none;
    }

    .service-card {
        min-height: 280px;
        padding: 22px 20px;
    }

    .service-icon-box {
        width: 62px;
        height: 62px;
        margin: 0 0 10px -4px;
    }

    .about-section {
        height: auto;
    }

    .about-grid {
        gap: 28px;
        padding: 0;
    }

    .about-visual {
        width: 100%;
        max-width: none;
        overflow: hidden;
    }

    .about-map-image {
        width: 100%;
        max-width: none;
        object-fit: contain;
        mix-blend-mode: screen;
        filter: opacity(0.9) drop-shadow(0 0 24px rgba(37, 99, 235, 0.14));
    }

    .about-content {
        width: min(100% - 32px, 712px);
        margin: 0 auto;
    }

    .portfolio-header-container {
        align-items: flex-start;
        margin-bottom: 20px;
    }

    .portfolio-slider-window {
        scroll-snap-type: x mandatory;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
    }

    .portfolio-track {
        width: 100%;
        gap: 16px;
    }

    .portfolio-card {
        flex: 0 0 calc((100% - 16px) / 2);
        width: calc((100% - 16px) / 2);
        scroll-snap-align: start;
    }

    .portfolio-visual-container {
        height: 200px;
        padding: 12px;
        border-radius: 16px;
        overflow: hidden;
    }

    .process-row-layout {
        gap: 28px;
    }

    .process-grid {
        margin: 0;
    }

    .process-step {
        align-items: center;
        text-align: center;
    }

    .cta-section {
        height: auto;
    }

    .cta-wrapper {
        padding: 28px 22px;
        gap: 22px;
        border-radius: 18px;
    }

    .cta-left {
        gap: 14px;
    }

    footer {
        min-height: 0;
        padding: 42px 0 20px;
    }

    .footer-grid {
        gap: 28px 22px;
    }

    .footer-desc {
        max-width: 380px;
    }
}

@media screen and (max-width: 576px) {
    :root {
        --section-space: 36px;
    }

    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .section-padding {
        padding: var(--section-space) 0;
    }

    .navbar-container > .cta-button {
        display: none;
    }

    .hero {
        padding: 88px 0 28px;
    }

    .hero-visual {
        height: clamp(220px, 67vw, 280px);
    }

    .hero-grid {
        gap: 26px;
    }

    .hero-title {
        font-size: clamp(32px, 9.5vw, 40px);
        letter-spacing: -1px;
    }

    .hero-desc {
        font-size: 15px;
    }

    .hero-actions {
        gap: 12px;
        margin-bottom: 30px;
    }

    .btn-primary,
    .btn-secondary {
        min-height: 50px;
    }

    .hero-stats-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 10px;
        align-items: stretch;
    }

    .stat-item-small {
        align-items: center;
    }

    .stat-item-small .stat-icon {
        width: 36px;
        height: 36px;
        flex: 0 0 36px;
    }

    .stat-item-small .stat-number {
        font-size: 20px;
    }

    .stat-item-small .stat-label {
        font-size: 9px;
        line-height: 1.3;
    }

    .section-title,
    .about-title,
    .process-left-col .section-title {
        font-size: clamp(28px, 8vw, 34px);
    }

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

    .service-card {
        min-height: 0;
        padding: 24px 22px;
    }

    .about-grid {
        gap: 34px;
    }

    .about-content {
        width: calc(100% - 36px);
    }

    .features-grid {
        gap: 22px;
    }

    .portfolio-header-container {
        gap: 12px;
        margin-bottom: 20px;
    }

    .portfolio-slider-window {
        margin: 0 -18px;
        padding: 4px 18px 10px;
    }

    .portfolio-card {
        flex-basis: 100%;
        width: 100%;
    }

    .portfolio-visual-container {
        height: 230px;
        padding: 14px;
        border-radius: 18px;
        overflow: hidden;
    }

    .process-row-layout {
        gap: 32px;
    }

    .process-grid {
        max-width: 360px;
        margin: 0 auto;
        gap: 28px;
    }

    .step-icon-container {
        margin-bottom: 12px;
    }

    .cta-wrapper {
        padding: 32px 20px;
    }

    .cta-title {
        font-size: 25px;
    }

    .footer-grid {
        gap: 34px;
    }

    .footer-col {
        align-items: flex-start;
    }

    .footer-bottom {
        gap: 12px;
    }

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

@media screen and (max-width: 576px) {
    .industries-mega-menu {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Keep desktop hero copy visually connected to the fixed header. */
@media screen and (min-width: 992px) {
    .hero-content,
    .services-hero-content,
    .about-hero-content,
    .baa-hero-copy {
        position: relative;
        top: -20px;
    }
}
