
/* =========================================================
   VAL-U-U — SECURE DIGITAL BOOK PAGES
   Book Details • PDF Reader • Purchased Library
========================================================= */

:root {
    --book-red: #9d2435;
    --book-red-hover: #bd3045;
    --book-gold: #e7bf85;
    --book-white: #ffffff;
    --book-muted: #d5c4c7;
    --book-dark: #130c10;
    --book-surface: #25161d;
    --book-border: #5b3541;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(
            ellipse at 90% 0%,
            #461c2b 0%,
            transparent 45%
        ),
        var(--book-dark);
    color: var(--book-white);
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

/* =========================================================
   PAGE CONTAINER
========================================================= */

.wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 22px 26px 80px;
}

/* =========================================================
   BOOK NAVIGATION
========================================================= */

.wrap nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 0 30px;
    border-bottom: 1px solid var(--book-border);
}

.wrap nav a {
    color: var(--book-gold);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wrap nav a:hover {
    color: var(--book-white);
}

.wrap nav strong {
    font-size: 15px;
    letter-spacing: 0.18em;
}

.wrap nav strong span {
    color: var(--book-gold);
}

/* =========================================================
   BOOK HERO
========================================================= */

.wrap .hero {
    display: grid;
    grid-template-columns: minmax(230px, 390px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(25px, 6vw, 85px);
    padding: 65px 0;
}

/* =========================================================
   BOOK COVER — NO CROPPING
========================================================= */

.wrap .cover {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 22px;
    background: var(--book-surface);
    border: 1px solid var(--book-border);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.wrap .cover img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 610px;
    object-fit: contain;
    object-position: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
}

/* =========================================================
   BOOK INFORMATION
========================================================= */

.wrap .info {
    min-width: 0;
}

.wrap .eyebrow {
    margin-bottom: 15px;
    color: var(--book-gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.wrap h1,
.wrap h2 {
    font-family: "Playfair Display", Georgia, serif;
    line-height: 1.16;
}

.wrap h1 {
    margin: 0 0 24px;
    font-size: clamp(2.1rem, 5vw, 4.2rem);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.wrap h2 {
    margin: 0 0 24px;
    font-size: clamp(1.7rem, 3vw, 2.2rem);
}

.wrap .description {
    max-width: 60ch;
    margin: 0 0 25px;
    color: var(--book-muted);
    line-height: 1.9;
}

.wrap .price {
    margin: 20px 0;
    color: var(--book-gold);
    font-size: 1.8rem;
    font-weight: 700;
}

/* =========================================================
   PURCHASE & DOWNLOAD BUTTONS
========================================================= */

.wrap .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 52px;
    padding: 15px 25px;
    background: var(--book-red);
    color: var(--book-white);
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        background 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.wrap .button:hover {
    background: var(--book-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(157, 36, 53, 0.25);
}

.wrap .button:focus-visible,
.wrap a:focus-visible {
    outline: 3px solid var(--book-gold);
    outline-offset: 4px;
}

.wrap .note {
    max-width: 65ch;
    margin-top: 16px;
    color: var(--book-muted);
    font-size: 0.92rem;
    line-height: 1.8;
}

/* =========================================================
   PDF READER
========================================================= */

.wrap .reader {
    margin-top: 20px;
    padding-top: 45px;
    border-top: 1px solid var(--book-border);
}

.wrap .reader iframe {
    display: block;
    width: 100%;
    height: min(78vh, 780px);
    min-height: 420px;
    margin-top: 25px;
    background: #ffffff;
    border: 1px solid #7e4c59;
    border-radius: 10px;
}

/* =========================================================
   PURCHASED BOOKS LIBRARY
========================================================= */

.wrap .catalog {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(180px, 1fr)
    );
    gap: 22px;
    margin-top: 35px;
}

.wrap .tile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 18px;
    background: #26171e;
    border: 1px solid #603845;
    border-radius: 12px;
    color: var(--book-white);
    text-decoration: none;
    transition:
        border-color 0.25s ease,
        transform 0.25s ease;
}

.wrap .tile:hover {
    border-color: var(--book-gold);
    transform: translateY(-4px);
}

.wrap .tile img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: contain;
    object-position: center;
}

.wrap .tile span {
    color: var(--book-gold);
}

/* =========================================================
   RESPONSIVE DESIGN
========================================================= */

@media (max-width: 900px) {
    .wrap .hero {
        grid-template-columns: minmax(200px, 330px) minmax(0, 1fr);
        gap: 35px;
    }
}

@media (max-width: 720px) {
    .wrap {
        padding: 14px 18px 60px;
    }

    .wrap nav {
        padding: 14px 0 24px;
    }

    .wrap nav strong {
        font-size: 12px;
        letter-spacing: 0.12em;
    }

    .wrap .hero {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 32px 0;
    }

    .wrap .cover {
        width: 100%;
        max-width: 410px;
        margin: 0 auto;
    }

    .wrap .reader {
        padding-top: 30px;
    }

    .wrap .reader iframe {
        height: 510px;
    }

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

    .wrap .tile {
        padding: 12px;
    }

    .wrap .tile img {
        height: 210px;
    }
}

@media (max-width: 420px) {
    .wrap .button {
        width: 100%;
    }

    .wrap .reader iframe {
        height: 440px;
    }

    .wrap .tile img {
        height: 175px;
    }
}

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

    .wrap .button,
    .wrap .tile {
        transition: none;
    }
}
