/* Reset and base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #111;
    color: #fff;
    overflow: hidden;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Progress bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255,255,255,0.2);
    z-index: 10;
}
.progress-fill {
    height: 100%;
    width: 0;
    background: #c41e3a;
    transition: width 0.1s ease;
}

/* Slides container - main scroll */
.slides-container {
    position: fixed;
    inset: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: auto;
}

/* Each slide */
.slide {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    contain: paint;
}

/* Intro slide - banner hero */
.slide-intro {
    justify-content: center;
    text-align: center;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    overflow: hidden;
    background: linear-gradient(180deg, #c41e3a 0%, #8b1528 100%); /* fallback when no banner */
}
.intro-banner {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.intro-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.7) 100%);
}
.slide-intro .slide-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 90%;
}
.intro-logo-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.intro-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.intro-report-label {
    font-size: 1.05rem;
    opacity: 0.95;
    margin: 0 0 0.25rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.intro-report-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    margin: 0 0 0.5rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.intro-report-desc {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    opacity: 0.95;
    margin: 0 0 1rem;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
/* Scroll hint + arrow at bottom of intro slide */
.intro-scroll-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
}
.intro-scroll-bottom .scroll-hint {
    font-size: 0.95rem;
    opacity: 0.95;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    animation: scroll-hint-bounce 2s ease-in-out infinite;
}

@keyframes scroll-hint-bounce {
    0%, 100% { transform: translateY(0); opacity: 0.95; }
    15% { transform: translateY(-6px); opacity: 1; }
    30% { transform: translateY(0); opacity: 0.95; }
    45% { transform: translateY(-4px); opacity: 1; }
    60% { transform: translateY(0); opacity: 0.95; }
    75% { transform: translateY(-2px); opacity: 1; }
}
@keyframes scroll-chevron-bounce {
    0%, 100% { transform: rotate(45deg) translateY(0) scale(1); opacity: 1; }
    20% { transform: rotate(45deg) translateY(3px) scale(1.08); opacity: 0.95; }
    40% { transform: rotate(45deg) translateY(12px) scale(1); opacity: 0.65; }
    60% { transform: rotate(45deg) translateY(5px) scale(1.04); opacity: 0.9; }
    80% { transform: rotate(45deg) translateY(2px) scale(1.02); opacity: 0.95; }
}

/* Image slide */
.slide-image .image-container {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
}
.slide-image .reel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.slide-image .slide-caption {
    position: relative;
    padding: 1.25rem 1rem 1.5rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
}
.slide-title {
    font-size: clamp(1.3rem, 3.5vw, 1.6rem);
    margin: 0 0 0.35rem;
    font-weight: 600;
}
.slide-description {
    font-size: clamp(1rem, 4.5vw, 1.3rem);
    margin: 0;
    opacity: 0.9;
    line-height: 1.4;
}

/* Video slide */
.slide-video .video-container {
    position: absolute;
    inset: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slide-video .reel-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* 9:16 mobile-friendly: show full video in portrait so landscape videos aren't badly cropped */
@media (max-width: 768px), (orientation: portrait) {
    .slide-video .reel-video {
        object-fit: contain;
    }
}
.slide-video .slide-caption {
    position: relative;
    padding: 1.25rem 1rem 1.5rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
}

/* Collage slide */
.slide-collage .collage-container {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
}
.slide-collage .collage-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.slide-collage .slide-caption-minimal {
    position: relative;
    padding: 0.75rem 1rem 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
}
.slide-collage .slide-caption-minimal .slide-description {
    font-size: clamp(0.95rem, 2.5vw, 1.05rem);
    margin: 0;
    opacity: 0.95;
}

/* Ending slide */
.slide-ending {
    background: linear-gradient(165deg, #1a1516 0%, #0f0d0e 40%, #1a0e12 100%);
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
}
.ending-content {
    width: 100%;
    max-width: 42rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.ending-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2.25rem 2rem;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.ending-logo-wrap {
    margin-bottom: 1.25rem;
}
.ending-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
    opacity: 0.95;
}
.ending-accent {
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, #c41e3a, #e83a52);
    border-radius: 2px;
    margin: 0 auto 1.5rem;
}
.ending-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.ending-subtitle {
    font-size: clamp(1.05rem, 2.5vw, 1.2rem);
    margin: 0 0 1.25rem;
    opacity: 0.92;
    font-weight: 500;
}
.ending-description {
    max-width: 34em;
    margin: 0 auto 1.75rem;
    font-size: clamp(0.95rem, 2.2vw, 1.1rem);
    line-height: 1.6;
    opacity: 0.88;
}
.ending-cta-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.cta-button {
    display: inline-block;
    padding: 0.9rem 1.85rem;
    background: linear-gradient(180deg, #c41e3a 0%, #a01830 100%);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    border-radius: 10px;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(196, 30, 58, 0.35);
}
.cta-button:hover, .cta-button:focus {
    background: linear-gradient(180deg, #d42a45 0%, #b01d38 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.45);
}
.cta-button-secondary {
    display: inline-block;
    padding: 0.9rem 1.85rem;
    background: transparent;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.cta-button-secondary:hover, .cta-button-secondary:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.8);
    color: #fff;
    transform: translateY(-1px);
}
.ending-message {
    font-size: 0.9rem;
    opacity: 0.75;
    margin: 0;
    line-height: 1.45;
}

/* Mobile touch and safe areas */
@media (max-width: 768px) {
    .slide {
        min-height: 100dvh;
    }
    .slide-caption {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    .ending-card {
        padding: 1.75rem 1.5rem;
    }
    .ending-cta-group {
        flex-direction: column;
        gap: 0.65rem;
    }
    /* Reduce scroll lag on Chrome mobile when scrolling backwards */
    .slides-container {
        scroll-snap-type: y proximity;
    }
    .slide {
        scroll-snap-stop: normal;
    }
}
