/* ==========================================================================
   FOREVER LINK | HOMEPAGE LOCAL STYLES (styles.css)
   ========================================================================== */

/* --- 1. THE GLASS CASCADE REVEAL ANIMATIONS --- */
.loading-overlay { position: fixed; inset: 0; background: var(--global-bg); z-index: 9999; display: flex; justify-content: center; align-items: center; transition: opacity 0.6s ease, visibility 0.6s, background-color 0.8s ease, backdrop-filter 0.8s ease; }
.loading-overlay.bg-fade { background-color: transparent; backdrop-filter: blur(0px); }
.loader-content { text-align: center; }

.brand-logo { font-family: var(--font-serif); font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 400; display: flex; align-items: baseline; gap: 8px; position: relative; color: var(--global-text); transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.3s ease; }
/* Restores the massive scale for the preloader dot */
.anim-1 .red-dot { width: clamp(10px, 2vw, 14px); height: clamp(10px, 2vw, 14px); transform-origin: center; }
.word-group { display: flex; gap: 12px; }
.word { display: inline-block; white-space: nowrap; }

.anim-1 .red-dot { animation: a1-dot 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; will-change: transform, opacity; }
.anim-1 .text-forever { animation: a1-forever 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; will-change: transform, opacity, filter; }
.anim-1 .text-link { animation: a1-link 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; will-change: transform, opacity, filter; }

@keyframes a1-dot { 0% { transform: scale(0); opacity: 0; } 20% { transform: scale(1); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes a1-forever { 0%, 15% { transform: translateX(40px); opacity: 0; filter: blur(5px); } 100% { transform: translateX(0); opacity: 1; filter: blur(0); } }
@keyframes a1-link { 0%, 15% { transform: translateX(-25px); opacity: 0; filter: blur(5px); } 100% { transform: translateX(0); opacity: 1; filter: blur(0); } }

.horizon-line { position: absolute; bottom: 0; left: 0; height: 1px; background: var(--corp-border); width: 0%; transition: width 1s cubic-bezier(0.77, 0, 0.175, 1); }
.horizon-line.draw { width: 100%; }
.cascade-item { opacity: 0; transform: translateY(40px); transition: all 1s cubic-bezier(0.16, 1, 0.3, 1); will-change: transform, opacity; }
.cascade-item.visible { opacity: 1; transform: translateY(0); }
.brand-logo.header-mode { font-size: 1.8rem; gap: 6px; text-shadow: 0px 4px 15px rgba(0, 0, 0, 0.08), 0px 1px 3px rgba(0, 0, 0, 0.05); }
.brand-logo.header-mode .red-dot { width: 8px; height: 8px; animation: none; transform: scale(1); opacity: 1; }
.brand-logo.header-mode .word { animation: none; filter: blur(0); opacity: 1; transform: translateX(0); }
#header-logo { transition: opacity 0.4s ease; }
.logo::after { content: ''; display: block; width: 8px; height: 8px; background-color: var(--brand-primary); border-radius: 50%; }


/* --- 2. THE EDITORIAL WHISPER: Hero & CTA --- */
.hero { padding: 100px 20px 60px; max-width: 800px; margin: 0 auto; }
.hero-content { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; }

.editorial-heading { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 50px; color: var(--global-text); text-align: center; transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1); will-change: filter, opacity, transform; }
.break-mobile { display: block; }
.break-desktop { display: none; }
@media (min-width: 1024px) { .break-mobile { display: none; } .break-desktop { display: block; } .editorial-heading { line-height: 1.05; } }

#rotating-keyword { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--brand-primary); display: inline-block; padding-left: 8px; transition: opacity 0.6s cubic-bezier(0.25, 1, 0.25, 1); }

.premium-cta { display: inline-flex; align-items: center; justify-content: center; padding: 16px 48px; font-size: 0.85rem; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; color: var(--global-text); background: transparent; border: 1px solid rgba(9, 20, 19, 0.3); border-radius: 100px; text-decoration: none; transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1); will-change: transform, background-color, box-shadow; }
.premium-cta:hover { background: var(--global-text); color: var(--global-bg); border-color: var(--global-text); transform: translateY(-6px) scale(1.02); box-shadow: 0 25px 40px -10px rgba(0, 0, 0, 0.2), 0 0 30px rgba(246, 48, 73, 0.08); }

@supports selector(:has(a, b)) {
    .hero-content:has(.premium-cta:hover) .editorial-heading { filter: blur(2px); opacity: 0.7; transform: scale(0.99); }
}


/* --- 3. THE PERPETUAL LOOM (Marquee) --- */
.marquee-container { margin-top: clamp(80px, 12vh, 150px); padding: 10px 0; overflow: hidden; position: relative; width: 100vw; left: 50%; transform: translateX(-50%); -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); }
.marquee-scroll { display: flex; width: max-content; will-change: transform; }
.marquee-content { display: flex; align-items: center; gap: 40px; padding-right: 40px; flex-shrink: 0; white-space: nowrap; font-family: var(--font-sans); font-size: 0.75rem; letter-spacing: 2.5px; text-transform: uppercase; font-weight: 500; color: var(--corp-icon); }
.diamond-separator { color: var(--brand-primary); opacity: 0.4; font-size: 0.6rem; }


/* --- 4. HOMEPAGE PRODUCT ZONE --- */
.store-zone { padding: 60px 5%; border-bottom: 1px solid var(--corp-border); }
.section-title { margin-bottom: 30px; font-size: 1.8rem; text-align: center; text-transform: uppercase; color: var(--global-text); transition: opacity 0.3s ease, transform 0.3s ease; will-change: opacity, transform; }

.storefront { transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); will-change: transform; }


/* Animation Bridge */
.hidden-blur { opacity: 0; filter: blur(15px); transform: scale(0.9); transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.show-blur { opacity: 1; filter: blur(0); transform: scale(1); }

/* Capstone CTA */
.storefront-capstone { display: flex; justify-content: center; margin-top: 60px; padding-top: 40px; border-top: 1px solid rgba(157, 178, 191, 0.3); transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); will-change: filter, opacity; }
.capstone-cta { display: inline-flex; align-items: center; gap: 12px; padding: 16px 48px; font-size: 0.85rem; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; color: var(--global-text); background: transparent; border: 1px solid rgba(9, 20, 19, 0.3); border-radius: 100px; text-decoration: none; transition: all var(--transition-smooth); will-change: transform, background-color, box-shadow; }
.capstone-cta i { font-size: 1.1rem; transition: transform var(--transition-smooth); }
.capstone-cta:hover { background: var(--global-text); color: #FFF; border-color: var(--global-text); transform: translateY(-4px); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1); }
.capstone-cta:hover i { transform: translateX(6px); }

/* --- 5. THE FL ECOSYSTEM (Homepage Integration) --- */
.corp-zone { background-color: var(--corp-surface); padding: 60px 5%; border-bottom: 1px solid var(--corp-border); }
.corp-heading { color: var(--corp-heading); }
.ecosystem-section { background: var(--global-bg); padding: 100px 5%; display: flex; justify-content: center; }
.ecosystem-container { width: 100%; max-width: 1200px; display: flex; flex-direction: column; }
.ecosystem-header-cell { padding-bottom: 40px; border-bottom: 1px solid var(--corp-border); margin-bottom: 40px; display: flex; justify-content: space-between; align-items: flex-end; }
.ecosystem-header-cell h2 { font-family: var(--font-sans); font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 400; letter-spacing: 0.02em; color: var(--corp-heading); line-height: 1.1; }
.ecosystem-header-cell p { font-family: var(--font-mono); font-size: 0.85rem; color: var(--corp-icon); max-width: 400px; text-align: right; line-height: 1.5; }
.ecosystem-cards-wrapper { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }

.ecosystem-card { border: 1px solid var(--corp-border); padding: 50px; display: flex; flex-direction: column; justify-content: space-between; min-height: 400px; background: #FFFFFF; opacity: 0.55; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1); will-change: transform, box-shadow, opacity; }
.ecosystem-card:hover, .ecosystem-card.scroll-active { transform: translateY(-8px); box-shadow: 15px 15px 0px var(--corp-surface); opacity: 1; }
.ecosystem-card.c-creator:hover .ecosystem-cta i, .ecosystem-card.c-creator.scroll-active .ecosystem-cta i { background: var(--creator-accent); color: #FFF; transform: scale(1.1) rotate(-45deg); }
.ecosystem-card.c-developer:hover .ecosystem-cta i, .ecosystem-card.c-developer.scroll-active .ecosystem-cta i { background: var(--developer-accent); color: #FFF; transform: scale(1.1) rotate(-45deg); }
.ecosystem-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.creator-badge { background: var(--creator-badge-bg); color: var(--creator-accent); padding: 6px 12px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em; }
.developer-badge { background: var(--developer-badge-bg); color: var(--developer-accent); padding: 6px 12px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em; }
.ecosystem-card h3 { font-family: var(--font-sans); font-size: 1.8rem; font-weight: 700; margin-top: 30px; margin-bottom: 20px; color: var(--corp-heading); }
.ecosystem-card p { color: var(--corp-icon); line-height: 1.6; }
.ecosystem-cta { display: inline-flex; justify-content: space-between; align-items: center; width: 100%; padding-top: 30px; border-top: 1px solid rgba(157, 178, 191, 0.3); font-family: var(--font-mono); font-weight: 700; color: var(--corp-heading); text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.05em; text-decoration: none; }
.ecosystem-cta i { width: 34px; height: 34px; font-size: 1.1rem; display: inline-flex; align-items: center; justify-content: center; background: var(--corp-surface); color: var(--corp-heading); border-radius: 50%; transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.ecosystem-card.c-creator:hover .ecosystem-cta i, .ecosystem-card.c-creator.scroll-active .ecosystem-cta i { background: var(--creator-accent) !important; color: #FFFFFF !important; transform: scale(1.1) rotate(-45deg); }
.ecosystem-card.c-developer:hover .ecosystem-cta i, .ecosystem-card.c-developer.scroll-active .ecosystem-cta i { background: var(--developer-accent) !important; color: #FFFFFF !important; transform: scale(1.1) rotate(-45deg); }

@media (max-width: 1023px) {
    .ecosystem-header-cell { flex-direction: column; align-items: flex-start; gap: 15px; padding-bottom: 30px; }
    .ecosystem-header-cell p { text-align: left; }
    .ecosystem-cards-wrapper { grid-template-columns: 1fr; }
    .ecosystem-card { padding: 30px; min-height: auto; }
    .ecosystem-card h3 { margin-top: 20px; margin-bottom: 15px; }
    .ecosystem-cta { padding-top: 20px; margin-top: 20px; }
}



/* --- 6. SHARED STORIES (Infinite Deck) --- */
.stories-zone { 
    background-color: transparent !important; 
    padding-top: 0 !important; /* Removes the default top padding */
    padding-bottom: 80px; 
    margin-top: -10px; /* The magic number: Pulls the entire section up */
    position: relative;
    z-index: 10; /* Ensures it sits above the hero layer */
    overflow: hidden; 
}

.stories-wrapper { 
    max-width: 800px; 
    margin: 0 auto; 
}

.stories-title { 
    font-size: 1.8rem; 
    font-family: var(--font-sans); 
    color: var(--global-text); 
    margin-bottom: 35px; /* Reduced from 50px to perfectly group the heading with the cards */
    font-weight: 700; 
    text-shadow: 0px 4px 15px rgba(0, 0, 0, 0.05); /* Subtle lift off the video background */
}

.deck-container { position: relative; width: 100%; max-width: 700px; height: 280px; margin: 0 auto; perspective: 1000px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.deck-container .story-card { position: absolute; top: 0; left: 0; width: 100%; background-color: #FFFFFF; padding: 35px 40px; border-radius: 28px; box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05); transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); opacity: 0; transform: translateY(40px) scale(0.8); pointer-events: none; z-index: 0; }
.deck-container .card-front { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); z-index: 3; pointer-events: auto; }
.deck-container .card-middle { opacity: 0.95; transform: translateY(20px) translateX(15px) rotate(-2.5deg) scale(0.95); z-index: 2; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03); }
.deck-container .card-back { opacity: 0.6; transform: translateY(40px) translateX(-10px) rotate(2deg) scale(0.9); z-index: 1; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02); }
.deck-container .card-swiping { transform: translateX(-150%) rotate(-15deg); opacity: 0; z-index: 4; }
.deck-container.pre-scroll .card-front { transform: translateY(15px) translateX(-10px) rotate(-3deg) scale(0.98); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04); }
.story-header { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.avatar { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-sans); font-weight: 500; font-size: 1.2rem; }
.user-info { display: flex; flex-direction: column; }
.user-info h4 { font-size: 1.05rem; color: #1A1A1A; font-weight: 600; margin-bottom: 2px; }
.badge-text { font-size: 0.7rem; letter-spacing: 0.5px; text-transform: uppercase; color: #7A7A7A; }
/* Phase 2: Strict Truncation to prevent varying card heights */
.story-quote { 
    font-family: var(--font-sans); 
    font-size: 1.15rem; 
    font-style: italic; 
    line-height: 1.6; 
    color: #333333; 
    font-weight: 400;
    
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Clamps to exactly 4 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 20px;
}

/* Data-Driven Avatar Themes */
.avatar.theme-purple { background-color: #F3E8FF; color: #6B21A8; }
.avatar.theme-peach { background-color: #FFEDD5; color: #C2410C; }
.avatar.theme-mint { background-color: #D1FAE5; color: #047857; }
.avatar.theme-slate { background-color: #F1F5F9; color: #334155; }
.avatar.theme-coral { background-color: #FFE4E6; color: #BE123C; }
.avatar.theme-gold { background-color: #FEF3C7; color: #B45309; }

/* Verified Badge Enhancement */
.badge-text.verified { color: #047857; display: inline-flex; align-items: center; gap: 4px; }
.badge-text.verified i { font-size: 0.85rem; }

/* The Contextual Upsell Pill */
.review-upsell-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #F8F9FA;
    border: 1px solid #E5E7EB;
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--corp-icon);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: auto;
    width: fit-content;
}

.review-upsell-pill:hover {
    background: var(--corp-surface);
    color: var(--corp-heading);
    border-color: #D1D5DB;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Optimistic Routing State */
.review-upsell-pill.is-routing {
    background: var(--global-text);
    color: #FFF;
    border-color: var(--global-text);
    transform: translateY(0);
}

@keyframes spinPill {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.spin-anim { animation: spinPill 1s linear infinite; }
.deck-indicator { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 40px; }
.dot { width: 8px; height: 8px; background-color: var(--corp-border); border-radius: 50%; transition: all 0.4s cubic-bezier(0.25, 1, 0.3, 1); }
.dot.active { width: 24px; background-color: var(--brand-primary); border-radius: 4px; }
@media (max-width: 600px) { .deck-container { height: 340px; } .story-card { padding: 25px; } }

/* --- RESPONSIVE SCALING (TABLET & DESKTOP) --- */
@media (min-width: 768px) {
    .premium-grid { grid-template-columns: repeat(3, 1fr); column-gap: 30px; row-gap: 80px; }
    .card-analog { padding: 0 2rem 2rem 2rem; }
    .image-breakout { margin-top: -50px; }
    .product-title { font-size: 1.05rem; }
    .product-story { display: block; font-size: 0.8rem; line-height: 1.4; padding-top: 4px; }
    .ingredient-bar { gap: 1rem; margin-top: 1rem; }
    .ingredient-bar i { font-size: 1.05rem; }
    .action-swap-area { height: 48px; margin-top: 1rem; }
    .price-pill { font-size: 0.9rem; }
}
@media (min-width: 1024px) {
    .premium-grid { grid-template-columns: repeat(4, 1fr); gap: 40px; }
}

/* --- CINEMATIC HERO SECTION UPGRADES --- */

.hero { 
    position: relative; /* Traps the absolute video inside */
    min-height: 100vh; /* Makes the hero fill the entire screen */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 100px 20px 60px; 
    overflow: hidden; /* Cuts off any video that spills out */
    max-width: 100%; /* Overriding your previous 800px limit */
}

/* The Video Background - Fixed Zoom */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    /* CHANGE: Force exact size instead of minimums */
    width: 100%;
    height: 100%;
    
    /* Ensure the video shrinks to fit inside this exact box */
    object-fit: contain; 
    
    z-index: 0;
}

/* The Aesthetic Overlay */
/*
.hero-overlay {
    position: absolute;
    inset: 0;
    /* A subtle gradient that is darker at the top (for the nav) and middle (for text) */
/*    background: linear-gradient(
        to bottom, 
        rgba(0, 0, 0, 0) 0%, 
        rgba(0, 0, 0, 0) 50%, 
        rgba(250, 250, 250, 1) 100% /* Fades smoothly into your global background color */
/*    );
    z-index: 1;
}
*/ 

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 80%, rgba(250,250,250,1) 100%);
    z-index: 1;
}


/* Pulling content to the front */
.hero-content, .marquee-wrapper {
    position: relative;
    z-index: 2; /* Sits on top of the overlay */
}

/* Light text overrides (Since the video is likely dark/colored) */
.hero-text-light {
    color: #FFFFFF !important;
    /* Layered shadows: a tight dark one for borders, a wide one for glow */
    text-shadow: 0px 2px 4px rgba(0,0,0,0.8), 0px 0px 30px rgba(0,0,0,0.6) !important; 
}
/* OPTION 1: THE FROSTED GLASS PILL */
.cta-light {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: #FFFFFF !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

.cta-light:hover {
    background: #FFFFFF !important;
    color: var(--global-text) !important;
}


/* ==========================================================================
   THE DUAL-LAYER CINEMATIC ENGINE
   ========================================================================== */
.fixed-cinematic-bg {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; 
    background-color: var(--global-bg);
    overflow: hidden;
}

.cinematic-layer {
    position: absolute;
    top: 65%; /* Adjusted to 50% for perfect center alignment */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    object-fit: cover; /* UPGRADED: Forces the asset to fill the void */
}

#scroll-canvas {
    opacity: 0; 
}

.global-glass-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(to bottom, rgba(250,250,250,0) 0%, rgba(250,250,250,0) 50%, rgba(250,250,250,0) 100%);
    backdrop-filter: blur(0px); 
    -webkit-backdrop-filter: blur(0px);
    pointer-events: none;
}

/* Make sure the main content floats above the fixed background */
main { position: relative; z-index: 1; }

/* Strip solid backgrounds from sections so the couple is visible */
.stories-zone, .ecosystem-section, .corp-zone { background-color: transparent !important; }

.storefront {
    background: rgba(250, 250, 250, 0.6) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 40px 40px 0 0; 
}

/* ==========================================================================
   TRUST BAR (MARQUEE) OVERRIDES
   ========================================================================== */

.marquee-dark {
    color: #000000 !important; /* Pure editorial black */
    text-shadow: none !important; /* Removes any ghosting or glow */
    font-weight: 600; /* Makes it slightly bolder so it cuts through the video */
}

/* Optional: If you want the diamonds to remain red, keep this. 
   If you want them black too, uncomment the line below. */
/* .marquee-dark .diamond-separator { color: #000000 !important; opacity: 0.3; } */


.card-analog:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   THE VELVET REVEAL (Curtain Drop Architecture)
   ========================================================================== */
.velvet-curtain {
    position: absolute;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--global-bg); /* Perfectly matches your site background */
    z-index: 1; /* Sits directly above the video, but below the overlay/text */
    opacity: 1;
    pointer-events: none; /* Ensures it never blocks clicks */
    transition: opacity 1.8s cubic-bezier(0.25, 1, 0.25, 1); /* Luxurious, slow fade */
    will-change: opacity;
}

.velvet-curtain.dropped {
    opacity: 0;
}