/* css/main.css - Identidade visual BookNest */

:root {
    --bn-blue: #0f2c5c;
    --bn-blue-light: #1a3a6e;
    --bn-cream: #f8f5f0;
    --bn-cream-dark: #f0ebe3;
    --bn-gold: #c9a227;
    --bn-gold-soft: #e8d5a3;
    --bn-text: #1a1a1a;
    --bn-text-light: #5a5a5a;
    --bn-white: #ffffff;
    --bn-shadow: 0 4px 20px rgba(15, 44, 92, 0.08);
    --bn-radius: 12px;
    --bn-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-body: 'Inter', system-ui, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bn-cream);
    color: var(--bn-text);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--bn-transition);
}

/* ========== LOADING ========== */
.bn-loading {
    position: fixed;
    inset: 0;
    background: var(--bn-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.bn-loading.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.bn-loading-content {
    text-align: center;
}

.bn-loading-logo {
    width: 140px;
    margin: 0 auto 24px;
    animation: bn-pulse 1.8s ease-in-out infinite;
}

.bn-loading-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--bn-blue);
    margin-bottom: 28px;
    letter-spacing: 0.5px;
}

.bn-loading-bar {
    width: 180px;
    height: 3px;
    background: #e0d9ce;
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
}

.bn-loading-progress {
    height: 100%;
    width: 30%;
    background: var(--bn-gold);
    border-radius: 2px;
    animation: bn-load 1.4s ease-in-out infinite;
}

@keyframes bn-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(0.97); }
}

@keyframes bn-load {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

/* ========== HEADER ========== */
.bn-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(248, 245, 240, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(15, 44, 92, 0.06);
    z-index: 1000;
    transition: var(--bn-transition);
}

.bn-header.scrolled {
    box-shadow: var(--bn-shadow);
}

.bn-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bn-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bn-logo img {
    height: 42px;
    width: auto;
}

.bn-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.bn-nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--bn-text);
    position: relative;
}

.bn-nav a:not(.bn-btn)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bn-gold);
    transition: width 0.3s;
}

.bn-nav a:not(.bn-btn):hover::after {
    width: 100%;
}

.bn-nav a:hover {
    color: var(--bn-blue);
}

.bn-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--bn-transition);
    border: none;
    cursor: pointer;
}

.bn-btn-primary {
    background: var(--bn-blue);
    color: white;
}

.bn-btn-primary:hover {
    background: var(--bn-blue-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15, 44, 92, 0.25);
}

.bn-btn-outline {
    background: transparent;
    border: 1.5px solid var(--bn-blue);
    color: var(--bn-blue);
}

.bn-btn-outline:hover {
    background: var(--bn-blue);
    color: white;
}

.bn-btn-gold {
    background: var(--bn-gold);
    color: var(--bn-blue);
}

.bn-btn-gold:hover {
    background: #b8921f;
}

.bn-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--bn-blue);
    cursor: pointer;
}

/* ========== HERO ========== */
.bn-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 140px 24px 80px;
    background: linear-gradient(165deg, var(--bn-cream) 0%, #f0ebe3 100%);
    position: relative;
    overflow: hidden;
}

.bn-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 50%;
    height: 80%;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.bn-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.bn-hero-content h1 {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 5vw, 3.8rem);
    font-weight: 700;
    color: var(--bn-blue);
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.bn-hero-content .bn-tagline {
    font-size: 1.25rem;
    color: var(--bn-text-light);
    margin-bottom: 36px;
    max-width: 480px;
    line-height: 1.5;
}

.bn-hero-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.bn-hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.bn-hero-book {
    width: 280px;
    height: 400px;
    background: var(--bn-blue);
    border-radius: 4px 12px 12px 4px;
    box-shadow: 20px 20px 60px rgba(15, 44, 92, 0.2);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: var(--font-display);
    font-size: 1.4rem;
    text-align: center;
    padding: 30px;
}

/* ========== SECTIONS ========== */
.bn-section {
    padding: 90px 24px;
}

.bn-section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.bn-section-header {
    text-align: center;
    margin-bottom: 50px;
}

.bn-section-header h2 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--bn-blue);
    margin-bottom: 12px;
}

.bn-section-header p {
    color: var(--bn-text-light);
    max-width: 520px;
    margin: 0 auto;
}

/* ========== CARDS ========== */
.bn-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 28px;
}

.bn-book-card {
    background: var(--bn-white);
    border-radius: var(--bn-radius);
    overflow: hidden;
    box-shadow: var(--bn-shadow);
    transition: var(--bn-transition);
    border: 1px solid rgba(15, 44, 92, 0.04);
}

.bn-book-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(15, 44, 92, 0.12);
}

.bn-book-cover {
    aspect-ratio: 2/3;
    background: #e8e2d8;
    overflow: hidden;
}

.bn-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.bn-book-card:hover .bn-book-cover img {
    transform: scale(1.04);
}

.bn-book-info {
    padding: 16px;
}

.bn-book-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--bn-blue);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bn-book-author {
    font-size: 0.85rem;
    color: var(--bn-text-light);
    margin-bottom: 8px;
}

.bn-book-bn {
    font-size: 0.75rem;
    color: var(--bn-gold);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ========== BN HIGHLIGHT ========== */
.bn-bn-section {
    background: var(--bn-blue);
    color: white;
    text-align: center;
}

.bn-bn-section h2 {
    color: white;
}

.bn-bn-example {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 18px 40px;
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 1.8rem;
    letter-spacing: 2px;
    margin: 24px 0;
    color: var(--bn-gold-soft);
}

/* ========== FOOTER ========== */
.bn-footer {
    background: var(--bn-blue);
    color: rgba(255,255,255,0.8);
    padding: 60px 24px 30px;
}

.bn-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.bn-footer-logo img {
    height: 40px;
    margin-bottom: 16px;
}

.bn-footer h4 {
    color: white;
    font-size: 0.95rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.bn-footer a {
    display: block;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

.bn-footer a:hover {
    color: var(--bn-gold);
}

.bn-footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.85rem;
}

/* ========== UTILITIES ========== */
.bn-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.bn-text-center { text-align: center; }
.bn-mt-40 { margin-top: 40px; }
.bn-mb-20 { margin-bottom: 20px; }
