/* ── Case Study 1: Banking Hero ─────────────────────────── */

/* Back button — top-left */
.cs__back {
    position: fixed;
    top: 5vh;
    left: 5vw;
    z-index: 100000;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-decoration: none;
    color: var(--text-secondary);
    opacity: 0;
    transition: color 0.3s ease, opacity 0.3s ease;
    cursor: none;
}
.cs__back:hover {
    color: var(--text-primary);
}
.cs__back .material-symbols-outlined {
    font-size: 1.1rem;
}

/* ── Hero ───────────────────────────────────────────────── */
#cs-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    background-color: #E8F1EF;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    padding: 0 5vw;
    box-sizing: border-box;
}

[data-theme="dark"] #cs-hero {
    background-color: #1a2e2a;
}

/* ── Hero content ───────────────────────────────────────── */
#cs-hero__content {
    text-align: center;
    padding-top: clamp(14vh, 18vh, 22vh);
    max-width: 800px;
    opacity: 0;
}

#cs-hero__index {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #4a7c6f;
    margin: 0 0 1.2rem 0;
}

[data-theme="dark"] #cs-hero__index {
    color: #7db2a4;
}

#cs-hero__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.4rem, 4.5vw, 4.2rem);
    font-weight: 300;
    line-height: 1.12;
    letter-spacing: -0.025em;
    color: #1a3a32;
    margin: 0;
}

[data-theme="dark"] #cs-hero__title {
    color: #d4e8e2;
}

#cs-hero__tags {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.cs-hero__tag {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4a7c6f;
}

[data-theme="dark"] .cs-hero__tag {
    color: #7db2a4;
}

.cs-hero__tag-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #4a7c6f;
    opacity: 0.5;
}

[data-theme="dark"] .cs-hero__tag-dot {
    background-color: #7db2a4;
}

/* ── Pinned stage ───────────────────────────────────────── */
#cs-stage {
    position: relative;
    overflow: hidden;
}

/* ── Coin — Lottie animation ───────────────────────────── */
#cs-coin {
    position: absolute;
    z-index: 20;
    left: 50%;
    top: 65%;
    pointer-events: none;
    will-change: transform;
}

#cs-coin__bob {
    will-change: transform;
}

#cs-coin__lottie {
    width: clamp(220px, 30vw, 380px);
    aspect-ratio: 1;
}

/* Shadow beneath the coin */
#cs-coin__shadow {
    width: clamp(140px, 18vw, 240px);
    height: 20px;
    margin: 1rem auto 0;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(0, 60, 40, 0.15) 0%, transparent 70%);
    filter: blur(6px);
    will-change: transform, opacity;
}

[data-theme="dark"] #cs-coin__shadow {
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.3) 0%, transparent 70%);
}

/* ── Phone mockup ───────────────────────────────────────── */
#cs-phone {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;                            /* behind the coin (z-index: 20) */
    opacity: 0;
}

#cs-phone__frame {
    position: relative;
    width: clamp(260px, 22vw, 320px);
    aspect-ratio: 393 / 852;
    background: #1a1a1a;
    border-radius: clamp(36px, 3.2vw, 48px);
    padding: clamp(8px, 0.7vw, 12px);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.08),
        0 40px 80px -20px rgba(0,0,0,0.35),
        0 0 0 1px rgba(0,0,0,0.15);
    will-change: transform, filter;
}

[data-theme="dark"] #cs-phone__frame {
    background: #111;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.12),
        0 40px 80px -20px rgba(0,0,0,0.6),
        0 0 0 1px rgba(0,0,0,0.4);
}

/* Dynamic Island */
#cs-phone__notch {
    position: absolute;
    top: clamp(14px, 1.3vw, 20px);
    left: 50%;
    transform: translateX(-50%);
    width: clamp(72px, 6.5vw, 96px);
    height: clamp(22px, 2vw, 28px);
    background: #000;
    border-radius: 100px;
    z-index: 5;
}

/* Screen area */
#cs-phone__screen {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: clamp(28px, 2.5vw, 38px);
    overflow: hidden;
    background: #ffffff;
}

#cs-phone__ui {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* ── Iris wipe transition overlay ───────────────────────── */
#cs-iris-wipe {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #000;
    pointer-events: all;
    opacity: 1;
}
