/* Three cards overlapping the hero by 92px (the design's auto-layout gap -92). The photo layer is anchored to the
   bottom-left of the photo box and overflows it like the design; hover zooms around the visible centre. */
.znh-cards {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px 32px;
    align-items: start;
    width: 1204px;
    margin: -92px auto 0;
}

.znh-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    will-change: transform;
}

.znh-card__content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px 24px 0;
}

.znh .znh-card__title {
    color: var(--znh-jet);
    font-size: 40px;
    font-style: italic;
    font-weight: 900;
    line-height: 38px;
    height: 66px;
    text-transform: uppercase;
    text-box-trim: trim-both;
    text-box-edge: cap alphabetic;
}

.znh .znh-card__desc {
    max-width: 280px;
    color: var(--znh-ash);
    font-size: 16px;
    font-weight: 500;
    line-height: 22px;
}

.znh-card__media {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    width: 100%;
    aspect-ratio: 307.5 / 307;
    overflow: hidden;
    border-radius: 12px;
    transform: translateZ(0);
}

.znh-card__layer {
    position: relative;
    flex: none;
    transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}

/* desktop: the layer sits at the design's offset in the photo box */
@media (min-width: 900px) {
    .znh-card__layer {
        position: absolute;
        left: var(--znh-lx, 0);
        top: var(--znh-ly, 0);
    }
}

.znh .znh-card__img {
    position: absolute;
    max-width: none;
    object-fit: cover;
}

.znh-card:hover .znh-card__layer {
    transform: scale(1.0625);
}

/* green glow following the cursor (--mx/--my from cards.js) */
.znh-card__glow {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(34, 226, 67, .16), transparent 60%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s;
}

.znh-card:hover .znh-card__glow {
    opacity: 1;
}

@media (max-width: 899px) {
    .znh-cards {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 27px;
        width: 100%;
        margin-top: -71px;
    }

    /* 348px on a 390 phone (17px gutters on narrower ones), wider screens: full width with 21px gutters */
    .znh .znh-card {
        width: max(min(348px, calc(100% - 34px)), calc(100% - 42px));
        transform: none !important;
    }

    .znh .znh-card__desc {
        max-width: none;
        font-size: 14px;
        line-height: 1.4;
    }

    .znh-card__glow {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .znh-card__layer {
        transition: none;
    }
}
