/* Cinematic Scroll-Driven Banner CSS */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400..800&display=swap');

:root {
    --cinematic-header-offset: 0px;
    --ss-dark: #010818;
    --ss-dark-card: rgba(2, 11, 36, 0.65);
    --ss-red: #ff0000;
    --ss-red-glow: rgba(255, 0, 0, 0.4);
    --ss-blue-glow: rgba(0, 72, 255, 0.25);
    --ss-glass-border: rgba(255, 255, 255, 0.08);
    --ss-text-white: #ffffff;
    --ss-text-muted: rgba(255, 255, 255, 0.7);
    --ss-panel-bg: linear-gradient(135deg, rgba(1, 8, 24, 0.84) 0%, rgba(1, 8, 24, 0.66) 56%, rgba(1, 8, 24, 0.22) 100%);
    --ss-panel-shadow: 0 22px 54px rgba(0, 0, 0, 0.35);
    --font-primary: 'Outfit', 'Inter', sans-serif;
}

/* Scroll Container Setup */
.cinematic-scroll-container {
    position: relative;
    width: 100%;
    height: 350vh; /* Increased from 180vh to decrease scrolling speed */
    background:
        radial-gradient(circle at 18% 22%, rgba(255, 0, 0, 0.16) 0%, transparent 26%),
        linear-gradient(180deg, #071325 0%, #010818 56%, #01050f 100%);
    font-family: var(--font-primary);
    overflow: visible;
    overflow-anchor: none;
    isolation: isolate;
}

/* Sticky Viewport */
.cinematic-sticky-viewport {
    position: -webkit-sticky;
    position: sticky;
    top: var(--cinematic-header-offset);
    width: 100%;
    height: calc(100svh - var(--cinematic-header-offset));
    max-height: 100vh;
    min-height: 320px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    box-sizing: border-box;
}

/* Interactive Canvas */
.cinematic-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
    pointer-events: none;
}

/* Atmospheric Volumetric Overlays */
.cinematic-overlay-vignette {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 52%,
        rgba(1, 8, 24, 0.55) 82%,
        rgba(1, 8, 24, 0.92) 100%
    );
    z-index: 2;
    pointer-events: none;
}

.cinematic-ambient-glow {
    position: absolute;
    inset: 0;
    background: none; /* Removed glow color overlay as requested */
    mix-blend-mode: screen;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.cinematic-grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
    mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.1) 80%);
    -webkit-mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.1) 80%);
    z-index: 2;
    pointer-events: none;
    opacity: 0.32;
}

/* Custom Volumetric Dust Particles */
.cinematic-dust-container {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.cinematic-particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
    animation: floatParticle var(--duration, 20s) linear infinite;
    opacity: var(--opacity, 0.5);
}

@keyframes floatParticle {
    0% {
        transform: translateY(105vh) translateX(0) scale(0.8);
    }
    50% {
        transform: translateY(50vh) translateX(var(--drift, 40px)) scale(1.1);
    }
    100% {
        transform: translateY(-10vh) translateX(calc(var(--drift, 40px) * -1)) scale(0.8);
    }
}

/* Premium Loading Screen */
.cinematic-preloader {
    position: absolute;
    inset: 0;
    background: #00040f;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99;
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 1.2s;
}

.cinematic-preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-glass-card {
    background: rgba(1, 8, 24, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--ss-glass-border);
    padding: 3.5rem 4rem;
    border-radius: 24px;
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 50px rgba(255, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 480px;
    width: 90%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.preloader-glass-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 0, 0, 0.08) 0%, transparent 60%);
    animation: rotateGlow 15s linear infinite;
    pointer-events: none;
}

@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-logo {
    height: 48px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.3));
    animation: pulseLogo 2s infinite ease-in-out;
}

@keyframes pulseLogo {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.3)); }
    50% { transform: scale(1.03); filter: drop-shadow(0 0 25px rgba(255, 0, 0, 0.6)); }
}

.loader-title {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--ss-text-white);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.loader-subtitle {
    font-size: 0.88rem;
    color: var(--ss-text-muted);
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
}

.loader-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 1rem;
}

.loader-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff3333, var(--ss-red));
    border-radius: 10px;
    box-shadow: 0 0 12px var(--ss-red);
    transition: width 0.1s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.loader-percent {
    font-size: 0.9rem;
    font-family: monospace;
    color: var(--ss-red);
    font-weight: bold;
    letter-spacing: 0.05em;
}

/* Slide Typography Overlays */
.cinematic-slides-container {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none; /* Let pointer events pass to container */
}

.cinematic-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: clamp(2rem, 4vh, 4rem) clamp(1.8rem, 7vw, 8%) clamp(3rem, 8vh, 6rem);
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) scale(0.98);
    transition: 
        opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1),
        transform 0.8s cubic-bezier(0.25, 1, 0.5, 1),
        visibility 0.8s;
    pointer-events: none;
}

.cinematic-slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto; /* Enable links/buttons when active */
}

/* Glassmorphism content card - Removed card boxes as requested to let text float directly over the 3D render */
.slide-content-card {
    display: none !important;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    padding: 0;
    border-radius: 0;
    max-width: min(46vw, 680px);
    box-shadow: none;
    position: relative;
    overflow: visible;
}

.slide-content-card::before {
    display: none; /* Removed the left red glowing stripe backing */
}

.slide-content-card::after {
    display: none;
}

/* Slide-specific alignments */
.cinematic-slide.align-center {
    align-items: center;
    text-align: center;
    padding: 0 5%;
}

.cinematic-slide.align-center .slide-content-card {
    max-width: 750px;
}

.cinematic-slide.align-center .slide-content-card::before {
    display: none;
}

.cinematic-slide.align-right {
    align-items: flex-end;
    text-align: right;
}

.cinematic-slide.align-right .slide-content-card {
    max-width: min(40vw, 580px);
}

.cinematic-slide.align-right .slide-content-card::before {
    left: auto;
    right: 0;
    border-radius: 0 20px 20px 0;
}

/* Slide typography styles */
.slide-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 0, 0, 0.12);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 100px;
    color: #ff3333;
    font-size: 1.3rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    animation: flashBadge 2.5s infinite ease-in-out;
}

@keyframes flashBadge {
    0%, 100% { border-color: rgba(255, 0, 0, 0.3); box-shadow: 0 0 0px transparent; }
    50% { border-color: rgba(255, 0, 0, 0.8); box-shadow: 0 0 8px var(--ss-red-glow); }
}

.slide-title-gradient {
    font-size: clamp(3.2rem, 4.4vw, 5.8rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: 0;
    color: var(--ss-text-white);
    margin-bottom: 1rem;
    text-transform: uppercase;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.95), 0 2px 6px rgba(0, 0, 0, 0.85); /* Rich text-shadow for ultimate legibility on top of canvas frames */
}

.slide-title-gradient span.accent {
    color: var(--ss-red);
    text-shadow: 0 0 30px rgba(255, 0, 0, 0.4), 0 4px 10px rgba(0, 0, 0, 0.9);
}

.slide-subtitle {
    font-size: clamp(1.35rem, 1.45vw, 1.9rem);
    font-weight: 400;
    color: var(--ss-text-white);
    margin-bottom: 1.2rem;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 1px 4px rgba(0, 0, 0, 0.85); /* Rich text-shadow for ultimate legibility on top of canvas frames */
}

.slide-description {
    font-size: clamp(1rem, 1.05vw, 1.15rem);
    line-height: 1.6;
    color: var(--ss-text-white); /* Elevate color to pure white for enhanced contrast */
    margin-bottom: 2rem;
    font-weight: 300;
    max-width: 58ch;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 1px 4px rgba(0, 0, 0, 0.85); /* Rich text-shadow for ultimate legibility on top of canvas frames */
}

.slide-cta-wrapper {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.cinematic-slide.align-right .slide-cta-wrapper {
    justify-content: flex-end;
}

.cinematic-slide.align-center .slide-cta-wrapper {
    justify-content: center;
}

/* Premium Buttons */
.slide-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    text-decoration: none;
}

.slide-btn.btn-primary {
    background: var(--ss-red);
    color: var(--ss-text-white);
    border: 1px solid var(--ss-red);
    box-shadow: 0 8px 24px rgba(255, 0, 0, 0.3);
}

.slide-btn.btn-primary:hover {
    background: #e60000;
    border-color: #e60000;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 0, 0, 0.5);
}

.slide-btn.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--ss-text-white);
    border: 1px solid var(--ss-glass-border);
    backdrop-filter: blur(10px);
}

.slide-btn.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.slide-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.slide-btn:hover svg {
    transform: translateX(4px);
}

/* Interactive Navigation Indicators */
.cinematic-nav-indicator {
    position: absolute;
    right: 3rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 6;
}

.nav-dot-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    text-decoration: none;
}

.nav-dot-label {
    color: var(--ss-text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid transparent;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-dot-wrapper:hover .nav-dot-label {
    opacity: 1;
    transform: translateX(0);
}

.nav-dot-wrapper:hover .nav-dot {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.3);
}

.nav-dot-wrapper.active .nav-dot {
    background: var(--ss-red);
    box-shadow: 0 0 12px var(--ss-red);
    transform: scale(1.5);
}

.nav-dot-wrapper.active .nav-dot-label {
    opacity: 1;
    transform: translateX(0);
    color: var(--ss-text-white);
}

/* Bottom Scroll Indicator */
.cinematic-scroll-explore {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 6;
    color: var(--ss-text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    pointer-events: none;
    animation: fadePulse 2s infinite ease-in-out;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.cinematic-scroll-container.has-progress .cinematic-scroll-explore {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
}

@keyframes fadePulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.9; }
}

.scroll-line-indicator {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--ss-text-white) 0%, transparent 100%);
    position: relative;
    overflow: hidden;
}

.scroll-line-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 15px;
    background: var(--ss-red);
    box-shadow: 0 0 8px var(--ss-red);
    animation: scrollSlide 2s cubic-bezier(0.1, 0.8, 0.2, 1) infinite;
}

@keyframes scrollSlide {
    0% { transform: translateY(-15px); opacity: 0; }
    30% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(40px); opacity: 0; }
}

/* Responsiveness Settings */
@media (max-width: 1024px) {
    .slide-title-gradient {
        font-size: 4rem;
    }
    .slide-subtitle {
        font-size: 2.6rem;
    }
    .slide-content-card {
        max-width: min(78vw, 620px);
    }
    .cinematic-nav-indicator {
        display: none; /* Hide interactive dot nav on smaller screens */
    }
}

@media (max-width: 768px) {
    .cinematic-scroll-container {
        height: 300vh;
    }
    .cinematic-sticky-viewport {
        height: calc(52vh - var(--cinematic-header-offset));
        min-height: 300px;
    }
    .cinematic-slides-container {
        display: none !important;
    }
    .slide-title-gradient {
        font-size: 3rem;
        margin-bottom: 0.8rem;
    }
    .slide-subtitle {
        font-size: 2.6rem;
        margin-bottom: 1rem;
    }
    .slide-description {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    .slide-content-card {
        padding: 0;
        border-radius: 0;
        margin: 0;
        max-width: 100%;
    }
    .cinematic-slide {
        padding: 0 3%;
        align-items: center !important;
        text-align: center !important;
    }
    .slide-content-card::before {
        display: none !important;
    }
    .slide-cta-wrapper {
        justify-content: center !important;
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    .slide-btn {
        width: 100%;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .cinematic-scroll-container {
        height: 52vh;
    }
    .slide-title-gradient {
        font-size: 2.6rem;
    }
    .preloader-glass-card {
        padding: 2.5rem 2rem;
    }
    .loader-logo {
        height: 38px;
    }
}
