/* ==========================================================================
   SERVICES — HERO
   (extracted from page-frontpage.css; hero rules only)
   ========================================================================== */

.home-hero {
    width: 100%;
    position: relative;
    aspect-ratio: 16 / 9;
    max-height: 100vh;
    background-color: #ccc;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.home-hero__lines {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    z-index: 1;
    pointer-events: none;
}

.home-hero__line {
    flex: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
    line-height: 1;
}

.home-hero__line-img {
    display: block;
    width: 100%;
    max-width: 100%;
    opacity: 0.9;
    transform: translateX(-100%);
    will-change: transform, opacity;
}

.home-hero__lines.is-visible .home-hero__line-img {
    animation: home-line-in 900ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.home-hero__lines.is-visible .home-hero__line--1 .home-hero__line-img {
    animation-delay: 0ms;
}
.home-hero__lines.is-visible .home-hero__line--2 .home-hero__line-img {
    animation-delay: 220ms;
}
.home-hero__lines.is-visible .home-hero__line--3 .home-hero__line-img {
    animation-delay: 440ms;
}
.home-hero__lines.is-visible .home-hero__line--4 .home-hero__line-img {
    animation-delay: 660ms;
}
.home-hero__lines.is-visible .home-hero__line--5 .home-hero__line-img {
    animation-delay: 880ms;
}
.home-hero__lines.is-visible .home-hero__line--6 .home-hero__line-img {
    animation-delay: 1000ms;
}

@keyframes home-line-in {
    from {
        transform: translateX(-60%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.home-hero__img {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 2;
}

.home-hero__social {
    padding: 1em;
    position: absolute;
    right: 0;
    bottom: 125px;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    z-index: 2;
    background: var(--x-black);
    border-radius: 16px 0px 0px 16px;
}

.home-hero__social-link {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-dark);
    border-radius: var(--radius-sm);
    font-size: var(--fs-lg);
    transition:
        transform var(--transition-fast),
        background-color var(--transition-fast);
}

.home-hero__social-link svg {
    width: 22px;
    height: 22px;
    color: var(--x-teal);
}

.home-hero__social-link:hover {
    transform: translateY(-2px);
    color: var(--color-dark);
}

.home-hero__social-link:hover svg {
    color: var(--color-light);
}

.home-hero__social-link--action svg {
    transform: rotate(45deg);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    .home-hero__line-img {
        transform: none;
        opacity: 0.8;
        animation: none !important;
    }
}

/* ==========================================================================
   HERO — Responsive
   ========================================================================== */

@media (max-width: 575.98px) {
    .home-hero {
        min-height: 55vh !important;
    }

    .home-hero__social {
        top: 85px;
        bottom: auto;
    }

    .home-hero__line-img {
        width: 100%;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .home-hero {
        min-height: 55vh !important;
    }

    .home-hero__social {
        top: 85px;
        bottom: auto;
    }

    .home-hero__line-img {
        width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .home-hero {
        aspect-ratio: 2 / 3;
        max-height: 80vh;
        min-height: 55vh !important;
    }

    .home-hero__social {
        top: var(--space-6);
        bottom: auto;
    }

    .home-hero__img {
        height: auto;
    }
}

@media (min-width: 1399px) and (max-width: 1599px) {
    .home-hero {
        max-height: 110vh;
    }
}

@media (min-width: 1600px) and (max-width: 2199px) {
    .home-hero {
        max-height: 100vh;
    }
}

@media (min-width: 2200px) {
    .home-hero {
        max-height: 140vh;
    }

    .home-hero__line.home-hero__line--4 {
        display: none;
    }
}

/* ==========================================================================
   SERVICES — ROWS (50/50 image + content, alternating)
   ========================================================================== */

.services-list {
    overflow-x: clip;
}

.services-row {
    background-color: var(--color-light);
    color: var(--x-black);
}

.services-row--blue {
    background-color: var(--x-blue);
}

.services-row--teal {
    background-color: var(--x-teal);
}

/* ---------- Media ---------- */

/*
 * Mobile / tablet (single column): the image sets its own height via
 * aspect-ratio, so it can never collapse to 0. At 992px+ (two columns)
 * it switches to filling the full height of the row (see Responsive).
 */
.services-row__media {
    position: relative;
    overflow: hidden;
    background-color: var(--x-gray-900);
}

.services-row__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* ---------- Content ---------- */

.services-row__content {
    display: flex;
    align-items: center;
}

.services-row__inner {
    width: 100%;
    max-width: 620px;
    padding: var(--space-6) var(--space-4);
}

.services-row__number {
    display: block;
    font-family: var(--font-heading);
    font-weight: var(--fw-black);
    font-size: 3.5rem;
    line-height: 1;
    color: var(--x-black);
    margin-bottom: var(--space-3);
}

.services-row__title {
    position: relative;
    font-family: var(--font-heading);
    font-weight: var(--fw-black);
    font-size: 3rem;
    line-height: var(--lh-tight);
    letter-spacing: var(--ls-tight);
    text-transform: uppercase;
    color: var(--x-black);
    margin: 0 0 var(--space-4);
    padding-bottom: var(--space-3);
}

.services-row__title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 64px;
    height: 4px;
    background-color: var(--x-blue);
}

/* Underline is white on the blue and teal rows */
.services-row--blue .services-row__title::after,
.services-row--teal .services-row__title::after {
    background-color: var(--color-light);
}

.services-row__lead {
    font-weight: var(--fw-bold);
    font-size: var(--fs-base);
    line-height: var(--lh-body);
    color: var(--x-black);
    margin-bottom: var(--space-3);
}

.services-row__text {
    font-weight: var(--fw-regular);
    font-size: var(--fs-base);
    line-height: var(--lh-body);
    color: var(--x-gray-700);
    margin-bottom: var(--space-4);
}

.services-row--blue .services-row__text,
.services-row--teal .services-row__text {
    color: var(--x-black);
}

/* ---------- Button ---------- */

.services-row__btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.6em 1.1em;
    font-family: var(--font-body);
    font-weight: var(--fw-bold);
    font-size: var(--fs-sm);
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
    text-decoration: none;
    color: var(--color-light);
    background-color: var(--x-blue);
    border-radius: var(--radius-sm);
    transition:
        background-color var(--transition-fast),
        color var(--transition-fast);
}

.services-row__btn:hover,
.services-row__btn:focus-visible {
    background-color: var(--x-black);
    color: var(--color-light);
}

/* Blue and teal rows: white button, black text; inverts on hover */
.services-row--blue .services-row__btn,
.services-row--teal .services-row__btn {
    background-color: var(--color-light);
    color: var(--x-black);
}

.services-row--blue .services-row__btn:hover,
.services-row--blue .services-row__btn:focus-visible,
.services-row--teal .services-row__btn:hover,
.services-row--teal .services-row__btn:focus-visible {
    background-color: var(--x-black);
    color: var(--color-light);
}

/* ==========================================================================
   ROWS — Responsive
   ========================================================================== */

@media (max-width: 575.98px) {
    .services-row__inner {
        padding: var(--space-8) var(--space-4);
    }

    .services-row__title {
        font-size: 1.5rem;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .services-row__inner {
        padding: var(--space-8) var(--space-4);
    }

    .services-row__title {
        font-size: 1.5rem;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .services-row__img {
        aspect-ratio: 4 / 3;
    }

    .services-row__inner {
        max-width: none;
        padding: var(--space-9) var(--space-6);
    }

    .services-row__title {
        font-size: 1.75rem;
    }
}

/* Two columns: image fills the full height of the row */
@media (min-width: 992px) {
    .services-row__img {
        position: absolute;
        inset: 0;
        height: 100%;
        aspect-ratio: auto;
    }

    .services-row__content {
        min-height: 480px;
    }

    .services-row__inner {
        padding: var(--space-9) var(--space-6);
    }
}

@media (min-width: 1399px) and (max-width: 2199px) {
    .services-row__content {
        min-height: 800px;
    }

    .services-row__inner {
        max-width: 800px;
        padding: 10rem var(--space-7);
    }

    .services-row__number {
        font-size: 4rem;
    }

    .services-row__title {
        font-size: 3.25rem;
    }

    .services-row__lead {
        font-size: 1.25rem;
    }

    .services-row__text {
        font-size: 1.25rem;
    }

    .services-row__btn {
        font-size: 1rem;
    }
}

@media (min-width: 2200px) {
    .services-row__content {
        min-height: 1200px;
    }

    .services-row__inner {
        max-width: 1200px;
        padding: 14rem var(--space-9);
    }

    .services-row__number {
        font-size: 7rem;
    }

    .services-row__title {
        font-size: 5.5rem;
    }

    .services-row__title::after {
        width: 100px;
        height: 6px;
    }

    .services-row__lead {
        font-size: 1.75rem;
    }

    .services-row__text {
        font-size: 1.5rem;
    }

    .services-row__btn {
        font-size: 1.5rem;
    }
}
