/* Factsogy homepage hero: overlay masthead, video hero, lower-third, ticker. Requires base.css + chrome.css. */

/* ---------- Masthead over the hero video ---------- */

/* Fixed and transparent over the video; site.js adds .is-solid once the page scrolls. */
.masthead--overlay {
    position: fixed;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent);
    border-bottom-color: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    color: #ffffff;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.masthead--overlay.is-solid {
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    border-bottom-color: var(--line);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: var(--text);
}

@media (prefers-color-scheme: light) {
    .masthead--overlay.is-solid .brand img {
        filter: none;
    }
}

/* ---------- Hero (always dark: it sits on video) ---------- */

.hero {
    position: relative;
    min-height: min(92vh, 860px);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: #050506;
    color: #ffffff;
    isolation: isolate;
}

.hero video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -3;
    filter: grayscale(0.35) contrast(1.05);
}

/* Darken towards the bottom-left where the headline sits */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(to top, rgba(5, 5, 6, 0.96) 0%, rgba(5, 5, 6, 0.55) 45%, rgba(5, 5, 6, 0.35) 100%),
        linear-gradient(to right, rgba(5, 5, 6, 0.7), transparent 70%);
}

/* CRT scanlines */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px);
}

.hero-inner {
    padding-top: 140px;
    padding-bottom: clamp(48px, 8vh, 88px);
}

.on-air {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    padding: 6px 14px 6px 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin: 0 0 22px;
}

.on-air i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ff3b2f;
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 59, 47, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 59, 47, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 59, 47, 0); }
}

.hero h1 {
    font-size: clamp(56px, 11.5vw, 156px);
    line-height: 0.88;
    font-weight: 900;
    max-width: 11ch;
    margin: 0 0 28px;
    text-wrap: balance;
}

.hero h1 em {
    font-style: normal;
    color: #ff3b2f;
}

/* TV lower-third caption */
.chyron {
    display: flex;
    align-items: stretch;
    max-width: 760px;
    margin-bottom: 32px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.chyron-tag {
    flex: none;
    display: flex;
    align-items: center;
    background: #ff3b2f;
    color: #ffffff;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 20px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 12px 18px;
}

.chyron p {
    margin: 0;
    background: #f3f1ec;
    color: #111214;
    font-weight: 600;
    font-size: clamp(15px, 1.8vw, 18px);
    line-height: 1.4;
    padding: 12px 20px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero .btn--ghost {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.6);
}

.hero .btn--ghost:hover {
    background: #ffffff;
    color: #111214;
}

/* Staggered load-in */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    animation: rise 0.8s var(--ease-out) forwards;
}

.reveal:nth-child(2) { animation-delay: 0.12s; }
.reveal:nth-child(3) { animation-delay: 0.24s; }
.reveal:nth-child(4) { animation-delay: 0.36s; }

@keyframes rise {
    to {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Ticker ---------- */

.ticker {
    background: #ff3b2f;
    color: #ffffff;
    overflow: hidden;
    border-top: 1px solid rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: ticker 32s linear infinite;
}

.ticker:hover .ticker-track {
    animation-play-state: paused;
}

.ticker ul {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ticker li {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 14px 0 14px 28px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 22px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.ticker li::after {
    content: "";
    width: 8px;
    height: 8px;
    background: #ffffff;
    transform: rotate(45deg);
}

@keyframes ticker {
    to { transform: translateX(-50%); }
}

@media (max-width: 640px) {
    .hero-inner {
        padding-top: 120px;
    }

    .chyron {
        flex-direction: column;
    }

    .chyron-tag {
        align-self: flex-start;
        font-size: 16px;
        padding: 6px 12px;
    }

    .ticker li {
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }

    .ticker-track {
        animation: none;
    }
}
