.section-gray .container {
    padding-block: 10rem 3rem;
}

.title-description {
    display: flex;
    align-items: center;
    gap: 6rem;
    flex-wrap: wrap;
}

.title-description .text-title {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.title-description p {
    flex: 0 0 25rem;
    margin-bottom: 0;
}

.timeline-carousel-outer {
    display: flex;
    width: 100%;
}

.timeline-carousel-wrapper {
    position: relative;
    --visible-items: 3;
    --peek: 0.5;
    --item-gap: clamp(2rem, 3vw, 4.5rem);
    --item-w: calc((100% - (var(--item-gap) * var(--visible-items))) / (var(--visible-items) + var(--peek)));
    --item-h: 15rem;
    --item-h-active: 17rem;
    --track-pad: 2.5rem;
    --fade-start: calc(100% - (var(--item-w) * var(--peek)) - var(--item-gap));
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.timeline-carousel {
    display: flex;
    align-items: center;
    gap: var(--item-gap);
    scroll-snap-type: x mandatory;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding: var(--track-pad) 0;

    height: calc(var(--item-h-active) + (var(--track-pad) * 2));
    box-sizing: border-box;

    -webkit-mask-image: linear-gradient(to right,
            #000 0,
            #000 var(--fade-start),
            rgba(0, 0, 0, 0.45) calc(var(--fade-start) + ((100% - var(--fade-start)) * 0.5)),
            transparent 100%);
    mask-image: linear-gradient(to right,
            #000 0,
            #000 var(--fade-start),
            rgba(0, 0, 0, 0.45) calc(var(--fade-start) + ((100% - var(--fade-start)) * 0.5)),
            transparent 100%);
}

.timeline-item {
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    scroll-snap-align: start;
    flex-shrink: 0;
    width: var(--item-w);
    height: var(--item-h);
    transition:
        height 0.55s cubic-bezier(0.33, 1, 0.68, 1),
        filter 0.55s ease;
}

.timeline-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-item.is-active {
    height: var(--item-h-active);
    filter: brightness(1.06);
    position: relative;
    z-index: 1;
}


.timeline-carousel::-webkit-scrollbar {
    display: none;
}

.timeline-carousel-next {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: calc(var(--item-w) * var(--peek));
    height: var(--item-h-active);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 3;
    opacity: 0.55;
    transition: opacity 0.3s ease;
}

.timeline-carousel-next::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--border-radius-sm);
    background: radial-gradient(circle at 85% 50%, rgba(255, 255, 255, 0.10), transparent 65%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.timeline-carousel-next:hover {
    opacity: 1;
}

.timeline-carousel-next:hover::before {
    opacity: 1;
}

.timeline-carousel-next:active svg {
    transform: translateX(3px);
}

.timeline-carousel-next svg {
    width: 1.6rem;
    height: 1.6rem;
    fill: currentColor;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
    transition: transform 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {

    .timeline-item,
    .timeline-carousel-next svg {
        transition: none;
    }
}

.section-2 {
    background-color: #fff;
    color: var(--secondary);
}

.section-2 .container {
    padding-block: 1rem 7rem;
}

/* Eyebrow — pequeno rótulo acima do título */
.route-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: "Geist Mono", monospace;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--block-bg-secondary);
}

.route-eyebrow::before {
    content: "";
    width: 1.75rem;
    height: 1px;
    background: var(--block-bg-secondary);
}

.values-flex {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3rem;
    padding-top: 5rem;
}

.values-flex .text-subtitle {
    margin-bottom: 0;
}

.values-copy {
    text-align: center;
    flex: none;
    width: 100%;
}


.route {
    position: relative;
    padding-top: 3.4rem;
}

.route-track {
    position: absolute;
    top: 3.4rem;
    left: 0;
    right: 0;
    height: 0;
    border-top: 2px dashed rgba(0, 36, 31, 0.28);
}

.route-fill {
    position: absolute;
    top: calc(3.4rem - 1px);
    left: 0;
    height: 2px;
    width: 0;
    background: var(--primary);
    border-radius: 2px;
    transition: width 1.4s cubic-bezier(0.45, 0.05, 0.35, 1);
}

.truck {
    position: absolute;
    top: 1.15rem;
    left: 0;
    transform: translateX(-50%);
    transition: left 1.4s cubic-bezier(0.45, 0.05, 0.35, 1);
    z-index: 3;
    will-change: left;
}

.truck svg {
    display: block;
    animation: truck-bob 1.1s ease-in-out infinite;
}

.truck.driving svg {
    animation: truck-drive 0.35s ease-in-out infinite;
}

@keyframes truck-bob {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}

@keyframes truck-drive {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    25% {
        transform: translateY(-1.5px) rotate(-1.2deg);
    }

    75% {
        transform: translateY(0.5px) rotate(1deg);
    }
}

.truck .puff {
    position: absolute;
    left: -8px;
    bottom: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0, 36, 31, 0.18);
    opacity: 0;
}

.truck.driving .puff {
    animation: truck-puff 0.7s ease-out infinite;
}

@keyframes truck-puff {
    0% {
        opacity: 0.7;
        transform: translate(0, 0) scale(0.6);
    }

    100% {
        opacity: 0;
        transform: translate(-14px, -6px) scale(1.6);
    }
}

.stops {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}

.stop {
    position: relative;
    padding-top: 2.6rem;
}

.stop .node {
    position: absolute;
    top: -0.45rem;
    left: 50%;
    transform: translateX(-50%);
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid rgba(0, 36, 31, 0.3);
    transition: all 0.35s ease;
    z-index: 2;
}

.stop .node::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: transparent;
    transition: background 0.35s ease;
}

.stop.is-active .node {
    border-color: var(--primary);
    animation: node-ping 1.6s ease-out infinite;
}

.stop.is-active .node::after {
    background: var(--primary);
}

.stop.is-done .node {
    border-color: var(--primary);
}

.stop.is-done .node::after {
    background: var(--primary-soft);
}

@keyframes node-ping {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 158, 82, 0.35);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(0, 158, 82, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 158, 82, 0);
    }
}

.stop-card {
    min-width: 0;
    overflow-wrap: anywhere;
    background: #fff;
    border: 1px solid var(--primary);
    border-radius: var(--border-radius-sm);
    padding: 2rem 1.6rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    cursor: pointer;
    transition:
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.35s;
}

.stop-card .stop-tag {
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    color: rgba(97, 109, 109, 0.4);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.35s;
}

.stop-card .stop-tag::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(97, 109, 109, 0.4);
}

.stop-card .chip .material-symbols-rounded {
    font-size: 2rem;
    color: var(--primary);
    transition: color 0.35s;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.stop-card h4 {
    font-size: 1.15rem;
    margin: 0.2rem 0 0;
    color: var(--primary);
}

.stop-card p {
    font-size: 0.9rem;
    color: var(--secondary);
    margin: 0;
}

.stop-card .delivered {
    margin-top: auto;
    padding-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--primary);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s ease 0.15s, transform 0.4s ease 0.15s;
}

.stop-card .delivered .material-symbols-rounded {
    font-size: 1rem;
    font-variation-settings: 'FILL' 1;
}

.stop.is-active .stop-card {
    transform: translateY(-8px);
    border: 1px solid var(--primary);
    color: #fff;
}

.stop.is-active .stop-card p {
    color: var(--secondary);
}

.stop.is-active .stop-card .stop-tag::after {
    background-color: var(--primary);
}

.stop.is-active .stop-card .stop-tag {
    color: var(--primary);
}

.stop.is-active .stop-card .delivered {
    opacity: 1;
    transform: translateY(0);
}

.company-timeline {
    padding: 7rem 0 4rem;
}

.company-timeline .text-title {
    text-align: center;
    margin-bottom: 3rem;
}

.company-timeline-list {
    list-style: none;
    margin: 0;
    padding: 2rem 0 0;
}

.company-timeline-event {
    position: relative;
    min-width: 0;
    padding: 4rem 0 6rem;
}

/* Alternating half-width bends meet at the center between cards. */
.company-timeline-event::before,
.company-timeline-event::after {
    content: "";
    position: absolute;
    inset: 0 25% -2px 50%;
    border-top: 2px dashed var(--primary);
    border-right: 2px dashed var(--primary);
    border-bottom: 2px dashed var(--primary);
    border-radius: 0 3rem 3rem 0;
    pointer-events: none;
}

.company-timeline-event:nth-child(even)::before,
.company-timeline-event:nth-child(even)::after {
    left: 25%;
    right: 50%;
    border-right: 0;
    border-left: 2px dashed var(--primary);
    border-radius: 3rem 0 0 3rem;
}

.company-timeline-event:first-child::before,
.company-timeline-event:first-child::after {
    border-top: 0;
    border-top-right-radius: 0;
}

.company-timeline-event:last-child::before,
.company-timeline-event:last-child::after {
    border-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    bottom: 3rem;
}

.company-timeline-event time {
    position: absolute;
    top: calc(50% - 1rem);
    left: 75%;
    z-index: 1;
    transform: translate(-50%, -50%);
    padding: 0.5rem 1rem;
    background: var(--bg);
    color: var(--primary);
    font-family: "Geist Mono", monospace;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
}

.company-timeline-event:nth-child(even) time {
    left: 25%;
}

.company-timeline-card {
    position: relative;
    width: 46%;
    min-height: 15rem;
    margin-left: 4%;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1.25rem;
    border: 1px solid var(--primary);
    box-shadow: var(--shadow-soft);
    border-radius: var(--border-radius-sm);
    background: #fff;
    color: var(--block-text);
    overflow-wrap: anywhere;
}

.company-timeline-card h3 {
    margin: 0;
    max-width: 100%;
    color: var(--primary);
    font-size: clamp(1.35rem, 2.2vw, 1.8rem);
    font-weight: 600;
    line-height: 1.25;
    text-wrap: balance;
}

.company-timeline-event:nth-child(even) .company-timeline-card {
    margin-left: 50%;
}

.company-timeline-card p {
    margin: 0;
    color: var(--secondary);
    font-size: 0.98rem;
    line-height: 1.6;
}

.company-timeline-event:last-child .company-timeline-card {
    background: var(--primary);
}

.company-timeline-event:last-child .company-timeline-card h3,
.company-timeline-event:last-child .company-timeline-card p {
    color: #fff;
}

@media (max-width: 991.98px) {
    .stops {
        grid-template-columns: repeat(2, 1fr);
    }

    .route {
        padding-top: 0;
    }

    .route-track,
    .route-fill,
    .truck,
    .stop .node {
        display: none;
    }

    .stop {
        padding-top: 0;
    }

    .stop .stop-card .delivered {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 575.98px) {
    .company-timeline {
        padding-top: 5rem;
    }

    .company-timeline-event {
        min-height: 0;
    }

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

@media (max-width: 768px) {

    .title-description {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .title-description .text-title {
        font-size: 2.5rem;
    }

    .title-description p {
        flex: 1 1 auto;
    }

    .values-flex {
        flex-direction: column;
        gap: 2rem;
        margin-top: 0;
        padding-top: 2rem;
    }

    .values-copy {
        flex: 1 1 auto;
        padding-left: 0;
    }

    .text-subtitle {
        font-size: 3rem;
    }

    .stats-group {
        width: 100%;
        margin-right: 0;
        justify-content: center;
    }

    .stat-card-box {
        width: 100%;
        max-width: 20rem;
    }

    .section-flex-dark {
        flex-direction: column;
        gap: 2.5rem;
    }

    .section-flex-left,
    .section-flex-right {
        flex: 1 1 100%;
        margin-left: 0;
        width: 100%;
    }

    .text-title-wrap {
        max-width: 100%;
    }

    .timeline-carousel-wrapper {
        width: 100%;
    }

    .stats-group {
        width: 100%;
        margin-right: 0;
        gap: 1rem;
        row-gap: 1rem;
        justify-content: space-between;
    }

    .stat-card {
        flex: 0 0 calc(50% - 0.5rem);
        min-width: 0;
    }

    .stat-card-box {
        width: 100%;
        max-width: none;
        height: 15rem;
        min-width: 0;
    }

    .stat-card-face {
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .section-gray .container {
        padding-block: 6rem 2.5rem;
    }

    .title-description .text-title,
    .values-copy .text-title,
    .company-timeline .text-title {
        font-size: clamp(1.6rem, 6vw, 2.25rem);
        overflow-wrap: anywhere;
    }

    .title-description p {
        min-width: 0;
        width: 100%;
    }

    .stops {
        gap: 1rem;
    }

    .stop-card {
        padding: 1.5rem 1.25rem;
    }

    .company-timeline {
        padding: 2.5rem 0 0;
    }

    .company-timeline .text-title {
        margin-bottom: 1.5rem;
    }

    .company-timeline-list {
        padding: 1.5rem 0 0;
    }

    .company-timeline-event {
        padding: 3rem 0;
    }

    .company-timeline-event::before,
    .company-timeline-event:nth-child(even)::before,
    .company-timeline-event::after,
    .company-timeline-event:nth-child(even)::after {
        inset: 0 auto 0 1rem;
        width: 0;
        border: 0;
        border-left: 2px dashed var(--primary);
        border-radius: 0;
    }

    .company-timeline-event time,
    .company-timeline-event:nth-child(even) time {
        top: 0;
        left: 0;
        transform: translateY(-50%);
        padding: 0.5rem 0;
        font-size: 2rem;
    }

    .company-timeline-card,
    .company-timeline-event:nth-child(even) .company-timeline-card {
        width: calc(100% - 3rem);
        min-height: 0;
        margin-left: 3rem;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {

    .timeline-carousel-wrapper {
        --visible-items: 1;
        --peek: 0.14;
        --item-gap: 1rem;
        --item-h: 15rem;
        --item-h-active: 16rem;
        --track-pad: 1.25rem;
        width: 100%;
    }

    .timeline-carousel {
        gap: var(--item-gap);
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 0;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }

    .timeline-item {
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }


    .timeline-item,
    .timeline-item.is-active {
        height: var(--item-h-active);
    }

    .timeline-carousel-next {
        display: none;
    }
}

/* Fill the timeline road as the visitor scrolls through its milestones. */
.company-timeline-event::before,
.company-timeline-event:nth-child(even)::before {
    border-color: rgba(0, 36, 31, 0.18);
}
.company-timeline-event::after,
.company-timeline-event:nth-child(even)::after {
    border-style: solid;
    clip-path: inset(0 0 calc(100% - var(--route-progress, 0%)) 0);
}
.company-timeline-card { z-index: 1; }
.company-timeline-event time { z-index: 2; }
@media (prefers-reduced-motion: reduce) {
    .company-timeline-event { --route-progress: 100% !important; }
}
