/* Premium Typography & Variables are now injected dynamically via Astro Layout and Decap CMS */

/* Base and Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.text-center { text-align: center; }
.text-highlight { color: var(--accent-crimson) !important; }

/* Navigation */
.premium-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0; /* Removido o padding lateral daqui para usar o do container */
    z-index: 100;
    background: linear-gradient(to bottom, rgba(34,34,34,0.95) 0%, transparent 100%);
    transition: background 0.4s ease, padding 0.4s ease;
}

.premium-nav.scrolled {
    background: rgba(34,34,34,0.98);
    padding: 1rem 5%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.premium-nav.nav-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 45px;
    width: auto;
    transition: transform 0.3s ease;
}

.nav-brand:hover .nav-logo {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}


.nav-links a {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    position: relative;
    padding-bottom: 4px;
    font-weight: 600;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-crimson);
    transition: width 0.4s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 101;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    transition: 0.3s ease;
}

/* Sections General */
.section {
    padding: 8rem 0;
    border-bottom: 1px solid var(--border-color);
}

/* Margem de segurança para páginas que não iniciam com Hero */
main > :first-child:not(.hero):not(.post-hero) {
    padding-top: calc(100px + 4rem) !important;
}

.bg-darker {
    background-color: var(--bg-darker);
}

.eyebrow {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.section-header {
    margin-bottom: 4rem;
}

.section-header h1, .section-header h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-display);
}

.divider {
    width: 80px;
    height: 2px;
    background-color: var(--accent-crimson);
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-outline {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    font-family: var(--font-sans);
    border-radius: 2px;
}

.btn-primary {
    background-color: var(--accent-crimson);
    color: #fff;
    border: 1px solid var(--accent-crimson);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-crimson);
    box-shadow: 0 0 20px rgba(213, 0, 0, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--text-primary);
    color: var(--bg-color);
}

.btn-outline {
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
}

.btn-outline:hover {
    background: var(--accent-crimson);
    border-color: var(--accent-crimson);
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--bg-color);
}

.spotlight-bg {
    position: absolute;
    inset: 0;
    background: url('https://images.unsplash.com/photo-1518709268805-4e9042af9f23?q=80&w=2000&auto=format&fit=crop') center/cover no-repeat;
    filter: grayscale(1) brightness(0.3) contrast(1.2);
    z-index: 0;
    opacity: 0.5;
    transition: transform 0.1s ease-out;
}

.hero-darkness {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle 400px at var(--mouse-x, 50%) var(--mouse-y, 50%), transparent 0%, rgba(34,34,34,0.9) 60%, var(--bg-color) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-main-logo {
    max-width: 90%;
    width: 450px;
    height: auto;
    margin: 0 auto 1.5rem;
    filter: drop-shadow(0 0 30px rgba(213, 0, 0, 0.5));
    display: block;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-family: var(--font-display);
    letter-spacing: 0.1em;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.scroll-text {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.scroll-line {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent-crimson), transparent);
    animation: scrollPulse 2s infinite;
}

@keyframes scrollPulse {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    50.1% { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Books Grid */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
}

.book-card {
    display: block;
    group: book;
}

.book-visual {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.book-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.8s;
    filter: brightness(0.8);
}

.book-hover-ui {
    position: absolute;
    inset: 0;
    background: rgba(213, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    mix-blend-mode: multiply;
}

.book-visual:hover .book-cover-img {
    transform: scale(1.05);
    filter: brightness(1);
}

.book-visual:hover .book-hover-ui {
    opacity: 1;
}

.book-visual:hover .btn-outline {
    opacity: 1;
    transform: translateY(0);
    z-index: 10;
}

.book-visual .btn-outline {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(20px);
    opacity: 0;
    transition: all 0.4s ease 0.1s;
    white-space: nowrap;
}

.book-meta h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.book-meta .author {
    font-size: 0.9rem;
    color: var(--accent-crimson);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
}

/* Editorial / Blog List */
.editorial-list {
    border-top: 1px solid var(--border-color);
}

.editorial-article {
    display: grid;
    grid-template-columns: 100px 180px 1fr 150px;
    gap: 2.5rem;
    align-items: center;
    padding: 3rem 0;
    transition: transform 0.4s ease;
}

.editorial-article:hover {
    transform: translateX(15px);
}

.editorial-article:hover h3 {
    color: var(--accent-crimson);
}

.editorial-article:hover .article-action {
    color: var(--accent-crimson);
}

.article-meta {
    font-size: 0.9rem;
    color: var(--accent-crimson);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.article-content h3 {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    transition: color 0.3s ease;
}

.article-content p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.article-action {
    text-align: right;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    transition: color 0.3s ease;
}

.line-divider {
    height: 1px;
    background-color: var(--border-color);
}

/* Author Section */
.author-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    align-items: center;
}

.author-image-wrapper {
    position: relative;
    border-radius: 4px;
}

.author-img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    filter: grayscale(0.5) contrast(1.2);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    position: relative;
    z-index: 2;
    transition: filter 0.4s ease;
}

.author-img:hover {
    filter: grayscale(0) contrast(1.1);
}

.author-decor {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent-crimson);
    z-index: 1;
    border-radius: 4px;
}

.author-info h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.author-bio {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.author-socials {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
}

.social-icon {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    border-bottom: 1px solid transparent;
    padding-bottom: 5px;
    font-weight: 600;
}

.social-icon:hover {
    color: var(--accent-crimson);
    border-bottom: 1px solid var(--accent-crimson);
}

/* Footer */
.premium-footer {
    background-color: #111;
    padding: 4rem 0;
    text-align: center;
    border-top: 1px solid var(--accent-crimson);
}

.footer-logo {
    height: 40px;
    margin-bottom: 1.5rem;
    opacity: 0.8;
    filter: grayscale(1);
    transition: filter 0.4s ease, opacity 0.4s ease;
}

.footer-logo:hover {
    filter: grayscale(0);
    opacity: 1;
}

.premium-footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 992px) {
    .author-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .author-decor {
        top: -10px;
        left: -10px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 5rem 0;
    }

    main > :first-child:not(.hero):not(.post-hero) {
        padding-top: calc(80px + 2rem) !important;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .editorial-article {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 2rem 0;
    }
    
    .article-action {
        text-align: left;
    }

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

    .btn-primary, .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .section-header h1, .section-header h2, .author-info h2 {
        font-size: 3rem;
    }

    /* Mobile Menu */
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--bg-darker);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        border-left: 2px solid var(--accent-crimson);
        gap: 3rem;
    }

    .nav-links.active {
        right: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

/* --- Inner Pages (Blog & Book) --- */

/* Blog Post */
.post-hero {
    height: 60vh;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding-bottom: 4rem;
    background-color: var(--bg-color);
    margin-bottom: 4rem;
}

.post-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.4) grayscale(0.5);
    z-index: 0;
}

.post-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.post-meta-top {
    font-size: 0.85rem;
    color: var(--accent-crimson);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    font-weight: 600;
}

.post-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    font-family: var(--font-display);
}

.post-body {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.post-body p {
    margin-bottom: 2rem;
}

.post-body h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin: 3rem 0 1.5rem;
}

.post-body blockquote {
    border-left: 4px solid var(--accent-crimson);
    padding-left: 2rem;
    font-style: italic;
    font-size: 1.3rem;
    color: var(--text-primary);
    margin: 3rem 0;
    background: linear-gradient(90deg, rgba(213,0,0,0.1) 0%, transparent 100%);
}

.post-interactions {
    max-width: 800px;
    margin: 4rem auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.interaction-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.btn-icon:hover, .btn-icon.active {
    background: var(--accent-crimson);
    border-color: var(--accent-crimson);
}

.comments-section {
    max-width: 800px;
    margin: 4rem auto;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

.comment-form textarea, .comment-form input {
    width: 100%;
    padding: 1rem;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.comment-form textarea:focus, .comment-form input:focus {
    outline: none;
    border-color: var(--accent-crimson);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.comment {
    background: var(--bg-darker);
    padding: 2rem;
    border-left: 2px solid var(--accent-crimson);
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.comment-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Book Details Page */
.book-details-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 10rem 0 6rem;
    position: relative;
    background: var(--bg-color);
    overflow: hidden;
}

.book-details-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.2);
    z-index: 0;
    transform: scale(1.1);
}

.book-details-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 5rem;
    align-items: center;
}

.book-cover-large {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
    transition: transform 0.4s ease;
}

.book-cover-large:hover {
    transform: translateY(-10px);
}

.book-info h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.book-info .author {
    font-size: 1.2rem;
    color: var(--accent-crimson);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 2rem;
}

.book-info .synopsis {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 3rem;
}

.book-meta-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.meta-value {
    font-size: 1.1rem;
    color: var(--text-primary);
}

@media (max-width: 992px) {
    .book-details-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    .book-cover-wrapper {
        max-width: 400px;
        margin: 0 auto;
    }
    .book-meta-details {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .post-title {
        font-size: 3rem;
    }
    .book-info h1 {
        font-size: 3rem;
    }
    .post-hero {
        height: auto;
        padding-top: 8rem;
    }
    .post-interactions {
        flex-direction: column;
        align-items: flex-start;
    }
}
