body {
    outline: 8px solid red !important;
}

:root {
    --bg: #f6f6f4;
    --surface: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --primary: #111827;
    --primary-hover: #1f2937;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    --radius: 16px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, sans-serif;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

.container {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
}

.site-header {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 18px;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    margin: 0;
    padding: 0;
}

.nav-menu a {
    text-decoration: none;
    font-weight: 600;
    color: var(--text);
}

.nav-menu a:hover {
    color: var(--primary-hover);
}

.site-main {
    min-height: calc(100vh - 140px);
}

.site-footer {
    border-top: 1px solid var(--border);
    background: #fff;
    padding: 24px 0;
    margin-top: 48px;
    color: var(--muted);
}

.page-section {
    padding: 48px 0;
}

.button-primary,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.2s ease;
    border: none;
}

.button-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 20px rgba(17, 24, 39, 0.14);
}

.button-primary:hover {
    background: var(--primary-hover);
    color: #fff;
    transform: translateY(-1px);
}

.button-secondary {
    background: #f3f4f6;
    color: var(--text);
}

.button-secondary:hover {
    background: #e5e7eb;
    color: var(--text);
}

/* =========================
   HOME / LANDING
========================= */

.hero {
    padding: 72px 0 56px;
    background:
        radial-gradient(circle at top left, rgba(17, 24, 39, 0.06), transparent 35%),
        linear-gradient(180deg, #ffffff 0%, #f6f6f4 100%);
}

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

.hero-kicker,
.section-kicker {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
}

.hero-title {
    margin: 0 0 18px;
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    line-height: 1.03;
    letter-spacing: -0.03em;
}

.hero-text,
.section-text {
    margin: 0;
    max-width: 760px;
    font-size: 1.06rem;
    line-height: 1.75;
    color: var(--muted);
}

.hero-actions,
.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 26px;
}

.hero-card {
    background: linear-gradient(180deg, #111827 0%, #1f2937 100%);
    color: #fff;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.hero-card-inner {
    min-height: 420px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 18px;
    padding: 28px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.hero-book-stack {
    position: relative;
    height: 220px;
    margin-bottom: 28px;
}

.hero-book {
    width: 150px;
    height: 210px;
    border-radius: 12px;
    position: absolute;
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.25);
}

.hero-book-1 {
    left: 0;
    top: 18px;
    background: linear-gradient(180deg, #d1d5db, #9ca3af);
    transform: rotate(-8deg);
}

.hero-book-2 {
    left: 85px;
    top: 0;
    background: linear-gradient(180deg, #f3f4f6, #d1d5db);
    transform: rotate(4deg);
}

.hero-book-3 {
    left: 170px;
    top: 24px;
    background: linear-gradient(180deg, #9ca3af, #6b7280);
    transform: rotate(12deg);
}

.hero-card-label {
    margin: 0 0 10px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.hero-card-title {
    margin: 0 0 12px;
    font-size: 2rem;
    line-height: 1.1;
}

.hero-card-text {
    margin: 0;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.82);
}

.section {
    padding: 64px 0;
}

.section-soft {
    background: #ffffff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-header {
    margin-bottom: 28px;
}

.section-title {
    margin: 0 0 14px;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.08;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.feature-card h3 {
    margin: 0 0 12px;
    font-size: 1.1rem;
}

.feature-card p {
    margin: 0;
    line-height: 1.75;
    color: var(--muted);
}

.cta-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

/* =========================
   CATÁLOGO DE LIBROS
========================= */

.catalog-page {
    padding: 64px 0 80px;
}

.catalog-header {
    text-align: center;
    margin-bottom: 42px;
}

.catalog-title {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.catalog-description {
    max-width: 760px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
    justify-content: center;
    gap: 34px 28px;
}

.book-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(17, 24, 39, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    position: relative;
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 50px rgba(17, 24, 39, 0.14);
    border-color: rgba(17, 24, 39, 0.14);
}

.book-card-cover {
    display: block;
    position: relative;
    background: linear-gradient(180deg, #f5f5f4 0%, #ececec 100%);
    padding: 18px 18px 10px;
    text-decoration: none;
}

.book-card-cover::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 22px;
    bottom: 14px;
    width: 10px;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.03));
    filter: blur(1px);
    opacity: 0.35;
}

.book-card-cover img,
.book-card-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4.3;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 18px 28px rgba(0, 0, 0, 0.18);
    background: #fff;
    position: relative;
    z-index: 1;
}

.book-card-placeholder {
    display: grid;
    place-items: center;
    color: var(--muted);
    font-weight: 700;
    background: #e5e7eb;
}

.book-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 18px 20px;
    flex: 1;
}

.book-card-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.45;
    min-height: 4.2em;
}

.book-card-title a {
    text-decoration: none;
    color: var(--text);
}

.book-card-title a:hover {
    text-decoration: underline;
}

.book-card-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.55;
    min-height: 3.2em;
}

.book-card-button,
.book-card .button-primary {
    margin-top: auto;
    width: 100%;
    text-align: center;
    justify-content: center;
}

.empty-state {
    max-width: 680px;
    margin: 0 auto;
    padding: 32px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

/* =========================
   LIBRO INDIVIDUAL
========================= */

.book-single {
    padding: 48px 0;
}

.book-single-header {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    align-items: start;
}

.book-single-cover-wrap {
    position: relative;
}

.book-single-cover {
    width: 100%;
    border-radius: 14px;
    display: block;
    box-shadow: var(--shadow);
}

.book-single-title {
    margin: 0 0 10px;
    font-size: 2.3rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.book-single-subtitle {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 1.08rem;
}

.content-section {
    margin-top: 40px;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.chapter-card {
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
}

.chapter-card:last-child {
    border-bottom: none;
}

.editor-content p {
    line-height: 1.75;
}

.editor-content {
    color: var(--text);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 980px) {
    .hero-grid,
    .feature-grid,
    .cta-box {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-card-inner {
        min-height: auto;
    }

    .hero-book-stack {
        transform: scale(0.9);
        transform-origin: left top;
    }
}

@media (max-width: 900px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 0;
    }

    .nav-menu {
        flex-wrap: wrap;
    }

    .book-single-header {
        grid-template-columns: 1fr;
    }

    .book-single-cover-wrap {
        max-width: 320px;
    }
}

@media (max-width: 640px) {
    .book-grid {
        grid-template-columns: minmax(220px, 280px);
    }

    .catalog-page {
        padding: 48px 0 64px;
    }

    .hero {
        padding: 56px 0 42px;
    }

    .section {
        padding: 52px 0;
    }
}