/* ==========================================================================
   WISEBET — ANIMACIONES & REVEAL SYSTEM (SKILL.md Protocol)
   Inspirado en: PhilosophyCarousel 3D Ring + Lusion.co soft reveals
   ========================================================================== */

/* --- REVEAL TRIGGERS --- */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-up.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* --- HERO TEXT REVEAL --- */
.line {
    display: block;
    overflow: hidden;
    margin-bottom: -0.1em;
}
.word {
    display: inline-block;
    transform: translateY(110%);
    will-change: transform;
}

.reveal-side {
    opacity: 0;
}

/* --- METHODOLOGY ENHANCEMENTS --- */
.method-step {
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 20px;
    padding: 30px;
    background: transparent;
    border: 1px solid transparent;
}
.method-step.active {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 214, 135, 0.1);
}
.progress-bar-inner {
    box-shadow: 0 0 10px var(--accent-green);
    transition: box-shadow 0.3s ease;
}

/* Línea de construcción (Wireframe build-in) */
.wire-line {
    width: 0;
    height: 1px;
    background: var(--accent-green);
    transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.wire-line.in-view { width: 100%; }

/* --- ANIMACIONES GLOBALES --- */
@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    to { left: 200%; }
}



/* --- BENTO CARDS MEJORADAS --- */
.bento-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(186,186,186,0.25);
    border-radius: 24px;
    padding: 48px;
    position: relative;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.16,1,0.3,1),
                box-shadow 0.5s cubic-bezier(0.16,1,0.3,1),
                border-color 0.5s;
}
.bento-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-green), transparent);
    opacity: 0;
    transition: opacity 0.5s;
}
.bento-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.06);
    border-color: rgba(0,214,135,0.2);
}
.bento-card:hover::before { opacity: 1; }

.bento-card h3 {
    font-size: 1.6rem;
    margin-bottom: 16px;
}
.bento-card p {
    line-height: 1.7;
    color: var(--text-muted);
}

/* Media en bento cards */
.bento-media {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    position: relative;
    aspect-ratio: 16/9;
}
.bento-media img,
.bento-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px);
    transition: filter 1.5s ease;
}
.bento-media img.loaded,
.bento-media video.loaded { filter: blur(0); }

/* --- ALGO PAGE LAYOUT MEJORADO --- */
.algo-hero-split {
    display: grid;
    grid-template-columns: 1fr min(480px, 45%);
    gap: 5vw;
    align-items: center;
    min-height: 80vh;
    padding-top: 80px;
    padding-bottom: 80px;
    overflow: visible;
}
.algo-hero-content { display: flex; flex-direction: column; }
.algo-eyebrow {
    font-size: 11px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--accent-green);
    margin-bottom: 24px;
    font-family: var(--font-body);
}
.algo-main-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 5vw, 7rem);
    color: var(--text-main);
    line-height: 1.05;
    margin-bottom: 32px;
    text-transform: uppercase;
}
.algo-desc {
    font-size: 16px;
    line-height: 1.85;
    color: rgba(26,26,26,0.75);
    font-weight: 300;
    margin-bottom: 48px;
    max-width: 440px;
}
.algo-stats-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    background: rgba(186,186,186,0.2);
    border-radius: 20px;
    overflow: hidden;
}
.algo-stat-box {
    background: rgba(255,255,255,0.8);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: background 0.3s;
}
.algo-stat-box:hover { background: rgba(255,255,255,0.95); }
.algo-stat-val {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--accent-green);
    line-height: 1;
}
.algo-stat-lbl {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
}

/* Divider animado */
.section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(186,186,186,0.5) 20%, rgba(186,186,186,0.5) 80%, transparent);
    margin: 80px 0;
    position: relative;
    overflow: hidden;
}
.section-divider::after {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--accent-green), transparent);
    animation: shimmer 3s infinite;
}
@keyframes shimmer {
    to { left: 200%; }
}

/* --- PICKS TABLE MEJORADA --- */
.picks-section { margin-top: 80px; }
.picks-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 32px;
}
.picks-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--text-main);
}
.picks-count {
    font-size: 12px;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}
.glass-table-container {
    width: 100%;
    overflow-x: auto;
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(186,186,186,0.3);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(10px);
}
.glass-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    text-align: left;
}
.glass-table th {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(186,186,186,0.3);
}
.glass-table td {
    padding: 20px;
    font-size: 14px;
    color: rgba(26,26,26,0.85);
}
.glass-table tbody tr {
    border-bottom: 1px solid rgba(186,186,186,0.15);
    transition: background 0.3s;
}
.glass-table tbody tr:hover {
    background: rgba(0,214,135,0.04);
}
.profit-positive {
    color: var(--accent-green);
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 0.9rem;
}
.profit-negative {
    color: #D94F3D;
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 0.9rem;
}


.method-bullets {
    margin-top: 16px;
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.method-bullets li {
    padding-left: 16px;
    position: relative;
    font-size: 14px;
    color: rgba(26,26,26,0.65);
    line-height: 1.6;
}
.method-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-green);
}

/* Math block (para calculos de EV) */
.math-block {
    margin-top: 24px;
    padding: 24px;
    background: rgba(0,214,135,0.04);
    border-left: 3px solid var(--accent-green);
    border-radius: 0 12px 12px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.math-block p {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(26,26,26,0.75);
}
.math-block .math-result {
    color: var(--accent-green);
    font-weight: 500;
}

/* --- BIAS THEORY GRID MEJORADA --- */
.theory-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
}
.theory-card {
    padding: 32px;
    border-radius: 16px;
    border: 1px solid rgba(186,186,186,0.2);
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(10px);
    transition: border-color 0.4s, transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.theory-card:hover {
    border-color: rgba(0,214,135,0.3);
    transform: translateY(-4px);
}
.theory-card-num {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--accent-green);
    letter-spacing: 0.2em;
    margin-bottom: 12px;
}
.theory-card h5 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 12px;
    line-height: 1.4;
}
.theory-card p {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(26,26,26,0.65);
}

/* --- SECTION HEADERS (Cinematicos) --- */
/* cinematic-header removed to avoid conflict with premium.css */

/* --- AUDIT BAR MEJORADA --- */
.audit-bar-wrapper {
    padding: 0 4vw;
    margin-bottom: 80px;
}
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    background: rgba(186,186,186,0.15);
    border-radius: 20px;
    overflow: hidden;
}
.bento-item {
    background: rgba(255,255,255,0.8);
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: background 0.3s;
}
.bento-item:hover { background: rgba(255,255,255,0.95); }
.bento-val {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    color: var(--text-main);
    display: block;
    line-height: 1;
}
.bento-lbl {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    text-align: center;
}

/* --- BLOG CARDS MEJORADAS --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 40px;
}
.blog-card {
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(186,186,186,0.2);
    border-radius: 20px;
    padding: 32px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform 0.5s cubic-bezier(0.16,1,0.3,1),
                box-shadow 0.5s, border-color 0.5s;
    position: relative;
    overflow: hidden;
}
.blog-card::after {
    content: '→';
    position: absolute;
    bottom: 32px;
    right: 32px;
    font-size: 1.2rem;
    color: var(--accent-green);
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.3s, transform 0.3s;
}
.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.07);
    border-color: rgba(0,214,135,0.25);
}
.blog-card:hover::after { opacity: 1; transform: translateX(0); }
.blog-date {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-green);
}
.blog-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--text-main);
    line-height: 1.5;
    flex-grow: 1;
}
.blog-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-tag {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(0,0,0,0.04);
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* --- SECTION TITLE MEJORADO --- */
.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    color: var(--text-main);
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}
.section-subtitle {
    font-size: 15px;
    color: rgba(26,26,26,0.6);
    margin-bottom: 60px;
    max-width: 600px;
    line-height: 1.7;
}

/* --- MANIFESTO BOX --- */
.manifesto-box {
    margin-top: 24px;
    padding: 24px 28px;
    background: rgba(0,214,135,0.04);
    border-left: 3px solid var(--accent-green);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    font-size: 1rem;
    color: rgba(26,26,26,0.8);
    line-height: 1.8;
}

/* --- RESPONSIVE OPTIMIZATION --- */
@media (max-width: 992px) {
    .hero-wrapper { 
        grid-template-columns: 1fr; 
        padding-top: 140px; 
        height: auto; 
        min-height: 80vh;
        gap: 30px;
        text-align: center;
    }
    .hero-left { 
        justify-content: center; 
        order: 1; /* Wordmark at the top */
        width: 100%;
        margin-bottom: 20px;
    }
    .hero-right { 
        order: 2; /* Content below wordmark */
        align-items: center; 
        text-align: center;
        max-width: 100%;
        padding: 0 20px;
    }
    .hero-wordmark { 
        font-size: clamp(2rem, 10vw, 4rem); 
        text-align: center;
        letter-spacing: 0.2em;
        opacity: 0.3 !important; /* Subtle background feel */
    }
    .hero-title {
        font-size: clamp(2rem, 6vw, 3.5rem);
        width: 100%;
    }
    .hero-subtitle {
        margin: 20px auto;
        max-width: 90%;
    }
    .algo-hero-split { 
        grid-template-columns: 1fr; 
        text-align: center;
        gap: 40px;
    }
    .algo-hero-content {
        align-items: center;
    }
    .algo-desc {
        margin: 0 auto 40px;
    }

    .bento-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 1px; 
    }
}

@media (max-width: 768px) {
    .bento-grid { 
        grid-template-columns: 1fr; 
    }
    .theory-grid { 
        grid-template-columns: 1fr; 
    }
    .algo-stats-panel { 
        grid-template-columns: 1fr; 
    }
    .method-step { 
        grid-template-columns: 1fr; 
        gap: 15px; 
        text-align: center;
    }
    .method-num {
        font-size: 2.5rem;
    }
    .method-bullets li {
        text-align: left;
    }
    .cinematic-header::after {
        font-size: 20vw;
        opacity: 0.03;
    }
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .bento-card { 
        padding: 24px; 
    }
    .hero-title {
        font-size: 1.8rem;
    }

}
