/*
 * home-v2.css
 * Page-specific styles for the rebuilt homepage (index.cfm): video hero and
 * the section spacing for the carousel/utility/programs/sponsors blocks
 * below it. Builds on core.css's tokens/utilities.
 */

/* Video hero: full viewport height on load (see assets/js/header-v2.js for --sh-vh) */
.video-hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    height: 100vh;
    height: calc(var(--sh-vh, 1vh) * 100);
    color: #fff;
    border-bottom: 4px solid var(--sh-color-sports-blue);
}

.video-hero__media {
    position: absolute;
    inset: 0;
}

.video-hero__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.55) 100%);
}

/* ---------- title over the video ---------- */
.video-hero__content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: var(--sh-header-height) 24px 72px;   /* clear of the header above and the scroll cue below */
    text-align: center;
    pointer-events: none;
}

.video-hero__line {
    margin: 0;
    color: #fff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.5);
    opacity: 0;
    animation: heroLineIn 1.1s ease-out forwards;
}

.video-hero__title {
    max-width: 14em;
    text-wrap: balance;   /* even line lengths, no lone last word */
    font-family: var(--c-font-family-heading);
    font-weight: 400;
    font-size: clamp(33px, 5.4vw, 78px);   /* 25% smaller than the first version (44px, 7.2vw, 104px) */
    line-height: 0.95;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

/* Cubano version of the title, to match the logo and logotype in the header.
   Remove the video-hero__title--cubano class in index.cfm to go back to Bebas Neue. */
.video-hero__title--cubano {
    max-width: 16em;
    font-family: "cubano", sans-serif;
    font-size: clamp(26px, 4vw, 58px);
    line-height: 1.05;
    letter-spacing: 0.01em;
}

.video-hero__tagline {
    max-width: 30em;
    text-wrap: balance;
    font-size: clamp(15px, 1.7vw, 22px);   /* about 15% smaller than the first version (17px, 2vw, 26px) */
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Cubano version of the subheading. Remove the video-hero__tagline--cubano class in index.cfm
   to go back to Inter. Cubano runs wider, so it is set smaller. */
.video-hero__tagline--cubano {
    font-family: "cubano", sans-serif;
    font-size: clamp(13px, 1.45vw, 19px);
    font-weight: 400;
    letter-spacing: 0.03em;
}

.video-hero__est {
    font-family: "cubano", sans-serif;
    font-size: clamp(11px, 1vw, 14px);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-color-accent);
}

.video-hero__line--1 { animation-delay: 0.4s; }
.video-hero__line--2 { animation-delay: 1.6s; }
.video-hero__line--3 { animation-delay: 2.8s; }

@keyframes heroLineIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- "scroll for more" cue ---------- */
.video-hero__scroll {
    position: absolute;
    left: 50%;
    bottom: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-family: "cubano", sans-serif;
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
    opacity: 0;
    animation: heroCueIn 1s ease-out 3.8s forwards;
    transition: color var(--c-transition);
}

.video-hero__scroll svg {
    animation: heroCueBob 2.2s ease-in-out 4.8s infinite;
}

.video-hero__scroll:hover,
.video-hero__scroll:focus-visible {
    color: var(--c-color-accent);
}

/* steps aside once the visitor scrolls (small script in index.cfm) */
.video-hero__scroll.is-hidden {
    visibility: hidden;
    opacity: 0 !important;   /* !important beats the fade-in animation without restarting it */
}

@keyframes heroCueIn {
    to { opacity: 1; }
}

@keyframes heroCueBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(5px); }
}

/* the scroll target lands below the fixed header */
#home-main {
    scroll-margin-top: calc(var(--sh-header-height-scrolled) + 16px);
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    .video-hero__line,
    .video-hero__scroll {
        opacity: 1;
        animation: none;
    }
    .video-hero__scroll svg { animation: none; }
    html { scroll-behavior: auto; }
}

@media only screen and (max-width: 575px) {
    .video-hero__content { gap: 10px; padding-bottom: 80px; }
}

/* Fixed header already reserves space via .c-page (see core.css);
   pull the hero back up so it renders full-bleed behind it */
.c-page .video-hero {
    margin-top: calc(-1 * var(--sh-header-height));
}

/* Homepage sections below the featured carousel */
.home-content {
    padding-top: var(--c-space-5);
}

.home-utility-section,
.home-programs-section,
.home-sponsors-section {
    margin-bottom: var(--c-space-5);
}

.home-carousel-section {
    margin-top: 40px;
}

/* playoff round / exhibition tag on a game (schedule.js, daily.js, home.js) */
.c-game-type {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.5;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}
