/* ============================================================
   Librería Txiki, C.A. — Landing
   Paleta: azul marino + dorado · Playfair Display + Inter
   ============================================================ */

:root {
    --navy:        #3B4A6B;
    --navy-dark:   #2C3A54;
    --navy-deep:   #1F2A40;
    --gold:        #F4C430;
    --gold-soft:   #E8B923;
    --cream:       #FBF7EF;
    --paper:       #FFFFFF;
    --ink:         #2C3E50;
    --muted:       #6C757D;
    --line:        #EAE4D8;
    --shadow-sm:   0 4px 12px rgba(31, 42, 64, 0.08);
    --shadow-lg:   0 18px 45px rgba(31, 42, 64, 0.14);
    --radius:      16px;
    --transition:  all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--ink);
    background: var(--cream);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container { width: min(1200px, 92%); margin: 0 auto; }

h1, h2, h3 { font-family: 'Playfair Display', serif; color: var(--navy); line-height: 1.15; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ---------- Top bar ---------- */
.top-bar {
    background: linear-gradient(135deg, var(--navy-deep), var(--navy-dark));
    color: #fff;
    font-size: 0.82rem;
    padding: 0.5rem 0;
}
.top-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.top-bar-note { margin: 0; opacity: 0.92; }
.top-bar-note i { color: var(--gold); margin-right: 0.35rem; }
.top-bar-right { display: flex; align-items: center; gap: 1.25rem; }
.social-links { display: flex; gap: 0.6rem; }
.social-links a {
    width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; background: rgba(255,255,255,0.12); color: #fff; font-size: 0.8rem;
    transition: var(--transition);
}
.social-links a:hover { background: var(--gold); color: var(--navy-deep); }
.top-access {
    color: rgba(255,255,255,0.7); font-size: 0.8rem; font-weight: 500;
    transition: var(--transition);
}
.top-access:hover { color: var(--gold); }

/* ---------- Navbar ---------- */
.navbar {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    transition: var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow-sm); }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 0; }
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand-logo { height: 44px; width: 44px; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow-sm); }
.brand-text { font-family: 'Playfair Display', serif; font-size: 1.25rem; color: var(--navy); }
.brand-text strong { color: var(--gold-soft); font-weight: 800; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; color: var(--navy); cursor: pointer; }
.nav-menu { display: flex; align-items: center; gap: 1.5rem; }
.nav-menu a { font-size: 0.88rem; font-weight: 600; color: var(--navy-dark); letter-spacing: 0.3px; transition: var(--transition); }
.nav-menu a:hover { color: var(--gold-soft); }
.nav-access {
    display: inline-flex; align-items: center; gap: 0.4rem;
    border: 1px solid var(--line); color: var(--navy);
    padding: 0.45rem 0.9rem; border-radius: 40px; font-size: 0.8rem !important;
    opacity: 0.85;
}
.nav-access:hover { border-color: var(--gold); color: var(--navy) !important; opacity: 1; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background:
        radial-gradient(circle at 85% 20%, rgba(244, 196, 48, 0.14), transparent 45%),
        linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-dark) 100%);
    color: #fff; overflow: hidden; padding: 6rem 0;
}
.hero-decor { position: absolute; color: rgba(244,196,48,0.12); pointer-events: none; animation: float 6s ease-in-out infinite; }
.hero-decor-1 { font-size: 5rem; top: 12%; left: 6%; }
.hero-decor-2 { font-size: 3.2rem; top: 60%; right: 8%; animation-delay: 2s; }
.hero-decor-3 { font-size: 2.6rem; bottom: 10%; left: 22%; animation-delay: 4s; }
.hero-inner { display: flex; align-items: center; gap: 3rem; position: relative; z-index: 2; }
.hero-copy { flex: 1.35; }
.hero-badge {
    display: inline-block; padding: 0.45rem 1.1rem; border: 1px solid rgba(244,196,48,0.5);
    color: var(--gold); border-radius: 40px; font-size: 0.8rem; font-weight: 600;
    letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 1.4rem;
}
.hero-copy h1 { font-size: clamp(2.4rem, 5vw, 4rem); color: #fff; font-weight: 800; margin-bottom: 1.4rem; }
.hero-copy h1 em { font-style: normal; color: var(--gold); }
.hero-copy p { font-size: 1.12rem; color: rgba(255,255,255,0.82); max-width: 620px; margin-bottom: 2.2rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-visual { flex: 1; display: flex; justify-content: center; }
.hero-emblem {
    width: clamp(220px, 28vw, 340px); aspect-ratio: 1; border-radius: 28px; overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.35), 0 0 0 8px rgba(244,196,48,0.15);
    background: #fff; padding: 0.4rem; transform: rotate(2deg);
}
.hero-emblem img { width: 100%; height: 100%; object-fit: cover; border-radius: 22px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.85rem 1.7rem;
    border-radius: 40px; font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: var(--transition);
}
.btn-primary { background: var(--gold); color: var(--navy-deep); box-shadow: 0 12px 26px rgba(244,196,48,0.35); }
.btn-primary:hover { background: var(--gold-soft); transform: translateY(-3px); }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.35); }
.btn-ghost:hover { background: rgba(255,255,255,0.08); border-color: #fff; }

/* ---------- Sections ---------- */
.section { padding: 5.5rem 0; }
.section-papeleria, .section-nosotros { background: var(--paper); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 3rem; }
.section-eyebrow { display: inline-block; color: var(--gold-soft); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: 0.78rem; margin-bottom: 0.8rem; }
.section-head h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); margin-bottom: 0.9rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ---------- Books ---------- */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.6rem; }
.book-card {
    background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
    border: 1px solid var(--line); transition: var(--transition); display: flex; flex-direction: column;
}
.book-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.book-cover {
    height: 260px; display: flex; flex-direction: column; justify-content: space-between;
    padding: 1.2rem; color: #fff; position: relative;
    background-size: cover; background-position: center;
}
.book-cover::after {
    content: ''; position: absolute; left: 12px; top: 0; bottom: 0; width: 1px;
    background: rgba(255,255,255,0.25);
}
.book-cover-editorial { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px; opacity: 0.85; }
.book-cover-title { font-family: 'Playfair Display', serif; font-size: 1.25rem; font-weight: 700; line-height: 1.25; }
.book-cover-author { font-size: 0.8rem; opacity: 0.9; }
.book-info { padding: 1.1rem 1.2rem 1.25rem; display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }
.book-info h3 { font-size: 1.02rem; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-author { font-size: 0.85rem; color: var(--navy-dark); font-weight: 500; }
.book-editorial { font-size: 0.8rem; color: var(--muted); }
.book-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 0.6rem; }
.book-price { font-weight: 800; color: var(--navy); font-size: 1.05rem; }
.book-stock { font-size: 0.72rem; color: #1f7a4d; background: #e7f4ec; padding: 0.2rem 0.6rem; border-radius: 20px; }

/* ---------- Papelería ---------- */
.category-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 2.2rem; }
.chip {
    border: 1px solid var(--line); background: #fff; color: var(--navy-dark);
    padding: 0.45rem 1rem; border-radius: 40px; font-size: 0.84rem; font-weight: 500; cursor: pointer;
    transition: var(--transition);
}
.chip:hover { border-color: var(--gold); }
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.1rem; }
.product-card {
    background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem;
    transition: var(--transition); display: flex; flex-direction: column; gap: 0.35rem;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); border-color: var(--gold); }
.product-card.hidden { display: none; }
.product-icon {
    width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--navy), var(--navy-dark)); color: var(--gold); font-size: 1.3rem; margin-bottom: 0.5rem;
}
.product-card h3 { font-family: 'Inter', sans-serif; font-size: 0.95rem; font-weight: 600; color: var(--ink); line-height: 1.3; }
.product-category { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.product-meta { margin-top: auto; padding-top: 0.5rem; display: flex; align-items: baseline; gap: 0.4rem; }
.product-price { font-weight: 800; color: var(--navy); font-size: 1rem; }
.product-currency { font-size: 0.72rem; color: var(--muted); }

/* ---------- Servicios ---------- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.6rem; }
.service-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; text-align: center; transition: var(--transition); }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.service-icon {
    width: 76px; height: 76px; margin: 0 auto 1.2rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--navy), var(--gold-soft)); color: #fff; font-size: 1.9rem;
}
.service-card h3 { font-size: 1.25rem; margin-bottom: 0.6rem; }
.service-card p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Nosotros ---------- */
.nosotros-inner { display: flex; align-items: center; gap: 3rem; }
.nosotros-copy { flex: 1.4; }
.nosotros-copy h2 { margin-bottom: 1.2rem; }
.nosotros-copy p { color: var(--muted); margin-bottom: 1rem; }
.stats-row { display: flex; gap: 2rem; margin-top: 2rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: 'Playfair Display', serif; font-size: 2.3rem; font-weight: 800; color: var(--navy); }
.stat-label { font-size: 0.85rem; color: var(--muted); }
.nosotros-visual { flex: 1; display: flex; justify-content: center; }
.years-seal {
    width: 230px; height: 230px; border-radius: 50%; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--navy), var(--navy-deep));
    color: #fff; box-shadow: 0 0 0 10px var(--gold), 0 0 0 12px rgba(244,196,48,0.3);
}
.years-num { font-family: 'Playfair Display', serif; font-size: 4.4rem; font-weight: 800; line-height: 1; color: var(--gold); }
.years-txt { text-transform: uppercase; letter-spacing: 3px; font-size: 0.85rem; margin-top: 0.4rem; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-deep); color: rgba(255,255,255,0.82); padding: 4rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer-brand p { margin: 1rem 0; font-size: 0.92rem; }
.footer-logo { height: 56px; width: 56px; border-radius: 12px; object-fit: cover; }
.footer-col h4 { color: #fff; font-family: 'Playfair Display', serif; font-size: 1.05rem; margin-bottom: 1rem; }
.footer-col a { display: block; color: rgba(255,255,255,0.7); font-size: 0.9rem; margin-bottom: 0.5rem; transition: var(--transition); }
.footer-col a:hover { color: var(--gold); }
.footer-col p { font-size: 0.9rem; margin-bottom: 0.6rem; }
.footer-col p i { color: var(--gold); margin-right: 0.4rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 1.3rem 0; }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem; }
.footer-bottom p { font-size: 0.85rem; opacity: 0.7; }
.footer-access { color: rgba(255,255,255,0.55); font-size: 0.85rem; transition: var(--transition); }
.footer-access:hover { color: var(--gold); }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; color: var(--muted); padding: 2rem 0; }
.empty-state i { display: block; font-size: 2.4rem; color: var(--gold-soft); margin-bottom: 0.6rem; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.23, 1, 0.32, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* ---------- Animations ---------- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .hero-inner { flex-direction: column; text-align: center; }
    .hero-copy p { margin-left: auto; margin-right: auto; }
    .hero-cta { justify-content: center; }
    .nosotros-inner { flex-direction: column; text-align: center; }
    .stats-row { justify-content: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
    .nav-toggle { display: block; }
    .nav-menu {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: flex-start; gap: 0.75rem;
        background: #fff; padding: 1.25rem 6%; box-shadow: var(--shadow-lg);
    }
    .nav-menu.open { display: flex; }
    .top-bar-inner { flex-direction: column; gap: 0.3rem; text-align: center; }
    .footer-grid { grid-template-columns: 1fr; }
}
