/* ─── Reset & Base ──────────────────────────────────────── */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.7;
    color: #2a2a2a;
    background: #f8f7f4;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    color: #2a6b4a;
    text-decoration: none;
}

a:hover {
    color: #1d4e35;
    text-decoration: underline;
}

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

/* ─── Container ─────────────────────────────────────────── */

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ─── Site Header ───────────────────────────────────────── */

.site-header {
    background: #2a2a2a;
    color: #fff;
    padding: 1rem 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.site-header__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.site-header__title:hover {
    color: #e0e0e0;
    text-decoration: none;
}

.site-header__nav {
    display: flex;
    gap: 1.5rem;
}

.site-header__nav a {
    color: #ccc;
    font-size: 0.95rem;
}

.site-header__nav a:hover {
    color: #fff;
    text-decoration: none;
}

/* ─── Hero ──────────────────────────────────────────────── */

.hero {
    text-align: center;
    padding: 3rem 1rem 2rem;
}

.hero h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.hero__subtitle {
    font-size: 1.15rem;
    color: #666;
    font-style: italic;
}

/* ─── Book Grid ─────────────────────────────────────────── */

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.8rem;
    padding: 1rem 0 3rem;
}

.book-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    text-decoration: none;
}

.book-card__image {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #e8e5df;
}

.book-card__body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.book-card__subtitle {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.4rem;
    font-style: italic;
}

.book-card__snippet {
    font-size: 0.88rem;
    color: #555;
    flex: 1;
    line-height: 1.5;
}

.book-card__price {
    font-size: 0.85rem;
    font-weight: 700;
    color: #2a6b4a;
    margin-top: 0.7rem;
}

/* ─── Book Landing Page ─────────────────────────────────── */

.book-page {
    padding: 2rem 0 3rem;
}

.book-page__layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: start;
    margin-bottom: 2.5rem;
}

.book-page__cover-img {
    width: 100%;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.book-page__title {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 0.3rem;
}

.book-page__subtitle {
    font-size: 1.15rem;
    color: #666;
    font-style: italic;
    margin-bottom: 0.8rem;
}

.book-page__author {
    font-size: 1rem;
    color: #555;
    margin-bottom: 0.5rem;
}

.book-page__price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2a6b4a;
    margin-bottom: 0.5rem;
}

.book-page__language {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1.2rem;
}

.book-page__description {
    max-width: 700px;
    margin-bottom: 2.5rem;
}

.book-page__description h2 {
    font-size: 1.5rem;
    margin: 1.5rem 0 0.8rem;
}

.book-page__description h3 {
    font-size: 1.2rem;
    margin: 1.2rem 0 0.6rem;
}

.book-page__description p {
    margin-bottom: 0.8rem;
}

.book-page__description ul,
.book-page__description ol {
    margin: 0.5rem 0 1rem 1.5rem;
}

.book-page__description li {
    margin-bottom: 0.3rem;
}

.book-page__description blockquote {
    border-left: 3px solid #2a6b4a;
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    color: #555;
    font-style: italic;
    background: #f0ede8;
    border-radius: 0 4px 4px 0;
}

.book-page__back {
    margin-top: 2rem;
    font-size: 0.95rem;
}

/* ─── Download Section ──────────────────────────────────── */

.download-section {
    background: #fff;
    border: 1px solid #e0ddd5;
    border-radius: 8px;
    padding: 2rem;
    max-width: 500px;
    margin: 2rem 0;
}

.download-section h2 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.download-section p {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.price-note {
    color: #888;
    font-size: 0.85rem !important;
}

/* ─── Forms ─────────────────────────────────────────────── */

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.form-group input[type="email"],
.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2a6b4a;
    box-shadow: 0 0 0 2px rgba(42, 107, 74, 0.15);
}

.form-group--checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-weight: 400;
    font-size: 0.88rem;
    line-height: 1.4;
    cursor: pointer;
}

.form-group--checkbox input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

/* ─── Buttons ───────────────────────────────────────────── */

.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    text-align: center;
}

.btn:hover {
    text-decoration: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn--primary {
    background: #2a6b4a;
    color: #fff;
}

.btn--primary:hover {
    background: #1d4e35;
    color: #fff;
}

.btn--large {
    padding: 0.9rem 2rem;
    font-size: 1.1rem;
}

/* ─── Messages ──────────────────────────────────────────── */

.message-box {
    max-width: 600px;
    margin: 3rem auto;
    padding: 2rem;
    text-align: center;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.message-box h1 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.message-box p {
    margin-bottom: 0.8rem;
    color: #555;
}

.message-box .email-highlight {
    font-weight: 700;
    color: #2a2a2a;
}

.error-box {
    max-width: 500px;
    margin: 4rem auto;
    padding: 2rem;
    text-align: center;
}

.error-box h1 {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 0.5rem;
}

.error-box p {
    color: #666;
    margin-bottom: 0.8rem;
}

/* ─── Privacy Page ──────────────────────────────────────── */

.privacy-page {
    max-width: 700px;
    margin: 2rem auto 3rem;
    padding: 0 1.5rem;
}

.privacy-page h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.privacy-page h2 {
    font-size: 1.3rem;
    margin: 1.5rem 0 0.5rem;
}

.privacy-page p,
.privacy-page li {
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
    color: #444;
}

.privacy-page ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

/* ─── Footer ────────────────────────────────────────────── */

.site-footer {
    background: #2a2a2a;
    color: #999;
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.85rem;
    margin-top: 2rem;
}

.site-footer p {
    margin-bottom: 0.3rem;
}

.site-footer a {
    color: #bbb;
}

.site-footer a:hover {
    color: #fff;
}

/* ─── Empty State ───────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: #999;
    font-style: italic;
    font-size: 1.1rem;
}

/* ─── Responsive ────────────────────────────────────────── */

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.7rem;
    }

    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .book-page__layout {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .book-page__cover-img {
        max-width: 250px;
        margin: 0 auto;
    }

    .book-page__title {
        font-size: 1.6rem;
    }

    .download-section {
        padding: 1.5rem;
    }

    .site-header .container {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .book-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .book-card__body {
        padding: 0.7rem;
    }

    .book-card__title {
        font-size: 0.9rem;
    }

    .book-card__snippet {
        font-size: 0.8rem;
    }
}
