html {
    overflow-y: auto;
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", sans-serif;
    color: var(--color-text-main);
    line-height: 1.5;
    background: var(--color-surface-1);
}

.primary-btn {
    padding: 14px 28px;
    background: var(--color-accent-primary);
    border: none;
    border-radius: var(--radius);
    color: var(--color-text-on-accent);
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
}

.primary-btn:hover {
    opacity: 0.9;
}

.index-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 6%;
    height: 100vh;
    position: relative;
    background-image: url('../assets/imgs/wallpaper.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    z-index: 10;
}

.index-hero-content {
    max-width: 800px;
    z-index: 2;
    position: relative;
}

.index-hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 18px;
    color: white;
}

.index-hero-content p {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.2rem;
    margin-bottom: 28px;
    color: white;
}

.index-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-dark-50);
    z-index: 1;
}

.scroll-down-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid white;
    border-radius: 50px;
    z-index: 2;
    cursor: pointer;
}

.scroll-down-indicator::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translate(-50%, 0);
    }

    40% {
        transform: translate(-50%, 15px);
    }
}

.scrolling-logos {
    padding: 40px 0;
}

.scroller {
    max-width: 100%;
    overflow: hidden;
    -webkit-mask: linear-gradient(90deg, transparent, var(--color-mask-foreground) 25%, var(--color-mask-foreground) 75%, transparent);
    mask: linear-gradient(90deg, transparent, var(--color-mask-foreground) 25%, var(--color-mask-foreground) 75%, transparent);
}

.scroller:first-child {
    margin-bottom: 20px;
}

.scroller[data-animated="true"] .scroller__inner {
    display: flex;
    gap: 6rem;
    width: max-content;
    flex-wrap: nowrap;
    /* flex-wrap: wrap; */
    animation: scroll 120s linear infinite;
}

.scroller:hover .scroller__inner {
    animation-play-state: paused;
}

.scroller[data-animated="true"][data-direction="right"] .scroller__inner {
    animation-direction: reverse;
}

@keyframes scroll {
    to {
        transform: translateX(-50%);
    }
}

.scroller__inner img {
    height: 60px;
    margin: 10px 0px;
    padding: 10px;
    object-fit: contain;
    opacity: 1;
    background-color: #f5f5f5;
    border-radius: 10px;
}

.logo-scroller-container {
    background-color: var(--color-surface-2);
    border-radius: 20px;
    padding: 1rem;
    box-shadow: var(--shadow-outset-medium);
    margin: 0 6%;
    overflow: hidden;
}


.metrics,
.featured-services,
.story-cards,
.impact {
    position: relative;
    background: var(--color-surface-2);
}

.featured-services::before,
.story-cards::before,
.impact::before,
.final-cta::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: 80px;
    background: var(--color-surface-1);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath d='M0,50 C150,100 350,0 500,50 C650,100 850,0 1000,50 L1000,0 L0,0 Z' fill='%23000000'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath d='M0,50 C150,100 350,0 500,50 C650,100 850,0 1000,50 L1000,0 L0,0 Z' fill='%23000000'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.metrics::after,
.featured-services::after,
.story-cards::after,
.impact::after,
.final-cta::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 80px;
    background: var(--color-surface-1);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath d='M0,50 C150,0 350,100 500,50 C650,0 850,100 1000,50 L1000,100 L0,100 Z' fill='%23000000'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath d='M0,50 C150,0 350,100 500,50 C650,0 850,100 1000,50 L1000,100 L0,100 Z' fill='%23000000'/%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.featured-services {
    padding: 120px 6% 80px;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.8rem;
    font-weight: 700;
}

.section-title p {
    max-width: 650px;
    margin: 15px auto 0;
    font-size: 1.1rem;
    color: var(--color-text-soft);
}

.gradient-text {
    background-image: var(--gradient-accent);
    background-size: 100%;
    -webkit-background-clip: text;
    -moz-background-clip: text;
    -webkit-text-fill-color: transparent;
    -moz-text-fill-color: transparent;
}

.featured-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.feature-card-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    margin-bottom: 18px;
}

.feature-card-image-wrapper img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease;
}

.feature-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-dark-75);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-card:hover .feature-card-overlay {
    opacity: 1;
}

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

.testimonial {
    padding: 50px 6% 20px;
    overflow: hidden;
}

.testimonial-slider {
    position: relative;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    padding-bottom: 80px;
}

.testimonial-slide {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 50px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
}

.testimonial-slide.active {
    opacity: 1;
    visibility: visible;
}

.testimonial-slide img {
    width: 450px;
    height: 375px;
    object-fit: cover;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.testimonial-text h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.testimonial-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.testimonial-btn {
    background: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.2s;
}

.testimonial-btn:hover {
    background: white;
}

.story-cards {
    padding: 120px 6% 100px;
    position: relative;
}

.story-cards-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 60px 40px;
    position: relative;
}

.story-card {
    position: relative;
    padding: 20px;
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-card:nth-child(1),
.story-card:nth-child(2),
.story-card:nth-child(3),
.story-card:nth-child(4) {
    background-color: var(--story-card-purple-tint);
}

.story-card:nth-child(5),
.story-card:nth-child(6),
.story-card:nth-child(7),
.story-card:nth-child(8) {
    background-color: var(--story-card-orange-tint);
}


.story-card:not(:last-child):hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.story-card:last-child {
    background: linear-gradient(135deg,
            var(--color-success-gradient-start),
            var(--color-success-gradient-end));
    border-color: var(--color-success-border);
    animation: glowing-shadow 1s infinite alternate;
    transition: transform 0.3s ease;
}

.story-card:last-child .story-card-number {
    color: var(--color-success-border);
    box-shadow: 0 0 0 1px var(--color-success-border);
    box-shadow: 0 0 0 1px #56ab2f;
}

.story-card-number {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: var(--color-accent-primary);
    color: var(--color-text-on-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    border: 3px solid var(--color-mask-foreground);
    box-shadow: 0 0 0 1px var(--color-accent-primary);
}

.story-card h3 {
    margin-top: 25px;
    margin-bottom: 10px;
}

@keyframes glowing-shadow {
    from {
        box-shadow: 0 0 5px -2px var(--color-success-glow),
            0 0 10px var(--color-success-glow),
            0 0 15px var(--color-success-glow);
    }

    to {
        box-shadow: 0 0 10px 2px var(--color-success-glow),
            0 0 20px var(--color-success-glow),
            0 0 25px var(--color-success-glow);
    }
}

.our-offices {
    padding: 80px 6%;
    text-align: center;
}

.office-cards-container {
    margin-top: 50px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.office-card {
    background: var(--color-surface-2);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.office-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.office-card img {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 18px;
}

.impact {
    padding: 120px 6% 100px;
}

.impact-content {
    margin-top: 40px;
    display: flex;
    align-items: center;
    gap: 60px;
}

.impact-text {
    flex: 1;
    text-align: left;
}

.impact-image {
    flex: 1;
}

.impact img {
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius);
}

.impact-content p {
    max-width: 500px;
    margin: 0 0 30px 0;
    font-size: 1.1rem;
    color: var(--color-text-soft);
}

.impact .primary-btn {
    display: inline-block;
}

.impact-btn-container {
    text-align: center;
    margin-top: 5em;
}

.brand-grid {
    padding: 80px 6%;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px;
}

.brand-grid img {
    width: 100%;
    border-radius: var(--radius);
}

.final-cta {
    padding: 160px 6% 120px;
    text-align: center;
}

.final-cta h2 {
    font-size: 2.5rem;
    margin-bottom: 25px;
}

/* MEDIA QUERIES BELOW — NO CHANGES OTHER THAN COLORS */

@media (max-width: 992px) {

    .metrics,
    .featured-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .story-cards-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .brand-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .testimonial-slide {
        flex-direction: column;
        text-align: center;
    }

    .testimonial-slider {
        padding-bottom: 0;
    }

    .testimonial-nav {
        bottom: auto;
        top: 50%;
        transform: translateY(-50%);
        width: calc(100% - 12%);
        justify-content: space-between;
        right: 6%;
        left: 6%;
    }

    .impact {
        text-align: center;
    }

    .story-card:not(:last-child)::after {
        background-image: none;
        width: 0;
        height: 0;
    }

    .story-card:not(:nth-child(2n))::after {
        height: 2px;
        width: 100%;
        top: 50%;
        left: calc(50% + 20px);
        transform: translateY(-50%);
        background-image: linear-gradient(to right, var(--color-border-soft), var(--color-border-soft)), var(--arrow-svg);
        background-repeat: no-repeat, no-repeat;
        background-position: left center, right center;
        background-size: calc(100% - 16px) 2px, 16px 16px;
    }

    .impact-content {
        flex-direction: column-reverse;
        gap: 40px;
    }

    .impact-text {
        text-align: center;
    }
}

@media (max-width: 768px) {
    section {
        padding-left: 5%;
        padding-right: 5%;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

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

    .scroller:first-child {
        margin-bottom: 0px;
    }

    .scroller {
        mask: none;
        --webkit-mask: none;
    }

    .scroller[data-animated="true"] .scroller__inner {
        gap: 1rem;
        animation: scroll 60s linear infinite;
    }

    .logo-scroller-container {
        margin: 10px;
        padding: 0px;
    }

    .featured-services-grid,
    .story-cards-container,
    .office-cards-container {
        grid-template-columns: 1fr;
    }

    .testimonial-slide img {
        width: 100%;
        height: auto;
        max-width: 400px;
        margin: 0 auto;
    }

    .testimonial-slider {
        min-height: 0;
        padding: 0 20px;
        margin-bottom: 50px;
    }

    .testimonial-text h2 {
        font-size: 1.5rem;
    }

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

    .testimonial-slide {
        padding: 20px 0;
    }

    .testimonial-nav {
        position: static;
        transform: none;
        justify-content: center;
        margin-top: 20px;
        width: 100%;
    }

    .final-cta h2 {
        font-size: 2rem;
    }

    .featured-services::before,
    .story-cards::before,
    .impact::before,
    .final-cta::before,
    .featured-services::after,
    .story-cards::after,
    .impact::after,
    .final-cta::after {
        height: 60px;
    }

    .story-card:not(:last-child)::after {
        width: 2px;
        height: 100%;
        top: calc(50% + 25px);
        left: 50%;
        transform: translateX(-50%);
        background-image: linear-gradient(to bottom, var(--color-border-soft), var(--color-border-soft)), var(--arrow-svg);
        background-repeat: no-repeat, no-repeat;
        background-position: top center, bottom center;
        background-size: 2px calc(100% - 16px), 16px 16px;
        transform: translateX(-50%) rotate(90deg);
    }
}