:root {
    --bg: #0c0d0f;
    --bg-dark: #08090a;
    --bg-light: #16181b;
    --panel: rgba(20, 22, 25, 0.92);
    --text: #e8e6e1;
    --muted: #9a9b98;
    --dim: #6b6c69;
    --line: rgba(185, 186, 180, 0.12);
    --line-strong: rgba(185, 186, 180, 0.24);
    --accent: #b8b9b4;
    --accent-bright: #d4d5d0;
    --accent-dark: #7a7b76;
    --pink: #e07a9b;
    --pink-bright: #f09bb5;
    --pink-dark: #c45a7a;
    --success: #6ba87a;
    --danger: #c45c5c;
    --shadow: 0 25px 70px rgba(0, 0, 0, 0.55);
    --radius: 18px;
    --radius-small: 10px;
    --max-width: 1180px;
    --font-main: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: Georgia, "Times New Roman", serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 12%, rgba(224, 122, 155, 0.035), transparent 32%),
        radial-gradient(circle at 88% 78%, rgba(90, 100, 120, 0.03), transparent 35%),
        linear-gradient(145deg, #0c0d0f 0%, #08090a 45%, #111214 100%);
    color: var(--text);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.background-effects {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.background-effects::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(184, 185, 180, 0.015) 45%, transparent 70%);
}

.fingerprint {
    position: absolute;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    opacity: 0.07;
    transform: rotate(-18deg);
    background: repeating-radial-gradient(ellipse at center, transparent 0, transparent 9px, rgba(200, 200, 195, 0.75) 10px, transparent 12px);
}

.fingerprint-one {
    top: 3%;
    right: -200px;
}

.fingerprint-two {
    bottom: -180px;
    left: -190px;
    transform: rotate(28deg);
    opacity: 0.055;
}

.dust {
    position: absolute;
    border-radius: 50%;
    background: rgba(200, 200, 195, 0.35);
    filter: blur(1px);
}

.dust-one {
    width: 3px;
    height: 3px;
    left: 18%;
    top: 24%;
}

.dust-two {
    width: 2px;
    height: 2px;
    right: 25%;
    top: 48%;
}

.dust-three {
    width: 4px;
    height: 4px;
    left: 65%;
    bottom: 15%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    background: rgba(8, 9, 10, 0.92);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(calc(100% - 32px), var(--max-width));
    min-height: 76px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand-magnifier {
    position: relative;
    width: 78px;
    height: 42px;
    flex: 0 0 78px;
}

.brand-glass {
    position: absolute;
    left: 0;
    top: 0;
    width: 42px;
    height: 42px;
    border: 3px solid var(--accent-bright);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        repeating-radial-gradient(
            ellipse at center,
            transparent 0,
            transparent 4px,
            rgba(200, 200, 195, 0.22) 5px,
            transparent 6.5px
        ),
        rgba(12, 13, 15, 0.9);
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.55), 0 0 10px rgba(184, 185, 180, 0.08);
    overflow: hidden;
}

.brand-team {
    position: relative;
    z-index: 2;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--pink);
    line-height: 1;
}

.brand-handle {
    position: absolute;
    width: 42px;
    height: 6px;
    left: 39px;
    top: 18px;
    border-radius: 4px;
    background: linear-gradient(90deg, #6e6f6b, #b8b9b4 40%, #9a9b96);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-name {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--accent-bright);
}

.brand-tagline {
    display: none;
    color: var(--muted);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
}

.menu-toggle {
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: transparent;
    color: var(--text);
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 99px;
}

.main-nav {
    position: absolute;
    top: 76px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    padding: 12px;
    background: rgba(12, 13, 15, 0.98);
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    box-shadow: var(--shadow);
}

.main-nav.open {
    display: flex;
}

.main-nav a {
    padding: 12px;
    border-radius: 8px;
    color: var(--muted);
    text-align: left;
    background: transparent;
    border: 0;
}

.main-nav a:hover {
    color: var(--text);
    background: rgba(224, 122, 155, 0.08);
}

.hero {
    width: min(calc(100% - 32px), var(--max-width));
    margin: auto;
    display: block;
    padding: 40px 0 20px;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pink);
    box-shadow: 0 0 14px rgba(224, 122, 155, 0.6);
}

.hero h1 {
    max-width: none;
    width: 100%;
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 14vw, 6.7rem);
    font-weight: 400;
    line-height: 0.92;
    letter-spacing: -0.055em;
}

.hero h1 span {
    display: block;
    color: var(--accent);
    font-style: italic;
}

.hero-description {
    max-width: none;
    width: 100%;
    margin-top: 22px;
    color: var(--muted);
    font-size: 1rem;
}

.hero-description strong {
    color: var(--text);
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.button {
    min-height: 48px;
    padding: 12px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 9px;
    font-size: 0.9rem;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.button-primary {
    background: linear-gradient(135deg, var(--pink-bright) 0%, var(--pink) 100%);
    color: #0c0d0f;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 22px rgba(224, 122, 155, 0.3);
}

.button-primary:hover {
    background: linear-gradient(135deg, #f5aec4 0%, var(--pink-bright) 100%);
    box-shadow: 0 6px 28px rgba(224, 122, 155, 0.4);
}

.button-secondary {
    border: 1px solid var(--line-strong);
    color: var(--text);
    background: rgba(184, 185, 180, 0.04);
}

.button-secondary:hover {
    background: rgba(224, 122, 155, 0.08);
    border-color: var(--pink);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo {
    width: min(100%, 380px);
    height: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.5));
}

.section {
    width: min(calc(100% - 32px), var(--max-width));
    margin: 0 auto;
    padding: 36px 0;
    scroll-margin-top: 90px;
}

.section-heading {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 28px;
}

.section-heading.centered {
    text-align: center;
    align-items: center;
}

.section-heading h2 {
    font-family: var(--font-display);
    font-size: clamp(2.3rem, 8vw, 4rem);
    font-weight: 400;
    line-height: 1;
}

.section-heading p {
    max-width: 570px;
    color: var(--muted);
}

.eyebrow {
    color: var(--dim);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.heading-link {
    color: var(--muted);
    font-size: 0.85rem;
}

.heading-link:hover {
    color: var(--pink-bright);
}

.featured-card {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(28, 30, 33, 0.9), rgba(12, 13, 15, 0.95));
    box-shadow: var(--shadow);
}

.featured-cover {
    min-height: 420px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(224, 122, 155, 0.05), transparent 55%);
}

.cover-frame {
    width: min(100%, 270px);
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 1px solid rgba(184, 185, 180, 0.2);
    background: #0a0b0c;
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.55);
}

.cover-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    color: var(--muted);
    background: repeating-linear-gradient(135deg, rgba(184, 185, 180, 0.04) 0, rgba(184, 185, 180, 0.04) 1px, transparent 1px, transparent 9px);
}

.featured-info {
    padding: 32px;
}

.featured-series {
    color: var(--pink);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.featured-info h3 {
    margin-top: 10px;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 8vw, 4.3rem);
    font-weight: 400;
    line-height: 0.95;
}

.featured-status {
    display: inline-flex;
    margin-top: 18px;
    padding: 6px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: rgba(184, 185, 180, 0.04);
}

.featured-description {
    margin-top: 25px;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 1.05rem;
    line-height: 1.75;
}

.featured-quote {
    margin-top: 25px;
    padding-left: 18px;
    border-left: 2px solid var(--pink);
    color: var(--text);
    font-size: 0.8rem;
    font-style: italic;
}

.series-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.series-card {
    position: relative;
    overflow: hidden;
    min-height: 280px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 80% 20%, rgba(224, 122, 155, 0.05), transparent 32%),
        linear-gradient(145deg, rgba(24, 26, 28, 0.9), rgba(10, 11, 12, 0.95));
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.series-card:hover {
    transform: translateY(-5px);
    border-color: var(--line-strong);
}

.series-number {
    position: absolute;
    top: 22px;
    right: 25px;
    color: rgba(184, 185, 180, 0.08);
    font-family: var(--font-display);
    font-size: 5rem;
    line-height: 1;
}

.series-card h3 {
    position: relative;
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 400;
}

.series-card p {
    position: relative;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.85rem;
}

.series-books {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 18px;
}

.series-book-pill {
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.62rem;
    background: rgba(184, 185, 180, 0.03);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.book-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-small);
    background: rgba(184, 185, 180, 0.025);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.book-card:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
}

.book-cover {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0a0b0c;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-info {
    padding: 14px;
}

.book-series {
    color: var(--pink);
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.book-title {
    margin-top: 4px;
    font-family: var(--font-display);
    font-size: 1.25rem;
    line-height: 1.05;
}

.book-status {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.about-card {
    display: grid;
    gap: 30px;
    padding: 35px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgba(24, 26, 28, 0.9), rgba(10, 11, 12, 0.95));
}

.about-mark {
    width: 90px;
    height: 90px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    color: var(--pink);
    background: rgba(224, 122, 155, 0.06);
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.about-content h2 {
    margin-top: 5px;
    font-family: var(--font-display);
    font-size: clamp(2.3rem, 8vw, 4rem);
    font-weight: 400;
}

.about-content p {
    max-width: 700px;
    margin-top: 18px;
    color: var(--muted);
}

.site-footer {
    margin-top: 30px;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.25);
}

.footer-inner {
    width: min(calc(100% - 32px), var(--max-width));
    min-height: 120px;
    margin: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-magnifier {
    width: 70px;
    height: 38px;
    flex: 0 0 70px;
}

.footer-magnifier .brand-glass {
    width: 38px;
    height: 38px;
}

.footer-magnifier .brand-team {
    font-size: 0.52rem;
}

.footer-magnifier .brand-handle {
    width: 36px;
    height: 5px;
    left: 35px;
    top: 16.5px;
}

.footer-brand strong {
    display: block;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    color: var(--accent-bright);
}

.footer-brand span {
    display: block;
    color: var(--dim);
    font-size: 0.62rem;
}

.footer-author {
    color: var(--dim);
    font-size: 0.65rem;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(4, 5, 6, 0.88);
    backdrop-filter: blur(8px);
}

.modal-window {
    position: relative;
    width: min(calc(100% - 28px), 850px);
    max-height: calc(100vh - 40px);
    margin: auto;
    overflow: auto;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: #141618;
    box-shadow: var(--shadow);
}

.modal-close {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: var(--muted);
    font-size: 1.5rem;
    line-height: 1;
}

.modal-window > .modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 3;
}

.modal-book {
    display: grid;
}

.modal-book-cover {
    padding: 35px;
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
}

.modal-book-cover .cover-frame {
    width: min(240px, 100%);
}

.modal-book-info {
    padding: 35px;
}

.modal-book-info h2 {
    margin-top: 8px;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 9vw, 4.3rem);
    font-weight: 400;
    line-height: 0.95;
}

.modal-book-info p {
    margin-top: 25px;
    color: var(--muted);
    font-family: var(--font-display);
    line-height: 1.8;
}

.modal-book-quote {
    margin-top: 25px;
    padding: 20px;
    border-left: 2px solid var(--pink);
    color: var(--muted);
    font-size: 0.85rem;
    font-style: italic;
}

.empty-state {
    padding: 40px 20px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-small);
    color: var(--dim);
    text-align: center;
}

@media (min-width: 650px) {
    .header-inner,
    .hero,
    .section,
    .footer-inner {
        width: min(calc(100% - 48px), var(--max-width));
    }

    .brand-tagline {
        display: block;
    }

    .books-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }

    .series-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-card {
        grid-template-columns: 120px 1fr;
        align-items: start;
        padding: 55px;
    }

    .footer-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

@media (min-width: 900px) {
    .header-inner {
        min-height: 84px;
    }

    .menu-toggle {
        display: none;
    }

    .main-nav {
        position: static;
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .main-nav a {
        padding: 9px 12px;
        text-align: center;
        font-size: 0.75rem;
    }

    .hero {
        width: min(calc(100% - 48px), var(--max-width));
        padding: 70px 0 40px;
    }

    .hero-visual {
        justify-content: flex-end;
    }

    .hero-logo {
        width: min(100%, 400px);
    }

    .section {
        scroll-margin-top: 100px;
    }

    .featured-card {
        grid-template-columns: 0.7fr 1.3fr;
    }

    .featured-cover {
        min-height: 600px;
    }

    .featured-info {
        padding: 65px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .series-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .books-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .modal-book {
        grid-template-columns: 0.75fr 1.25fr;
    }

    .modal-book-cover {
        min-height: 550px;
        align-items: center;
    }
}

@media (min-width: 1200px) {
    .hero h1 {
        font-size: 6.7rem;
    }

    .section {
        padding-top: 42px;
        padding-bottom: 42px;
    }
}

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

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}
