.brand-hero {
    container-type: inline-size;
    width: 100%;
    max-width: 600px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    user-select: none;
}

.brand-hero__mark-wrap {
    width: 46cqi;
    aspect-ratio: 1;
    animation: brand-hero-float 6s ease-in-out infinite;
}

.brand-hero__mark {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 1.5cqi 3cqi rgba(16, 160, 200, .25));
    /* The mark has 4-fold symmetry, so a 90deg turn lands on an identical frame and loops seamlessly. */
    animation: brand-hero-enter .9s cubic-bezier(.2, .8, .2, 1) both,
               brand-hero-turn 7s cubic-bezier(.7, 0, .3, 1) 1.5s infinite;
}

/* The wordmark is cut from the official artwork so typeface and spacing match the logo exactly. */
.brand-hero__wordmark {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1cqi;
    animation: brand-hero-rise .8s ease-out .25s both;
}

.brand-hero__wordmark img {
    display: block;
    height: auto;
}

.brand-hero__wordmark-img {
    width: 84cqi;
}

/* Widths keep the artwork's original name-to-slogan ratio (481px : 308px). */
.brand-hero__name-img {
    width: 72cqi;
}

.brand-hero__slogan-img {
    width: 46cqi;
    margin-top: 3cqi;
}

.brand-hero__reg {
    position: absolute;
    top: -1.5cqi;
    inset-inline-end: -4.5cqi;
    font-size: 4cqi;
    font-weight: 500;
    line-height: 1;
    color: #0b2b6b;
}

/* The artwork is navy on transparent; dark mode turns it white for contrast. */
.dark-theme .brand-hero__wordmark-img,
.dark-theme .brand-hero__name-img {
    filter: brightness(0) invert(1);
}

.dark-theme .brand-hero__reg {
    color: #fff;
}

@keyframes brand-hero-enter {
    from { opacity: 0; transform: scale(.6) rotate(-90deg); }
    to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes brand-hero-turn {
    0%, 70% { transform: rotate(0) scale(1); }
    85% { transform: rotate(45deg) scale(.9); }
    100% { transform: rotate(90deg) scale(1); }
}

@keyframes brand-hero-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2.5cqi); }
}

@keyframes brand-hero-rise {
    from { opacity: 0; transform: translateY(3cqi); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .brand-hero__mark-wrap,
    .brand-hero__mark,
    .brand-hero__wordmark {
        animation: none;
    }
}
