:root {
    --bg: #110904;
    --panel: rgba(28, 16, 8, 0.90);
    --panel-strong: rgba(18, 10, 5, 0.97);
    --paper: #f4e5ca;
    --muted: #cbb89b;
    --accent: #a75b18;
    --accent-light: #e1ad62;
    --line: rgba(222, 173, 105, 0.19);
    --shadow: rgba(0, 0, 0, 0.65);
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    background:
        radial-gradient(circle at 50% 0%, rgba(164, 91, 24, 0.36), transparent 36%),
        linear-gradient(180deg, #1c1008 0%, #100904 44%, #070402 100%);
    color: var(--paper);
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.65;
}

a {
    color: inherit;
}

.book-hero {
    position: relative;
    min-height: 100svh;
    padding: 28px clamp(18px, 4vw, 64px) 80px;
    overflow: hidden;
    background:
        linear-gradient(
            90deg,
            rgba(2, 3, 4, 0.98) 0%,
            rgba(4, 5, 6, 0.88) 48%,
            rgba(4, 5, 6, 0.76) 100%
        );
}

.book-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(1, 2, 3, 0.28), rgba(1, 2, 3, 0.84)),
        url("okladka.png") center 42% / cover no-repeat;
    filter: blur(16px) brightness(0.38);
    transform: scale(1.07);
    opacity: 0.64;
}

.book-hero > * {
    position: relative;
    z-index: 1;
}

.top-nav {
    width: min(1260px, 100%);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.top-nav a {
    color: #ddd3c6;
    text-decoration: none;
}

.top-nav a:hover {
    color: #ffffff;
}

.top-nav span {
    color: #b6aca0;
}

.hero-layout {
    width: min(1180px, 100%);
    margin: 54px auto 0;
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    gap: clamp(42px, 7vw, 100px);
    align-items: center;
}

.cover-wrap {
    position: relative;
}

.cover-wrap::after {
    content: "";
    position: absolute;
    inset: 8% -8% -5% 12%;
    background: rgba(176, 91, 20, 0.36);
    filter: blur(42px);
    z-index: -1;
}

.cover-wrap img {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    box-shadow: 0 28px 70px var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.eyebrow,
.section-kicker {
    color: var(--accent-light);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 0.78rem;
    font-weight: 700;
}

.hero-copy h1 {
    margin-top: 14px;
    font-family: Impact, "Arial Narrow", sans-serif;
    font-size: clamp(3.2rem, 8vw, 7.2rem);
    line-height: 0.9;
    letter-spacing: 0.015em;
    text-transform: uppercase;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
}

.subtitle {
    margin-top: 18px;
    color: var(--accent-light);
    font-size: clamp(1.05rem, 2.4vw, 1.7rem);
    letter-spacing: 0.06em;
    line-height: 1.35;
}

.lead {
    max-width: 720px;
    margin-top: 28px;
    color: #d3cbc0;
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    line-height: 1.85;
}

.book-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 34px;
}

.book-meta div {
    padding: 16px 18px;
    border: 1px solid var(--line);
    background: rgba(3, 6, 8, 0.5);
}

.book-meta dt {
    color: #8f8880;
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.book-meta dd {
    margin-top: 4px;
    color: #f4eee6;
    font-size: 1rem;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 34px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    border: 1px solid var(--accent);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.74rem;
    font-weight: 700;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.primary {
    background: var(--accent);
    color: #ffffff;
}

.primary:hover {
    background: var(--accent-light);
    color: #111111;
}

.secondary {
    background: rgba(0, 0, 0, 0.2);
    color: #eeeeee;
}

.secondary:hover {
    background: rgba(167, 91, 24, 0.18);
}

main {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: 30px 0 100px;
}

.content-section {
    padding: 70px 0;
    border-bottom: 1px solid var(--line);
}

.content-section h2 {
    margin-top: 8px;
    font-family: Impact, "Arial Narrow", sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.text-panel {
    max-width: 920px;
    margin-top: 30px;
    padding: 34px;
    border-left: 3px solid var(--accent);
    background:
        linear-gradient(90deg, rgba(167, 91, 24, 0.12), transparent),
        var(--panel);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.text-panel p {
    color: #d5cec4;
    font-size: 1.05rem;
}

.text-panel p + p {
    margin-top: 20px;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 30px;
}

.info-card {
    position: relative;
    padding: 28px;
    background: var(--panel);
    border: 1px solid var(--line);
    overflow: hidden;
}

.info-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
}

.card-code {
    color: var(--accent-light);
    font-size: 0.7rem;
    letter-spacing: 0.24em;
}

.info-card h3 {
    margin-top: 8px;
    font-size: 1.45rem;
    font-weight: 400;
}

.info-card p {
    margin-top: 12px;
    color: var(--muted);
}

.chapter-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin-top: 30px;
    list-style: none;
    background: var(--line);
    border: 1px solid var(--line);
}

.chapter-list li {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    background: var(--panel-strong);
    color: #ddd6cc;
}

.chapter-list span {
    color: var(--accent-light);
    font-family: Arial, sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
}

.reader-section {
    border-bottom: 0;
}

.reader-frame {
    height: min(88svh, 980px);
    min-height: 650px;
    margin-top: 30px;
    padding: 12px;
    background: #020304;
    border: 1px solid rgba(196, 123, 47, 0.68);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}

.reader-frame iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    background: #ffffff;
}

.reader-fallback {
    margin-top: 18px;
    color: #aaa29a;
    font-size: 0.9rem;
}

.reader-fallback a {
    color: var(--accent-light);
}

.page-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 28px clamp(18px, 4vw, 64px);
    border-top: 1px solid var(--line);
    background: #080402;
    color: #918b84;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
}

.page-footer a {
    color: #c6bdb2;
    text-decoration: none;
}

.page-footer span {
    margin: 0 8px;
    color: var(--accent-light);
}

@media (max-width: 860px) {
    .hero-layout {
        grid-template-columns: 1fr;
    }

    .cover-wrap {
        width: min(420px, 88vw);
        margin: 0 auto;
    }

    .hero-copy {
        text-align: center;
    }

    .lead {
        margin-left: auto;
        margin-right: auto;
    }

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

    .hero-actions {
        justify-content: center;
    }

    .character-grid,
    .chapter-list {
        grid-template-columns: 1fr;
    }

    .reader-frame {
        min-height: 560px;
    }

    .page-footer {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 560px) {
    .book-hero {
        padding-left: 14px;
        padding-right: 14px;
    }

    .top-nav span {
        display: none;
    }

    .hero-layout {
        margin-top: 34px;
        gap: 36px;
    }

    .hero-copy h1 {
        font-size: 3.2rem;
    }

    .content-section {
        padding: 52px 0;
    }

    .text-panel {
        padding: 24px 20px;
    }

    .info-card {
        padding: 24px 20px;
    }

    .reader-frame {
        height: 72svh;
        min-height: 500px;
        padding: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .button {
        transition: none;
    }
}
