/* --- CONFIGURAÇÕES GERAIS --- */
body {
    font-family: 'Lato', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    overflow-x: hidden;
}

/* --- ANIMAÇÕES DE REVELAÇÃO (Scroll) --- */
.reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-property: opacity, transform;
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Delays para grids */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }

/* --- NAVBAR E MENU MOBILE --- */
.nav-link-line {
    position: relative;
}

.nav-link-line::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, #8E8F8D, #D8DADB);
    transition: width 0.3s ease;
}

.nav-link-line:hover::after {
    width: 100%;
}

#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
}

#mobile-menu.open {
    max-height: 600px;
    opacity: 1;
    visibility: visible;
}

.menu-icon {
    transition: transform 0.3s ease;
}

.menu-open .menu-icon {
    transform: rotate(90deg);
}

/* --- TIPOGRAFIA E EFEITOS METÁLICOS --- */
.text-metallic {
    background: linear-gradient(45deg, #8E8F8D, #D8DADB, #8E8F8D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: shine 5s linear infinite;
}

@keyframes shine {
    to { background-position: 200% center; }
}

/* --- MOCKUP DO EBOOK 3D --- */
.book-container {
    perspective: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.book {
    width: 240px;
    height: 360px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateY(-25deg);
    transition: transform 0.6s ease;
    box-shadow: 20px 20px 40px rgba(0, 0, 0, 0.4);
}

/* Ajuste para mobile: diminui o tamanho do livro se a tela for pequena */
@media (max-width: 640px) {
    .book {
        width: 180px;
        height: 270px;
    }
}

.book:hover {
    transform: rotateY(0deg) scale(1.05);
}

.book-front {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #081E60;
    border-radius: 4px 12px 12px 4px;
    overflow: hidden;
    backface-visibility: hidden;
    z-index: 2;
    border: 1px solid #B1B2B0;
}

.book-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lombada do Livro */
.book::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 100%;
    left: 0;
    top: 0;
    background: linear-gradient(to right, #8E8F8D, #D8DADB, #8E8F8D);
    transform: rotateY(-90deg) translateX(-20px);
    transform-origin: left;
}

/* Páginas internas */
.book::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    right: 0;
    top: 0;
    background: #fff;
    transform: translateZ(-20px);
    border-radius: 0 8px 8px 0;
}

/* --- GLASSMORPHISM --- */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Suporte Safari */
    border: 1px solid rgba(177, 178, 176, 0.1);
}

/* --- UTILITÁRIOS EXTRAS --- */
.shadow-glow {
    box-shadow: 0 0 20px rgba(142, 143, 141, 0.2);
}

.shadow-metallic {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

/* BOTÕES METÁLICOS */
.bg-metallic {
    background: linear-gradient(45deg, #8E8F8D, #D8DADB, #8E8F8D);
    background-size: 200% auto;
    transition: 0.5s;
}

.bg-metallic:hover {
    background-position: right center;
}

/* Fallback: se o JS falhar, revela tudo após 3 segundos automaticamente */
@media (prefers-reduced-motion: no-preference) {
    .reveal:not(.active) {
        animation: forceReveal 0s forwards;
        animation-delay: 3.5s;
    }
}

@keyframes forceReveal {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}