/* 
   Olper's Premium Scroll Animation Landing Page Stylesheet
   Designed with Premium Glassmorphism, Dark Ruby Aesthetics, and High-Performance scroll layers.
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Plus+Jakarta+Sans:wght@300;400;600;700;800&display=swap');

:root {
    --bg-primary: #0a0606; /* Dark background with subtle crimson tint */
    --bg-card: rgba(18, 10, 10, 0.65); /* Rich glassmorphic base */
    --primary-glow: rgba(220, 38, 38, 0.15); /* Soft crimson glow */
    --accent-red: #e11d48; /* Ruby crimson accent */
    --accent-gold: #fbbf24; /* Liquid gold accent */
    --text-main: #f3f4f6; /* Off-white for clean readability */
    --text-muted: #9ca3af; /* Warm gray for captions */
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-active: rgba(225, 29, 72, 0.3);
}

/* Base Styles & Resets */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    background-color: var(--bg-primary);
    font-family: var(--font-body);
    color: var(--text-main);
    scroll-behavior: auto; /* Disabled smooth-scroll on html for instant, precise canvas scrubbing */
}

/* Custom Scrollbar for Premium Feel */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--bg-primary), var(--accent-red), var(--accent-gold));
    border-radius: 5px;
    border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--bg-primary), #f43f5e, #fcd34d);
}

/* Main Scroll Track Container */
#scroll-container {
    position: relative;
    width: 100%;
    /* 800vh creates an expansive scrubbing range (approximately 2.6 frames per pixel for slow, beautiful panning) */
    height: 850vh; 
}

/* Sticky Wrapper for Canvas & Overlays */
.sticky-wrapper {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Fullscreen Canvas */
#animation-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    display: block;
}

/* Ambient Radial Glow Overlays to frame the center canvas subject */
.ambient-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    background: radial-gradient(circle at center, transparent 40%, rgba(10, 6, 6, 0.7) 100%),
                radial-gradient(circle at 10% 20%, rgba(225, 29, 72, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(251, 191, 36, 0.06) 0%, transparent 40%);
}

/* Text overlays container */
.overlay-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none; /* Allows scrolling through elements */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Individual Scene Card */
.scene-card {
    position: absolute;
    max-width: 580px;
    width: 90%;
    padding: 2.5rem;
    border-radius: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
    
    /* Initially hidden and shifted down */
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.8s ease;
    
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: auto; /* Active elements inside can be interacted with */
}

/* Position presets for visual rhythm */
.scene-card.center-bottom {
    bottom: 10%;
}

.scene-card.left-center {
    left: 8%;
    top: 30%;
}

.scene-card.right-center {
    right: 8%;
    top: 35%;
}

/* Active State Triggered by JS */
.scene-card.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    border-color: var(--border-glass-active);
    box-shadow: 0 20px 50px rgba(225, 29, 72, 0.1), 
                inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

/* Typography styles */
.badge {
    align-self: flex-start;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    background: rgba(225, 29, 72, 0.12);
    border: 1px solid rgba(225, 29, 72, 0.3);
    color: #fda4af;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-family: var(--font-body);
}

.badge.gold {
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fde047;
}

.scene-card h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 30%, #f3f4f6 70%, var(--accent-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.scene-card.active h2 {
    background: linear-gradient(135deg, #ffffff 30%, #fda4af 75%, var(--accent-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.scene-card p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-muted);
    font-weight: 300;
}

/* CTA Button Styles */
.cta-button {
    margin-top: 0.5rem;
    align-self: flex-start;
    padding: 0.8rem 2rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-red), #b91c1c);
    color: white;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(225, 29, 72, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(225, 29, 72, 0.5);
    background: linear-gradient(135deg, #f43f5e, var(--accent-red));
}

.cta-button svg {
    transition: transform 0.3s ease;
}

.cta-button:hover svg {
    transform: translateX(4px);
}

/* Mouse Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    z-index: 3;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
}

.mouse-icon {
    width: 22px;
    height: 36px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.mouse-icon::after {
    content: '';
    width: 4px;
    height: 8px;
    background-color: var(--accent-red);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 1.6s infinite ease-in-out;
}

@keyframes scroll-wheel {
    0% { top: 6px; opacity: 0; }
    30% { opacity: 1; }
    80% { top: 18px; opacity: 0; }
    100% { top: 18px; opacity: 0; }
}

/* Fullscreen Preloader Styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                visibility 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-brand {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: white;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader-brand span {
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    color: var(--accent-red);
    margin-top: 0.2rem;
    font-weight: 500;
}

.progress-container {
    width: 280px;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 15px rgba(225, 29, 72, 0.1);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-red) 0%, var(--accent-gold) 100%);
    box-shadow: 0 0 10px rgba(225, 29, 72, 0.8);
    transition: width 0.1s ease-out;
}

.progress-text {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.1em;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(225, 29, 72, 0.1);
    border-top: 3px solid var(--accent-red);
    border-right: 3px solid var(--accent-gold);
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    margin-bottom: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Header & Brand Nav (Premium Glass Pill) */
header {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 4rem);
    max-width: 1200px;
    padding: 0.8rem 2rem;
    z-index: 999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
    
    /* Glassmorphism */
    background: rgba(18, 10, 10, 0.45);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.4rem;
    color: white;
    text-decoration: none;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.logo span {
    color: var(--accent-red);
}

nav {
    display: flex;
    gap: 0.5rem;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    transition: all 0.3s ease;
    letter-spacing: 0.03em;
}

nav a:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive Adaptations */
@media (max-width: 768px) {
    header {
        top: 1rem;
        width: calc(100% - 2rem);
        padding: 0.8rem 1.5rem;
    }
    
    nav {
        display: none; /* Clean canvas layout on mobile */
    }
    
    .scene-card {
        padding: 1.8rem;
        max-width: 90%;
        left: 5% !important;
        right: 5% !important;
        top: auto !important;
        bottom: 8% !important; /* Mobile pushes all cards to uniform bottom overlay sheet */
    }
    
    .scene-card h2 {
        font-size: 1.6rem;
    }
    
    .scene-card p {
        font-size: 0.95rem;
    }
    
    .loader-brand {
        font-size: 2rem;
    }
}
