/* Clips 2–7 — studyTorium story reels (18s loop, 6 frames; shared timeline with clip 1) */
.st-clip {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    font-family: 'Inter', system-ui, sans-serif;
    pointer-events: none;
}

.st-clip a {
    pointer-events: auto;
}

.st-clip-bg {
    position: absolute;
    inset: 0;
    animation: stClipBgHue 18s ease-in-out infinite;
}

.st-clip--2 .st-clip-bg {
    background: linear-gradient(180deg, #0f172a 0%, #0ea5e9 55%, #22d3ee 100%);
}
.st-clip--3 .st-clip-bg {
    background: linear-gradient(145deg, #052e16 0%, #16a34a 50%, #4ade80 100%);
}
.st-clip--4 .st-clip-bg {
    background: linear-gradient(180deg, #431407 0%, #ea580c 45%, #fbbf24 100%);
}
.st-clip--5 .st-clip-bg {
    background: linear-gradient(200deg, #312e81 0%, #6366f1 40%, #a78bfa 100%);
}
.st-clip--6 .st-clip-bg {
    background: linear-gradient(160deg, #0c0a09 0%, #57534e 38%, #e7e5e4 100%);
}
.st-clip--7 .st-clip-bg {
    background: linear-gradient(185deg, #042f2e 0%, #14b8a6 50%, #5eead4 100%);
}

@keyframes stClipBgHue {
    0%,
    100% {
        filter: saturate(1) brightness(1);
    }
    50% {
        filter: saturate(1.06) brightness(1.02);
    }
}

.st-clip-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 38%, transparent 28%, rgba(0, 0, 0, 0.52) 100%);
}

.st-frame {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1.25rem 8.5rem;
    box-sizing: border-box;
    opacity: 0;
    z-index: 0;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-duration: 18s;
}

.st-frame--a {
    animation-name: stSixFrameA;
}
.st-frame--b {
    animation-name: stSixFrameB;
}
.st-frame--c {
    animation-name: stSixFrameC;
}
.st-frame--d {
    animation-name: stSixFrameD;
}
.st-frame--e {
    animation-name: stSixFrameE;
}
.st-frame--f {
    animation-name: stSixFrameF;
}

.st-line {
    margin: 0;
    max-width: 20rem;
    font-size: clamp(1.2rem, 5.2vw, 1.75rem);
    font-weight: 800;
    line-height: 1.22;
    color: #f8fafc;
    text-shadow: 0 4px 22px rgba(0, 0, 0, 0.55);
    letter-spacing: -0.02em;
}

.st-line strong {
    color: #fef08a;
    font-weight: 900;
}

.st-line-sm--tight {
    margin-top: 0.75rem;
}

.st-line-sm {
    display: block;
    margin-top: 0.55rem;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
    color: rgba(226, 232, 240, 0.92);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.st-em {
    color: #7dd3fc;
    font-weight: 900;
}

.st-line--compact {
    margin: 0;
    font-size: 0.95rem;
}

.st-shout-lg {
    margin: 0.5rem 0 0;
    font-size: clamp(1.5rem, 6vw, 2rem);
    font-weight: 900;
    color: #7dd3fc;
}

.st-shout-md {
    margin: 0.35rem 0 0;
    font-size: 1.35rem;
    font-weight: 900;
    color: #7dd3fc;
}

.st-kicker {
    margin: 0.35rem 0 0;
}

.st-pill {
    display: inline-block;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(248, 250, 252, 0.9);
}

.st-mini-grid {
    display: flex;
    gap: 0.5rem;
    width: min(21rem, 90vw);
    justify-content: center;
    flex-wrap: wrap;
}

.st-mini {
    flex: 1 1 42%;
    min-width: 8.5rem;
    padding: 0.65rem 0.55rem;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.78rem;
    font-weight: 800;
    color: #e2e8f0;
    text-align: center;
    line-height: 1.25;
}

.st-mini span {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.65rem;
    font-weight: 700;
    opacity: 0.75;
    color: #94a3b8;
}

.st-score {
    margin-top: 0.75rem;
    font-size: clamp(2rem, 9vw, 3rem);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: #fef3c7;
    text-shadow: 0 0 28px rgba(251, 191, 36, 0.35);
}

.st-brand-fin {
    margin: 0.35rem 0 0;
    font-size: clamp(1.5rem, 6vw, 2rem);
    font-weight: 900;
    color: #fff;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.st-fin-sub {
    margin: 0.65rem 0 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(203, 213, 225, 0.9);
    max-width: 18rem;
    line-height: 1.4;
}

.st-cta {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.9rem 1.4rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 900;
    text-decoration: none;
    color: #0f172a;
    background: linear-gradient(135deg, #e0f2fe 0%, #a5b4fc 100%);
    border: 2px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}
.st-cta:hover {
    filter: brightness(1.06);
}

.st-cta-ghost {
    display: inline-block;
    margin-top: 0.65rem;
    padding: 0.65rem 1.1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 800;
    text-decoration: none;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.st-rec-ui {
    width: min(17rem, 85vw);
    padding: 0.85rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-align: left;
}
.st-rec-ui-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    font-weight: 800;
    color: #fecaca;
    margin-bottom: 0.5rem;
}
.st-rec-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    animation: stRecBlink 1s step-end infinite;
}
@keyframes stRecBlink {
    50% {
        opacity: 0.35;
    }
}

/* Shared 6-frame timeline (matches clip 1) */
@keyframes stSixFrameA {
    0% {
        opacity: 0;
        transform: translateY(10px);
        z-index: 1;
    }
    2% {
        opacity: 1;
        transform: translateY(0);
        z-index: 6;
    }
    10% {
        opacity: 1;
        z-index: 6;
    }
    11.5% {
        opacity: 0;
        z-index: 1;
    }
    11.51%,
    100% {
        opacity: 0;
        z-index: 0;
    }
}

@keyframes stSixFrameB {
    0%,
    11.4% {
        opacity: 0;
        transform: translateY(14px) scale(0.96);
        z-index: 0;
    }
    12% {
        opacity: 1;
        transform: translateY(0) scale(1);
        z-index: 6;
    }
    27% {
        opacity: 1;
        z-index: 6;
    }
    28.5% {
        opacity: 0;
        z-index: 1;
    }
    28.51%,
    100% {
        opacity: 0;
        z-index: 0;
    }
}

@keyframes stSixFrameC {
    0%,
    27.4% {
        opacity: 0;
        transform: scale(0.96);
        z-index: 0;
    }
    28% {
        opacity: 1;
        transform: scale(1);
        z-index: 6;
    }
    49.5% {
        opacity: 1;
        z-index: 6;
    }
    51% {
        opacity: 0;
        z-index: 1;
    }
    51.01%,
    100% {
        opacity: 0;
        z-index: 0;
    }
}

@keyframes stSixFrameD {
    0%,
    50.4% {
        opacity: 0;
        transform: translateY(12px);
        z-index: 0;
    }
    51% {
        opacity: 1;
        transform: translateY(0);
        z-index: 6;
    }
    60.5% {
        opacity: 1;
        z-index: 6;
    }
    62% {
        opacity: 0;
        z-index: 1;
    }
    62.01%,
    100% {
        opacity: 0;
        z-index: 0;
    }
}

@keyframes stSixFrameE {
    0%,
    61.4% {
        opacity: 0;
        transform: scale(0.94);
        z-index: 0;
    }
    62% {
        opacity: 1;
        transform: scale(1);
        z-index: 6;
    }
    76.5% {
        opacity: 1;
        z-index: 6;
    }
    78% {
        opacity: 0;
        z-index: 1;
    }
    78.01%,
    100% {
        opacity: 0;
        z-index: 0;
    }
}

@keyframes stSixFrameF {
    0%,
    77.4% {
        opacity: 0;
        transform: translateY(16px);
        z-index: 0;
    }
    78% {
        opacity: 1;
        transform: translateY(0);
        z-index: 6;
    }
    97% {
        opacity: 1;
        z-index: 6;
    }
    99.5% {
        opacity: 0;
        z-index: 1;
    }
    100% {
        opacity: 0;
        z-index: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .st-clip-bg,
    .st-frame {
        animation: none !important;
    }

    .st-frame--f {
        opacity: 1 !important;
        z-index: 6 !important;
    }

    .st-frame:not(.st-frame--f) {
        display: none !important;
    }
}
