.hero-bg {
    background-image: url('../assets/home-hero.png');
}

.hero-bottom {
    margin-bottom: calc(var(--space-section) * 2);
}

.hero-bottom .bottom {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
}

.hero-bottom .bottom .left img {
    width: 100%;
    height: auto;
    border-radius: var(--space-sm);
    object-fit: cover;
}

.hero-bottom .bottom .right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-md);
}

.dev-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
}

.dev-top .card-left {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.dev-top .card-left img {
    width: 100%;
    height: auto;
    border-radius: var(--space-sm);
}

.dev-top .card-left .name {
    font-family: var(--urbanist);
    font-size: var(--fs-base);
    color: var(--primary-color);
}

.dev-top .card-left .date {
    font-family: var(--urbanist);
    font-size: var(--fs-sm);
    color: var(--primary-color);
}

.dev-top .card-left button {
    width: 100%;
    padding: var(--space-xs) 0;
    border-radius: 10px 10px 20px 20px;
    background-color: transparent;
    color: var(--primary-color);
    border: 1.3px solid var(--primary-color);
    font-family: var(--urbanist);
    font-size: var(--fs-sm);
}



.dev-top .card-right {
    position: relative;
    width: 100%;
    height: 100%;
}

.dev-top .card-right .clip-card {
    width: 100%;
    height: 100%;
    background: url(../assets/clip-image.png) no-repeat center center;
    background-size: cover;
    border-radius: 30px;
    clip-path: url(#curve-cut);
}

.dev-top .card-right .buttons {
    position: absolute;
    top: calc(var(--space-xs) - 8px);
    right: calc(var(--space-xs) - 8px);
    display: flex;
    gap: var(--space-xs);
}

.dev-top .card-right .buttons a {
    font-family: var(--urbanist);
    font-size: var(--fs-xs);
    padding: var(--space-xs) var(--space-sm);
    background-color: var(--primary-color);
    color: var(--secondary-color);
    font-weight: normal;
    border-radius: 99px;
    margin-bottom: 0;
    text-decoration: none;
}

.dev-top .card-right .previous,
.dev-top .card-right .next {
    background-color: transparent;
    width: calc(var(--space-xl) - 3px);
    height: calc(var(--space-xl) - 3px);
    
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 99px;
    text-align: center;
    font-size: var(--fs-sm);
    margin-left: -3px;
}

.project-card {
    width: 100%;
    max-width: 283px;
}

.project-card .card-svg a g {
    transform-box: fill-box;
    transform-origin: center;
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), filter 220ms ease;
}

.project-card .card-svg a rect {
    transition: fill 220ms ease;
}

.project-card .card-svg a:hover g {
    transform: translateY(-2px);
    filter: drop-shadow(0 8px 14px rgba(0, 48, 96, 0.2));
}

.project-card .card-svg a:hover rect {
    fill: color-mix(in srgb, var(--primary-color) 88%, white);
}

.project-card .card-svg a:active g {
    transform: translateY(0) scale(0.98);
}

.card-svg {
    width: 100%;
    height: auto;
    display: block;
}

.dev-bottom p {
    font-family: var(--urbanist);
    font-size: var(--fs-xs);
    color: var(--primary-color);
}

.legacy {
    margin-bottom: calc(var(--space-section) * 2);
    width: 100%;
    height: auto;
    background-color: var(--primary-color);
    padding: calc(var(--space-xl) * 4) 0;
}

.legacy-container {
    display: flex;
    flex: 1 1 0;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    
    color: var(--secondary-color);
}

.legacy-left {
    max-width: 450px;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.gold-head {
    font-family: var(--urbanist);
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--gold);
}

.legacy-left h2 {
    font-family: var(--playfair-display);
    font-size: calc(var(--fs-xl) + 10px);
    font-weight: 500;
}

.legacy-left p {
    font-family: var(--urbanist);
    font-size: var(--fs-sm);
}

.legacy-right {
    
    display: flex;
    gap: var(--space-xl);
    align-items: center;
}

.legacy-work {
    width: 360px;
    min-width: 360px;
    max-width: 360px;
    overflow: hidden;
}

.year-slider {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    align-items: flex-end;
    font-family: var(--urbanist);
}

.year-slider .arrow {
    font-size: var(--fs-xl);
    opacity: 0.7;
    margin-right: var(--space-xs);
}

.year-slider .years {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-sm);
    overflow: hidden;
    scroll-behavior: smooth;
}

.year {
    font-size: var(--fs-base);
    opacity: 0.7;
}

.year.active {
    font-size: var(--fs-xl);
    opacity: 1;
}

.legacy-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    width: 100%;
}

.legacy-card h3 {
    height: 50px;
    font-family: var(--urbanist);
    font-size: var(--fs-lg);
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

.legacy-card p {
    font-family: var(--urbanist);
    font-size: var(--fs-sm);
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

.legacy-card img {
    width: 100%;
    max-width: 100%;
    height: clamp(180px, 24vw, 240px);
    object-fit: cover;
    display: block;
    border-radius: var(--space-sm);
}

.legacy-image-viewport {
    width: 100%;
    max-width: 100%;
    height: clamp(180px, 24vw, 240px);
    overflow: hidden;
    border-radius: var(--space-sm);
}

.legacy-image-track {
    width: 100%;
    height: 100%;
    display: flex;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.legacy-image-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.services {
    margin-bottom: calc(var(--space-section) * 2);
}

.services a {
    display: inline-block;
    color: var(--gold);
    font-family: var(--urbanist);
    font-size: var(--fs-sm);
    text-decoration: none;
    font-weight: bold;
    margin-bottom: var(--space-md);
}

.what-we-do {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.what-we-do h2 {
    font-family: var(--playfair-display);
    font-size: var(--fs-xl);
    color: var(--primary-color);
}

.what-we-do a {
    padding: var(--space-xs) var(--space-sm);
    background-color: var(--primary-color);
    color: var(--secondary-color);
    font-weight: normal;
    font-size: var(--fs-xs);
    border-radius: 99px;
    margin-bottom: 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.service-card {
    display: flex;
    flex-direction: column;
    
    background-color: white;
    padding: var(--space-lg);
    border-radius: var(--space-sm);
    color: var(--primary-color);
    box-shadow: 0 4px 6px rgba(0, 48, 96, 0.1);
}

.service-card img {
    width: var(--fs-xl);
    height: var(--fs-xl);
    margin-bottom: var(--space-sm);
}

.service-card h3 {
    color: var(--gold);
    font-family: var(--urbanist);
    font-size: var(--fs-base);
    margin-bottom: var(--space-xs);
}

.service-card p {
    font-family: var(--urbanist);
    font-size: var(--fs-sm);
}

.our-story {
    margin-bottom: calc(var(--space-section) * 2);
}

.our-story .top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    place-items: center;
    margin-bottom: var(--space-section);
}

.our-story .top h2 {
    font-family: var(--playfair-display);
    font-size: var(--fs-xl);
    color: var(--primary-color);
}

.our-story .top .right p {
    font-family: var(--urbanist);
    font-size: var(--fs-sm);
    color: var(--primary-color);
}

.our-story .top .right a {
    display: inline-block;
    margin-top: var(--space-sm);
    color: var(--primary-color);
    font-size: var(--fs-sm);
    font-family: var(--urbanist);
    font-weight: bold;
    text-decoration: none;
}

.our-story .top .right a:hover {
    color: var(--secondary-color);
}

.our-story .bottom {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    padding-bottom: 150px;
}

.story-card {
    position: relative;
    padding: var(--space-md) var(--space-md) 0;
    border-left: 1px solid grey;
}

.story-card::after {
    content: '+';
    position: absolute;
    left: -4.5px;
    top: -13px;
    width: 20px;
    height: 20px;
    
    
}

.story-card:nth-child(2) {
    transform: translateY(50px);
}

.story-card:nth-child(3) {
    transform: translateY(100px);
}

.story-card:nth-child(4) {
    transform: translateY(150px);
}

.story-card h3 {
    font-family: var(--urbanist);
    font-size: var(--fs-base);
    color: var(--gold);
    margin-bottom: var(--space-sm);
}

.story-card p {
    font-family: var(--urbanist);
    font-size: var(--fs-sm);
    color: var(--primary-color);
}

.clients {
    margin-bottom: calc(var(--space-section) * 2);
}

.client-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    color: var(--primary-color);
    margin-bottom: var(--space-md);
}

.client-header h2 {
    font-family: var(--playfair-display);
    font-size: var(--fs-xl);
}

.clients-previous,
.clients-next {
    width: var(--space-xl);
    height: var(--space-xl);
    
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: transparent;
    border-radius: 99px;
    text-align: center;
    font-size: var(--fs-xs);
    margin-left: 2px;
}

.client-review {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-sm);
}

.client-review-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    height: auto;
    border-radius: var(--space-xs);
}

.client-rating {
    background-color: white;
    padding: var(--space-sm);
    border-radius: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    height: 100%;
}

.client-rating img {
    width: 100px;
}

.client-rating p {
    font-family: var(--urbanist);
    font-size: var(--fs-sm);
    color: var(--primary-color);
}

.client-info {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    
}

.client-info .image {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    overflow: hidden;
}

.client-info .image div {
    background-color: grey;
    border-radius: var(--space-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-weight: bold;
}


.client-info .details .name {
    font-family: var(--urbanist);
    color: var(--primary-color);
    font-weight: 700;
    font-size: var(--fs-sm);
}

.client-info .details .description {
    font-family: var(--urbanist);
    color: var(--primary-color);
    font-size: calc(var(--fs-xs) - 2px);
}

.client-image {
    border-radius: var(--space-xs);
    overflow: hidden;
}

.client-image img {
    width: 100%;
    height: 100%;
    max-height: 400px;
    object-fit: cover;
}

.contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: stretch;
    gap: var(--space-section);
    margin-bottom: calc(var(--space-section) * 2);
}

.contact#contact {
    /* Offset anchor jump for fixed navbar. */
    scroll-margin-top: calc(60px + var(--space-md));
}

.contact-image {
    max-width: 400px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    
    border-radius: var(--space-sm);
}

.contact-right {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    max-width: 400px;
}

@media (min-width: 1025px) {
    .contact {
        display: grid;
        grid-template-columns: minmax(320px, 460px) minmax(320px, 460px);
        align-items: stretch;
        justify-content: center;
        gap: clamp(2.2rem, 4vw, 4.5rem);
    }

    .contact-image,
    .contact-right {
        width: 100%;
        max-width: none;
    }

    .contact-image {
        height: 100%;
    }
}

.contact.submit-thankyou-state {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
    width: 100%;
    text-align: center;
}

.contact-right h3 {
    font-family: var(--urbanist);
    font-size: var(--fs-lg);
    color: var(--primary-color);
}

.contact-right p {
    font-family: var(--urbanist);
    font-size: var(--fs-sm);
    color: var(--primary-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
}

.contact-form label {
    font-family: var(--urbanist);
    font-size: var(--fs-sm);
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: var(--space-xs);
}

.contact-form select,
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: var(--space-sm);
    margin-bottom: var(--space-md);
    border: 1px solid #ccc;
    border-radius: var(--space-xl);
    font-family: var(--urbanist);
    font-size: var(--fs-sm);
    color: var(--primary-color);
}

.contact-form textarea {
    resize: vertical;
    height: auto;
    border-radius: 10px;
}

.contact-form select:has(option[value=""]:checked) {
    color: color-mix(in srgb, var(--primary-color) 40%, transparent);
    font-size: var(--fs-xs);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: color-mix(in srgb, var(--primary-color) 40%, transparent);
    opacity: 1;
    font-family: var(--urbanist);
    font-size: var(--fs-xs);
}

.contact-form button {
    padding: var(--space-sm) var(--space-md);
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    border-radius: 99px;
    font-family: var(--urbanist);
    font-size: var(--fs-sm);
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.contact-form .name-row {
    display: flex;
    gap: var(--space-md);
}

.contact-form .name-row div {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}




@media (min-width: 1025px) and (max-width: 1440px) {
    .hero-bottom .bottom {
        gap: var(--space-lg);
    }

    .dev-top {
        gap: var(--space-lg);
    }

    .legacy-container {
        gap: var(--space-lg);
    }

    .legacy-right {
        gap: var(--space-lg);
    }

    .legacy-work {
        width: clamp(300px, 30vw, 340px);
        min-width: 0;
        max-width: 340px;
    }
}


@media (max-width: 1024px) {

    
    .dev-top {
        gap: var(--space-sm);
    }

    
    .legacy-container {
        flex-direction: column;
        gap: var(--space-xl);
    }

    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    
    .our-story .top {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    
    .story-card:nth-child(2),
    .story-card:nth-child(3),
    .story-card:nth-child(4) {
        transform: none;
    }

    .our-story .bottom {
        padding-bottom: 0;
    }

    
    .contact {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-lg);
    }

    .contact-image {
        max-width: 100%;
        width: 100%;
        height: clamp(240px, 42vw, 340px);
        object-fit: cover;
    }

    .contact-right {
        max-width: 100%;
        width: 100%;
    }
}


@media (max-width: 768px) {

    
    .hero-bottom .bottom {
        grid-template-columns: 1fr;
    }

    .dev-top {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-md);
    }

    
    .dev-top .card-right {
        position: relative;
        flex-direction: column;
        gap: var(--space-xs);
    }

    .dev-top .card-right .clip-card {
        width: 100%;
        height: 200px;
        min-height: unset;
        order: 1;
    }

    
    .dev-top .card-right .buttons {
        order: 0;
        position: absolute;
        top: 10px;
        right: 10px;
        gap: var(--space-xs);
        margin: 0;
    }

    .dev-top .card-right .buttons a {
        font-size: 0.875rem;
        padding: 6px 12px;
    }

    .dev-top .card-right .previous,
    .dev-top .card-right .next {
        width: clamp(1.6rem, 5vw, 2rem);
        height: clamp(1.6rem, 5vw, 2rem);
        font-size: clamp(0.65rem, 2.5vw, var(--fs-sm));
        flex-shrink: 1;
    }

    
    .legacy-right {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-lg);
        width: 100%;
    }

    .legacy-work {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    
    .year-slider {
        flex-direction: row;
        align-items: center;
        gap: var(--space-sm);
        width: 100%;
    }

    .year-slider .arrow {
        margin-right: 0;
        flex-shrink: 0;
        display: inline-block;
        transform: rotate(-90deg);
        transform-origin: center;
    }

    /* Keep rotation while global “pressable” hover/active runs (otherwise transform is replaced and the arrow jumps). */
    .year-slider .arrow:hover {
        transform: translateY(-2px) rotate(-90deg);
        box-shadow: none;
    }

    .year-slider .arrow:active {
        transform: rotate(-90deg) scale(0.94);
        box-shadow: none;
    }

    
    

    
    .year-slider .years {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-behavior: smooth;
        scrollbar-width: none;
        -ms-overflow-style: none;
        flex: 1;
        gap: var(--space-lg);
        align-items: center;
        padding: 0 var(--space-xs);
    }

    .year-slider .years::-webkit-scrollbar {
        display: none;
    }

    .year-slider .years .year {
        flex-shrink: 0;
    }

    
    .what-we-do {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    
    .client-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .clients-buttons {
        display: flex;
        gap: var(--space-xs);
    }

    .contact-form .name-row {
        flex-direction: column;
        gap: 0;
    }

    .contact-form .name-row div {
        width: 100%;
    }

    .contact-image {
        height: auto;
    }
}


@media (max-width: 576px) {

    .contact#contact {
        scroll-margin-top: calc(64px + var(--space-md));
    }

    .dev-top .card-right .buttons {
        top: 5px;
        right: 5px;
    }

    .dev-top .card-right .buttons a {
        font-size: 0.8rem;
        padding: 3px 7px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .legacy {
        padding: var(--space-xl) 0;
    }

    .legacy-card img {
        border-radius: var(--space-xs);
    }

    .client-review {
        grid-template-columns: 1fr;
    }
}


@media (min-width: 769px) and (max-width: 1024px) {
    .hero-bottom .bottom {
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }

    .dev-top {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-md);
    }

    .legacy-container {
        flex-direction: row;
        align-items: flex-start;
        gap: var(--space-md);
    }

    .legacy-left,
    .legacy-right {
        flex: 1 1 0;
        min-width: 0;
    }

    .legacy-work {
        width: 100%;
        min-width: 0;
        max-width: 320px;
    }

    .year-slider {
        gap: clamp(0.2rem, 0.6vw, var(--space-xs));
        align-items: flex-end;
        max-height: clamp(210px, 30vw, 300px);
    }

    .year-slider .arrow {
        font-size: clamp(1.05rem, 1.6vw, var(--fs-lg));
        margin-right: 0;
    }

    .year-slider .years {
        gap: clamp(0.35rem, 0.8vw, var(--space-sm));
        max-height: clamp(170px, 22vw, 240px);
        overflow: hidden;
    }

    .year-slider .year {
        font-size: clamp(0.85rem, 1vw, var(--fs-base));
    }

    .year-slider .year.active {
        font-size: clamp(1.2rem, 1.8vw, var(--fs-xl));
        line-height: 1;
    }

    .services-grid {
        grid-template-columns: 1fr 1fr;
    }

    .client-review {
        grid-template-columns: repeat(2, 1fr);
    }
}