/* face-serum.css */

/* Core Serum Page Overrides */
body.serum-page {
    background-color: #050505;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    overflow-x: hidden;
}

body.serum-page h1,
body.serum-page h2,
body.serum-page h3 {
    color: rgba(255, 255, 255, 0.9);
}

/* Custom Scrollbar for Serum Page */
body.serum-page::-webkit-scrollbar {
    width: 6px;
}

body.serum-page::-webkit-scrollbar-track {
    background: #050505;
}

body.serum-page::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

body.serum-page::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}



/* CSS Scroll Snapping Settings */
/* CSS Scroll Snapping Settings - Toggled via JS */
html.snapping-active {
    scroll-snap-type: y mandatory;
    scroll-behavior: auto !important;
    /* Prevents stuttering by letting snapping handle the physics */
}

/* Scrollytelling Section */
.scrollytelling-container {
    position: relative;
    background-color: #050505;
}

/* 
   We pin the canvas inside the scrollytelling container. 
   It listens to window.scrollY to determine what to draw.
*/
.canvas-wrapper {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.canvas-wrapper.visible {
    opacity: 0.7;
    /* Smoothly dimmed background for text legibility */
}

/* Add a cinematic vignette to the canvas wrapper */
.canvas-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(5, 5, 5, 0) 40%, rgba(5, 5, 5, 0.6) 100%);
    pointer-events: none;
    z-index: 11;
}

#serum-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.9) contrast(1.1);
    /* Cinematic color grade */
}

/* Overlay Container wrapper */
.overlay-container {
    width: 100%;
    margin-top: -100vh;
    /* Pull the overlay back up over the sticky canvas wrapper */
    position: relative;
    z-index: 20;
}

/* The actual scrollable blocks */
.snap-section {
    position: relative;
    width: 100%;
    height: 100vh;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 21;
    /* Above canvas */
}

/* Enable pointer events only on CTA block */
#beat-d.snap-section {
    pointer-events: auto;
}

.snap-section:not(#beat-d) {
    pointer-events: none;
}

/* Premium Text Animations (GSAP-style) */
.premium-beat {
    width: 90%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Default hidden state */
.premium-beat .huge-title,
.premium-beat .beat-subtitle,
.premium-beat .cta-button {
    opacity: 0;
    transform: translateY(60px) scale(0.95);
    filter: blur(15px);
    transition: all 1.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity, filter;
}

/* Stagger timings */
.premium-beat .huge-title {
    transition-delay: 0.2s;
}

.premium-beat .beat-subtitle {
    transition-delay: 0.5s;
}

.premium-beat .cta-button {
    transition-delay: 0.8s;
}

/* Active revealed state */
.snap-section.active .premium-beat .huge-title,
.snap-section.active .premium-beat .beat-subtitle,
.snap-section.active .premium-beat .cta-button {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.huge-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(4rem, 10vw, 8.5rem);
    line-height: 1.05;
    margin-bottom: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.03em;
    color: #fff;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.beat-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.serum-footer-spacer {
    /* Final snap section so the user can scroll normally down to the footer */
    height: 100vh;
    scroll-snap-align: start;
    background: #050505;
    position: relative;
    z-index: 30;
    /* Put above fixed canvas so it covers it */
}

/* Ensure footer works with scroll snap */
footer,
#contact {
    position: relative;
    z-index: 30;
}

/* Scroll More Indicator */
.scroll-more-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transition: opacity 1s ease 1s;
    /* Fade in with a delay */
    pointer-events: none;
}

#beat-d.active .scroll-more-indicator {
    opacity: 0.6;
}

.scroll-more-indicator span {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
    transform: rotate(45deg);
    animation: scrollBounce 2s infinite ease-in-out;
}

@keyframes scrollBounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) rotate(45deg);
    }

    40% {
        transform: translateY(-10px) rotate(45deg);
    }

    60% {
        transform: translateY(-5px) rotate(45deg);
    }
}

/* --- Unified UI Overrides --- */
/* Reset text color for shared light-themed components to ensure readability on the dark serum page */
body.serum-page #contact,
body.serum-page #cart-drawer,
body.serum-page #desktop-sidebar,
body.serum-page .custom-toast,
body.serum-page .confirm-box {
    color: var(--text-charcoal);
    text-align: left;
}

body.serum-page #contact h3,
body.serum-page #contact h4,
body.serum-page #cart-drawer h3,
body.serum-page #desktop-sidebar h3,
body.serum-page .confirm-title {
    color: var(--text-charcoal);
}