/* Clip 1 — studyTorium hook (HTML/CSS cycle, 18s loop) */
.st-clip1 {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    font-family: 'Inter', system-ui, sans-serif;
}

.st-clip1-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, #0c1220 0%, #1e3a5f 38%, #312e81 72%, #0f172a 100%);
    animation: stClip1BgShift 18s ease-in-out infinite;
}

@keyframes stClip1BgShift {
    0%,
    100% {
        filter: hue-rotate(0deg) saturate(1);
    }
    33% {
        filter: hue-rotate(-8deg) saturate(1.08);
    }
    66% {
        filter: hue-rotate(10deg) saturate(1.05);
    }
}

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

.st-clip1-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;
}

/* Frame A — shell */
.st-clip1-frame--a {
    animation-name: stClip1FrameA;
}

.st-clip1-shell {
    width: min(20rem, 88vw);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.45);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.st-clip1-topbar {
    height: 2.25rem;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.st-clip1-main--empty {
    min-height: 11rem;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.35) 0%, rgba(15, 23, 42, 0.65) 100%);
}

/* Frame B — logo + triad */
.st-clip1-frame--b {
    animation-name: stClip1FrameB;
}

.st-clip1-logo {
    width: clamp(3.5rem, 18vw, 5rem);
    height: auto;
    display: block;
    margin: 0 auto 1rem;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
}

.st-clip1-frame--e .st-clip1-logo {
    animation: stClip1LogoMark 18s ease-in-out infinite;
}

@keyframes stClip1LogoMark {
    0%,
    61.9% {
        transform: scale(1);
    }
    76% {
        transform: scale(1.05);
    }
    78%,
    100% {
        transform: scale(1);
    }
}

.st-clip1-headline {
    margin: 0;
    font-size: clamp(1.65rem, 7vw, 2.35rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #f8fafc;
    text-shadow: 0 4px 28px rgba(0, 0, 0, 0.55);
}

.st-clip1-frame--b .st-clip1-tagline {
    margin: 0.65rem 0 0;
    font-size: clamp(0.95rem, 3.8vw, 1.1rem);
    font-weight: 600;
    line-height: 1.35;
    color: rgba(226, 232, 240, 0.88);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
}

/* Frame C — split mock */
.st-clip1-frame--c {
    animation-name: stClip1FrameC;
}

.st-clip1-split {
    display: flex;
    gap: 0.65rem;
    width: min(22rem, 92vw);
    justify-content: center;
    align-items: stretch;
}

.st-clip1-mock {
    flex: 1;
    min-width: 0;
    border-radius: 12px;
    padding: 0.75rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    text-align: left;
}

.st-clip1-mock-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.95);
    margin: 0 0 0.45rem;
}

.st-clip1-mock-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #e2e8f0;
    margin: 0 0 0.35rem;
    line-height: 1.2;
}

.st-clip1-mock-meta {
    font-size: 0.72rem;
    color: #94a3b8;
    margin: 0;
}

.st-clip1-mock-bar {
    margin-top: 0.65rem;
    height: 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.st-clip1-mock-bar > span {
    display: block;
    height: 100%;
    width: 62%;
    border-radius: inherit;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
}

.st-clip1-mock--cards .st-clip1-card-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.45rem 0.5rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
    font-size: 0.78rem;
    font-weight: 700;
    color: #cbd5e1;
}

.st-clip1-caption {
    margin: 1.1rem 0 0;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.88);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

/* Frame D — promise */
.st-clip1-frame--d {
    animation-name: stClip1FrameD;
}

.st-clip1-promise {
    margin: 0;
    max-width: 19rem;
    font-size: clamp(1.25rem, 5.2vw, 1.75rem);
    font-weight: 800;
    line-height: 1.25;
    color: #f1f5f9;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
}

.st-clip1-em {
    color: #7dd3fc;
    text-shadow: 0 0 24px rgba(125, 211, 252, 0.45);
}

/* Frame E — brand */
.st-clip1-frame--e {
    animation-name: stClip1FrameE;
}

.st-clip1-brand {
    margin: 0.35rem 0 0.5rem;
    font-size: clamp(1.85rem, 8vw, 2.65rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #fff;
    text-shadow: 0 6px 32px rgba(0, 0, 0, 0.5);
}

.st-clip1-tagline {
    margin: 0;
    font-size: clamp(0.95rem, 3.8vw, 1.1rem);
    font-weight: 600;
    color: rgba(203, 213, 225, 0.92);
    max-width: 18rem;
    line-height: 1.35;
}

/* Frame F — CTA */
.st-clip1-frame--f {
    animation-name: stClip1FrameF;
}

.st-clip1-cta {
    display: inline-block;
    padding: 0.95rem 1.5rem;
    border-radius: 999px;
    font-size: 1rem;
    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 36px rgba(0, 0, 0, 0.35);
    transition: filter 0.2s ease, transform 0.2s ease;
}

.st-clip1-cta:hover {
    filter: brightness(1.06);
    transform: translateY(-2px);
}

.st-clip1-cta-sub {
    margin: 0.85rem 0 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(148, 163, 184, 0.95);
}

/* 18s timeline: A 2s, B 3s, C 4s, D 2s, E 3s, F 4s */
@keyframes stClip1FrameA {
    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 stClip1FrameB {
    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 stClip1FrameC {
    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 stClip1FrameD {
    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 stClip1FrameE {
    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 stClip1FrameF {
    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-clip1-bg,
    .st-clip1-frame,
    .st-clip1-frame--e .st-clip1-logo {
        animation: none !important;
    }

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

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