/* ================= ПЕРЕМЕННЫЕ И БАЗА ================= */
:root {
    --graphite: #202124;
    --coal: #0D0D0F;
    --gold: #B49A62;
    --text-light: #E5E1D8;
    --text-muted: #9A958A;
    
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Inter', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    background-color: var(--coal);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    color: var(--text-light);
    font-family: var(--font-sans);
    line-height: 1.6;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--gold); text-decoration: none; transition: color 0.3s; }
a:hover, a:focus { color: var(--text-light); outline: none; }

/* ФАВИКОН (принудительно круглая иконка, если картинка квадратная) */
link[rel="icon"] {
    border-radius: 50% !important;
}

/* ================= ТИПОГРАФИКА ================= */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.2rem; color: var(--gold); }
h3 { font-size: 1.5rem; }

p { margin-bottom: 1.2rem; }
p:last-child { margin-bottom: 0; }

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

section { padding: 5rem 0; }

/* ================= КНОПКИ ================= */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border: 1px solid var(--gold);
    background-color: var(--gold);
    color: var(--coal);
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    background-color: transparent;
    color: var(--gold);
}

.btn-outline {
    background-color: transparent;
    color: var(--gold);
}

.btn-outline:hover {
    background-color: var(--gold);
    color: var(--coal);
}

.store-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.store-group { flex: 1; min-width: 250px; }

.store-group h3 {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-sans);
    font-weight: 400;
}

.btn-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.btn-list .btn {
    width: 100%;
    padding: 0.8rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px;
}

.badge-free {
    font-size: 0.7rem;
    opacity: 0.8;
    text-transform: lowercase;
    font-style: italic;
}

/* ================= ШАПКА И МЕНЮ ================= */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    background-color: rgba(13, 13, 15, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(180, 154, 98, 0.2);
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--text-light);
    font-weight: 600;
    letter-spacing: 0.1em;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.main-nav a.active, .main-nav a:hover { color: var(--gold); }

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0; right: 0;
    height: 1px;
    background-color: var(--gold);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
}
.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-light);
    transition: 0.3s;
}

/* ================= ПЕРВЫЙ ЭКРАН ================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 70px;
    background: radial-gradient(circle at center, var(--graphite) 0%, var(--coal) 70%);
}

.hero-inner {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-text { flex: 1; }
.hero-text h1 { margin-bottom: 1rem; color: var(--text-light); }
.slogan {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--gold);
}

.hero-image { flex: 1; display: flex; justify-content: center; }

/* ================= КАРТИНКИ ================= */
.portrait-img {
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    object-fit: cover;
}

.cover-img {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    margin-bottom: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover .cover-img {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(180, 154, 98, 0.2);
}

.book-cover-wrapper {
    flex-shrink: 0;
    width: 300px;
    max-width: 100%;
}

/* ================= СЕТКА КНИГ ================= */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.book-card {
    display: flex;
    flex-direction: column;
    color: var(--text-light);
}
.book-card:hover h3 { color: var(--gold); }

.book-card h3 { margin-bottom: 0.2rem; transition: color 0.3s; }
.book-year { color: var(--text-muted); font-size: 0.9rem; }

.section-link { margin-top: 2rem; text-align: center; }

/* ================= ПРОЕКТ И БЛОКИ ================= */
.project-card {
    background-color: var(--graphite);
    padding: 2rem;
    border-left: 3px solid var(--gold);
    margin-top: 1.5rem;
}

.status-badge {
    display: inline-block;
    background-color: rgba(180, 154, 98, 0.15);
    color: var(--gold);
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    border-radius: 3px;
}

/* ================= ПОДВАЛ ================= */
.site-footer {
    background-color: var(--graphite);
    padding: 3rem 0;
    border-top: 1px solid rgba(180, 154, 98, 0.2);
    text-align: center;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-nav, .footer-contacts {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-nav a, .footer-contacts a {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.footer-nav a:hover, .footer-contacts a:hover { color: var(--gold); }

/* СТИЛИ ДЛЯ ТЕКСТА ВНИЗУ (КОПИРАЙТ И МЕТРИКА) */
.copyright, .metrika-notice {
    color: var(--text-muted) !important;
    font-size: 0.75rem !important;
    opacity: 0.7;
    margin-top: 0.5rem;
    font-family: var(--font-sans);
    font-weight: 300;
    display: block;
}

/* ================= КНОПКА ДОНАТА ================= */
.footer-support-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gold);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid rgba(180, 154, 98, 0.3);
    border-radius: 3px;
    transition: all 0.3s ease;
}
.footer-support-link:hover {
    background-color: rgba(180, 154, 98, 0.1);
    border-color: var(--gold);
    color: var(--text-light);
}

/* ================= КАРТОЧКА ДОНАТА ================= */
.support-card {
    background: var(--graphite);
    border: 1px solid rgba(180, 154, 98, 0.2);
    border-radius: 8px;
    padding: 2rem;
    margin-top: 3rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.support-card h3 { color: var(--gold); font-family: var(--font-serif); font-size: 1.6rem; margin-bottom: 0.8rem; }
.support-card p { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.95rem; line-height: 1.6; max-width: 500px; margin-left: auto; margin-right: auto; }

/* ================= ВИДЕОПРОМО ================= */
.video-promo-container {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(180, 154, 98, 0.2);
}

.video-promo-container h2 { margin-bottom: 1.5rem; }

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    background-color: #000;
}

.video-wrapper video {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.play-button {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: rgba(180, 154, 98, 0.2);
    border: 2px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    z-index: 10;
}

.play-button:hover {
    background-color: var(--gold);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-button svg {
    width: 40px;
    height: 40px;
    color: var(--text-light);
    margin-left: 5px;
    transition: color 0.3s ease;
}

.play-button:hover svg { color: var(--coal); }

.video-caption {
    text-align: center;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--text-light);
    margin-top: 1rem;
    font-style: italic;
}

.video-music {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* ================= БЛОК БЕСПЛАТНОГО ФРАГМЕНТА ================= */
.fragment-banner {
    background: linear-gradient(145deg, var(--graphite) 0%, var(--coal) 100%);
    border: 1px solid rgba(180, 154, 98, 0.2);
    border-radius: 8px;
    padding: 1.5rem 2rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.fragment-banner h3 {
    color: var(--gold);
    font-family: var(--font-serif);
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
}

.fragment-banner p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ================= АДАПТИВНОСТЬ ================= */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.8rem; }
    section { padding: 3rem 0; }
    
    .menu-toggle { display: flex; }
    
    .main-nav {
        position: fixed;
        top: 70px; left: 0; right: 0;
        background-color: var(--coal);
        padding: 2rem;
        border-bottom: 1px solid rgba(180, 154, 98, 0.2);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }
    
    .main-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .hero-inner {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .portrait-placeholder { width: 250px; height: 320px; }
    .video-wrapper { max-width: 100%; border-radius: 0; }
    .play-button { width: 60px; height: 60px; }
    .play-button svg { width: 30px; height: 30px; }
    .store-groups { flex-direction: column; gap: 1.5rem; }
    
    .fragment-banner {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
}

/* ================= ДОСТУПНОСТЬ ================= */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}