:root {
    --bg-main: #fdfbf7;
    --bg-secondary: #f4efe6;
    --text-main: #2c2420;
    --text-muted: #6b5d52;
    --accent: #d97706;
    --accent-light: #fef3c7;
    --primary-btn: #c2410c;
    --border: #e5d5c5;
    
    --font-main: 'Inter', sans-serif;
    --font-serif: 'Merriweather', serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
}

body.modal-open { overflow: hidden; }

a { text-decoration: none; color: inherit; }

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HERO SECTION --- */
.hero {
    padding: 80px 0 100px;
    background: radial-gradient(circle at 80% 20%, #fff7ed 0%, #fdfbf7 70%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.05) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(500px, 1fr) auto;
    gap: 40px;
    align-items: center;
}

.tag-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-light);
    color: #92400e;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

h1 {
    font-family: var(--font-serif);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.2;
    margin: 0 0 24px 0;
    color: #431407;
}

h1 span {
    color: var(--primary-btn);
    font-style: italic;
    position: relative;
    display: inline-block;
}

h1 span::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 12px;
    background: #ffedd5;
    z-index: -1;
    transform: rotate(-1deg);
    border-radius: 4px;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 36px;
    max-width: 600px;
}

.quote-hero {
    border-left: 4px solid var(--accent);
    padding-left: 20px;
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 30px;
    font-family: var(--font-serif);
    font-size: 16px;
    background: rgba(255,255,255,0.5);
    padding: 15px 15px 15px 20px;
    border-radius: 0 8px 8px 0;
}

.buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.book-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin: 20px 0;
    perspective: 1000px; 
}

.book-glow { display: none; }

.book-3d {
    position: relative;
    width: 580px; 
    height: auto;
    background: transparent;
    border: none;
    transform-style: preserve-3d;
    transform: rotateY(-10deg) rotateX(5deg);
    animation: magicFloat 6s ease-in-out infinite;
}

.book-3d::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(
        105deg, 
        transparent 20%, 
        rgba(255, 255, 255, 0.4) 40%, 
        transparent 60%
    );
    
    z-index: 10;
    pointer-events: none;
    filter: blur(5px);
    animation: shineEffect 5s infinite;
    background-size: 200% auto;
}

.book-3d:hover {
    transform: translateY(-10px) rotate(2deg) scale(1.02);
}

.book-3d::before { display: none; }

.book-cover-img {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 38px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-btn);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(194, 65, 12, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: #ea580c;
    box-shadow: 0 6px 20px rgba(194, 65, 12, 0.3);
}

.btn-secondary {
    background: #fff;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    background: #fafaf9;
}

/* --- HOOKS GRID --- */
.hooks-section {
    padding: 80px 0;
    background: var(--bg-secondary);
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
}

.grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 100%;
    margin: 0 auto;
}

.hook-card {
    background: #fff;
    padding: 30px 28px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0,0,0,0.02);
    transition: transform 0.3s;
    height: 100%;
    position: relative;
}

.hook-card::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 15px;
    background: rgba(255,255,255,0.4);
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transform: translateX(-50%) rotate(-2deg);
}

.hook-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.hook-icon-box {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--primary-btn);
}

.hook-title {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #431407;
}

.hook-desc {
    color: var(--text-muted);
    font-size: 14px;
}

/* --- CHARACTERS --- */
.characters-section { padding: 100px 0; }
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.section-title {
    text-align: center;
    font-family: var(--font-serif);
    font-size: 28px;
    margin-bottom: 60px;
    color: #431407;
}

.section-title span {
    color: var(--primary-btn);
    background-image: linear-gradient(120deg, #ffedd5 0%, #ffedd5 100%);
    background-repeat: no-repeat;
    background-size: 100% 0.3em;
    background-position: 0 88%;
}

.char-card {
    display: flex;
    gap: 24px;
    background: #fff;
    border: 1px solid var(--border);
    padding: 30px;
    border-radius: 16px;
    transition: 0.3s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.char-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.char-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    background: #fff7ed;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    border: 1px solid #ffedd5;
    color: var(--primary-btn);
}

.char-content h3 {
    margin: 0 0 10px 0;
    font-family: var(--font-serif);
    font-size: 18px;
    color: #431407;
}

/* --- GALLERY --- */
.gallery-section {
    padding: 80px 0;
    background-color: #e5e5e5;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%239C92AC' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    overflow: hidden;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 40px;
    padding: 20px;
}

.gallery-item {
    position: relative;
    background: #fff;
    padding: 12px 12px 50px 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-item:nth-child(odd) { transform: rotate(2deg); }
.gallery-item:nth-child(even) { transform: rotate(-2deg); }
.gallery-item:nth-child(3n) { transform: rotate(1deg); }

.gallery-item:hover {
    transform: scale(1.05) rotate(0deg) !important;
    z-index: 10;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.gallery-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: #f0f0f0;
    filter: sepia(30%);
}

.gallery-caption {
    position: absolute;
    bottom: 15px;
    left: 0;
    width: 100%;
    text-align: center;
    font-family: 'Nothing You Could Do', cursive, var(--font-serif);
    color: #444;
    font-size: 14px;
}

/* --- REALITY CHECK --- */
.reality-check {
    background: #fff;
    padding: 100px 0;
    border-top: 1px solid var(--border);
}

.reality-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.highlight-text {
    font-size: 18px;
    font-weight: 300;
    color: var(--text-main);
    margin-bottom: 30px;
    font-family: var(--font-serif);
}

.highlight-text b {
    font-weight: 700;
    color: var(--primary-btn);
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.stat-box {
    text-align: left;
    background: #fdfbf7;
    padding: 20px;
    border-radius: 12px;
    border: 1px dashed var(--border);
}

.stat-num { font-size: 28px; font-weight: 800; color: #431407; display: block; }

.excerpt-box {
    background: #fdfbf7;
    padding: 40px;
    border-radius: 2px;
    border-left: 4px solid var(--accent);
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    font-family: var(--font-serif);
    font-size: 16px;
    font-style: italic;
    color: #555;
    position: relative;
}

.excerpt-box::before {
    content: '“';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 80px;
    color: rgba(217, 119, 6, 0.1);
    font-family: serif;
}

/* --- AUTHOR & REVIEWS --- */
.author-section { padding: 80px 0; background: #f8f5f2; }
.author-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.author-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #fff;
    box-shadow: 0 0 0 1px var(--border);
    flex-shrink: 0;
}
.social-link {
    color: var(--primary-btn);
    font-weight: 600;
    border-bottom: 1px solid rgba(194, 65, 12, 0.2);
}

.review-card {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.review-quote { color: var(--text-main); }

/* --- CTA --- */
.cta-box {
    background: #fff7ed;
    border: 2px dashed #fed7aa;
    border-radius: 24px;
    padding: 80px 20px;
    text-align: center;
    position: relative;
    color: var(--text-main);
}
.cta-box::before { display: none; }
.price { font-size: 36px; font-weight: 800; color: #431407; margin: 30px 0; }
.price s { color: #a8a29e; }

/* --- MODAL --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 253, 245, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: #fff;
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(67, 20, 7, 0.15);
}
.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fffbf7;
    border-radius: 12px 12px 0 0;
}
.modal-header h3 { margin: 0; font-size: 16px; color: var(--primary-btn); font-family: var(--font-serif); }
.close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
}
.modal-body {
    padding: 40px;
    overflow-y: auto;
    font-family: var(--font-serif);
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    background-color: #fff;
}
.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border);
    background: #fffbf7;
    border-radius: 0 0 12px 12px;
    text-align: center;
}

@keyframes magicFloat {
    0%, 100% {
        transform: translateY(0) rotateY(-10deg) rotateX(5deg);
    }
    50% {
        transform: translateY(-20px) rotateY(-5deg) rotateX(0deg);
    }
}

@keyframes shineEffect {
    0% { background-position: 200% center; opacity: 0; }
    20% { opacity: 0; }
    50% { opacity: 1; }
    80% { opacity: 0; }
    100% { background-position: -200% center; opacity: 0; }
}

/* --- MOBILE ADJUSTMENTS --- */
@media (max-width: 950px) {
    .hero {
        padding: 40px 0 60px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-content > div:first-child { order: 1; }
    .hero-content > div:last-child { order: 0; }
    .book-3d {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        animation: magicFloat 6s ease-in-out infinite; 
    }

    .buttons { justify-content: center; }
    .book-container { margin-bottom: 20px; }
    
    .reality-grid { grid-template-columns: 1fr; }
    .btn { width: 100%; margin: 0 0 10px 0; }
    
    .char-card { flex-direction: column; text-align: center; }
    .char-icon { margin: 0 auto 15px; }
    
    .grid-2, .grid-2x2 { grid-template-columns: 1fr; }
    .author-card { flex-direction: column;}
    .author-img { margin-bottom: 10px; }
}

.reviews-section {
    padding: 80px 0;
    /* Добавляем фон, чтобы отделить от следующей секции */
    background-color: #f8f5f2; 
}

.carousel-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 5px;
    flex: 1;
    min-width: 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.review-slide {
    flex: 0 0 auto;
    width: 300px;
    transition: transform 0.3s ease;
}

.review-slide:hover {
    transform: scale(1.02);
}

.review-slide img {
    width: 100%;
    height: 500px;
    object-fit: contain;
    object-position: center;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    display: block;
    background: #fff; 
}

.review-name {
    text-align: center;
    margin-top: 15px;
    font-weight: 600;
    color: var(--text-main);
    font-size: 16px;
    font-family: var(--font-serif);
}

.review-slide {
    height: auto;
    padding-bottom: 10px;
}

.carousel-btn {
    background: #fff;
    border: 1px solid var(--border);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: var(--primary-btn);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all 0.2s;
    flex-shrink: 0;
    z-index: 2;
}

.carousel-btn:hover {
    background: var(--primary-btn);
    color: #fff;
    border-color: var(--primary-btn);
}

@media (max-width: 600px) {
    .carousel-btn { display: none; }
    .review-slide { width: 260px; }
    .review-slide img { height: 400px; }
}

.cta-section {
    background-color: #ffffff; /* Белый фон вокруг цветной коробки */
    padding: 80px 0; /* Отступы сверху и снизу */
}