/* ============================================
   CASE STUDY — PRESENTATION MODE
   Full-screen slide-by-slide experience
   ============================================ */

/* ═══════════════════════════════════════════════ */
/* PRESENTATION LAYOUT                            */
/* ═══════════════════════════════════════════════ */

.cs-body {
    overflow: hidden;
    height: 100vh;
}

.cs-slides {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Each slide = full viewport */
.cs-slide {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    overflow: hidden;
}

.cs-slide__inner {
    max-width: 800px;
    width: 100%;
    padding: 6rem 2rem;
    text-align: left;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* When slide is in view */
.cs-slide--active .cs-slide__inner {
    opacity: 1;
    transform: translateY(0);
}

/* Hero slide — centered */
.cs-slide--hero .cs-slide__inner {
    text-align: center;
    max-width: 900px;
    padding-top: 4rem;
    padding-bottom: 10rem;
}

/* Nav slide — centered */
.cs-slide--nav {
    background: rgba(255, 255, 255, 0.01);
}

.cs-slide--nav .cs-slide__inner {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Alternating slide backgrounds */
.cs-slide:nth-child(odd) {
    background: transparent;
}

.cs-slide:nth-child(even) {
    background: rgba(255, 255, 255, 0.008);
}

.cs-slide:nth-child(even)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
}

.cs-slide:nth-child(even)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
}

/* ═══════════════════════════════════════════════ */
/* PROGRESS BAR                                   */
/* ═══════════════════════════════════════════════ */

.cs-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    z-index: 200;
    background: rgba(255, 255, 255, 0.03);
}

.cs-progress__bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-accent), rgba(90, 160, 242, 0.4));
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(90, 160, 242, 0.3);
}

/* ═══════════════════════════════════════════════ */
/* NAVIGATION DOTS                                */
/* ═══════════════════════════════════════════════ */

.cs-dots {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 150;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cs-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.cs-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.cs-dot:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.cs-dot--active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    box-shadow: 0 0 10px rgba(90, 160, 242, 0.3);
}

.cs-dot--active::after {
    border-color: rgba(90, 160, 242, 0.2);
}

/* ═══════════════════════════════════════════════ */
/* HERO SLIDE                                     */
/* ═══════════════════════════════════════════════ */

.cs-hero__ambient {
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(ellipse, rgba(90, 160, 242, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.cs-hero__grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black, transparent);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black, transparent);
    pointer-events: none;
    z-index: 0;
}

/* Back link */
.cs-hero__back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--color-text-muted);
    margin-bottom: 3rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.35s ease;
    position: relative;
    z-index: 1;
}

.cs-hero__back:hover {
    color: var(--color-accent);
    border-color: rgba(90, 160, 242, 0.3);
    background: rgba(90, 160, 242, 0.05);
}

.cs-hero__back svg {
    transition: transform 0.3s ease;
}

.cs-hero__back:hover svg {
    transform: translateX(-3px);
}

/* Meta info */
.cs-hero__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.cs-hero__number {
    font-family: var(--font-mono);
    font-size: 4rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.04);
    line-height: 1;
}

.cs-hero__category {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    color: var(--color-accent);
    padding: 0.35rem 0.8rem;
    border: 1px solid rgba(90, 160, 242, 0.2);
    border-radius: 100px;
}

/* Title */
.cs-hero__title {
    font-family: 'Syne', var(--font-primary);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--color-text-primary);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.cs-hero__tagline {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
    max-width: 550px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Scroll hint for hero */
.cs-slide__hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
    pointer-events: none;
}

.cs-slide__hint span {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    color: var(--color-text-muted);
    animation: csPulse 2.5s ease-in-out infinite;
}

@keyframes csPulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

/* ═══════════════════════════════════════════════ */
/* CHAPTER CONTENT                                */
/* ═══════════════════════════════════════════════ */

/* Chapter label */
.cs-chapter__label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cs-chapter__label .label-line {
    width: 30px;
    height: 1px;
    background: var(--color-accent);
    opacity: 0.6;
}

.cs-chapter__label .label-text {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    color: var(--color-accent);
    opacity: 0.8;
}

/* Chapter heading */
.cs-chapter__heading {
    font-family: 'Syne', var(--font-primary);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--color-text-primary);
    margin-bottom: 2rem;
}

/* Chapter body text */
.cs-chapter__body {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--color-text-secondary);
}

.cs-chapter__body p {
    margin-bottom: 1.5rem;
}

.cs-chapter__body p:last-child {
    margin-bottom: 0;
}

/* Highlighted text */
.cs-highlight {
    color: var(--color-accent);
    font-weight: 500;
}

/* Approach steps list */
.cs-approach-steps {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cs-approach-step {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.35s ease;
}

.cs-approach-step:hover {
    background: rgba(90, 160, 242, 0.03);
    border-color: rgba(90, 160, 242, 0.1);
    transform: translateX(4px);
}

.cs-approach-step__number {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    opacity: 0.6;
    min-width: 24px;
    padding-top: 0.2rem;
}

.cs-approach-step__content h4 {
    font-family: 'Syne', var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.25rem;
}

.cs-approach-step__content p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin: 0;
}

/* ═══════════════════════════════════════════════ */
/* STACK GRID                                     */
/* ═══════════════════════════════════════════════ */

.cs-stack-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.cs-stack-item {
    padding: 1.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    text-align: center;
    transition: all 0.35s ease;
}

.cs-stack-item:hover {
    background: rgba(90, 160, 242, 0.04);
    border-color: rgba(90, 160, 242, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.cs-stack-item__category {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-accent);
    opacity: 0.7;
    margin-bottom: 0.75rem;
    display: block;
}

.cs-stack-item__name {
    font-family: 'Syne', var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-primary);
    display: block;
}

/* ═══════════════════════════════════════════════ */
/* OUTCOME METRICS                                */
/* ═══════════════════════════════════════════════ */

.cs-outcome__metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.cs-metric {
    text-align: center;
    padding: 1.25rem 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.cs-metric__value {
    display: block;
    font-family: 'Syne', var(--font-primary);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-accent);
    margin-bottom: 0.3rem;
}

.cs-metric__label {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

/* ═══════════════════════════════════════════════ */
/* SLIDE TRANSITION ANIMATIONS                    */
/* ═══════════════════════════════════════════════ */

/* Stagger child elements when slide enters */
.cs-slide--active .cs-chapter__label {
    animation: csSlideIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.cs-slide--active .cs-chapter__heading {
    animation: csSlideIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

.cs-slide--active .cs-chapter__body {
    animation: csSlideIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

.cs-slide--active .cs-stack-grid {
    animation: csSlideIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

.cs-slide--active .cs-outcome__metrics {
    animation: csSlideIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

@keyframes csSlideIn {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reset children when not active */
.cs-slide:not(.cs-slide--active) .cs-chapter__label,
.cs-slide:not(.cs-slide--active) .cs-chapter__heading,
.cs-slide:not(.cs-slide--active) .cs-chapter__body,
.cs-slide:not(.cs-slide--active) .cs-stack-grid,
.cs-slide:not(.cs-slide--active) .cs-outcome__metrics {
    opacity: 0;
    transform: translateY(25px);
}

/* ═══════════════════════════════════════════════ */
/* KEYBOARD HINT                                  */
/* ═══════════════════════════════════════════════ */

.cs-key-hint {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: var(--color-text-muted);
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 150;
    pointer-events: none;
}

.cs-key-hint--visible {
    opacity: 0.4;
}

/* ═══════════════════════════════════════════════ */
/* RESPONSIVE                                     */
/* ═══════════════════════════════════════════════ */

@media (max-width: 768px) {
    .cs-dots {
        right: 1rem;
        gap: 0.5rem;
    }

    .cs-dot {
        width: 6px;
        height: 6px;
    }

    .cs-slide__inner {
        padding: 4rem 1.5rem;
    }

    .cs-hero__number {
        font-size: 2.5rem;
    }

    .cs-stack-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cs-outcome__metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .cs-approach-step {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .cs-dots {
        display: none;
    }

    .cs-stack-grid {
        grid-template-columns: 1fr 1fr;
    }

    .cs-outcome__metrics {
        grid-template-columns: 1fr 1fr;
    }
}