/* Loaded only by v2/index.html; shared navigation styles stay independent. */
@font-face {
    font-family: 'V2 Ranking Display';
    src: url('../fonts/V2Ranking-AlimamaShuHeiTi.otf') format('opentype');
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'V2 Ranking Regular';
    src: url('../fonts/V2Ranking-AlibabaPuHuiTi-Regular.ttf') format('truetype');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

.hx-hero-redesign {
    --hero-navy: #102959;
    aspect-ratio: 1920 / 1021;
    background: var(--hero-navy);
}

.hx-hero-redesign,
.hx-hero-redesign * {
    font-family: inherit;
}

.hx-hero-redesign .hx-slide {
    pointer-events: none;
}

.hx-hero-redesign .hx-slide.is-active {
    pointer-events: auto;
}

.hx-hero-redesign .hx-slide > .hx-cms-content,
.hx-hero-redesign .hx-reference-artwork {
    display: block;
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1920 / 967;
    overflow: hidden;
}

.hx-hero-redesign .hx-slide > .hx-cms-content::after,
.hx-hero-redesign .hx-reference-artwork::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 24%;
    background: linear-gradient(180deg, rgba(16, 41, 89, 0), var(--hero-navy));
    pointer-events: none;
}

.hx-hero-redesign .hx-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Keep the restored photograph top-aligned with the original reference. */
.hx-hero-redesign .hx-reference-artwork img {
    height: auto;
}

/* Preserve each supplied composition and its embedded lettering. */
.hx-hero-redesign.hx-hero-v2 .hx-reference-artwork {
    height: auto;
    min-height: 0;
    aspect-ratio: 1920 / 967;
}

.hx-hero-redesign.hx-hero-v2 .hx-reference-artwork img {
    position: static;
    height: 100%;
    object-fit: contain;
}

.hx-hero-v2 .hx-reference-artwork picture,
.hx-hero-v2 .hx-banner-link {
    display: block;
}

.hx-hero-v2 .hx-reference-artwork picture {
    aspect-ratio: 1920 / 967;
}

.hx-cms-artwork {
    display: block;
    width: 100%;
    height: 100%;
}

.hx-hero-caption.hx-cms-caption {
    display: none;
}

/* Measured from hero.png: the panel is 46.5% of the image width. Keep
 * typography proportional to the photo, including on wide desktop screens. */
.hx-hero-caption {
    position: absolute;
    z-index: 1;
    top: 46.5%;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 1.2vw;
    width: 46.5%;
    min-height: 28.3%;
    padding: 2.25vw 1.25vw 2.9vw;
    border: 1px solid rgba(151, 214, 239, .42);
    border-left: 0;
    background: rgba(10, 39, 128, .64);
    box-shadow: .45vw 0 0 rgba(136, 208, 235, .12),
        0 .35vw 0 rgba(156, 215, 237, .14);
    color: #fff;
    text-align: center;
}

.hx-hero-caption-source,
.hx-hero-caption-title {
    margin: 0;
    color: inherit;
    text-shadow: 0 .025em 0 rgba(124, 188, 235, .7),
        .025em .045em 0 rgba(6, 35, 87, .55);
}

.hx-hero-caption-source {
    font-size: 2.4vw;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: .015em;
}

.hx-hero-caption-title {
    font-size: 4.6vw;
    font-weight: 900;
    font-style: normal;
    line-height: 1.1;
    letter-spacing: -.015em;
    white-space: nowrap;
    /* Explicit slant/condensing also works with CJK fonts without italics. */
    transform: skewX(-10deg) scaleX(.9);
    transform-origin: center;
}

.hx-hero-caption-en {
    justify-content: center;
    padding: 1.8vw;
}

.hx-hero-caption-en .hx-hero-caption-source {
    font-size: max(14px, 1.5vw);
    line-height: 1.35;
}

.hx-hero-caption-en .hx-hero-caption-title {
    font-size: max(24px, 2.9vw);
    font-style: italic;
    line-height: 1.2;
    white-space: normal;
    transform: none;
}

.hx-hero-redesign .hx-hero-overlay {
    gap: clamp(18px, 1.67vw, 32px);
    padding-top: clamp(40px, 5vw, 96px);
    background: none;
    pointer-events: none;
}
.hx-hero-redesign .hx-hero-overlay::before {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: min(15vw, 288px);
    background: linear-gradient(0deg, #0e2755, rgba(15, 37, 78, .65) 40%, rgba(16, 35, 70, .35) 70%, rgba(16, 35, 70, 0));
    pointer-events: none;
}
.hx-hero-redesign .hx-controls,
.hx-hero-redesign .hx-rankings {
    position: relative;
}

/* Fade the photo behind the caption; the rankings scrim must not dim the
 * first slide's white lettering and translucent blue surface. */
.hx-hero-redesign .hx-reference-artwork::after {
    height: 20%;
}

.hx-hero-redesign .hx-controls {
    justify-content: center;
    padding: 0;
}

.hx-hero-redesign .hx-dots {
    gap: 0;
    pointer-events: auto;
}

.hx-hero-redesign .hx-dot {
    display: grid;
    place-items: center;
    width: 31px;
    height: 36px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
}

.hx-hero-redesign .hx-dot::before {
    content: '';
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 50%;
    transition: background .2s ease;
}

.hx-hero-redesign .hx-dot.is-active::before {
    background: #fff;
}

.hx-hero-redesign .hx-dot:hover::before {
    background: rgba(255, 255, 255, .5);
}

.hx-hero-redesign .hx-dot:focus-visible {
    outline: 2px solid #f4d66e;
    outline-offset: 2px;
}

.hx-hero-redesign .hx-stats {
    grid-template-columns: 2.05fr 1fr 1.1fr 1.45fr;
    gap: clamp(18px, 2vw, 38px);
    padding: 0 clamp(20px, 1.7vw, 33px) clamp(44px, 2.6vw, 50px);
}

.hx-hero-redesign .hx-stat {
    min-width: 0;
    gap: 10px;
}

.hx-hero-redesign .hx-stat-icon {
    width: clamp(25px, 1.75vw, 34px);
    height: clamp(32px, 2.2vw, 42px);
}

/* The gradient lives on the headline, not on a span: the fourth stat has two
 * spans ("Asia No.1" / "World Top 30") and a per-span background would leave
 * the second one plain and restart the sweep on each word. One background box
 * over the whole headline spreads it across every span.
 *
 * Both ends of the gradient are the same gold and the tile is exactly twice
 * the headline width, so shifting by 200% moves it a whole tile and the loop
 * has no visible seam. */
.hx-hero-redesign .hx-stat-headline {
    flex-wrap: wrap;
    gap: 5px 16px;
    font-size: clamp(19px, 1.7vw, 33px);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0;
    background: linear-gradient(100deg, #ffca47 0%, #ffca47 38%, #fff 50%, #ffca47 62%, #ffca47 100%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: hx-stat-sheen 4.5s linear infinite;
}

@keyframes hx-stat-sheen {
    to { background-position: 200% center; }
}

.hx-hero-redesign .hx-stat-note {
    margin-top: 6px;
    color: #e1e9f6;
    font-size: clamp(12px, 1.08vw, 21px);
    line-height: 1.65;
    text-wrap: initial;
}

.v2-index .hx-stat-headline {
    font-family: 'V2 Ranking Display', var(--v2-font-body);
}

.v2-index .hx-stat-note {
    font-family: 'V2 Ranking Regular', var(--v2-font-body);
    font-weight: 400;
}

@media (max-width: 767px) {
    .hx-hero-redesign {
        aspect-ratio: auto;
    }

    .hx-hero-caption { top: auto; bottom: 4.53%; }

    /* Overlaid grid items reserve the tallest slide without measuring it in JS. */
    .hx-slides {
        display: grid;
    }

    .hx-hero-redesign .hx-slide {
        position: relative;
        inset: auto;
        grid-area: 1 / 1;
        min-width: 0;
    }

    .hx-hero-redesign .hx-reference-artwork {
        height: 100%;
        min-height: 39.52vw;
        aspect-ratio: auto;
    }

    .hx-hero-redesign .hx-reference-artwork img {
        position: absolute;
        height: 100%;
        object-position: center top;
    }

    .hx-hero-redesign .hx-slide-cms > .hx-cms-content {
        height: 100%;
        min-height: 39.52vw;
        aspect-ratio: auto;
        color: inherit;
    }

    .hx-hero-redesign .hx-slide-cms > .hx-cms-content::after {
        display: none;
    }

    .hx-hero-redesign .hx-cms-artwork {
        position: absolute;
        inset: 0;
        height: 100%;
    }

    .hx-hero-redesign .hx-slide-cms img {
        object-fit: cover;
        object-position: center top;
    }

    /* All narrow-screen captions use the first slide's image overlay. */
    .hx-hero-caption.hx-cms-caption {
        display: flex;
    }

    .hx-cms-caption .hx-hero-caption-title {
        white-space: normal;
        text-wrap: balance;
        overflow-wrap: break-word;
    }

    .hx-cms-caption .hx-hero-caption-source {
        text-wrap: balance;
    }

    .hx-hero-redesign .hx-hero-overlay {
        position: relative;
        margin-top: 0;
        padding-top: 12px;
        gap: 18px;
        background: none;
    }

    .hx-hero-redesign .hx-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    .hx-hero-redesign .hx-stat:nth-child(n + 2) {
        display: flex;
    }

    .hx-hero-redesign .hx-stat-note {
        font-size: 14px;
        overflow-wrap: break-word;
    }

    .hx-hero-redesign .hx-stat > div {
        min-width: 0;
    }
}

@media (max-width: 760px) {
    .hx-hero-caption {
        width: 60%;
        min-height: 0;
        gap: 10px;
        padding: 18px 16px 22px;
    }

    .hx-hero-caption-source {
        font-size: max(16px, 2.4vw);
    }

    .hx-hero-caption-title {
        font-size: max(26px, 4.6vw);
    }
}

@media (max-width: 540px) {
    .hx-hero-redesign .hx-reference-artwork,
    .hx-hero-redesign .hx-slide-cms > .hx-cms-content {
        min-height: 75vw;
    }

    .hx-hero-caption {
        bottom: 16px;
        width: calc(100% - 20px);
        min-height: 0;
        padding: 16px 18px;
    }

    .hx-hero-caption-title {
        font-size: clamp(26px, 6.5vw, 35px);
        white-space: normal;
        text-wrap: balance;
    }

    .hx-hero-redesign .hx-stats {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .hx-hero-redesign .hx-dot {
        width: 36px;
        height: 44px;
    }

    .hx-hero-redesign .hx-dot::before {
        width: 12px;
        height: 12px;
    }
}

/* Two identical groups make the right-to-left loop continuous. */
.hx-hero-redesign .hx-rankings {
    overflow: hidden;
    pointer-events: auto;
}

.hx-hero-redesign .hx-rankings:focus-visible {
    outline: 2px solid #f4d66e;
    outline-offset: -2px;
}

.hx-hero-redesign .is-marquee .hx-rankings-track {
    display: flex;
    width: calc(200% + clamp(36px, 4vw, 76px));
    /* The seam between the two groups uses the same gap as the items inside a
     * group, so the loop point is invisible. */
    gap: clamp(36px, 4vw, 76px);
    animation: hx-rankings-scroll 45s linear infinite;
}

.hx-hero-redesign .is-marquee .hx-stats {
    display: grid;
    flex: 0 0 auto;
    width: calc((100% - clamp(36px, 4vw, 76px)) / 2);
    gap: clamp(18px, 2vw, 38px);
    padding: 0 clamp(20px, 1.7vw, 33px) clamp(44px, 2.6vw, 50px);
}


.hx-hero-redesign .is-marquee .hx-stat {
    min-width: 0;
}

.hx-hero-redesign .is-marquee .hx-stat-headline {
    flex-wrap: nowrap;
}

.hx-hero-redesign .is-marquee .hx-stat-note {
    white-space: normal;
}
@media (max-width: 767px) {
    .hx-hero-redesign .hx-hero-overlay::before { display: none; }
    .hx-hero-redesign .is-marquee .hx-rankings-track { width: max-content; }
    .hx-hero-redesign .is-marquee .hx-stats {
        display: flex;
        width: max-content;
        gap: clamp(36px, 4vw, 76px);
        padding: 0 0 clamp(24px, 1.5vw, 30px);
    }
    .hx-hero-redesign .is-marquee .hx-stat { flex: 0 0 auto; }
    .hx-hero-redesign .is-marquee .hx-stat-note { white-space: nowrap; }
}

.hx-hero-redesign .hx-rankings:hover .hx-rankings-track,
.hx-hero-redesign .hx-rankings:focus-within .hx-rankings-track {
    animation-play-state: paused;
}

/* Half the track plus half its single seam gap = exactly one group. */
@keyframes hx-rankings-scroll {
    to { transform: translateX(calc(-50% - clamp(18px, 2vw, 38px))); }
}

@media (prefers-reduced-motion: reduce) {
    .hx-hero-redesign .is-marquee .hx-rankings-track {
        display: block;
        width: auto;
        animation: none;
    }

    .hx-hero-redesign .is-marquee .hx-stats {
        display: grid;
        width: auto;
        min-width: 0;
        padding: 0 clamp(20px, 1.7vw, 33px) 24px;
    }

    .hx-hero-redesign .is-marquee .hx-stats[aria-hidden="true"] {
        display: none;
    }

    .hx-hero-redesign .is-marquee .hx-stat-headline {
        flex-wrap: wrap;
    }

    .hx-hero-redesign .is-marquee .hx-stat-note {
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hx-hero-redesign .hx-stat-headline {
        background: linear-gradient(90deg, #ffca47 0%, #ffca47 45%, #fff 68%);
        background-clip: text;
        -webkit-background-clip: text;
        animation: none;
    }

    .hx-hero-redesign .hx-slide,
    .hx-hero-redesign .hx-dot::before {
        transition: none;
    }
}

/* Portrait artwork is phone-only; tablets retain the landscape composition. */
@media (max-width: 767px) {
    .hx-hero-redesign.hx-hero-v2 .hx-slides {
        aspect-ratio: auto;
    }

    .hx-hero-redesign.hx-hero-v2 .hx-reference-artwork {
        aspect-ratio: 750 / 1136;
    }

    .hx-hero-v2 .hx-reference-artwork picture {
        aspect-ratio: 750 / 1136;
    }

    .hx-hero-v2 .hx-reference-artwork::after {
        display: none;
    }

    .hx-hero-v2 .hx-hero-overlay {
        position: absolute;
        padding-top: 80px;
        gap: 4px;
    }

    .hx-hero-v2 .hx-hero-overlay::before {
        display: block;
        height: 100%;
    }

    .hx-hero-v2 .is-marquee .hx-rankings-track {
        width: max-content;
    }

    .hx-hero-v2 .is-marquee .hx-stats {
        display: flex;
        width: max-content;
        gap: clamp(36px, 4vw, 76px);
        padding: 0 0 24px;
    }

    .hx-hero-v2 .is-marquee .hx-stat {
        flex: 0 0 auto;
    }

    .hx-hero-v2 .is-marquee .hx-stat-note {
        white-space: nowrap;
    }

    /* Static rankings need their own space when scripting or motion is off. */
    .hx-hero-v2 .hx-hero-overlay:has(.hx-rankings:not(.is-marquee)) {
        position: relative;
        padding-top: 12px;
    }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
    .hx-hero-v2 .hx-hero-overlay {
        position: relative;
        padding-top: 12px;
    }

    .hx-hero-v2 .is-marquee .hx-rankings-track {
        width: auto;
    }

    .hx-hero-v2 .is-marquee .hx-stats {
        display: grid;
        width: auto;
        padding: 0 20px 24px;
    }

    .hx-hero-v2 .is-marquee .hx-stat-note {
        white-space: normal;
    }
}

/* Empty CMS content keeps rankings visible without reserving an artwork frame. */
.hx-hero-redesign.hx-hero-empty {
    aspect-ratio: auto;
}

.hx-hero-empty .hx-slides {
    display: none;
}

.hx-hero-v2.hx-hero-empty .hx-hero-overlay {
    position: relative;
    padding-top: 24px;
}

.hx-hero-v2.hx-hero-empty .hx-hero-overlay::before {
    display: none;
}
