/* ==========================================================================
   Sthree Cinematic Launch Ceremony - CSS Stylesheet (Triple-Layer Streams)
   ========================================================================== */

/* Design System Variables */
:root {
    --primary: #F05A2B;      /* Primary Orange */
    --yellow: #F9AD27;       /* Golden Yellow */
    --red: #C92614;          /* Deep Red */
    --brown: #57190F;        /* Dark Brown */
    --dark-gray: #404040;    /* Dark Gray */
    --black: #000000;
    --white: #FFFFFF;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
    
    --transition-cinematic: all 2.5s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset & Page Lock */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--black);
    font-family: var(--font-body);
    color: var(--white);
    -webkit-font-smoothing: antialiased;
}

.ceremony-body {
    user-select: none;
    -webkit-user-select: none;
}

/* ==========================================================================
   ROOT TIMELINE VIEWPORTS & INTERACTIVE CONTAINER
   ========================================================================== */
.timeline-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 10;
    transition: background 4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Canvas overlay for particle and celebration system */
#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

/* Luxury Background Flares (Active from Phase 5 onwards) */
.light-flare {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0;
    pointer-events: none;
    z-index: 2;
    transition: opacity 4.5s ease-in-out, transform 8s ease-in-out;
}

.flare-orange {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(240, 90, 43, 0.15) 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    transform: translate(0, 0);
}

.flare-gold {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(249, 173, 39, 0.12) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    transform: translate(0, 0);
}

/* ==========================================================================
   TRIPLE-LAYER SCROLLING GALLERY STREAMS (Borderless, Auto-width aspect ratios)
   ========================================================================== */
.reels-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    transition: opacity 3s cubic-bezier(0.16, 1, 0.3, 1),
                transform 3s cubic-bezier(0.16, 1, 0.3, 1);
    transform: scale(1.06);
}

/* Scrolling Tracks Channels */
.gallery-stream {
    width: 100%;
    position: absolute;
    left: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    transition: transform 0.1s linear; /* Parallax shifting speed */
}

/* Vertical alignments for three streams */
.stream-top {
    top: 4%;
    height: 130px;
    z-index: 3;
}

.stream-middle {
    top: 50%;
    transform: translateY(-50%);
    height: 210px; /* Big Size */
    opacity: 0.22;  /* Dims middle track so central text/logo stand out cleanly */
    z-index: 1;    /* Sits directly behind content portal */
}

.stream-bottom {
    bottom: 4%;
    height: 130px;
    z-index: 3;
}

/* Horizontal track marquee box */
.stream-content {
    display: flex;
    gap: 20px; /* Minimalist print-mount spacing */
    white-space: nowrap;
    will-change: transform;
    pointer-events: auto; /* Active cursor interactions */
}

/* Infinite linear loop keyframes */
.stream-content.scroll-left {
    animation: scrollLeftTrack 44s linear infinite;
    animation-play-state: paused;
}

.stream-content.scroll-right {
    animation: scrollRightTrack 44s linear infinite;
    animation-play-state: paused;
}

/* Active running states in Phase 3 */
.drift-active .stream-content.scroll-left,
.drift-active .stream-content.scroll-right {
    animation-play-state: running;
}

/* Elegant Fine-Art Print Mounting Frame */
.gallery-print {
    display: inline-block;
    width: auto;   /* Auto width to preserve photo native aspect ratio */
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    opacity: 0.35;
    transition: opacity 0.5s ease, 
                transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.5s ease,
                box-shadow 0.5s ease;
    will-change: transform;
}

/* Specific heights matching stream lines */
.stream-top .gallery-print,
.stream-bottom .gallery-print {
    height: 130px;
    padding: 4px;
    border-radius: 8px;
}

.stream-middle .gallery-print {
    height: 210px;
    padding: 6px;
    border-radius: 12px;
}

.gallery-print img {
    height: 100%;
    width: auto; /* Preserve aspect ratio dynamically */
    filter: brightness(0.65) contrast(1.05);
    transition: filter 0.5s ease;
}

.stream-top .gallery-print img,
.stream-bottom .gallery-print img {
    border-radius: 5px;
}

.stream-middle .gallery-print img {
    border-radius: 8px;
}

/* Hover print highlight & scale lifts */
.gallery-print:hover {
    opacity: 0.95 !important;
    transform: translateY(-8px) scale(1.03);
    border-color: rgba(249, 173, 39, 0.35);
    box-shadow: 0 15px 35px rgba(249, 173, 39, 0.12);
    z-index: 10;
}

.gallery-print:hover img {
    filter: brightness(0.95) contrast(1.02);
}

/* ==========================================================================
   CENTRAL CONTENT PORTAL
   ========================================================================== */
.central-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 850px;
    width: 90%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

/* Center Logo wrapper */
.logo-wrapper {
    position: relative;
    margin-bottom: 3.5rem;
    opacity: 0;
    transform: scale(0.85);
    transition: var(--transition-cinematic);
}

.brand-logo {
    width: 360px;
    height: auto;
    filter: drop-shadow(0 10px 25px rgba(240, 90, 43, 0.15));
    position: relative;
    z-index: 2;
    transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(249, 173, 39, 0.22) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    opacity: 0;
    transition: opacity 3s ease;
}

/* Brand Statement */
.brand-statement {
    margin-bottom: 4.5rem;
}

.statement-title {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--white);
    margin-bottom: 2rem;
    overflow: hidden;
}

.statement-title .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.statement-title .word.highlight {
    color: var(--yellow);
}

/* Stagger delay classes for title words */
.statement-title .word:nth-child(1) { transition-delay: 0.1s; }
.statement-title .word:nth-child(2) { transition-delay: 0.3s; }
.statement-title .word:nth-child(4) { transition-delay: 0.6s; }
.statement-title .word:nth-child(5) { transition-delay: 0.8s; }

.statement-subtitle {
    font-family: var(--font-body);
    font-size: 1.35rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.05em;
    max-width: 620px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-cinematic);
    transition-delay: 1.2s;
}

/* ==========================================================================
   GLOWING LAUNCH BUTTON
   ========================================================================== */
.button-wrapper {
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    transition: var(--transition-cinematic);
    transition-delay: 0.5s;
    pointer-events: none;
}

.launch-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    outline: none;
    padding: 18px;
    border-radius: 60px;
    z-index: 10;
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 320px;
    height: 76px;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--yellow) 100%);
    box-shadow: 0 15px 45px rgba(240, 90, 43, 0.45);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    color: var(--white);
    font-family: var(--font-body);
    overflow: hidden;
    position: relative;
    z-index: 2;
    transition: var(--transition-fast);
}

.btn-label {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(87, 25, 15, 0.25);
    transition: var(--transition-fast);
}

/* Glowing Aura Containers */
.btn-glow-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.btn-ripple-ring, .btn-ripple-ring-2, .btn-ripple-ring-3 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50px;
    border: 1.5px solid var(--primary);
    width: 320px;
    height: 76px;
    opacity: 0;
    pointer-events: none;
}

/* Light Shine sweep loop */
.btn-light-sweep {
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-25deg);
    transition: 0.75s;
}

/* Hover States for Launcher Button */
.launch-btn:hover .btn-content {
    transform: scale(1.04);
    box-shadow: 0 20px 60px rgba(240, 90, 43, 0.75);
    border-color: rgba(255, 255, 255, 0.45);
}

.launch-btn:hover .btn-label {
    letter-spacing: 0.24em;
}

.launch-btn:hover .btn-light-sweep {
    left: 150%;
    transition: 1s ease-in-out;
}

/* Click animation pulse triggers */
.btn-clicked .btn-content {
    transform: scale(0.95);
    box-shadow: 0 5px 20px rgba(240, 90, 43, 0.3);
    background: var(--yellow);
}

/* ==========================================================================
   TIMELINE STEPS / TIMEOUT CONTROLLERS
   ========================================================================== */

/* PHASE 2: Logo Entry (T = 3s) */
.phase-2 .logo-wrapper {
    opacity: 1;
    transform: scale(1);
}
.phase-2 .logo-glow {
    opacity: 0.6;
}

/* PHASE 3: Camera Reels Reveal (T = 7s) */
.phase-3 .logo-wrapper {
    opacity: 1;
    transform: scale(1);
}
.phase-3 .reels-container {
    opacity: 1;
    transform: scale(1);
}

/* PHASE 4: Brand Statement (T = 14s) */
.phase-4 .logo-wrapper {
    opacity: 1;
    transform: scale(1);
}
.phase-4 .reels-container {
    opacity: 1;
    transform: scale(1);
}
.phase-4 .statement-title .word {
    opacity: 1;
    transform: translateY(0);
}
.phase-4 .statement-subtitle {
    opacity: 1;
    transform: translateY(0);
}

/* PHASE 5: Background transforms (T = 19s) */
.phase-5.timeline-container {
    background: radial-gradient(circle at center, #1b0a06 0%, var(--black) 100%);
}
.phase-5 .logo-wrapper {
    opacity: 1;
    transform: scale(1);
}
.phase-5 .reels-container {
    opacity: 1;
    transform: scale(1);
}
.phase-5 .statement-title .word {
    opacity: 1;
    transform: translateY(0);
}
.phase-5 .statement-subtitle {
    opacity: 1;
    transform: translateY(0);
}
.phase-5 .light-flare {
    opacity: 0.85;
}
.phase-5 .flare-orange {
    transform: translate(30px, 30px);
}
.phase-5 .flare-gold {
    transform: translate(-30px, -30px);
}

/* PHASE 6: Button Entry (T = 24s) */
.phase-6.timeline-container {
    background: radial-gradient(circle at center, #1b0a06 0%, var(--black) 100%);
}
.phase-6 .logo-wrapper {
    opacity: 1;
    transform: scale(1);
}
.phase-6 .reels-container {
    opacity: 1;
    transform: scale(1);
}
.phase-6 .statement-title .word {
    opacity: 1;
    transform: translateY(0);
}
.phase-6 .statement-subtitle {
    opacity: 1;
    transform: translateY(0);
}
.phase-6 .light-flare {
    opacity: 0.85;
}
.phase-6 .button-wrapper {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Loop animations for active button rings */
.phase-6 .btn-ripple-ring {
    animation: ringGlowPulse 3s infinite linear;
}
.phase-6 .btn-ripple-ring-2 {
    animation: ringGlowPulse 3s infinite linear;
    animation-delay: 1s;
}
.phase-6 .btn-ripple-ring-3 {
    animation: ringGlowPulse 3s infinite linear;
    animation-delay: 2s;
}

/* ==========================================================================
   LAUNCH CELEBRATION CLIMAX EFFECTS
   ========================================================================== */

/* Flash overlay */
.celebration-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.celebration-flash.active {
    opacity: 1;
}

/* Full screen Logo zoom transition */
.zoom-logo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1010;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
}

.zooming-logo {
    width: 360px;
    height: auto;
    transform: scale(1);
    transition: transform 3.5s cubic-bezier(0.85, 0, 0.15, 1);
}

.zoom-logo-overlay.active {
    opacity: 1;
}

.zoom-logo-overlay.active .zooming-logo {
    transform: scale(15) rotate(15deg);
}

/* Fade out other content elements during explosion */
.fadeOut {
    opacity: 0 !important;
    transform: scale(0.85) !important;
    transition: opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */

/* Infinite marquee track loops translating precisely half width (seamless loop) */
@keyframes scrollLeftTrack {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes scrollRightTrack {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes ringGlowPulse {
    0% {
        width: 320px;
        height: 76px;
        border-radius: 50px;
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        width: 320px;
        height: 76px;
        border-radius: 50px;
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.4);
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN SCALES
   ========================================================================== */

/* Smaller Laptops and Desktop monitors */
@media (max-width: 1440px) {
    .statement-title {
        font-size: 3.8rem;
    }
    .brand-logo {
        width: 280px;
    }
    .stream-top {
        height: 110px;
    }
    .stream-top .gallery-print {
        height: 110px;
    }
    .stream-middle {
        height: 160px;
    }
    .stream-middle .gallery-print {
        height: 160px;
    }
    .stream-bottom {
        height: 110px;
    }
    .stream-bottom .gallery-print {
        height: 110px;
    }
}

/* Tablet screens */
@media (max-width: 991px) {
    .statement-title {
        font-size: 2.8rem;
    }
    .statement-subtitle {
        font-size: 1.15rem;
    }
    .brand-logo {
        width: 220px;
    }
    .stream-top {
        height: 90px;
    }
    .stream-top .gallery-print {
        height: 90px;
        border-radius: 6px;
    }
    .stream-middle {
        height: 130px;
    }
    .stream-middle .gallery-print {
        height: 130px;
        border-radius: 8px;
    }
    .stream-bottom {
        height: 90px;
    }
    .stream-bottom .gallery-print {
        height: 90px;
        border-radius: 6px;
    }
    .reels-container {
        padding: 10vh 0;
    }
}

/* Mobile screens */
@media (max-width: 575px) {
    .statement-title {
        font-size: 2.2rem;
    }
    .statement-subtitle {
        font-size: 1rem;
    }
    .brand-logo {
        width: 160px;
    }
    .btn-content {
        width: 260px;
        height: 64px;
    }
    .btn-ripple-ring, .btn-ripple-ring-2, .btn-ripple-ring-3 {
        width: 260px;
        height: 64px;
    }
    .btn-label {
        font-size: 0.9rem;
    }
    .stream-top {
        height: 75px;
    }
    .stream-top .gallery-print {
        height: 75px;
        border-radius: 5px;
        padding: 2px;
    }
    .stream-middle {
        height: 100px;
    }
    .stream-middle .gallery-print {
        height: 100px;
        border-radius: 6px;
        padding: 3px;
    }
    .stream-bottom {
        height: 75px;
    }
    .stream-bottom .gallery-print {
        height: 75px;
        border-radius: 5px;
        padding: 2px;
    }
    .reels-container {
        padding: 12vh 0;
    }
}
