/* ==========================================================================
   Gwen homepage hero.

   Layout follows the supplied designs: a panel (deep teal or white) over the
   left 40% of a full-bleed photograph, with an optional links panel beside it
   and a vertical numbered stepper on the right edge.

   Transitions follow aon.com's HomepageHeroV2 — on large screens the hero
   pins and scroll drives a horizontal wipe between slides. Slides are
   right-anchored and a full viewport wide, so tweening width from 0 to 100vw
   reads as a wipe rather than a resize, and two slides sharing one photograph
   stay perfectly registered while their panels change.
   ========================================================================== */

.gw-hero {
    --gw-teal-deep: #164b44;
    --gw-teal: #008a8a;
    --gw-green: #25c97a;
    --gw-ink: #111517;
    --gw-muted: #5d6d78;
    --gw-white: #fff;

    --gw-header-height: 96px;
    --gw-pad: 24px;
    --gw-panel-width: 40%;
    --gw-links-width: 31%;
    --gw-ease: cubic-bezier(.4, 0, 0, 1);

    position: relative;
    overflow: hidden;
    min-height: 100vh;
    background: var(--gw-teal-deep);
    color: var(--gw-white);
    display: grid;
    grid-template-columns: 1fr;
}

/* ---------- stage ---------- */
.gw-hero__stage {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.gw-hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .9s ease;
}

.gw-hero__slide.is-active {
    opacity: 1;
    visibility: visible;
}

/* Right-anchored, viewport-wide: everything inside keeps its place while the
   slide's width is tweened. */
.gw-hero__frame {
    position: absolute;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100%;
}

.gw-hero__media {
    position: absolute;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ---------- panels ---------- */
.gw-hero__panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--gw-header-height) + 32px) var(--gw-pad) 40px;
    overflow: hidden;
}

.gw-hero__slide--teal .gw-hero__panel {
    background: var(--gw-teal-deep);
    color: var(--gw-white);
}

.gw-hero__slide--light .gw-hero__panel {
    background: var(--gw-white);
    color: var(--gw-ink);
}

.gw-hero__panel-inner {
    position: relative;
    z-index: 1;
}

.gw-hero__eyebrow {
    display: block;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gw-muted);
}

.gw-hero__title {
    margin: 0;
    font-size: clamp(28px, 14px + 1.9vw, 44px);
    line-height: 1.14;
    font-weight: 700;
    letter-spacing: -.01em;
}

.gw-hero__title sup {
    font-size: .42em;
    top: -.85em;
}

.gw-hero__slide--light .gw-hero__title {
    color: var(--gw-teal);
}

.gw-hero__body {
    margin: 28px 0 0;
    max-width: 46ch;
    font-size: 16px;
    line-height: 1.62;
    color: rgba(255, 255, 255, .74);
}

.gw-hero__slide--light .gw-hero__body {
    color: var(--gw-muted);
}

.gw-hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    align-self: flex-start;
    margin-top: 32px;
    padding: 15px 28px;
    border-radius: 999px;
    background: var(--gw-green);
    color: var(--gw-ink);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color .3s ease, transform .3s ease;
}

.gw-hero__cta svg {
    width: 18px;
    height: 18px;
    transition: transform .3s ease;
}

.gw-hero__cta:hover {
    background: #1eb46c;
    color: var(--gw-ink);
}

.gw-hero__cta:hover svg {
    transform: translateX(4px);
}

/* ---------- watermark ---------- */
.gw-hero__watermark {
    position: absolute;
    left: -.06em;
    bottom: -.12em;
    z-index: 0;
    font-size: clamp(90px, 40px + 9vw, 210px);
    font-weight: 700;
    line-height: .8;
    white-space: nowrap;
    pointer-events: none;
    color: rgba(0, 138, 138, .09);
}

.gw-hero__slide--teal .gw-hero__watermark {
    left: var(--gw-pad);
    bottom: 40px;
    width: clamp(120px, 14vw, 260px);
    font-size: 0;
}

.gw-hero__watermark img {
    width: 100%;
    opacity: .09;
    filter: brightness(0) invert(1);
}

/* ---------- links panel ---------- */
.gw-hero__links {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--gw-panel-width);
    width: var(--gw-links-width);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--gw-header-height) + 32px) 40px 40px;
    background: var(--gw-white);
}

.gw-hero__links ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.gw-hero__links li + li {
    margin-top: 34px;
}

.gw-hero__links a {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    color: var(--gw-ink);
    font-size: 19px;
    line-height: 1.3;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 4px;
    transition: color .3s ease;
}

.gw-hero__links a svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    transition: transform .3s ease;
}

.gw-hero__links a:hover {
    color: var(--gw-teal);
}

.gw-hero__links a:hover svg {
    transform: translateX(4px);
}

/* ---------- trusted-by strip ---------- */
.gw-hero__clients {
    position: absolute;
    left: var(--gw-panel-width);
    right: 0;
    bottom: 9%;
    padding: 0 120px 0 40px;
    color: var(--gw-white);
}

.gw-hero__clients-title {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    white-space: nowrap;
}

.gw-hero__clients-title::before,
.gw-hero__clients-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, .45);
}

.gw-hero__clients ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 2.4vw, 44px);
    margin: 0;
    padding: 18px clamp(16px, 2vw, 32px);
    list-style: none;
    background: rgba(255, 255, 255, .92);
    border-radius: 6px;
}

.gw-hero__clients img {
    display: block;
    height: clamp(24px, 2.6vw, 38px);
    width: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
}

/* ---------- vertical stepper ---------- */
.gw-hero__steps {
    display: none;
    position: absolute;
    right: 56px;
    bottom: 7%;
    z-index: 5;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

.gw-hero__step {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 20px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.gw-hero__step-dot {
    width: 6px;
    height: 6px;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 50%;
    transition: opacity .3s ease;
}

.gw-hero__step-num {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 600;
    color: var(--gw-green);
    opacity: 0;
    transition: opacity .3s ease;
}

/* the active step trades its dot for the number, with a leader rule */
.gw-hero__step.is-active .gw-hero__step-num { opacity: 1; }
.gw-hero__step.is-active .gw-hero__step-dot { opacity: 0; }

.gw-hero__step.is-active::after {
    content: "";
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    width: 46px;
    height: 1px;
    background: rgba(255, 255, 255, .6);
}

/* ---------- skip ---------- */
.gw-hero__skip {
    display: none;
    position: absolute;
    right: 124px;
    bottom: 30px;
    z-index: 5;
    padding: 8px 0;
    border: none;
    background: none;
    color: rgba(255, 255, 255, .82);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
}

.gw-hero__skip:hover,
.gw-hero__skip:focus-visible {
    color: var(--gw-green);
}

/* ==========================================================================
   Small screens: panels stack above a fixed image band, slides cross-fade.
   ========================================================================== */
@media (max-width: 1023px) {
    .gw-hero {
        min-height: 0;
    }

    .gw-hero__stage {
        position: relative;
        inset: auto;
    }

    .gw-hero__slide {
        position: relative;
        inset: auto;
        display: none;
    }

    .gw-hero__slide.is-active {
        display: block;
    }

    .gw-hero__frame {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: column;
    }

    .gw-hero__panel,
    .gw-hero__links {
        position: relative;
        inset: auto;
        left: auto;
        width: 100%;
        padding: calc(var(--gw-header-height) + 40px) var(--gw-pad) 40px;
    }

    .gw-hero__links {
        order: 3;
        padding-top: 32px;
    }

    .gw-hero__media {
        position: relative;
        order: 4;
        top: auto;
        right: auto;
        width: 100%;
        height: 300px;
    }

    .gw-hero__clients {
        order: 5;
        position: relative;
        left: auto;
        bottom: auto;
        padding: 28px var(--gw-pad);
        background: var(--gw-teal-deep);
    }

    .gw-hero__watermark {
        display: none;
    }

    .gw-hero__steps {
        display: flex;
        flex-direction: row;
        position: relative;
        right: auto;
        bottom: auto;
        justify-content: center;
        padding: 20px 0;
        background: var(--gw-teal-deep);
    }

    .gw-hero__step.is-active::after {
        display: none;
    }
}

/* ==========================================================================
   Desktop
   ========================================================================== */
@media (min-width: 1024px) {
    .gw-hero {
        --gw-pad: 48px;
    }

    .gw-hero__panel {
        width: var(--gw-panel-width);
    }

    .gw-hero__steps {
        display: flex;
    }
}

@media (min-width: 1440px) {
    .gw-hero {
        --gw-pad: 64px;
    }
}

/* ==========================================================================
   Scroll-driven stage (>= 1200px, as on aon.com).
   ========================================================================== */
@media (min-width: 1200px) {
    .gw-hero__stage {
        overflow: hidden;
    }

    .gw-hero__slide {
        inset: 0 0 0 auto;
        width: 100vw;
        opacity: 1;
        visibility: visible;
        overflow: hidden;
        transition: none;
        will-change: width;
    }

    .gw-hero__media {
        will-change: filter;
    }

    /* Start state for the sequence, in CSS so there is no first-paint flash.
       Gated on the class JS adds, so a failed script still leaves slide 1
       readable rather than blanking the hero. */
    .gw-hero.is-scroll-driven .gw-hero__slide + .gw-hero__slide {
        width: 0;
    }

    .gw-hero.is-scroll-driven .gw-hero__skip {
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gw-hero__slide,
    .gw-hero__cta,
    .gw-hero__cta svg,
    .gw-hero__links a svg {
        transition: none;
    }
}
