:root {
    --services-navy: #071735;
    --services-orange: #fd8d32;
    --services-gutter: clamp(32px, 3.25vw, 70px);
}

.services-page,
.services-page *,
.services-page *::before,
.services-page *::after {
    box-sizing: border-box;
}

.services-hero {
    position: relative;
    display: grid;
    min-height: max(760px, 100svh);
    overflow: hidden;
    color: #ffffff;
    background: var(--services-navy);
}

.services-hero__media,
.services-hero__picture,
.services-hero__image,
.services-hero__video,
.services-hero__veil {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.services-hero__picture {
    display: block;
}

.services-hero__image,
.services-hero__video {
    object-fit: cover;
    object-position: 50% 50%;
}

.services-hero__video {
    z-index: 1;
    opacity: 0;
    transition: opacity 500ms ease;
}

.services-hero__video.is-ready {
    opacity: 1;
}

.services-hero__veil {
    z-index: 2;
    background:
        linear-gradient(90deg, rgba(7, 23, 53, 0.48) 0%, rgba(7, 23, 53, 0.24) 55%, rgba(7, 23, 53, 0.34) 100%),
        linear-gradient(180deg, rgba(7, 23, 53, 0.28) 0%, rgba(7, 23, 53, 0.18) 47%, rgba(7, 23, 53, 0.88) 100%);
}

.services-hero__content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: min(100%, 2160px);
    min-height: inherit;
    margin: 0 auto;
    padding: var(--dyer-marketing-hero-content-top) var(--services-gutter) var(--dyer-marketing-hero-content-bottom);
}

.services-hero__eyebrow {
    margin: 0 0 var(--dyer-marketing-hero-eyebrow-gap);
    color: var(--services-orange);
    font-size: var(--dyer-marketing-hero-eyebrow-size);
    font-weight: 650;
    line-height: 1.1;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.services-hero__title {
    max-width: min(860px, 66vw);
    margin: 0;
    font-size: var(--dyer-marketing-hero-statement-size);
    font-weight: var(--dyer-marketing-hero-statement-weight);
    line-height: var(--dyer-marketing-hero-statement-line-height);
    letter-spacing: var(--dyer-marketing-hero-statement-letter-spacing);
}

.services-hero__title-lead {
    white-space: nowrap;
}

.services-hero__title-aircraft,
.services-hero__title-decision {
    white-space: normal;
}

.services-hero__lower {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: min(1050px, 72vw);
}

.services-hero__description {
    max-width: 1000px;
    margin: 0;
    font-size: var(--dyer-marketing-hero-description-size);
    font-weight: var(--dyer-marketing-hero-description-weight);
    line-height: var(--dyer-marketing-hero-description-line-height);
    letter-spacing: var(--dyer-marketing-hero-description-letter-spacing);
}

.services-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 18px var(--dyer-marketing-cta-gap);
    margin-top: var(--dyer-marketing-hero-actions-top);
}

.services-hero__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    color: inherit;
    font-size: clamp(14px, 0.95vw, 17px);
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: color 180ms ease;
}

.services-hero__link-label {
    position: relative;
    padding-bottom: 6px;
}

.services-hero__link-label::before,
.services-hero__link-label::after {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 1px;
    content: "";
}

.services-hero__link-label::before {
    width: 22%;
    background: var(--services-orange);
    opacity: 0;
}

.services-hero__link-label::after {
    width: 100%;
    background: rgba(255, 255, 255, 0.92);
    transform-origin: left;
}

.services-hero__link-plane {
    display: inline-block;
    flex: 0 0 auto;
    width: 20px;
    height: 18px;
    background-image: url('../images/dyer-logo-white.svg');
    background-repeat: no-repeat;
    background-position: -12px -68px;
    background-size: 162px 90px;
    transition: transform 180ms ease;
}

.services-hero__link:hover,
.services-hero__link:focus-visible {
    color: var(--services-orange);
}

.services-hero__link:hover .services-hero__link-label::before,
.services-hero__link:focus-visible .services-hero__link-label::before {
    animation: services-underline-snake 520ms cubic-bezier(0.35, 0, 0.2, 1) both;
}

.services-hero__link:hover .services-hero__link-label::after,
.services-hero__link:focus-visible .services-hero__link-label::after {
    background: var(--services-orange);
    animation: services-underline-fill 520ms cubic-bezier(0.35, 0, 0.2, 1) both;
}

.services-hero__link:hover .services-hero__link-plane,
.services-hero__link:focus-visible .services-hero__link-plane {
    transform: translateX(5px);
}

.services-hero__link:focus-visible {
    outline: 2px solid var(--services-orange);
    outline-offset: 6px;
}

@media (max-width: 880px) {
    .services-hero {
        min-height: max(700px, 100svh);
    }

    .services-hero__content {
        padding-top: var(--dyer-marketing-hero-content-top);
    }

    .services-hero__title {
        max-width: 760px;
    }

    .services-hero__lower {
        max-width: 820px;
    }
}

@media (max-width: 1100px) and (orientation: portrait) {
    .services-hero--has-mobile-image .services-hero__image {
        object-position: center 60%;
    }

    .services-hero--has-mobile-image .services-hero__video {
        display: none;
    }

    .services-cta--has-mobile-image .services-cta__media img {
        object-position: center 55%;
    }
}

@media (max-width: 760px) {
    :root {
        --services-gutter: clamp(20px, 6.4vw, 30px);
    }

    .services-hero {
        min-height: max(720px, 100svh);
    }

    .services-hero__image,
    .services-hero__video {
        object-position: 54% 50%;
    }

    .services-hero--has-mobile-image .services-hero__image {
        object-position: center 60%;
    }

    .services-hero__veil {
        background:
            linear-gradient(180deg, rgba(7, 23, 53, 0.42) 0%, rgba(7, 23, 53, 0.2) 38%, rgba(7, 23, 53, 0.92) 100%),
            linear-gradient(90deg, rgba(7, 23, 53, 0.34), rgba(7, 23, 53, 0.14));
    }

    .services-hero__content {
        padding-top: var(--dyer-marketing-hero-content-top);
        padding-bottom: var(--dyer-marketing-hero-content-bottom);
    }

    .services-hero__eyebrow {
        margin-bottom: var(--dyer-marketing-hero-eyebrow-gap);
        font-size: var(--dyer-marketing-hero-eyebrow-size);
    }

    .services-hero__title {
        max-width: 100%;
        font-size: var(--dyer-marketing-hero-statement-size);
        line-height: var(--dyer-marketing-hero-statement-line-height);
    }

    .services-hero__title br {
        display: none;
    }

    .services-hero__title-lead,
    .services-hero__title-aircraft,
    .services-hero__title-decision {
        display: inline;
        white-space: normal;
    }

    .services-hero__lower {
        max-width: 100%;
    }

    .services-hero__description {
        font-size: var(--dyer-marketing-hero-description-size);
        line-height: var(--dyer-marketing-hero-description-line-height);
    }

    .services-hero__actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        margin-top: var(--dyer-marketing-hero-actions-top);
    }

    .services-hero__link {
        font-size: 14px;
    }
}

/* The wider mobile composition needs less vertical reserve than a narrow phone. */
@media (min-width: 641px) and (max-width: 760px) and (min-height: 621px) {
    .services-hero,
    .services-hero__content {
        min-height: max(640px, 100svh);
    }
}

.services-detail {
    padding: clamp(72px, 8vw, 132px) var(--services-gutter);
    color: var(--services-navy);
    background: #f7f7f5;
}

.services-detail__list {
    width: min(100%, 1880px);
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.services-detail__item {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    min-height: 660px;
    margin: 0;
    overflow: hidden;
    background: #ffffff;
}

.services-detail__item + .services-detail__item {
    margin-top: clamp(34px, 4vw, 68px);
}

.services-detail__item--reverse .services-detail__content {
    order: 2;
}

.services-detail__item--reverse .services-detail__figure {
    order: 1;
}

.services-detail__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(40px, 4.2vw, 72px);
}

.services-detail__title {
    margin: 0 0 32px;
    font-size: clamp(42px, 4.1vw, 70px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.035em;
}

.services-detail__copy {
    max-width: 700px;
    color: #536078;
    font-size: clamp(15px, 0.92vw, 17px);
    line-height: 1.58;
}

.services-detail__copy p {
    margin: 0;
}

.services-detail__copy p + p {
    margin-top: 1.15em;
}

.services-detail__figure {
    min-height: 100%;
    margin: 0;
    overflow: hidden;
    background: #dfe4eb;
}

.services-detail__image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 660px;
    object-fit: cover;
    object-position: center center;
    transition: transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.services-detail__item:hover .services-detail__image {
    transform: scale(1.018);
}

.services-advisory {
    padding: clamp(62px, 5.2vw, 96px) var(--services-gutter);
    color: #ffffff;
    background: var(--services-navy);
}

.services-advisory__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    gap: clamp(54px, 7vw, 132px);
    align-items: center;
    width: min(100%, 1880px);
    min-height: 350px;
    margin: 0 auto;
}

.services-advisory__eyebrow,
.services-advisory__list-eyebrow {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.23em;
    text-transform: uppercase;
}

.services-advisory__eyebrow {
    color: #ffffff;
}

.services-advisory__title {
    margin: clamp(26px, 2.8vw, 42px) 0 22px;
    font-size: clamp(42px, 4vw, 66px);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.services-advisory__intro {
    max-width: 820px;
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(16px, 1.08vw, 20px);
    line-height: 1.5;
}

.services-advisory__list-eyebrow {
    color: var(--services-orange);
}

.services-advisory__list {
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid rgba(174, 199, 229, 0.18);
}

.services-advisory__list li {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    gap: clamp(10px, 0.8vw, 14px);
    padding: clamp(13px, 1vw, 17px) 0;
    border-bottom: 1px solid rgba(174, 199, 229, 0.18);
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(17px, 1.16vw, 21px);
    line-height: 1.35;
}

.services-advisory__list li::before {
    width: 6px;
    height: 6px;
    margin-top: 0.56em;
    border-radius: 50%;
    content: "";
    background: var(--services-orange);
}

.services-cta {
    position: relative;
    color: #ffffff;
    background: var(--services-navy);
}

.services-cta__visual {
    position: relative;
    height: var(--dyer-marketing-closing-visual-height);
    min-height: var(--dyer-marketing-closing-visual-height);
    overflow: hidden;
    isolation: isolate;
}

.services-cta__media,
.services-cta__veil {
    position: absolute;
    inset: 0;
}

.services-cta__picture {
    display: block;
    width: 100%;
    height: 100%;
}

.services-cta__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 60%;
}

.services-cta__veil {
    background:
        linear-gradient(180deg, rgba(7, 23, 53, 0.28) 0%, rgba(7, 23, 53, 0.08) 42%, rgba(7, 23, 53, 0.72) 100%),
        linear-gradient(90deg, rgba(7, 23, 53, 0.36), rgba(7, 23, 53, 0) 62%);
}

.services-cta__content,
.services-cta__actions {
    position: relative;
    z-index: 1;
    width: min(100%, 2160px);
    margin-right: auto;
    margin-left: auto;
}

.services-cta__content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: inherit;
    padding: var(--dyer-marketing-closing-content-top) var(--dyer-marketing-closing-gutter) var(--dyer-marketing-closing-content-bottom);
}

.services-cta__content--without-title {
    justify-content: flex-end;
}

.services-cta__title {
    max-width: 1060px;
    margin: 0;
    font-size: var(--dyer-marketing-final-tagline-size);
    font-weight: var(--dyer-marketing-final-tagline-weight);
    line-height: var(--dyer-marketing-final-tagline-line-height);
    letter-spacing: var(--dyer-marketing-final-tagline-letter-spacing);
    text-wrap: balance;
}

.services-cta__nowrap {
    white-space: nowrap;
}

.services-cta__text {
    max-width: 830px;
    margin: 0;
    padding-top: 0;
    font-size: var(--dyer-marketing-closing-copy-size);
    font-weight: var(--dyer-marketing-closing-copy-weight);
    line-height: var(--dyer-marketing-closing-copy-line-height);
    letter-spacing: var(--dyer-marketing-closing-copy-letter-spacing);
}

.services-cta__actions {
    display: flex;
    align-items: center;
    gap: var(--dyer-marketing-cta-gap);
    min-height: var(--dyer-marketing-closing-actions-height);
    padding: 20px var(--dyer-marketing-closing-gutter);
    background: rgba(7, 23, 53, 0.97);
}

.services-cta__link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-size: var(--dyer-marketing-closing-action-size);
    font-weight: var(--dyer-marketing-closing-action-weight);
    line-height: var(--dyer-marketing-closing-action-line-height);
    text-decoration: none;
}

.services-cta__link > span:first-child {
    padding-bottom: 7px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.9);
    transition: color 180ms ease, border-color 180ms ease;
}

.services-cta__plane {
    display: inline-block;
    width: 20px;
    height: 18px;
    background-image: url('../images/dyer-logo-white.svg');
    background-repeat: no-repeat;
    background-position: -12px -68px;
    background-size: 162px 90px;
    transition: transform 180ms ease;
}

.services-cta__link:hover,
.services-cta__link:focus-visible {
    color: var(--services-orange);
}

.services-cta__link:hover > span:first-child,
.services-cta__link:focus-visible > span:first-child {
    border-color: var(--services-orange);
}

.services-cta__link:hover .services-cta__plane,
.services-cta__link:focus-visible .services-cta__plane {
    transform: translateX(5px);
}

.services-cta__link:focus-visible {
    outline: 2px solid var(--services-orange);
    outline-offset: 7px;
}

@media (max-width: 1100px) {
    .services-detail__item {
        min-height: 570px;
    }

    .services-detail__image {
        min-height: 570px;
    }

    .services-detail__content {
        padding: clamp(34px, 4.4vw, 52px);
    }

    .services-advisory__inner {
        grid-template-columns: 1fr 0.82fr;
        gap: 64px;
    }
}

/* At tablet widths, let each supplied 3:2 image own its natural frame. */
@media (max-width: 1700px) {
    .services-detail__item {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .services-detail__item--reverse .services-detail__content,
    .services-detail__item--reverse .services-detail__figure {
        order: initial;
    }

    .services-detail__figure,
    .services-detail__image {
        min-height: 0;
        aspect-ratio: 3 / 2;
    }
}

@media (max-width: 760px) {
    .services-detail {
        padding-top: 48px;
        padding-bottom: 64px;
    }

    .services-detail__item {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .services-detail__item--reverse .services-detail__content,
    .services-detail__item--reverse .services-detail__figure {
        order: initial;
    }

    .services-detail__content {
        padding: 36px 22px 42px;
    }

    .services-detail__title {
        margin-bottom: 22px;
        font-size: clamp(38px, 12vw, 52px);
    }

    .services-detail__copy {
        font-size: 14.5px;
        line-height: 1.56;
    }

    .services-detail__figure,
    .services-detail__image {
        min-height: 0;
        aspect-ratio: 3 / 2;
    }

    .services-advisory {
        padding-top: 58px;
        padding-bottom: 64px;
    }

    .services-advisory__inner {
        grid-template-columns: 1fr;
        gap: 46px;
        min-height: 0;
    }

    .services-advisory__title {
        margin-top: 26px;
        margin-bottom: 20px;
        font-size: clamp(38px, 10.8vw, 50px);
    }

    .services-advisory__title br {
        display: none;
    }

    .services-advisory__intro {
        font-size: 16px;
    }

    .services-advisory__list {
        margin-top: 28px;
    }

    .services-advisory__list li {
        grid-template-columns: 16px minmax(0, 1fr);
        gap: 10px;
        padding: 13px 0;
        font-size: 17px;
    }

    .services-cta__media img {
        object-position: 60% center;
    }

    .services-cta__title {
        font-size: var(--dyer-marketing-final-tagline-size);
        line-height: var(--dyer-marketing-final-tagline-line-height);
    }

    .services-cta__text {
        padding-top: 0;
        font-size: var(--dyer-marketing-closing-copy-size);
    }

    .services-cta__actions {
        flex-direction: row;
        align-items: center;
        gap: var(--dyer-marketing-cta-gap);
        min-height: 0;
        padding-top: 30px;
        padding-bottom: 34px;
    }
}

@media (max-width: 760px) {
    .services-cta__actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
    }

    .services-cta--has-mobile-image .services-cta__media img {
        object-position: center 55%;
    }
}

@keyframes services-underline-snake {
    0% { opacity: 1; transform: translateX(0); }
    72% { opacity: 1; transform: translateX(355%); }
    100% { opacity: 0; transform: translateX(355%); }
}

@keyframes services-underline-fill {
    0% { transform: scaleX(0); }
    38% { transform: scaleX(0.16); }
    100% { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
    .services-hero__video {
        display: none;
    }

    .services-hero *,
    .services-hero *::before,
    .services-hero *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

    .services-detail__image,
    .services-cta__link,
    .services-cta__link * {
        transition-duration: 0.01ms !important;
    }
}

@media (max-height: 620px) and (min-width: 641px) {
    .services-hero,
    .services-hero__content {
        min-height: 560px;
    }

    .services-hero__content {
        padding-top: 104px;
        padding-bottom: 28px;
    }

    .services-hero__eyebrow {
        margin-bottom: 16px;
        font-size: 11px;
    }

    .services-hero__title {
        max-width: 760px;
        font-size: clamp(42px, 5.6vw, 50px);
    }

    .services-hero__lower {
        max-width: 760px;
    }

    .services-hero__description {
        font-size: var(--dyer-marketing-hero-description-size);
        line-height: var(--dyer-marketing-hero-description-line-height);
    }

    .services-hero__actions {
        gap: 12px var(--dyer-marketing-cta-gap);
        margin-top: 28px;
    }

    .services-detail {
        padding-top: 48px;
        padding-bottom: 58px;
    }
}

/* Keep Hero and closing marketing actions aligned on one shared spacing scale. */
@media (min-width: 641px) and (max-width: 1368px) {
    .services-hero__actions,
    .services-cta__actions {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 18px var(--dyer-marketing-cta-gap);
    }
}
