/* css/yapper.css */

:root {
    --yap-orange: #FF5F1F;
    --yap-amber: #FFB300;
    --yap-dark: #050200; 
    --glass-border: rgba(255, 95, 31, 0.25);
    --glass-bg: rgba(15, 8, 4, 0.6);
}

/* --- SECTION LAYOUT --- */
.yapper-section {
    position: relative;
    height: 300vh; /* Reduced slightly for better pacing */
    z-index: 90;
    background-color: var(--yap-dark);
    /* margin-top: -1px;  */
    font-family: 'JetBrains Mono', monospace;
}

.yapper-sticky-wrapper {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- ORGANIC BACKGROUND --- */
.yapper-bg-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    background-color: var(--yap-dark);
}

.noise-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    animation: floatOrb 12s infinite alternate ease-in-out;
}

.orb-1 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--yap-orange), transparent 70%);
    top: -10%;
    left: 0%;
}

.orb-2 {
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--yap-amber), transparent 70%);
    bottom: -10%;
    right: 0%;
    animation-delay: -6s;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 40px) scale(1.15); }
}

/* --- HEADER --- */
.yapper-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1400px;
    height: 100vh;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.yapper-header {
    text-align: center;
    margin-top: 6vh;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
    z-index: 20;
}

.yapper-section.active .yapper-header {
    opacity: 1;
    transform: translateY(0);
}

.yapper-title {
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 6rem);
    background: linear-gradient(180deg, #fff, var(--yap-orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
    letter-spacing: -2px;
    filter: drop-shadow(0 0 25px rgba(255, 95, 31, 0.4));
}

.yapper-subtitle {
    font-size: 1rem;
    color: #999;
    margin-top: 0.5rem;
    letter-spacing: 3px;
}

.yapper-subtitle .highlight { color: var(--yap-amber); font-weight: bold; }

/* --- THE STREAM (Desktop Layout) --- */
.yapper-stream {
    position: relative;
    width: 100%;
    flex-grow: 1;
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CARD BASE STYLES */
.yap-card {
    position: absolute;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    color: #fff;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.05);
    transition: transform 0.1s linear, box-shadow 0.3s ease, border-color 0.3s ease;
    will-change: transform, opacity;
}

.yap-card:hover {
    box-shadow: 0 30px 60px rgba(255, 95, 31, 0.3), inset 0 0 0 1px rgba(255,255,255,0.1);
    border-color: var(--yap-orange);
    z-index: 100 !important;
}

.yap-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--yap-amber);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.yap-card h3 {
    font-family: 'Syncopate', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

/* --- CLUSTER POSITIONING (Tech Command Center) --- */
.yapper-stream {
    position: relative;
    width: 100%;
    flex-grow: 1;
    perspective: 1000px;
    display: block; 
}

/* --- 1. PRIMARY ANCHOR: Social Dashboard --- */
.card-social {
    position: absolute !important;
    width: 420px;
    left: calc(50% - 210px); 
    top: 45%; /* Lifted up to visually center against the whole screen */
    margin-top: -240px; /* Pushed higher up to give the podcast room */
    z-index: 30;
    background: rgba(10, 5, 2, 0.85);
    border: 1px solid var(--yap-orange);
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(255, 95, 31, 0.25), inset 0 0 0 1px rgba(255, 95, 31, 0.4);
}

/* --- 2. SECONDARY ANCHOR: Podcast Console --- */
.card-audio {
    position: absolute !important;
    width: 420px;
    left: calc(50% - 210px); 
    top: 45%; /* Matched to the new baseline */
    margin-top: 120px; /* Pushed further down so it no longer overlaps */
    z-index: 25;
    background: rgba(10, 5, 2, 0.75);
    border: 1px solid rgba(255, 179, 0, 0.3); 
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.6);
}

/* --- 3. AUXILIARY PANELS: Symmetrical Video Flanks --- */
/* Right Panel (Main AI Reel) */
.reel-center {
    position: absolute !important;
    width: 240px;
    left: calc(50% + 240px); 
    top: 45%; /* Matched to the new baseline */
    margin-top: -180px; /* Centered nicely alongside the two middle boxes */
    z-index: 20;
    border-radius: 12px;
    border-color: rgba(255,255,255,0.1);
    opacity: 0.7;
    filter: grayscale(0.4);
    transition: all 0.4s ease;
}

/* Left Panel (Coding Myths) */
.reel-left {
    position: absolute !important;
    width: 240px;
    right: calc(50% + 240px); 
    top: 45%; /* Matched to the new baseline */
    margin-top: -180px; /* Centered nicely alongside the two middle boxes */
    z-index: 20;
    border-radius: 12px;
    border-color: rgba(255,255,255,0.1);
    opacity: 0.7;
    filter: grayscale(0.4);
    transition: all 0.4s ease;
}

/* Eliminate the 3rd redundant video */
.reel-right {
    display: none !important; 
}

/* Interaction States for Auxiliary Panels */
.reel-center:hover, .reel-left:hover {
    opacity: 1;
    filter: grayscale(0);
    border-color: var(--yap-orange);
    box-shadow: 0 0 30px rgba(255, 95, 31, 0.2);
    z-index: 40 !important;
}

/* --- INNER CARD STYLING --- */
/* Socials Inner Grid */
.social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem; 
    margin-bottom: 1.5rem;
}

.soc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    height: 60px; 
    border-radius: 8px; /* Sharp UI buttons */
    /* background: rgba(255,255,255,0.03); */
    color: #ff5f1f;
    font-size: 1.8rem; 
    transition: all 0.2s ease;
    /* border: 1px solid rgba(255,255,255,0.08); */
    text-decoration: none;
    flex-direction: column;
}

.soc-btn:hover {
    background: var(--yap-orange);
    border-color: var(--yap-orange);
    color: var(--yap-dark); /* Dark icon on bright background for high contrast */
    box-shadow: 0 0 20px rgba(255, 95, 31, 0.4);
}

.soc-btn:hover > .soc-tag::after{
    content: '';
}

.soc-btn:hover > .soc-tag{
    font-size: 0rem;
    position: absolute;
}

.soc-tag {
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    letter-spacing: 1px;
    color: #ff5f1f75;
}

.fa-brands {
    filter: drop-shadow(0 0 5px rgba(255, 95, 31, 0.4));
}

.yap-stat { font-size: 0.85rem; color: var(--yap-orange); text-align: center; font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 2px;}

/* Reels Inner */
.card-reel { padding: 0.6rem; background: rgba(0,0,0,0.6); display: flex; flex-direction: column; gap: 0.8rem; }
.reel-frame { position: relative; width: 100%; aspect-ratio: 9/16; border-radius: 8px; overflow: hidden; }
.reel-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1); }
.card-reel:hover .reel-frame img { transform: scale(1.08); }

.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    z-index: 2;
    transition: all 0.3s;
    color: rgba(255,255,255,0.6);
}
.card-reel:hover .video-overlay { background: rgba(0,0,0,0.4); color: var(--yap-orange); }

.reel-stats {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0.6rem 0.5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.95));
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #fff;
    z-index: 3;
    font-family: 'JetBrains Mono', monospace;
}
.reel-info h4 { font-family: 'Syncopate', sans-serif; font-size: 0.9rem; color: #fff; margin: 0; }
.reel-info p { font-size: 0.7rem; color: #888; margin: 0; margin-top: 4px;}

/* Audio Inner */
.audio-visualizer { display: flex; align-items: center; gap: 4px; height: 30px; margin-bottom: 1.2rem; }
.bar { width: 6px; background: var(--yap-amber); border-radius: 2px; animation: eq 1s ease-in-out infinite; }
.bar:nth-child(1) { height: 15px; animation-delay: 0.1s; }
.bar:nth-child(2) { height: 25px; animation-delay: 0.2s; }
.bar:nth-child(3) { height: 30px; animation-delay: 0.3s; }
.bar:nth-child(4) { height: 20px; animation-delay: 0.4s; }
.bar:nth-child(5) { height: 10px; animation-delay: 0.5s; }
@keyframes eq { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.3); } }
.listen-btn { text-decoration: none; color: #fff; font-size: 0.8rem; font-family: 'JetBrains Mono', monospace; border-bottom: 1px solid rgba(255,255,255,0.3); padding-bottom: 4px; transition: all 0.2s; text-transform: uppercase;}
.listen-btn:hover { color: var(--yap-amber); border-color: var(--yap-amber); }

/* --- SECTION TRANSITION (Scientist to Yapper) --- */
.yapper-section {
    position: relative;
    height: 300vh; 
    z-index: 100; /* Higher than scientist (50) */
    background-color: var(--yap-dark); /* Set a solid base color */
    font-family: 'JetBrains Mono', monospace;
}

.transition-gradient {
    position: absolute;
    top: -80vh;
    left: 0;
    width: 100%;
    height: 160vh;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(5, 2, 0, 1) 50%, rgba(5, 2, 0, 1) 75%, rgba(0, 0, 0, 0) 100%);
    z-index: 5;
    pointer-events: none;
}

.yapper-sticky-wrapper {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--yap-dark);
    /* REMOVE or adjust the mask-image if it's causing text flickering */
    -webkit-mask-image: none; 
    mask-image: none;
}

/* ========================================= */
/* --- MOBILE RESPONSIVENESS (Max 900px) --- */
/* ========================================= */
@media (max-width: 900px) {
    #influencer {
        padding-bottom: 0rem;
    }

    .yapper-section {
        height: auto; 
        min-height: 100vh;
        overflow-y: visible; 
        padding-bottom: 5rem;
    }
    .yapper-sticky-wrapper {
        position: relative; 
        height: auto;
        display: block;
    }
    .yapper-header {
        margin-top: 5rem;
        margin-bottom: 3rem;
        transform: translateY(0);
        opacity: 1;
    }
    .yapper-stream {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem; /* Tighter gap for a unified column */
        padding: 0 1.5rem;
    }
    
    /* Reset Positioning */
    .yap-card {
        position: relative !important;
        top: auto !important; left: auto !important; right: auto !important; margin-top: 0 !important;
        transform: none !important; opacity: 1 !important;
        width: 100% !important; max-width: 450px;
    }
    
    /* RUTHLESS MOBILE FOCUS: Hide all videos */
    .reel-left, .reel-center, .reel-right { 
        display: none !important; 
    }
    
    /* Order the Dashboard */
    .card-social { order: 1; }
    .card-audio { order: 2; }

    .soc-tag {
        content: '';
        font-size: 0rem;
        position: absolute;
    }
}