/* ==========================================================================
   AI ENGINEER 2027 - LANDING PAGE & ARTIGO STYLES
   WebApp Designer - Design System Integration (Glassmorphism & Bento Grid)
   ========================================================================== */

/* --- Variáveis Específicas do Livro --- */
:root {
    --book-gold: #f59e0b;
    --book-gold-light: #fbbf24;
    --book-glow: rgba(99, 102, 241, 0.25);
    --book-surface: rgba(15, 23, 42, 0.95);
    --card-dark: #0f172a;
    --border-subtle: rgba(255, 255, 255, 0.08);
}

/* --- Hero do Livro --- */
.book-hero {
    position: relative;
    padding: 130px 0 80px;
    background: radial-gradient(circle at 50% 10%, rgba(99, 102, 241, 0.15) 0%, rgba(15, 23, 42, 0) 70%),
                linear-gradient(180deg, #0b0f19 0%, #0f172a 100%);
    color: #f8fafc;
    overflow: hidden;
}

.book-hero::before {
    content: '';
    position: absolute;
    top: -150px;
    right: -100px;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}

.book-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
}

.book-hero-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.book-badge-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.book-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #c7d2fe;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-pulse {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.book-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: #ffffff;
    margin-bottom: 0;
}

.gradient-title {
    background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 70%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.book-subtitle {
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    font-weight: 500;
    color: #e2e8f0;
    line-height: 1.4;
}

.book-lead {
    font-size: 0.98rem;
    color: #94a3b8;
    line-height: 1.65;
    max-width: 580px;
}

/* --- Metadados e Contador Oficial --- */
.book-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    padding: 14px 20px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    margin-top: 6px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: #cbd5e1;
    font-weight: 500;
}

.meta-item i {
    color: #818cf8;
    font-size: 1rem;
}

.download-counter-badge {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(168, 85, 247, 0.25) 100%);
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(168, 85, 247, 0.4);
    font-weight: 700;
    color: #fbbf24;
}

/* --- Botões de Ação do Hero --- */
.book-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 8px;
}

.btn-book-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 50px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    min-height: 48px;
}

.btn-book-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -5px rgba(99, 102, 241, 0.55);
    color: #ffffff;
}

.btn-book-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 50px;
    background: rgba(30, 41, 59, 0.85);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 48px;
}

.btn-book-download:hover {
    background: rgba(51, 65, 85, 0.95);
    border-color: #6366f1;
    transform: translateY(-2px);
    color: #ffffff;
}

/* --- Mockup 3D da Capa do Livro --- */
.book-cover-stage {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
    position: relative;
}

.book-3d {
    position: relative;
    width: 320px;
    max-width: 90%;
    border-radius: 12px;
    box-shadow: -15px 25px 45px rgba(0, 0, 0, 0.6),
                0 0 30px rgba(99, 102, 241, 0.25);
    transform: rotateY(-8deg) rotateX(4deg);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s ease;
    overflow: hidden;
    background: #000;
}

.book-3d:hover {
    transform: rotateY(0deg) rotateX(0deg) scale(1.03);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7),
                0 0 45px rgba(99, 102, 241, 0.4);
}

.book-3d img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.book-spine-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 14px;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.2) 0%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
}

/* --- Bento Grid: Pilares da Obra --- */
.book-topics-section {
    padding: 80px 0;
    background: #0f172a;
    color: #f8fafc;
}

.book-section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 48px;
}

.book-section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #818cf8;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.book-section-header h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    color: #ffffff;
    margin-bottom: 12px;
}

.book-section-header p {
    color: #94a3b8;
    font-size: 0.98rem;
}

/* --- Citação Oficial do Autor (Contracapa) --- */
.quote-box {
    max-width: 900px;
    margin: 0 auto 48px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-left: 4px solid #fbbf24;
    border-radius: 14px;
    padding: 24px 30px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
}

.quote-box p {
    font-size: 1.02rem;
    font-style: italic;
    color: #e2e8f0;
    line-height: 1.65;
    margin-bottom: 10px;
}

.quote-author {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #38bdf8;
    letter-spacing: 0.3px;
}

/* --- Showcase da Contracapa & Pilares da Autópsia Técnica --- */
.backcover-showcase {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    align-items: start;
    margin-top: 10px;
}

.backcover-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: -10px 20px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    background: #000;
}

.backcover-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(56, 189, 248, 0.3);
}

.backcover-card img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
}

.backcover-badge {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fbbf24;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 50px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.real-pillars-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pillar-item {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 20px 22px;
    display: flex;
    gap: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
}

.pillar-item:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateX(4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.pillar-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #818cf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.pillar-content h3 {
    font-size: 1.05rem;
    color: #ffffff;
    margin-bottom: 6px;
    font-weight: 600;
}

.pillar-content p {
    font-size: 0.88rem;
    color: #94a3b8;
    line-height: 1.55;
    margin-bottom: 0;
}

/* --- Seção Contribuição Pix ("Pague um Café") --- */
.book-support-section {
    padding: 50px 0 70px;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.1) 0%, rgba(15, 23, 42, 1) 80%);
    color: #ffffff;
}

.support-card {
    max-width: 820px;
    margin: 0 auto;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.5),
                0 0 25px rgba(245, 158, 11, 0.1);
    backdrop-filter: blur(16px);
}

.support-header {
    text-align: center;
    margin-bottom: 28px;
}

.support-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 50%;
    color: #fbbf24;
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.support-header h2 {
    font-size: 1.8rem;
    color: #ffffff;
    margin-bottom: 8px;
}

.support-header p {
    color: #94a3b8;
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.55;
}

.support-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    align-items: center;
}

.support-qr {
    text-align: center;
    background: #ffffff;
    padding: 12px;
    border-radius: 14px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.support-qr img {
    width: 100%;
    max-width: 180px;
    height: auto;
    display: block;
    border-radius: 8px;
}

.support-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pix-key-box {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pix-key-label {
    font-size: 0.76rem;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.pix-key-value {
    font-family: monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: #38bdf8;
    letter-spacing: 1px;
}

.support-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-pix-copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    font-size: 0.88rem;
    font-weight: 600;
    background: #fbbf24;
    color: #0f172a;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-pix-copy:hover {
    background: #f59e0b;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(245, 158, 11, 0.35);
}

.btn-pix-paste {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    font-size: 0.88rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-pix-paste:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.pix-meta-info {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

/* --- Seção ZuuN (Estudo de Caso Prático) --- */
.book-zuun-section {
    padding: 70px 0;
    background: #0b0f19;
    color: #ffffff;
}

.zuun-card {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 20px;
    padding: 32px 36px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: center;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.4);
}

.zuun-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 50px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.zuun-content h3 {
    font-size: 1.5rem;
    margin-bottom: 6px;
    color: #ffffff;
}

.zuun-content p {
    color: #94a3b8;
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 0;
}

.zuun-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 50px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.zuun-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.4);
    color: #ffffff;
}

/* --- Toast de Notificação --- */
.toast-notice {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #10b981;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.toast-notice.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* --- Responsividade Completa --- */
@media (max-width: 992px) {
    .book-hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .book-hero-content {
        align-items: center;
    }

    .book-badge-container {
        justify-content: center;
    }

    .book-meta-bar {
        justify-content: center;
    }

    .book-actions {
        justify-content: center;
    }

    .backcover-showcase {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .backcover-card {
        max-width: 300px;
        margin: 0 auto;
    }

    .quote-box {
        padding: 20px 20px;
    }

    .zuun-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .zuun-card .zuun-cta {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .book-hero {
        padding: 105px 0 50px;
    }

    .book-3d {
        width: 250px;
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .support-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .support-qr {
        margin: 0 auto;
        max-width: 200px;
    }

    .support-buttons {
        justify-content: center;
    }

    .book-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-book-primary, .btn-book-download {
        width: 100%;
    }
}
