.hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #071633;
}

/* The picture / video area is 16:9 (the shape of a video), so a 1920x1080 video or picture fits exactly and is never
   cut, on every screen. */
.hero-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #071633;
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center;
    opacity: 0;
    transform: translate3d(0, var(--parallax-y, 0px), 0) scale(1.06);
    transition: opacity 0.58s ease, transform 1.05s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-image.is-active {
    opacity: 1;
    transform: translate3d(0, var(--parallax-y, 0px), 0) scale(1);
}

.hero-image.is-entering.is-next {
    transform: translate3d(2.2%, var(--parallax-y, 0px), 0) scale(1.03);
}

.hero-image.is-entering.is-prev {
    transform: translate3d(-2.2%, var(--parallax-y, 0px), 0) scale(1.03);
}

.hero-image.is-active.is-entering {
    transform: translate3d(0, var(--parallax-y, 0px), 0) scale(1);
}

.hero-image.is-leaving.is-next {
    opacity: 0;
    transform: translate3d(-2%, var(--parallax-y, 0px), 0) scale(1.07);
}

.hero-image.is-leaving.is-prev {
    opacity: 0;
    transform: translate3d(2%, var(--parallax-y, 0px), 0) scale(1.07);
}

/* The video of a slide lies over the picture (the picture stays until the video plays) */
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: translate3d(0, var(--parallax-y, 0px), 0);
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.hero-video.is-visible {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(16, 24, 50, 0.08) 20%, rgba(7, 11, 22, 0.72) 100%);
}

.hero-word {
    position: absolute;
    left: 50%;
    top: 44%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;

    font-size: clamp(110px, 24vw, 360px);
    letter-spacing: 0.1em;
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    line-height: 0.85;
    white-space: nowrap;
    z-index: 1;
    pointer-events: none;

    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.98) 0%,
            rgba(255, 255, 255, 0.92) 20%,
            rgba(246, 250, 255, 0.78) 48%,
            rgba(218, 232, 255, 0.5) 72%,
            rgba(188, 210, 246, 0.16) 100%);

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 14px rgba(172, 196, 234, 0.2));
}

.hero-caption {
    position: absolute;
    bottom: 24px;
    left: 24px;
    right: 210px;
    display: grid;
    grid-template-columns: 1fr 3.5fr;
    color: #fff;
    align-items: end;
    gap: 10px;
}

.hero-caption[hidden] {
    display: none;
}

.hero-year,
.hero-caption p {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.hero.is-changing .hero-year,
.hero.is-changing .hero-caption p {
    opacity: 0;
    transform: translateY(12px);
}

.hero-year {
    font-size: 18px;
    font-weight: 500;
}

.hero-caption p {
    line-height: 1.2;
    font-weight: 400;
}

.hero-caption strong {
    font-weight: 600;
}

.hero-slider-controls {
    position: absolute;
    right: 24px;
    bottom: 24px;
    display: flex;
    gap: 10px;
}

.hero-slider-controls button {
    border: 0;
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: #fff;
    color: #0d2456;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.hero-slider-controls .hero-prev:hover,
.hero-slider-controls .hero-prev:focus-visible {
    transform: scale(1.14) rotate(-7deg);
    background: #163b8c;
    color: #fff;
    box-shadow: 0 14px 24px -14px rgba(22, 59, 140, 0.75);
}

.hero-slider-controls .hero-next:hover,
.hero-slider-controls .hero-next:focus-visible {
    transform: scale(1.14) rotate(7deg);
    background: #163b8c;
    color: #fff;
    box-shadow: 0 14px 24px -14px rgba(22, 59, 140, 0.75);
}

.hero-slider-controls .hero-prev:active {
    transform: scale(1.18) rotate(-9deg);
}

.hero-slider-controls .hero-next:active {
    transform: scale(1.18) rotate(9deg);
}

@media (min-width: 1280px) {
    .hero-word {
        top: 44%;
    }

    .hero-caption p {
        font-size: 20px;
    }
}

@media (max-width: 1024px) {
    .hero {
        border-radius: 18px;
    }

    .hero-word {
        left: 50%;
        top: 42%;
        width: 100%;
        font-size: clamp(56px, 23vw, 210px);
        line-height: 0.9;
    }

    .hero-slider-controls {
        right: 12px;
        bottom: 12px;
    }

    .hero-slider-controls button {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 20px;
    }
}

/* Tablet and phone: the caption sits under the picture / video instead of over it, so nothing covers the video. */
@media (max-width: 900px) {
    .hero-caption {
        position: static;
        display: block;
        padding: 14px 18px 18px;
        background: linear-gradient(180deg, #0a1d4a, #071633);
    }

    .hero-year {
        display: block;
        margin-bottom: 4px;
        font-size: 14px;
        opacity: 0.8;
    }

    .hero-caption p {
        font-size: 16px;
        line-height: 1.35;
    }

    .hero-caption strong {
        display: block;
        font-size: 18px;
    }
}

@media (max-width: 560px) {
    .hero-slider-controls {
        right: 8px;
        bottom: 8px;
        gap: 6px;
    }

    .hero-slider-controls button {
        width: 32px;
        height: 32px;
        border-radius: 10px;
        font-size: 16px;
    }
}
