.servicos {
    --services-bg: #00142f;
    --services-blue: #0878ff;
    --services-cyan: #09dfff;
    min-height: 100svh;
    height: auto;
    padding: clamp(5rem, 7vw, 7.5rem) clamp(1.25rem, 5vw, 5rem);
    color: #ffffff;
    background:
        radial-gradient(circle at 72% 46%, rgba(0, 91, 255, 0.16), transparent 31%),
        linear-gradient(125deg, #001126, var(--services-bg) 55%, #001026);
}

.servicos::before {
    z-index: 0;
    background:
        linear-gradient(rgba(17, 104, 193, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 104, 193, 0.08) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.75), transparent 80%);
    -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.75), transparent 80%);
}

.container-servicos {
    position: relative;
    z-index: 1;
    max-width: 1500px;
    height: auto;
    align-items: stretch;
    gap: clamp(2rem, 4vw, 4rem);
}

.services-heading {
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
}

.services-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--services-cyan);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.services-eyebrow span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--services-cyan);
    box-shadow: 0 0 14px rgba(9, 223, 255, 0.72);
}

.services-heading h2 {
    margin-top: 0.7rem;
    color: #ffffff;
    font-family: var(--font-grande);
    font-size: clamp(4rem, 7vw, 7rem);
    font-weight: 850;
    line-height: 0.82;
    letter-spacing: -0.055em;
}

.services-heading h2 span {
    background: linear-gradient(180deg, #12e7ff, #0784ff 52%, #0756d9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.services-heading p {
    max-width: 540px;
    padding-bottom: 0.4rem;
    color: #d9dfed;
    font-size: clamp(1rem, 1.35vw, 1.25rem);
    line-height: 1.5;
    text-align: right;
}

.services-showcase {
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(340px, 0.34fr) minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 4.5rem);
}

.services-list-wrap {
    padding-right: clamp(1.5rem, 3vw, 3rem);
    border-right: 1px solid rgba(18, 126, 255, 0.85);
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.service-option {
    position: relative;
    width: 100%;
    min-height: 67px;
    padding: 0.6rem 0.45rem 0.6rem 0.75rem;
    border: 0;
    display: grid;
    grid-template-columns: 44px 55px minmax(0, 1fr);
    align-items: center;
    gap: 0.8rem;
    color: #dbe5f6;
    text-align: left;
    background: transparent;
    cursor: pointer;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.service-option::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10%;
    width: 4px;
    height: 80%;
    border-radius: 999px;
    background: var(--services-cyan);
    box-shadow: 0 0 13px rgba(9, 223, 255, 0.7);
    opacity: 0;
    transform: scaleY(0.5);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.service-option::after {
    content: "";
    position: absolute;
    left: 110px;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--services-cyan), rgba(8, 120, 255, 0.12));
    opacity: 0;
}

.service-option span {
    color: #b9c9e3;
    font-size: 1rem;
    font-weight: 700;
}

.service-option i {
    color: #c6f8ff;
    font-size: 2rem;
    text-align: center;
}

.service-option strong {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.25;
}

.service-option:hover,
.service-option:focus-visible {
    color: #ffffff;
    outline: none;
    background: rgba(8, 106, 255, 0.08);
    transform: translateX(4px);
}

.service-option.is-active {
    color: var(--services-cyan);
    background: linear-gradient(90deg, rgba(0, 134, 255, 0.12), transparent 85%);
}

.service-option.is-active::before,
.service-option.is-active::after {
    opacity: 1;
    transform: scaleY(1);
}

.service-option.is-active span,
.service-option.is-active i {
    color: var(--services-cyan);
}

.service-option.is-active strong {
    font-weight: 700;
}

.service-detail {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(300px, 0.72fr) minmax(400px, 1.28fr);
    grid-template-rows: 1fr auto auto;
    column-gap: clamp(2rem, 4vw, 4.5rem);
    align-items: center;
}

.service-detail-copy {
    position: relative;
    z-index: 2;
    align-self: center;
}

.service-counter {
    display: block;
    margin-bottom: clamp(2rem, 4vw, 4rem);
    color: #6d82ff;
    font-size: 1.15rem;
    font-weight: 700;
}

.service-counter strong {
    color: var(--services-cyan);
}

.service-detail-icon {
    display: none;
}

.service-detail h3 {
    color: #ffffff;
    font-family: var(--font-grande);
    font-size: clamp(3rem, 4.5vw, 5.1rem);
    font-weight: 850;
    line-height: 0.95;
    letter-spacing: -0.045em;
    text-transform: uppercase;
}

.service-detail-copy > p {
    max-width: 450px;
    margin-top: 1.35rem;
    color: #d5dbea;
    font-size: clamp(1.1rem, 1.5vw, 1.45rem);
    line-height: 1.45;
}

.service-illustration {
    position: relative;
    width: min(100%, 650px);
    aspect-ratio: 1.35;
    justify-self: end;
    filter: drop-shadow(0 0 22px rgba(0, 104, 255, 0.32));
}

.api-window,
.api-phone,
.api-server,
.api-database,
.api-label {
    position: absolute;
    border: 2px solid #0ddcff;
    color: #bff8ff;
    background: linear-gradient(145deg, rgba(7, 76, 210, 0.86), rgba(1, 19, 63, 0.94));
    box-shadow: inset 0 0 22px rgba(0, 117, 255, 0.32), 0 0 15px rgba(0, 123, 255, 0.56);
}

.api-window {
    left: 3%;
    top: 8%;
    width: 43%;
    height: 45%;
    padding: 18px;
    border-radius: 17px;
    transform: perspective(700px) rotateY(15deg) rotateZ(3deg);
}

.api-window > span {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: #dffaff;
}

.api-window-image {
    position: absolute;
    left: 8%;
    top: 27%;
    width: 43%;
    height: 40%;
    border: 1px solid #16dfff;
    display: grid;
    place-items: center;
    color: #10b7ff;
    background: rgba(0, 65, 170, 0.52);
}

.api-window-image i {
    font-size: 2.5rem;
}

.api-line {
    position: absolute;
    right: 8%;
    width: 35%;
    height: 8px;
    border-radius: 999px;
    background: #138dff;
}

.api-line-one { top: 35%; }
.api-line-two { top: 48%; width: 28%; }

.api-phone {
    left: 19%;
    bottom: 4%;
    width: 21%;
    height: 43%;
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    transform: rotate(-3deg);
}

.api-phone i {
    font-size: 2.4rem;
}

.api-phone span {
    width: 62%;
    height: 7px;
    border-radius: 999px;
    background: #138dff;
}

.api-server {
    right: 17%;
    top: 29%;
    width: 30%;
    height: 52%;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    transform: perspective(700px) rotateY(-12deg);
}

.api-server strong {
    font-size: clamp(2rem, 4vw, 4rem);
    text-shadow: 0 0 15px rgba(9, 223, 255, 0.8);
}

.api-server span {
    width: 62%;
    height: 8px;
    border-radius: 999px;
    background: #127eff;
}

.api-database {
    right: 0;
    bottom: 9%;
    width: 18%;
    height: 36%;
    border: 0;
    background: none;
    box-shadow: none;
}

.api-database i {
    position: absolute;
    left: 0;
    width: 100%;
    height: 42%;
    border: 2px solid #0ddcff;
    border-radius: 50%;
    background: linear-gradient(180deg, #075ef1, #011a59);
    box-shadow: inset 0 0 17px rgba(9, 223, 255, 0.35), 0 0 13px rgba(0, 111, 255, 0.55);
}

.api-database i:nth-child(1) { top: 0; }
.api-database i:nth-child(2) { top: 26%; }
.api-database i:nth-child(3) { top: 52%; }

.api-connector {
    position: absolute;
    height: 2px;
    border-top: 2px dashed #0ddcff;
    filter: drop-shadow(0 0 5px #0ddcff);
}

.api-connector-one {
    left: 43%;
    top: 34%;
    width: 20%;
    transform: rotate(13deg);
}

.api-connector-two {
    left: 39%;
    bottom: 30%;
    width: 25%;
    transform: rotate(-9deg);
}

.api-label {
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-style: normal;
}

.api-label-one { left: 47%; top: 24%; }
.api-label-two { left: 42%; bottom: 22%; }

.service-tags {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: clamp(1.5rem, 4vw, 4rem);
    padding: 1.4rem 0;
    border-bottom: 1px solid rgba(38, 107, 190, 0.32);
}

.service-tags li {
    color: #d8deed;
    font-size: 1rem;
}

.service-tags li + li::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: clamp(1.5rem, 4vw, 4rem);
    border-radius: 50%;
    background: var(--services-cyan);
    box-shadow: 0 0 9px rgba(9, 223, 255, 0.7);
}

.service-detail-footer {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
}

.service-detail-footer > a {
    padding-bottom: 0.3rem;
    border-bottom: 2px solid var(--services-cyan);
    color: var(--services-cyan);
    font-size: 1.1rem;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.service-detail-footer > a:hover,
.service-detail-footer > a:focus-visible {
    color: #ffffff;
    outline: none;
    text-shadow: 0 0 12px rgba(9, 223, 255, 0.6);
}

.service-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.service-controls button {
    width: 50px;
    height: 50px;
    border: 1px solid transparent;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: transparent;
    font-size: 1.35rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.service-controls button:hover,
.service-controls button:focus-visible {
    border-color: var(--services-cyan);
    outline: none;
    background: rgba(8, 120, 255, 0.15);
    transform: translateY(-2px);
}

.service-detail.is-changing .service-detail-copy,
.service-detail.is-changing .service-tags,
.service-detail.is-changing .service-illustration {
    animation: serviceReveal 0.4s ease both;
}

@keyframes serviceReveal {
    from { opacity: 0.2; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1120px) {
    .services-showcase {
        grid-template-columns: minmax(290px, 0.38fr) minmax(0, 1fr);
    }

    .service-detail {
        grid-template-columns: minmax(240px, 0.8fr) minmax(310px, 1.2fr);
        column-gap: 1.5rem;
    }

    .service-option {
        grid-template-columns: 38px 45px minmax(0, 1fr);
        gap: 0.55rem;
    }

    .service-option i {
        font-size: 1.65rem;
    }
}

@media (max-width: 900px) {
    .servicos {
        padding-inline: 1.25rem;
    }

    .services-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }

    .services-heading p {
        text-align: left;
    }

    .services-showcase {
        grid-template-columns: 1fr;
    }

    .services-list-wrap {
        padding: 0 0 1.25rem;
        border-right: 0;
        border-bottom: 1px solid rgba(18, 126, 255, 0.7);
    }

    .services-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.35rem 1rem;
    }

    .service-detail {
        min-height: 560px;
    }
}

@media (max-width: 640px) {
    .servicos {
        min-height: auto;
        padding: 4.5rem 1rem;
    }

    .servicos::before {
        background-size: 52px 52px;
    }

    .container-servicos {
        gap: 2rem;
    }

    .services-heading h2 {
        font-size: clamp(3.8rem, 19vw, 5.2rem);
    }

    .services-heading p {
        font-size: 1rem;
    }

    .services-showcase {
        min-height: 0;
        gap: 2rem;
    }

    .services-list-wrap {
        width: calc(100vw - 1rem);
        margin-left: -0.5rem;
        padding: 0 0.5rem 1rem;
        overflow: hidden;
    }

    .services-list {
        display: flex;
        flex-direction: row;
        gap: 0.65rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .services-list::-webkit-scrollbar {
        display: none;
    }

    .service-option {
        flex: 0 0 175px;
        min-height: 105px;
        padding: 0.8rem;
        grid-template-columns: 30px 1fr;
        grid-template-areas:
            "index icon"
            "title title";
        align-content: center;
        border: 1px solid rgba(41, 119, 214, 0.4);
        border-radius: 14px;
        scroll-snap-align: start;
        background: rgba(3, 31, 73, 0.75);
    }

    .service-option::before,
    .service-option::after {
        display: none;
    }

    .service-option span { grid-area: index; }
    .service-option i { grid-area: icon; text-align: right; }
    .service-option strong { grid-area: title; font-size: 0.9rem; }

    .service-option.is-active {
        border-color: var(--services-cyan);
        box-shadow: inset 0 0 20px rgba(0, 110, 255, 0.16), 0 0 14px rgba(0, 110, 255, 0.12);
    }

    .service-detail {
        min-height: 0;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        gap: 1.3rem;
    }

    .service-detail-copy {
        text-align: center;
    }

    .service-counter {
        margin-bottom: 1rem;
    }

    .service-detail-icon {
        width: 54px;
        height: 54px;
        margin: 0 auto 1rem;
        border: 1px solid var(--services-cyan);
        border-radius: 15px;
        display: grid;
        place-items: center;
        color: var(--services-cyan);
        background: rgba(0, 90, 220, 0.18);
        font-size: 1.6rem;
        box-shadow: 0 0 18px rgba(0, 112, 255, 0.2);
    }

    .service-detail h3 {
        font-size: clamp(2.4rem, 12vw, 3.6rem);
    }

    .service-detail-copy > p {
        max-width: 500px;
        margin: 1rem auto 0;
        font-size: 1rem;
    }

    .service-illustration {
        grid-row: 2;
        width: min(100%, 440px);
        justify-self: center;
    }

    .service-tags {
        grid-column: 1;
        justify-content: center;
        gap: 0.75rem;
        padding: 0.7rem 0 1.2rem;
    }

    .service-tags li {
        font-size: 0.78rem;
    }

    .service-tags li + li::before {
        width: 6px;
        height: 6px;
        margin-right: 0.75rem;
    }

    .service-detail-footer {
        grid-column: 1;
    }

    .service-detail-footer > a {
        font-size: 0.95rem;
    }

    .service-controls button {
        width: 44px;
        height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .service-detail.is-changing .service-detail-copy,
    .service-detail.is-changing .service-tags,
    .service-detail.is-changing .service-illustration {
        animation: none;
    }
}
