:root {
    --bg: #f7f4ee;
    --surface: #ffffff;
    --surface-soft: #f2ede3;
    --text: #1d1d1d;
    --muted: #666666;
    --primary: #7b5b36;
    --primary-dark: #5e4324;
    --border: #e5ddd0;
    --shadow: 0 10px 30px rgba(34, 34, 34, 0.08);
    --radius: 20px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(180deg, #fbf9f4 0%, #f4efe6 100%);
    color: var(--text);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
}

.section {
    padding: 88px 0;
}

.section-lite {
    padding: 72px 0 56px;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 14px;
}

.big-title {
    font-size: clamp(2rem, 4vw, 3.1rem);
}

.section-subtitle,
.lead-text {
    color: var(--muted);
    max-width: 760px;
    margin-bottom: 24px;
}

.alt-bg {
    background: rgba(255,255,255,0.35);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(251, 249, 244, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(123, 91, 54, 0.08);
}

.nav {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, #b28a58 100%);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    box-shadow: var(--shadow);
}

.brand-text h1 {
    font-size: 1rem;
    line-height: 1.2;
}

.brand-text p {
    color: var(--muted);
    font-size: 0.85rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-links a {
    color: #43382d;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-toggle {
    display: none;
    border: 0;
    background: var(--surface);
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 24px rgba(123, 91, 54, 0.24);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

.btn-light {
    background: #fff;
    color: var(--primary-dark);
}

.btn-outline-light {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.35);
}

.hero-grid,
.about-grid,
.contact-grid,
.two-col,
.cta-box {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: center;
}

.hero-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(255,255,255,0.7));
    border: 1px solid rgba(123, 91, 54, 0.10);
    border-radius: 28px;
    padding: 54px;
    box-shadow: var(--shadow);
}

.hero-badge {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 999px;
    background: #efe5d6;
    color: var(--primary-dark);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.hero h2 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 18px;
}

.hero-actions,
.cta-actions {
    margin-top: 28px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-panel {
    background: linear-gradient(180deg, #7b5b36 0%, #5f4425 100%);
    border-radius: 30px;
    padding: 34px;
    color: #fff;
    box-shadow: 0 18px 50px rgba(69, 45, 19, 0.28);
}

.hero-panel-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    padding: 22px;
    margin-top: 18px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.card,
.soft-card,
.login-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.soft-card {
    background: var(--surface-soft);
}

.soft-card ul {
    padding-left: 22px;
}

.soft-card li + li {
    margin-top: 8px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.step {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 24px 20px;
    box-shadow: var(--shadow);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 18px 40px rgba(34,34,34,0.12);
    border-color: rgba(123, 91, 54, 0.24);
}

.step-number {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #efe5d6;
    color: var(--primary-dark);
    display: grid;
    place-items: center;
    font-weight: 800;
    margin-bottom: 16px;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.book-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(34,34,34,0.12);
}

.book-cover {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #ede8de;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-body {
    padding: 22px;
}

.tag {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f1eadf;
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.book-meta {
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 10px;
}

.cta-box {
    background: linear-gradient(135deg, #7a5a35 0%, #9a7341 100%);
    color: #fff;
    border-radius: 30px;
    padding: 42px;
    box-shadow: 0 20px 45px rgba(88,58,26,0.28);
}

.contact-grid.enhanced-contact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.contact-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
}

.contact-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #efe5d6;
    color: var(--primary-dark);
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    font-weight: 800;
}

.map-frame {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid var(--border);
}

.operator-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    align-items: center;
}

.operator-photo img {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 22px;
    border: 1px solid var(--border);
}

.full-span {
    grid-column: 1 / -1;
}

.logo-card {
    background: var(--surface);
    border-radius: 28px;
    padding: 30px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 340px;
}

.logo-card img {
    max-height: 260px;
    object-fit: contain;
}

.mini-form {
    display: grid;
    gap: 14px;
}

.mini-form input,
.mini-form textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #fff;
    outline: none;
    font: inherit;
}

.mini-form input:focus,
.mini-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(123, 91, 54, 0.08);
}

.login-wrap {
    display: flex;
    justify-content: center;
}

.login-card {
    width: min(100%, 520px);
}

.footer {
    padding: 28px 0 36px;
    color: var(--muted);
}

.footer-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1080px) {
    .hero-grid,
    .cta-box,
    .about-grid,
    .contact-grid,
    .two-col {
        grid-template-columns: 1fr;
    }

    .steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-3,
    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 840px) {
    .menu-toggle {
        display: inline-flex;
    }

    .nav-links,
    .nav-actions .desktop-only {
        display: none;
    }

    .nav-links.mobile-open {
        display: flex;
    position: absolute;
        top: 78px;
        left: 16px;
        right: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        background: rgba(255,255,255,0.98);
        padding: 20px;
        border-radius: 20px;
        border: 1px solid var(--border);
        box-shadow: var(--shadow);
    }

    .hero-card,
    .hero-panel,
    .cta-box {
        padding: 28px;
    }

    .section {
        padding: 72px 0;
    }

    .operator-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .grid-3,
    .catalog-grid,
    .steps,
    .contact-grid.enhanced-contact {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .cta-actions,
    .footer-wrap {
        flex-direction: column;
        align-items: flex-start;
    }
}

.access-badge {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
}

.access-open {
    background: #dff5e7;
    color: #1c7c45;
}

.access-closed {
    background: #f1e4d8;
    color: #8a4b20;
}

.book-detail-cover img {
    width: 100%;
    max-width: 420px;
    border-radius: 24px;
    box-shadow: 0 18px 40px rgba(34, 34, 34, 0.12);
    border: 1px solid var(--border);
}

.pdf-frame {
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    background: #fff;
}