/* =========================================================
           RESET
        ========================================================= */

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: #ffffff;
            color: #111111;
            overflow-x: hidden;
        }

        img {
            max-width: 100%;
            display: block;
        }

        a {
            text-decoration: none;
            color: inherit;
        }

        button {
            font-family: inherit;
        }

        /* =========================================================
           CORES
        ========================================================= */

        :root {
            --black: #050505;
            --black-soft: #0c0c0c;
            --black-card: #121212;

            --red: #ff1515;
            --red-dark: #d90909;

            --gray: #333333;
            --gray-light: #777777;

            --light: #f5f5f5;
            --white: #ffffff;

            --container: 1180px;
        }

        /* =========================================================
           UTILITÁRIOS
        ========================================================= */

        .container {
            width: min(var(--container), calc(100% - 40px));
            margin: 0 auto;
        }

        .section {
            padding: 70px 0;
        }

        .section-label {
            color: var(--red);
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 2px;
            text-transform: uppercase;
            margin-bottom: 15px;
        }

        .section-title {
            font-size: clamp(30px, 4vw, 44px);
            line-height: 1.15;
            font-weight: 800;
            letter-spacing: -1.5px;
        }

        .section-description {
            color: #666;
            max-width: 650px;
            margin: 18px auto 0;
            line-height: 1.7;
            font-size: 15px;
        }

        .center {
            text-align: center;
        }

        /* =========================================================
   HEADER — FUNDO BRANCO
========================================================= */

header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 3px solid #ff1515;
}

.header-inner {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
}

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

nav {
    display: flex;
    align-items: center;
    gap: 34px;
}

nav a {
    color: #111111;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    padding: 8px 0;
}

nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: #ff1515;
    transition: .3s;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

nav a:hover,
nav a.active {
    color: #ff1515;
}

.header-button {
    background: #ff1515;
    color: #ffffff;
    padding: 13px 22px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    transition: .3s;
}

.header-button:hover {
    background: #111111;
    color: #ffffff;
    transform: translateY(-2px);
}

.menu-button {
    display: none;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.menu-button span {
    width: 26px;
    height: 2px;
    background: #111111;
    display: block;
    margin: 5px;
}

        /* =========================================================
           HERO
        ========================================================= */

        .hero {
            min-height: 730px;
            background:
                radial-gradient(circle at 80% 50%, rgba(255, 21, 21, .13), transparent 30%),
                linear-gradient(115deg, #020202 0%, #090909 60%, #111111 100%);
            position: relative;
            overflow: hidden;
            color: white;
        }

        .hero::before {
            content: "";
            position: absolute;
            inset: 0;
            background-image:
                linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
            background-size: 70px 70px;
            mask-image: linear-gradient(to right, transparent, black, transparent);
        }

        .hero::after {
            content: "";
            position: absolute;
            width: 500px;
            height: 500px;
            right: -200px;
            top: 100px;
            border: 1px solid rgba(255, 21, 21, .15);
            transform: rotate(45deg);
        }

        .hero-content {
            min-height: 720px;
            display: flex;
            align-items: center;
            position: relative;
            z-index: 2;
        }

        .hero-text {
            width: 50%;
            padding-top: 40px;
        }

        .hero-text h1 {
            font-size: clamp(45px, 5vw, 70px);
            line-height: 1.02;
            letter-spacing: -3px;
            font-weight: 800;
            max-width: 680px;
        }

        .hero-text h1 span {
            color: var(--red);
        }

        .hero-text p {
            margin-top: 28px;
            color: #bdbdbd;
            line-height: 1.7;
            max-width: 510px;
            font-size: 16px;
        }

        .hero-buttons {
            display: flex;
            gap: 15px;
            margin-top: 35px;
            align-items: center;
        }

        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            padding: 15px 25px;
            border-radius: 4px;
            font-size: 13px;
            font-weight: 700;
            transition: .3s;
            cursor: pointer;
        }

        .btn-primary {
            background: var(--red);
            color: #fff;
        }

        .btn-primary:hover {
            background: #fff;
            color: var(--red);
            transform: translateY(-3px);
        }

        .btn-outline {
            border: 1px solid #555;
            color: #fff;
        }

        .btn-outline:hover {
            border-color: var(--red);
            color: var(--red);
        }

        .hero-visual {
            position: absolute;
            right: -50px;
            width: 54%;
            height: 560px;
            top: 125px;
        }

        .device-laptop {
            position: absolute;
            right: 70px;
            top: 30px;
            width: 600px;
            height: 380px;
            background: linear-gradient(145deg, #303030, #111111);
            border-radius: 15px;
            border: 1px solid #444;
            transform: perspective(1000px) rotateY(-8deg) rotateX(3deg);
            box-shadow: 0 50px 100px rgba(0,0,0,.6);
        }

        .device-screen {
            position: absolute;
            inset: 12px;
            background:
                linear-gradient(135deg, #050505, #181818);
            border-radius: 8px;
            overflow: hidden;
        }

        .screen-header {
            height: 35px;
            border-bottom: 1px solid #292929;
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 0 15px;
        }

        .screen-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: #444;
        }

        .screen-content {
            padding: 45px;
        }

        /* Galeria de projetos na tela do dispositivo */
        .screen-carousel {
            position: absolute;
            left: 0;
            right: 0;
            top: 35px;
            bottom: 0;
            overflow: hidden;
            background: #111;
            aspect-ratio: 958 / 545;
        }

        .screen-carousel::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,0,0,.12));
            pointer-events: none;
            z-index: 2;
        }

        .screen-carousel-track {
            display: flex;
            width: 100%;
            height: 100%;
            transform: translate3d(0, 0, 0);
            transition: transform .85s cubic-bezier(.65,0,.2,1);
            will-change: transform;
        }

        .screen-carousel img {
            flex: 0 0 100%;
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            user-select: none;
            -webkit-user-drag: none;
        }

        .screen-carousel-dots {
            position: absolute;
            z-index: 3;
            left: 50%;
            bottom: 10px;
            transform: translateX(-50%);
            /* display: flex; */
            display: none;
            gap: 5px;
        }

        .screen-carousel-dot {
            width: 5px;
            height: 5px;
            border-radius: 50%;
            background: rgba(255,255,255,.45);
            transition: .3s;
        }

        .screen-carousel-dot.active {
            width: 16px;
            border-radius: 5px;
            background: var(--red);
        }

        .screen-carousel:hover .screen-carousel-track {
            transition-duration: .95s;
        }

        /* Modal do portfólio */
        .project-modal {
            position: fixed;
            inset: 0;
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 25px;
            background: rgba(0,0,0,.78);
            /* blur removido para que os controles position:fixed usem a viewport */
            backdrop-filter: none;
            opacity: 0;
            visibility: hidden;
            transition: opacity .25s ease, visibility .25s ease;
        }

        .project-modal.open {
            opacity: 1;
            visibility: visible;
        }

        .project-modal-content {
            position: relative;
            width: min(100%, 980px);
            max-height: 90vh;
            overflow: auto;
            background: #fff;
            border-radius: 10px;
            box-shadow: 0 30px 100px rgba(0,0,0,.4);
            transform: translateY(20px) scale(.98);
            transition: transform .25s ease;
        }

        .project-modal.open .project-modal-content {
            transform: translateY(0) scale(1);
        }

        .project-modal-nav {
            position: initial;
            top: 50%;
            transform: translateY(-50%);
            z-index: 10000;
            width: 48px;
            height: 48px;
            border: 1px solid rgba(255,255,255,.35);
            border-radius: 50%;
            background: rgba(0,0,0,.65);
            color: #fff;
            font-size: 30px;
            line-height: 1;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: .2s ease;
        }

        .project-modal-nav:hover {
            background: var(--red);
            border-color: var(--red);
        }

        .project-modal-prev {
            left: max(12px, calc(50% - 540px));
        }

        .project-modal-next {
            right: max(12px, calc(50% - 540px));
        }

        .project-modal-investment {
            display: flex;
            gap: 5px;
            align-items: center;
        }

        .investment-icon {
            color: #d4d4d4;
            font-weight: 900;
            font-size: 17px;
            line-height: 1;
        }

        .investment-icon.active {
            color: var(--red);
        }

        .project-modal-detail.full-width {
            grid-column: 1 / -1;
        }

        .project-modal-close {
            position: absolute;
            top: 14px;
            right: 14px;
            z-index: 3;
            width: 38px;
            height: 38px;
            border: 1px solid rgba(255, 255, 255, .35);
            border-radius: 50%;
            background: rgba(0,0,0,.72);
            color: #fff;
            font-size: 22px;
            line-height: 1;
            cursor: pointer;
        }

        .project-modal-grid {
            display: grid;
            grid-template-columns: 1.15fr .85fr;
        }

        .project-modal-image {
            min-height: 440px;
            background: lightgrey;
        }

        .project-modal-image img {
            display: block;
            width: 100%;
            height: 100%;
            min-height: 440px;
            object-fit: contain;
        }

        .project-modal-info {
            padding: 45px 35px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .project-modal-category {
            color: var(--red);
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            margin-bottom: 12px;
        }

        .project-modal-info h2 {
            font-size: 30px;
            line-height: 1.15;
            margin-bottom: 16px;
        }

        .project-modal-info p {
            color: #666;
            font-size: 14px;
            line-height: 1.75;
        }

        .project-modal-details {
            margin-top: 28px;
            padding-top: 20px;
            border-top: 1px solid #eee;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 18px 24px;
        }

        .project-modal-detail strong {
            display: block;
            font-size: 11px;
            color: #999;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 4px;
        }

        .project-modal-detail span {
            font-size: 13px;
            color: #222;
        }

        .project-card {
            cursor: pointer;
        }

        @media (max-width: 760px) {
            .project-modal {
                padding: 12px;
            }

            .project-modal-grid {
                grid-template-columns: 1fr;
            }

            .project-modal-image,
            .project-modal-image img {
                min-height: 240px;
                max-height: 45vh;
            }

            .project-modal-info {
                padding: 28px 22px;
            }

            .project-modal-info h2 {
                font-size: 24px;
            }

            .project-modal-nav {
                width: 40px;
                height: 40px;
                font-size: 24px;
            }

            .project-modal-prev { left: 8px; }
            .project-modal-next { right: 8px; }

            .project-modal-details {
                grid-template-columns: 1fr;
            }

            .project-modal-detail.full-width {
                grid-column: auto;
            }
        }

        .screen-content .small {
            color: var(--red);
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 2px;
        }

        .screen-content h3 {
            font-size: 32px;
            margin-top: 10px;
        }

        .screen-line {
            height: 7px;
            background: #2b2b2b;
            width: 65%;
            margin-top: 20px;
        }

        .screen-line.short {
            width: 40%;
        }

        .device-phone {
            position: absolute;
            right: 30px;
            bottom: 55px;
            width: 155px;
            height: 300px;
            background: #111;
            border: 5px solid #333;
            border-radius: 25px;
            box-shadow: 0 30px 70px rgba(0,0,0,.7);
            overflow: hidden;
            z-index: 4;
        }

        .phone-screen {
            position: absolute;
            inset: 6px;
            border-radius: 18px;
            background:
                linear-gradient(160deg, #090909, #1d1d1d);
            padding: 30px 15px;
        }

        .phone-screen h4 {
            font-size: 16px;
            margin-top: 10px;
        }

        .red-shape {
            position: absolute;
            right: 40px;
            top: 60px;
            width: 80px;
            height: 80px;
            background: var(--red);
            clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0 50%);
            opacity: .9;
        }

        .gray-shape {
            position: absolute;
            right: 130px;
            top: -10px;
            width: 100px;
            height: 100px;
            background: #333;
            clip-path: polygon(0 0, 75% 0, 100% 40%, 50% 100%);
            opacity: .8;
        }

        /* =========================================================
           SERVIÇOS
        ========================================================= */

        .services {
            background: #fff;
        }

        .service-grid {
            margin-top: 55px;
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
        }

        .service-card {
            padding: 35px;
            border: 1px solid #e8e8e8;
            border-radius: 7px;
            transition: .35s;
            background: #fff;
            min-height: 205px;
        }

        .service-card:hover {
            transform: translateY(-7px);
            border-color: rgba(255,21,21,.3);
            box-shadow: 0 20px 45px rgba(0,0,0,.08);
        }

        .service-icon {
            width: 52px;
            height: 52px;
            border: 1px solid rgba(255,21,21,.28);
            color: var(--red);
            background: linear-gradient(145deg, #fff, #fafafa);
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            margin-bottom: 22px;
            box-shadow: 0 8px 20px rgba(0,0,0,.04);
        }

        .service-icon svg {
            width: 25px;
            height: 25px;
            stroke: currentColor;
            stroke-width: 1.8;
            fill: none;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .service-card:hover .service-icon {
            background: var(--red);
            color: #fff;
            border-color: var(--red);
            transform: translateY(-1px);
        }

        .service-card h3 {
            font-size: 16px;
            margin-bottom: 10px;
        }

        .service-card p {
            color: #777;
            font-size: 13px;
            line-height: 1.6;
        }

        /* =========================================================
           PORTFÓLIO
        ========================================================= */

        .portfolio {
            background: #f5f5f5;
        }

        .portfolio-filters {
            margin: 45px auto 30px;
            display: flex;
            justify-content: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .filter {
            padding: 10px 18px;
            border-radius: 30px;
            border: 1px solid #ddd;
            background: #fff;
            color: #555;
            font-size: 12px;
            cursor: pointer;
            transition: .3s;
        }

        .filter:hover,
        .filter.active {
            background: var(--red);
            color: white;
            border-color: var(--red);
        }

        .portfolio-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 18px;
        }

        .project-card {
            background: white;
            border-radius: 7px;
            overflow: hidden;
            border: 1px solid #e5e5e5;
            transition: .35s;
        }

        .project-card:hover {
            transform: translateY(-6px);
            box-shadow: 0 20px 50px rgba(0,0,0,.1);
        }

        .project-image {
            height: 190px;
            background: #151515;
            position: relative;
            overflow: hidden;
        }

        .project-image img {
            width: 100%;
            height: 100%;
            /* object-fit: cover; */
            transition: .5s;
        }

        .project-card:hover .project-image img {
            transform: scale(1.05);
        }

        .project-placeholder {
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background:
                radial-gradient(circle at 30% 30%, rgba(255,21,21,.2), transparent 30%),
                linear-gradient(135deg,#111,#272727);
            color: white;
            font-size: 22px;
            font-weight: 700;
        }

        .project-info {
            padding: 23px;
        }

        .project-info h3 {
            font-size: 16px;
            margin-bottom: 8px;
        }

        .project-info p {
            color: #777;
            font-size: 12px;
            line-height: 1.6;
            min-height: 38px;
        }

        .project-link {
            display: inline-flex;
            color: var(--red);
            font-size: 12px;
            font-weight: 700;
            margin-top: 18px;
            gap: 7px;
        }

        .portfolio-button {
            text-align: center;
            margin-top: 35px;
        }

        .portfolio-show-all {
            min-width: 210px;
            justify-content: center;
            cursor: pointer;
        }

        /* A limitação dos 9 projetos é controlada pelo JavaScript.
           Não usar nth-child aqui, pois os filtros precisam exibir todos
           os projetos da categoria, inclusive os que ficam após o 9º. */

        .portfolio-filters {
            overflow-x: auto;
            scrollbar-width: none;
            padding-bottom: 4px;
        }

        .portfolio-filters::-webkit-scrollbar { display: none; }

        .project-modal-nav {
            width: auto;
            min-width: 48px;
            height: 42px;
            padding: 0 14px;
            border-radius: 21px;
            font-size: 12px;
            font-weight: 700;
            white-space: nowrap;
        }

        .investment-icon {
            color: #d6d6d6;
            font-size: 13px;
            transform: rotate(0deg);
        }

        .investment-icon.active {
            color: var(--red);
        }

        /* =========================================================
           SOBRE
        ========================================================= */

        .about {
            background: var(--black);
            color: #fff;
            position: relative;
            overflow: hidden;
        }

        .about-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 80px;
            align-items: center;
        }

        .about .section-label {
            margin-bottom: 15px;
        }

        .about h2 {
            font-size: clamp(35px,4vw,50px);
            line-height: 1.1;
            letter-spacing: -2px;
        }

        .about h2 span {
            color: var(--red);
        }

        .about-text {
            color: #aaa;
            line-height: 1.8;
            font-size: 14px;
            margin-top: 25px;
        }

        .stats {
            display: flex;
            gap: 50px;
            margin-top: 40px;
        }

        .stat strong {
            display: block;
            color: var(--red);
            font-size: 34px;
        }

        .stat span {
            color: #aaa;
            font-size: 11px;
        }

        .about-image {
            height: 400px;
            background:
                linear-gradient(135deg, rgba(255,21,21,.15), transparent),
                url("images/about.png") center/cover;
            border-radius: 5px;
            position: relative;
            overflow: hidden;
        }

        .about-image::after {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient(to top, rgba(0,0,0,.6), transparent);
        }

        .especialidade {
            background: var(--black);
            color: #fff;
        }

        .especialidade .service-card {
        background: #171717;
        border-color: #2b2b2b;
        color: #fff;
        }
        /* =========================================================
           PROCESSO
        ========================================================= */

        .process {
            background: #fff;
        }

        .process-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            margin-top: 65px;
            position: relative;
        }

        .process-grid::before {
            content: "";
            position: absolute;
            top: 30px;
            left: 10%;
            right: 10%;
            height: 1px;
            border-top: 1px dashed #ddd;
        }

        .process-item {
            text-align: center;
            position: relative;
            z-index: 2;
            padding: 0 15px;
        }

        .process-number {
            width: 62px;
            height: 62px;
            background: #111;
            border-radius: 50%;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 25px;
            font-weight: 700;
            border: 5px solid white;
            box-shadow: 0 0 0 1px #ddd;
        }

        .process-item:nth-child(2) .process-number,
        .process-item:nth-child(4) .process-number {
            background: var(--red);
        }

        .process-item h3 {
            font-size: 14px;
            margin-bottom: 10px;
        }

        .process-item p {
            color: #777;
            font-size: 11px;
            line-height: 1.6;
        }

        /* =========================================================
           DEPOIMENTOS
        ========================================================= */

        .testimonials {
            background: #f5f5f5;
            display: none;
        }

        .testimonial-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 18px;
            margin-top: 50px;
        }

        .testimonial {
            background: #fff;
            padding: 30px;
            border: 1px solid #e6e6e6;
            border-radius: 7px;
        }

        .quote {
            color: var(--red);
            font-size: 35px;
            font-weight: 800;
            line-height: 1;
            margin-bottom: 15px;
        }

        .testimonial p {
            color: #666;
            font-size: 13px;
            line-height: 1.7;
        }

        .testimonial-author {
            margin-top: 25px;
        }

        .testimonial-author strong {
            display: block;
            font-size: 12px;
        }

        .testimonial-author span {
            color: #999;
            font-size: 11px;
        }

        /* =========================================================
           CTA
        ========================================================= */

        .cta {
            background: var(--red);
            color: white;
            position: relative;
            overflow: hidden;
        }

        .cta::before {
            content: "";
            position: absolute;
            width: 250px;
            height: 500px;
            left: -70px;
            top: -100px;
            /* background:
                repeating-linear-gradient(
                    110deg,
                    transparent 0,
                    transparent 30px,
                    rgba(255,255,255,.8) 30px,
                    rgba(255,255,255,.8) 42px
                ); */
            transform: skewX(-10deg);
            opacity: .9;
        }

        .cta-inner {
            min-height: 180px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 30px;
            position: relative;
            z-index: 2;
        }

        .cta h2 {
            font-size: 28px;
            margin-bottom: 7px;
        }

        .cta p {
            font-size: 13px;
            opacity: .85;
        }

        .cta .btn {
            background: #050505;
            color: #fff;
            min-width: 170px;
        }

        .cta .btn:hover {
            background: white;
            color: #111;
        }

        /* =========================================================
           FOOTER
        ========================================================= */

        footer {
            background: #050505;
            color: white;
        }

        .footer-main {
            padding: 65px 0;
            display: grid;
            grid-template-columns: 1.4fr 1fr 1fr 1fr;
            gap: 50px;
        }

        .footer-logo img {
            width: 175px;
        }

        .footer-description {
            color: #777;
            font-size: 12px;
            line-height: 1.7;
            max-width: 260px;
            margin-top: 20px;
        }

        .socials {
            /* display: flex; */
            display: none;
            gap: 8px;
            margin-top: 20px;
        }

        .social {
            width: 32px;
            height: 32px;
            border: 1px solid #333;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 4px;
            color: #aaa;
            font-size: 11px;
            transition: .3s;
        }

        .social:hover {
            color: white;
            border-color: var(--red);
            background: var(--red);
        }

        .footer-column h3 {
            font-size: 12px;
            margin-bottom: 20px;
        }

        .footer-column a {
            display: block;
            color: #777;
            font-size: 11px;
            margin-bottom: 12px;
            transition: .3s;
        }

        .footer-column a:hover {
            color: var(--red);
        }

        .footer-bottom {
            border-top: 1px solid #1d1d1d;
            min-height: 60px;
            display: flex;
            justify-content: center;
            align-items: center;
            color: #555;
            font-size: 10px;
        }

        /* =========================================================
           ANIMAÇÕES
        ========================================================= */

        .fade-up {
            opacity: 0;
            transform: translateY(30px);
            transition: opacity .7s ease, transform .7s ease;
        }

        .fade-up.visible {
            opacity: 1;
            transform: translateY(0);
        }

        /* =========================================================
           RESPONSIVO
        ========================================================= */

        @media (max-width: 1000px) {

            .hero-visual {
                opacity: .35;
                right: -200px;
            }

            .hero-text {
                width: 70%;
            }

            .service-grid,
            .portfolio-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .process-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 50px;
            }

            .process-grid::before {
                display: none;
            }

            .testimonial-grid {
                grid-template-columns: 1fr;
            }

            .footer-main {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 700px) {

            .container {
                width: min(var(--container), calc(100% - 30px));
            }

            .section {
                padding: 70px 0;
            }

            .header-inner {
                height: 75px;
            }

            .logo img {
                width: 155px;
            }

            @media (max-width: 700px) {

    nav {
        position: fixed;
        top: 75px;
        left: 0;
        right: 0;
        background: #ffffff;
        flex-direction: column;
        gap: 0;
        padding: 20px;
        transform: translateY(-150%);
        transition: .3s;
        box-shadow: 0 8px 20px rgba(0,0,0,.08);
    }

    nav.open {
        transform: translateY(0);
    }

    nav a {
        color: #111111;
        padding: 15px;
        width: 100%;
        text-align: center;
    }

    nav a:hover,
    nav a.active {
        color: #ff1515;
    }

    .header-button {
        display: none;
    }

    .menu-button {
        display: block;
    }


            .hero,
            .hero-content {
                min-height: 700px;
            }

            .hero-text {
                width: 100%;
                padding-top: 60px;
            }

            .hero-text h1 {
                font-size: 46px;
            }

            .hero-visual {
                opacity: .15;
                right: -330px;
            }

            .hero-buttons {
                flex-direction: column;
                align-items: flex-start;
            }

            .service-grid,
            .portfolio-grid,
            .about-grid,
            .footer-main {
                grid-template-columns: 1fr;
            }

            .about-grid {
                gap: 40px;
            }

            .about-image {
                height: 350px;
            }

            .stats {
                gap: 25px;
                flex-wrap: wrap;
            }

            .process-grid {
                grid-template-columns: 1fr;
            }

            .cta-inner {
                padding: 50px 0;
                flex-direction: column;
                align-items: flex-start;
            }

            .cta::before {
                opacity: .2;
            }

            .footer-bottom {
                padding: 20px 0;
                flex-direction: column;
                gap: 10px;
                justify-content: center;
            }
        }
        
        /* Ajustes finais de responsividade */
        @media (max-width: 700px) {
            .section { padding: 58px 0; }
            .section-title { font-size: clamp(28px, 8vw, 38px); line-height: 1.08; }
            .section-description { font-size: 13px; line-height: 1.65; }
            .portfolio-filters { justify-content: flex-start; flex-wrap: nowrap; margin: 28px 0 22px; gap: 8px; }
            .filter { flex: 0 0 auto; padding: 9px 14px; font-size: 11px; }
            .portfolio-grid { gap: 14px; }
            .project-image { height: 210px; }
            .project-info { padding: 18px; }
            .project-info h3 { font-size: 15px; }
            .project-info p { font-size: 12px; min-height: 0; }
            .portfolio-button { margin-top: 26px; }
            .portfolio-show-all { width: 100%; min-height: 48px; }
            .project-modal { padding: 8px; align-items: flex-end; }
            .project-modal-content { width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; }
            .project-modal-grid { display: flex; flex-direction: column; }
            .project-modal-image, .project-modal-image img { min-height: 210px; max-height: 36vh; }
            .project-modal-info { padding: 24px 18px 30px; }
            .project-modal-info h2 { font-size: 23px; margin-bottom: 10px; }
            .project-modal-info p { font-size: 13px; line-height: 1.65; }
            .project-modal-details { margin-top: 20px; padding-top: 16px; gap: 14px; }
            .project-modal-nav { position: fixed; top: 12px; transform: none; z-index: 10001; height: 38px; min-width: 38px; padding: 0 11px; font-size: 10px; }
            .project-modal-prev { left: 10px; }
            .project-modal-next { right: 10px; }
            .project-modal-close { top: 12px; right: 50%; transform: translateX(50%); width: 38px; height: 38px; }
            .hero-text h1 { font-size: clamp(38px, 10vw, 50px); line-height: .98; padding-top: 15px;}
            .hero-text p { font-size: 14px; line-height: 1.65; }
            .hero-buttons .btn { width: 100%; justify-content: center; }
            .service-card { padding: 22px; }
            .about-image { height: 280px; }
            .stats { justify-content: space-between; }
            .stat strong { font-size: 28px; }
            .process-item { padding: 0 4px; }
            .cta-inner { gap: 24px; }
            .cta-inner h2 { font-size: 30px; line-height: 1.1; }
            .cta-inner .btn { width: 100%; justify-content: center; }
            .footer-main { gap: 34px; }
            .footer-bottom { text-align: center; padding: 18px 0; line-height: 1.5; }
        }

        @media (max-width: 380px) {
            .container { width: min(var(--container), calc(100% - 24px)); }
            .logo img { width: 135px; }
            .header-inner { height: 68px; }
            nav { top: 68px; }
            .hero, .hero-content { min-height: 650px; }
            .project-modal-nav { font-size: 9px; padding: 0 8px; }
            .project-modal-info { padding-left: 15px; padding-right: 15px; }
        }


        /* =========================================================
           AJUSTES SOLICITADOS — V8
        ========================================================= */

        /* Navegação do projeto: sempre fora do popup, presa à viewport */
        .project-modal {
            overflow: visible;
        }

        /* Navegação do projeto: sempre fora do popup, na parte inferior */
        .project-modal {
            padding-bottom: 86px;
        }

        .project-modal-nav {
            position: fixed;
            top: auto;
            bottom: 22px;
            transform: none;
            z-index: 10001;
            width: auto;
            min-width: 160px;
            height: 44px;
            padding: 0 18px;
            border-radius: 22px;
            background: rgba(17,17,17,.94);
            border: 1px solid rgba(255,255,255,.35);
            font-size: 12px;
            font-weight: 700;
            white-space: nowrap;
        }

        .project-modal-prev {
            left: calc(50% - 190px);
        }

        .project-modal-next {
            right: calc(50% - 190px);
        }

        /* Mobile: filtros quebram em várias linhas, sem rolagem lateral */
        @media (max-width: 700px) {
            .portfolio-filters {
                justify-content: center;
                flex-wrap: wrap;
                overflow: visible;
                width: 100%;
                margin: 24px auto 20px;
                gap: 7px;
                padding-bottom: 0;
            }

            .filter {
                flex: 0 1 auto;
                padding: 8px 11px;
                font-size: 10px;
                white-space: nowrap;
            }

            /* Hero mobile: o dispositivo passa a ser o elemento visual principal
               e fica em primeiro plano na parte inferior da abertura. */
            .hero,
            .hero-content {
                min-height: 730px;
            }

            .hero-content {
                align-items: flex-start;
            }

            .hero-text {
                position: relative;
                z-index: 5;
                width: 100%;
                padding-top: 75px;
            }

            .hero-visual {
                opacity: 1;
                z-index: 4;
                right: 0;
                bottom: 8px;
                top: auto;
                width: 100%;
                height: 285px;
                pointer-events: none;
            }

            .hero-visual .gray-shape,
            .hero-visual .red-shape {
                opacity: .25;
            }

            .device-laptop {
                right: 4%;
                top: 18px;
                width: 92%;
                height: 235px;
                transform: perspective(1000px) rotateY(-4deg) rotateX(2deg);
                box-shadow: 0 30px 65px rgba(0,0,0,.7);
            }

            .device-screen {
                inset: 9px;
                border-radius: 8px;
            }

            .screen-header {
                height: 25px;
                padding: 0 10px;
            }

            .screen-dot {
                width: 5px;
                height: 5px;
            }

            .screen-carousel {
                top: 25px;
            }

            /* O telefone deixa de competir com o tablet no mobile. */
            .device-phone {
                display: none;
            }

            /* Processo mais compacto no celular */
            .process {
                padding: 42px 0;
            }

            .process-grid {
                margin-top: 32px;
                gap: 28px;
            }

            .process-item {
                padding: 0 8px;
            }

            .process-number {
                width: 50px;
                height: 50px;
                margin-bottom: 14px;
                border-width: 4px;
            }

            .process-item h3 {
                margin-bottom: 6px;
                font-size: 13px;
            }

            .process-item p {
                font-size: 10px;
                line-height: 1.45;
            }

            /* Navegação do popup abaixo do conteúdo, fora da caixa */
            .project-modal {
                padding: 8px 8px 76px;
                align-items: flex-end;
            }

            .project-modal-content {
                max-height: calc(92vh - 58px);
            }

            .project-modal-nav {
                bottom: 14px;
                top: auto;
                height: 40px;
                min-width: 0;
                padding: 0 12px;
                font-size: 10px;
                border-radius: 20px;
            }

            .project-modal-prev {
                left: 10px;
            }

            .project-modal-next {
                right: 10px;
            }
        }

        @media (max-width: 380px) {
            .hero,
            .hero-content {
                min-height: 680px;
            }

            .hero-visual {
                height: 250px;
            }

            .device-laptop {
                height: 205px;
            }

            .project-modal-nav {
                font-size: 9px;
                padding: 0 9px;
            }
        }

    
        /* CORREÇÃO DEFINITIVA — navegação do projeto fora do popup e no rodapé da viewport */
        .project-modal {
            position: fixed;
            inset: 0;
            overflow: visible !important;
        }
        .project-modal-nav {
            position: absolute !important;
            top: auto !important;
            bottom: 18px !important;
            transform: none !important;
            z-index: 100000 !important;
            height: 44px;
            width: auto;
            min-width: 160px;
            padding: 0 18px;
        }
        .project-modal-prev {
            left: calc(50% - 390px) !important;
            right: auto !important;
        }
        .project-modal-next {
            right: calc(50% - 390px) !important;
            left: auto !important;
        }
        @media (max-width: 700px) {
            .project-modal {
                padding-bottom: 70px !important;
            }
            .project-modal-content {
                max-height: calc(92vh - 70px) !important;
            }
            .project-modal-nav {
                bottom: 12px !important;
                min-width: 0;
                height: 40px;
                padding: 0 12px;
                font-size: 10px;
            }
            .project-modal-prev {
                left: 10px !important;
                right: auto !important;
            }
            .project-modal-next {
                right: 10px !important;
                left: auto !important;
            }
        }

        /* =========================================================
           AJUSTE FINAL — CONTROLES DO POPUP DO PORTFÓLIO
        ========================================================= */

        /* Desktop: navegação abaixo do popup, alinhada à largura do conteúdo */
        @media (min-width: 701px) {
            .project-modal {
                align-items: center;
                justify-content: center;
                padding: 25px 25px 82px;
            }

            .project-modal-content {
                margin: 0;
            }

            .project-modal-nav {
                position: absolute !important;
                top: auto !important;
                bottom: 18px !important;
                transform: none !important;
                z-index: 10001 !important;
                height: 44px;
                min-width: 180px;
                padding: 0 18px;
                border-radius: 22px;
            }

            /* A área do popup tem 980px; os botões ficam logo abaixo,
               próximos às respectivas extremidades do popup. */
            .project-modal-prev {
                left: calc(50% - 490px) !important;
                right: auto !important;
            }

            .project-modal-next {
                right: calc(50% - 490px) !important;
                left: auto !important;
            }
        }

        /* Mobile: popup realmente centralizado e os 3 controles no rodapé */
        @media (max-width: 700px) {
            .project-modal {
                align-items: center !important;
                justify-content: center !important;
                padding: 12px 8px 72px !important;
                overflow: visible !important;
            }

            .project-modal-content {
                width: min(100%, 560px) !important;
                max-height: calc(92vh - 72px) !important;
                margin: 0 auto !important;
                border-radius: 16px !important;
            }

            .project-modal-nav {
                position: absolute !important;
                top: auto !important;
                bottom: 14px !important;
                transform: none !important;
                z-index: 10002 !important;
                height: 40px !important;
                min-width: 0 !important;
                width: 108px !important;
                padding: 0 8px !important;
                border-radius: 20px !important;
                font-size: 10px !important;
            }

            /* Anterior | X | Seguinte */
            .project-modal-prev {
                left: calc(50% - 174px) !important;
                right: auto !important;
            }

            .project-modal-next {
                right: calc(50% - 174px) !important;
                left: auto !important;
            }

            .project-modal-close {
                position: fixed !important;
                top: auto !important;
                right: auto !important;
                left: 50% !important;
                bottom: 14px !important;
                transform: translateX(-50%) !important;
                z-index: 10003 !important;
                width: 40px !important;
                height: 40px !important;
                margin: 0 !important;
            }
        }

        @media (max-width: 380px) {
            .project-modal-nav {
                width: 96px !important;
                font-size: 9px !important;
                padding: 0 6px !important;
            }

            .project-modal-prev {
                left: calc(50% - 154px) !important;
            }

            .project-modal-next {
                right: calc(50% - 154px) !important;
            }

            .project-modal-close {
                width: 38px !important;
                height: 38px !important;
                bottom: 14px !important;
            }
        }



/* =========================================================
   ESPECIALIDADE
========================================================= */
.especialidade {
    background: var(--black);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.especialidade .section-label {
    color: var(--red);
}

.especialidade .section-title {
    color: #fff;
}

.especialidade .section-description {
    color: #aaa;
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

.especialidade .section-description strong {
    color: #fff;
}

.especialidade-grid {
    margin-top: 55px;
}

.especialidade .service-card {
    background: #171717;
    border-color: #2b2b2b;
    color: #fff;
    min-height: 225px;
}

.especialidade .service-card:hover {
    background: #1d1d1d;
    border-color: rgba(255,21,21,.55);
    box-shadow: 0 20px 45px rgba(0,0,0,.28);
}

.especialidade .service-card h3 {
    color: #fff;
}

.especialidade .service-card p {
    color: #aaa;
}

@media (max-width: 700px) {
    .especialidade-grid {
        margin-top: 35px;
    }

    .especialidade .service-card {
        min-height: 0;
    }
}
