/* Shared by every homepage section: page shell, reveal motion and video thumbnails. Loads first. */
.f12-home {
    background: var(--f12-color-surface-page);
    color: var(--f12-color-text-primary);
}

.f12-home .home-page-container {
    width: min(100%, var(--f12-layout-content-max, 1280px));
    padding: var(--f12-space-12) var(--f12-space-8) var(--f12-space-16);
}

/* Room above the footer: less than a section gap, since the footer's own colour already separates it. */
.f12-home .home-page-container.f12-sections {
    padding-bottom: var(--f12-space-16);
}

.f12-home .featured-media img {
    transition: transform 240ms var(--f12-ease-standard);
}

.f12-home .featured-media:hover img {
    transform: scale(1.035);
}

/* Motion */
.f12-home .motion-target {
    opacity: 1;
    transform: none;
    filter: none;
}

@media (prefers-reduced-motion: no-preference) {
    .js-motion .f12-home .motion-target {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
    }

    .js-motion .f12-home .motion-target.is-visible {
        animation: f12-home-reveal-up 520ms var(--f12-ease-standard) both;
        animation-delay: var(--reveal-delay, 0ms);
    }
}

@keyframes f12-home-reveal-up {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Video thumbnails, used by Beliefs and Topic */
.f12-home .featured-media {
    aspect-ratio: 16 / 10;
    background: var(--f12-color-surface-subtle);
    border-radius: var(--f12-radius-3);
    overflow: hidden;
    box-shadow: var(--f12-shadow-1);
}

.f12-home .featured-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.f12-home .about-media {
    --f12-home-play-x: 50%;
    --f12-home-play-y: 50%;
    aspect-ratio: 16 / 9;
    position: relative;
}

.f12-home .video-thumb {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.f12-home .video-thumb--button {
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    text-align: inherit;
}

.f12-home .video-thumb::before {
    content: "";
    position: absolute;
    left: var(--f12-home-play-x);
    top: var(--f12-home-play-y);
    width: min(18%, 5rem);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 248, 238, 0.16) 0%,
        rgba(255, 248, 238, 0.08) 48%,
        rgba(255, 248, 238, 0) 76%
    );
    opacity: 0.58;
    pointer-events: none;
    transition:
        opacity var(--f12-duration-fast) var(--f12-ease-standard),
        transform var(--f12-duration-fast) var(--f12-ease-standard);
    z-index: 1;
}

.f12-home .video-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.32) 0%,
        rgba(0, 0, 0, 0.1) 55%,
        rgba(0, 0, 0, 0) 100%
    );
    pointer-events: none;
}

/* Artwork that is already finished, or has light type at the bottom, skips the shade. */
.f12-home .video-thumb--clear::after { display: none; }

.f12-home .about-media .f12-media-play {
    --f12-media-play-border-color: rgba(255, 255, 255, 0.72);
    --f12-media-play-bg: rgba(255, 247, 240, 0.11);
    --f12-media-play-shadow: 0 10px 22px rgba(48, 27, 8, 0.16);
    --f12-media-play-shadow-active: 0 14px 26px rgba(48, 27, 8, 0.24);
    --f12-media-play-color: rgba(255, 255, 255, 0.96);
    --f12-media-play-duration: 4.8s;

    left: var(--f12-home-play-x);
    top: var(--f12-home-play-y);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 247, 240, 0.08)),
        var(--f12-media-play-bg);
    opacity: 0.98;
    transition:
        opacity var(--f12-duration-fast) var(--f12-ease-standard),
        background var(--f12-duration-fast) var(--f12-ease-standard),
        border-color var(--f12-duration-fast) var(--f12-ease-standard),
        box-shadow var(--f12-duration-fast) var(--f12-ease-standard);
}

.f12-home .about-media .video-thumb:hover .f12-media-play,
.f12-home .about-media .video-thumb:focus-visible .f12-media-play,
.f12-home .about-media .video-thumb:focus-within .f12-media-play {
    --f12-media-play-bg: rgba(255, 248, 240, 0.16);
    --f12-media-play-border-color: rgba(255, 255, 255, 0.78);
    opacity: 1;
}

.f12-home .about-media .video-thumb:hover::before,
.f12-home .about-media .video-thumb:focus-visible::before,
.f12-home .about-media .video-thumb:focus-within::before {
    opacity: 0.72;
    transform: translate(-50%, -50%) scale(1.03);
}

.f12-home .about-media .video-thumb:focus-visible {
    outline: 0;
}

.f12-home .about-media .video-thumb:focus-visible .f12-media-play {
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.26),
        0 18px 34px rgba(7, 10, 16, 0.34);
}

@media (max-width: 768px) {
    .f12-home .home-page-container {
        padding: var(--f12-space-10) var(--f12-space-5) var(--f12-space-12);
    }

    .f12-home .home-page-container.f12-sections {
        padding-bottom: var(--f12-space-12);
    }
}

@media (prefers-reduced-motion: reduce) {
    .f12-home .featured-media img {
        transition: none;
        animation: none;
        filter: none;
        transform: none;
        opacity: 1;
    }

    .f12-home .motion-target,
    .f12-home .f12-media-play--pulse,
    .f12-home .f12-media-play--pulse::before,
    .f12-home .f12-media-play--pulse::after,
    .f12-home .f12-media-play--soft-idle,
    .f12-home .f12-media-play--soft-idle::before {
        transition: none;
        animation: none;
        filter: none;
        transform: none;
        opacity: 1;
    }
}
