/* ==========================================================================
   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; }

/* --- STATIC CONTROLS --- */
.sticky-controls { position: relative; z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 15px; padding: 10px 0 20px; background: transparent; }

/* FIX 1: Strictly scoped to the search bar so it doesn't break the Nav */
/* --- BULLETPROOF SEARCH BAR --- */
.search-glass { 
    position: relative; 
    width: 100%; 
    max-width: 500px; 
    display: flex; 
    align-items: center; 
}
.search-glass .search-icon { 
    position: absolute; 
    left: 18px; 
    font-size: 1.2rem; 
    color: rgba(0,0,0,0.4); 
    pointer-events: none; /* Prevents icon from blocking clicks */
    z-index: 2; 
}
.search-glass .premium-input { 
    width: 100%; 
    border-radius: 100px; 
    padding: 14px 20px 14px 50px; /* 50px pushes text past the icon */
    background: rgba(0,0,0,0.03); 
    border: 1px solid transparent; 
    outline: none; 
    transition: all 0.3s ease; 
    font-family: var(--font-mono);
    font-size: 0.85rem;
}
.search-glass .premium-input:focus { 
    background: #FFF; 
    border-color: rgba(0,0,0,0.15); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.03); 
}

/* FIX 2: Flex-start allows scrolling on mobile without cutting the "All" pill */
.category-pills { display: flex; gap: 10px; justify-content: flex-start; width: 100%; max-width: 500px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: none; transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); will-change: filter, opacity, transform; }
/* Centers the pills beautifully on Desktop */
@media (min-width: 500px) {
    .category-pills { justify-content: center; }
}
.category-pills::-webkit-scrollbar { display: none; }
.pill { padding: 8px 20px; border-radius: 20px; background: transparent; border: 1px solid rgba(0,0,0,0.15); color: var(--global-text); font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; cursor: pointer; transition: 0.3s; white-space: nowrap; flex-shrink: 0; }
.pill.active, .pill:hover { background: var(--global-text); color: #FFF; border-color: var(--global-text); }

/* --- THE ZENITH FOCUS (Native Scroll Architecture) --- */
body.search-active { overflow: hidden; }
body.search-active .section-title { opacity: 0; transform: translateY(-15px) scale(0.98); pointer-events: none; }
/* Notice: We removed the .storefront translateY glide entirely! */
body.search-active .premium-grid,
body.search-active .category-pills,
body.search-active .storefront-capstone { filter: blur(8px); opacity: 0.3; transform: scale(0.98); pointer-events: none; }

/* The Grid */
/* Base Mobile Layout (2 Columns) */
.premium-grid { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 15px; row-gap: 50px; padding-top: 50px; transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); will-change: filter, opacity, transform; }
.premium-grid.filtering { opacity: 0; transform: translateY(15px); }

/* --- ANALOG CARD UX (MOBILE-FIRST PARITY) --- */
.card-analog { 
    background: #FFFFFF; 
    width: 100%; 
    border-radius: 12px; 
    border: 1px solid rgba(0,0,0,0.04); 
    box-shadow: var(--shadow-card); 
    position: relative; 
    /* STRICT MOBILE PADDING: Prevents the stretched rectangle bug! */
    padding: 0 1rem 1.5rem 1rem; 
    transition: box-shadow var(--transition-smooth); 
    font-family: var(--font-mono); 
    cursor: pointer; 
    -webkit-tap-highlight-color: transparent; 
}

.content-wrapper { display: flex; flex-direction: column; align-items: center; }

/* Mobile Image Breakout */
.image-breakout { 
    margin-top: -35px; /* Smaller mobile lift */
    margin-bottom: 1rem; 
    width: 110%; 
    display: flex; 
    justify-content: center; 
    filter: var(--shadow-volumetric); 
    transition: transform var(--transition-smooth); 
    transform-origin: bottom center; z-index: 5; will-change: transform; 
}
.image-breakout img, .image-breakout svg { width: 100%; height: auto; display: block; }

/* Mobile Typography */
.typography-group { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; width: 100%;}
.card-badge { display: inline-block; margin-bottom: 0.3rem; padding: 0.2rem 0.6rem; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--global-text); border: 1px solid var(--global-text); border-radius: 100px; background: transparent; transition: background var(--transition-smooth), color var(--transition-smooth); }
.card-badge:empty { display: none; }
.product-title { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--global-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }

/* Hide story entirely on mobile to save vertical space */
.product-story { display: none; } 

.ingredient-bar { display: flex; justify-content: center; gap: 0.6rem; margin-top: 0.4rem; color: var(--corp-icon); }
.ingredient-bar i { font-size: 0.85rem; opacity: 0.7; transition: opacity var(--transition-smooth), transform var(--transition-smooth); }

/* Mobile Action Button Area */
.action-swap-area { position: relative; width: 100%; height: 34px; overflow: hidden; border-radius: 6px; border: 1px solid rgba(0,0,0,0.08); background: var(--global-bg); margin-top: 0.8rem; }
.price-pill { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.05em; color: var(--global-text); transition: transform var(--transition-smooth), opacity var(--transition-smooth); }
.btn-add { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; background: var(--global-text); color: #FFF; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; border: none; font-family: inherit; transform: translateY(100%); transition: transform var(--transition-smooth); }

/* Touch/Hover States */
body:not(.is-touch-device) .card-analog:hover, .card-analog.is-active { box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08); }
body:not(.is-touch-device) .card-analog:hover .image-breakout, .card-analog.is-active .image-breakout { transform: scale(1.05) translateY(-6px); }
body:not(.is-touch-device) .card-analog:hover .card-badge:not(:empty), .card-analog.is-active .card-badge:not(:empty) { background: var(--global-text); color: #FFF; }
body:not(.is-touch-device) .card-analog:hover .ingredient-bar i, .card-analog.is-active .ingredient-bar i { opacity: 1; transform: translateY(-2px); }
body:not(.is-touch-device) .card-analog:hover .price-pill, .card-analog.is-active .price-pill { transform: translateY(-100%); opacity: 0; }
body:not(.is-touch-device) .card-analog:hover .btn-add, .card-analog.is-active .btn-add { transform: translateY(0); }

/* 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; padding: 60px 5%; 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: 50px; font-weight: 700; }
.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; }
.story-quote { font-family: var(--font-sans); font-size: 1.15rem; font-style: italic; line-height: 1.6; color: #333333; font-weight: 400; }
.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; }
}