@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Great+Vibes&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #040906;
    --bg-soft: #07110c;
    --panel: rgba(5, 16, 11, 0.96);
    --panel-soft: rgba(7, 21, 15, 0.97);
    --panel-edge: rgba(199, 158, 89, 0.26);
    --panel-edge-strong: rgba(221, 188, 126, 0.42);
    --ink: #efe4cf;
    --ink-soft: #e0c8a0;
    --muted: #b69b73;
    --gold: #c99e59;
    --gold-soft: #e4c98e;
    --emerald: #10392a;
    --emerald-soft: #081710;
    --shadow: 0 24px 60px rgba(0,0,0,.38);
    --radius: 6px;
    --display: 'Cormorant Garamond', Georgia, serif;
    --script: 'Great Vibes', 'Snell Roundhand', cursive;
    --body: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    font-family: var(--body);
    background:
        radial-gradient(circle at 86% 8%, rgba(16, 57, 42, .14), transparent 24rem),
        radial-gradient(circle at 10% 12%, rgba(104, 28, 41, .12), transparent 16rem),
        linear-gradient(180deg, #020705 0%, #07100b 42%, #040906 100%);
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold-soft); }
img { display: block; max-width: 100%; }
main { width: min(1380px, calc(100% - 28px)); margin: 0 auto; }

.site-header {
    position: relative;
    z-index: 40;
    width: min(1380px, calc(100% - 28px));
    margin: 16px auto 18px;
    display: grid;
    grid-template-columns: minmax(260px, auto) 1fr auto;
    align-items: center;
    gap: 18px;
    color: var(--ink-soft);
}
.page-home .site-header {
    margin-bottom: -104px;
    padding: 0 6px;
}
.page-home main { width: min(1380px, calc(100% - 20px)); }
.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.brand-flourish {
    width: 54px;
    height: 60px;
    flex: 0 0 auto;
    background: url('/assets/img/hero-left-top-decor.png') center center / contain no-repeat;
}
.brand strong {
    display: block;
    font-family: var(--script);
    font-weight: 400;
    font-size: clamp(2.5rem, 4vw, 3.6rem);
    line-height: .88;
    color: var(--ink-soft);
}
.brand em {
    display: block;
    margin-top: 4px;
    font-style: normal;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .15em;
    font-size: .68rem;
}
.site-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.site-nav a {
    position: relative;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .84rem;
    padding: 8px 6px;
}
.site-nav a.active,
.site-nav a:hover { color: var(--gold-soft); }
.site-nav a.active::after,
.site-nav a:hover::after {
    content: '';
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.site-social {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-self: end;
}
.site-social a {
    color: var(--gold-soft);
    font-size: 1.1rem;
    line-height: 1;
}
.menu-toggle { display: none; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    border: 1px solid var(--panel-edge-strong);
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(12, 44, 31, .98), rgba(7, 20, 14, .98));
    color: var(--gold-soft) !important;
    font-family: var(--display);
    text-transform: uppercase;
    letter-spacing: .07em;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(0,0,0,.2);
}
.button:hover { color: #ffefc8 !important; transform: translateY(-1px); }
.button.ghost { background: transparent; box-shadow: none; }
.button.small { padding: 10px 14px; font-size: .86rem; }
.button.full-width { width: 100%; }
.text-link { color: var(--gold-soft); font-weight: 700; }

.notice {
    margin: 0 0 18px;
    padding: 14px 18px;
    border-radius: 4px;
    border: 1px solid var(--panel-edge);
    background: rgba(13, 36, 26, .94);
    color: var(--ink);
    font-weight: 700;
}
.notice.error {
    background: rgba(54, 21, 27, .95);
    color: #f7dae0;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--gold);
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .26em;
    font-weight: 700;
}

.hero-masterpiece {
    position: relative;
    min-height: 820px;
    overflow: hidden;
    border: 1px solid var(--panel-edge);
    border-radius: var(--radius);
    background:
        linear-gradient(90deg, rgba(4, 12, 9, .98) 0%, rgba(4, 12, 9, .96) 40%, rgba(4, 12, 9, .72) 58%, rgba(4, 12, 9, .28) 70%, rgba(4, 12, 9, .05) 82%, rgba(4, 12, 9, 0) 100%),
        linear-gradient(180deg, #06100b 0%, #040c08 100%);
    box-shadow: var(--shadow);
}
.hero-copy {
    position: relative;
    z-index: 5;
    width: min(46%, 620px);
    padding: 176px 44px 96px 134px;
    text-align: center;
}
.hero-copy h1 {
    margin: 0 0 8px;
    font-family: var(--script);
    font-size: clamp(3.2rem, 6vw, 6.8rem);
    font-weight: 400;
    line-height: .95;
    color: var(--ink-soft);
}
.hero-subtitle {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(1.35rem, 2vw, 2.1rem);
    line-height: 1.18;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-soft);
}
.hero-divider,
.section-divider,
.ornate-divider {
    width: 170px;
    height: 20px;
    margin: 16px auto 16px;
    background: url('/assets/img/filigree-divider.png') center center / contain no-repeat;
}
.hero-lead {
    max-width: 480px;
    margin: 0 auto 26px;
    color: rgba(239, 228, 207, .90);
    font-family: var(--display);
    font-size: clamp(1.15rem, 1.7vw, 1.55rem);
    line-height: 1.56;
}
.hero-actions { display: flex; justify-content: center; }
.hero-button {
    min-width: 264px;
    padding-top: 16px;
    padding-bottom: 16px;
    font-size: 1.1rem;
}
.hero-visual {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 63%;
    background: url('/assets/img/hero-scene.png') center center / cover no-repeat;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.14) 6%, rgba(0,0,0,.84) 16%, #000 28%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.14) 6%, rgba(0,0,0,.84) 16%, #000 28%);
}
.hero-ornament {
    position: absolute;
    z-index: 4;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}
.hero-left-top {
    top: 10px;
    left: 8px;
    width: 180px;
    height: 216px;
    background-image: url('/assets/img/hero-left-top-decor.png');
}
.hero-left-bottom {
    left: 0;
    bottom: 0;
    width: 220px;
    height: 360px;
    background-image: url('/assets/img/hero-left-bottom-roses.png');
    background-position: left bottom;
}
.hero-right-top {
    top: 6px;
    right: 0;
    width: 240px;
    height: 140px;
    background-image: url('/assets/img/hero-right-top-decor.png');
    background-position: right top;
}
.hero-right-bottom {
    right: 0;
    bottom: 0;
    width: 340px;
    height: 400px;
    background-image: url('/assets/img/hero-right-rose.png');
    background-position: right bottom;
}

.homepage-grid {
    display: grid;
    grid-template-columns: 1.38fr .9fr .9fr 1.02fr;
    gap: 14px;
    margin-top: 10px;
}
.feature-card,
.page-hero.compact,
.luxury-page-hero,
.book-detail,
.content-section,
.post-card,
.quote-card,
.card-form,
.newsletter-card,
.shop-book-card,
.demo-book-card,
.storefront-empty,
.split-section > div:first-child,
.book-card,
.timeline-card,
.info-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(5, 16, 11, .98), rgba(4, 12, 9, .98));
    border: 1px solid var(--panel-edge);
    border-radius: var(--radius);
    box-shadow: 0 18px 38px rgba(0,0,0,.22);
}
.feature-card::before,
.luxury-page-hero::before,
.book-detail::before,
.content-section::before,
.post-card::before,
.newsletter-card::before,
.shop-book-card::before,
.storefront-empty::before,
.book-card::before,
.quote-card::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(217, 182, 119, .14);
    border-radius: 2px;
    pointer-events: none;
}
.feature-card {
    padding: 24px 18px 18px;
    text-align: center;
    min-height: 100%;
}
.feature-card h2 {
    margin: 0;
    font-family: var(--display);
    font-weight: 600;
    color: var(--ink-soft);
    font-size: clamp(1.5rem, 2vw, 2rem);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.featured-book-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.featured-book-item {
    display: grid;
    gap: 10px;
    align-content: start;
}
.featured-book-item .book-cover {
    width: 100%;
    aspect-ratio: 160 / 285;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid rgba(225, 199, 153, .14);
    box-shadow: 0 10px 18px rgba(0,0,0,.24);
}
.featured-book-item span {
    font-family: var(--display);
    font-size: 1.05rem;
    line-height: 1.05;
    color: var(--ink);
    text-transform: uppercase;
}
.blog-listing {
    display: grid;
    gap: 16px;
    margin-bottom: 18px;
}
.blog-list-item {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    align-items: start;
    text-align: left;
}
.blog-list-item img {
    width: 74px;
    height: 78px;
    object-fit: cover;
    border: 1px solid rgba(225, 199, 153, .14);
    border-radius: 2px;
}
.blog-list-item span { display: grid; gap: 4px; }
.blog-list-item strong {
    font-family: var(--display);
    font-size: 1.2rem;
    line-height: 1.12;
    color: var(--ink);
}
.blog-list-item em {
    font-style: normal;
    color: var(--muted);
    font-size: .92rem;
}
.newsletter-panel-card p,
.author-panel-card p,
.feature-card p {
    color: rgba(239, 228, 207, .84);
    line-height: 1.7;
}
.mail-ornament {
    width: 250px;
    height: 190px;
    margin: 8px auto 12px;
    background: url('/assets/img/card-mail-decor.png') center center / contain no-repeat;
}
.stack-form { display: grid; gap: 10px; }
.newsletter-compact-form { margin-top: 14px; }
input,
textarea,
select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid rgba(225, 199, 153, .16);
    border-radius: 2px;
    background: rgba(8, 25, 18, .96);
    color: var(--ink);
    font: inherit;
}
input::placeholder,
textarea::placeholder { color: rgba(239, 228, 207, .42); }
textarea { resize: vertical; }
.tiny-note { margin-top: 10px; color: var(--muted); font-size: .85rem; }
.author-card-portrait {
    margin: 6px auto 14px;
    width: min(92%, 300px);
}
.author-card-portrait img {
    width: 100%;
    display: block;
    border-radius: 2px;
}
.author-card-quote {
    font-family: var(--display);
    font-size: 1.28rem;
    line-height: 1.45;
    margin-bottom: 18px;
}

.luxury-page-hero,
.page-hero.compact,
.article-page header {
    margin: 34px 0 22px;
    padding: 40px 34px;
}
.luxury-page-hero h1,
.page-hero h1,
.article-page h1,
.book-detail h1,
.content-section h2,
.shop-book-card h2,
.book-card h2,
.book-card h3,
.post-card h2,
.post-card h3,
.quote-card h2,
.split-section h2 {
    font-family: var(--display);
    font-weight: 600;
    color: var(--ink);
}
.luxury-page-hero h1,
.page-hero h1,
.article-page h1,
.book-detail h1 {
    margin: 0 0 12px;
    font-size: clamp(2.9rem, 5.8vw, 4.9rem);
    line-height: .96;
}
.luxury-page-hero p,
.page-hero p,
.article-page p,
.content-section p,
.book-detail p,
.post-card p,
.book-card p,
.shop-book-card p,
.storefront-empty p,
.demo-book-card p,
.split-section p,
.quote-card p { color: rgba(239, 228, 207, .82); line-height: 1.8; }
.muted { color: var(--muted) !important; }
.date-line {
    color: var(--gold);
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .18em;
    font-weight: 800;
}

.books-hero,
.about-hero {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: center;
}
.books-hero-note,
.author-portrait-panel {
    position: relative;
    padding: 18px;
    background: rgba(9, 26, 19, .72);
    border: 1px solid rgba(225, 199, 153, .12);
    border-radius: 4px;
}
.books-hero-note p {
    margin: 0;
    font-family: var(--display);
    font-size: 1.4rem;
    line-height: 1.5;
    color: var(--ink-soft);
}
.signature-line {
    color: var(--gold-soft) !important;
    font-family: var(--display);
    font-size: 1.2rem;
}
.portrait-frame {
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid rgba(225, 199, 153, .14);
    background: rgba(6, 16, 11, .96);
}
.portrait-frame img { width: 100%; object-fit: cover; }
.portrait-placeholder {
    padding: 24px;
    min-height: 340px;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 10px;
}
.portrait-placeholder span {
    font-family: var(--script);
    font-size: 4rem;
    color: var(--gold-soft);
}
.about-layout {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 22px;
}
.about-sidebar-stack { display: grid; gap: 22px; }
.quote-card,
.content-section,
.post-card,
.book-card { padding: 28px; }
.mini-panel .button { margin-top: 8px; }

.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 24px; }
.filter-row a {
    padding: 10px 14px;
    border: 1px solid var(--panel-edge);
    border-radius: 999px;
    background: rgba(8, 20, 15, .86);
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .8rem;
    font-weight: 700;
}
.filter-row a.active { background: rgba(14, 49, 36, .92); color: #fff2d6; }

.bookstore-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.shop-book-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    padding: 18px;
}
.shop-cover .book-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid rgba(225, 199, 153, .14);
    box-shadow: 0 12px 22px rgba(0,0,0,.24);
}
.shop-book-copy h2 { margin: 8px 0 8px; font-size: clamp(1.9rem, 3vw, 2.8rem); }
.shop-actions,
.buy-row,
.actions,
.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.status-pill {
    display: inline-flex;
    width: max-content;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(225, 199, 153, .14);
    background: rgba(15, 54, 39, .7);
    color: var(--gold-soft);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
}
.storefront-empty {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 20px;
    padding: 28px;
}
.demo-bookshelf {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.demo-book-card {
    padding: 10px;
    text-align: center;
}
.demo-book-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid rgba(225, 199, 153, .12);
    margin-bottom: 10px;
}
.demo-book-card h3 {
    margin: 0 0 6px;
    font-family: var(--display);
    color: var(--ink);
    font-size: 1.15rem;
}
.book-detail {
    display: grid;
    grid-template-columns: minmax(240px, 360px) 1fr;
    gap: 34px;
    margin: 34px 0 22px;
    padding: 34px;
}
.detail-cover .book-cover,
.book-cover.large {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(225, 199, 153, .16);
    box-shadow: 0 16px 28px rgba(0,0,0,.26);
}
.placeholder-cover {
    aspect-ratio: 2 / 3;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: linear-gradient(180deg, #113322 0%, #0a1812 100%);
    color: var(--gold-soft);
    font: 600 2.3rem var(--display);
    border: 1px solid rgba(225, 199, 153, .16);
}
.subtitle { font-size: 1.15rem; color: rgba(239, 228, 207, .82); }
.facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 8px 16px;
    color: rgba(239, 228, 207, .82);
}
.facts dt {
    color: var(--gold);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-weight: 800;
}
.excerpt-box { background: linear-gradient(180deg, rgba(9, 26, 19, .96), rgba(4, 12, 9, .98)); }
.content-section blockquote {
    margin: 18px 0;
    padding-left: 18px;
    border-left: 4px solid var(--gold);
    font-family: var(--display);
    font-size: 1.25rem;
    color: var(--ink-soft);
}

.post-grid,
.book-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.book-grid.wide { grid-template-columns: 1fr; }
.book-card.horizontal { display: grid; grid-template-columns: 160px 1fr; gap: 18px; }
.book-card h2,
.book-card h3,
.post-card h2,
.post-card h3 { margin: 8px 0; font-size: 1.9rem; line-height: 1.08; }
.post-thumb,
.article-image { width: 100%; max-height: 420px; object-fit: cover; border-radius: 4px; margin-bottom: 18px; }
.article-page { padding: 8px 0 30px; }
.article-page header { margin-top: 34px; }

.newsletter-card {
    width: min(1380px, calc(100% - 28px));
    margin: 54px auto 18px;
    padding: 28px;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 22px;
    align-items: center;
}
.newsletter-card h2 { margin: 0 0 8px; font-family: var(--display); font-size: clamp(2rem, 4vw, 3rem); }
.inline-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; }
.site-footer {
    width: 100%;
    padding-bottom: 18px;
}
.footer-grid {
    width: min(1380px, calc(100% - 28px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 0 4px 8px;
    color: rgba(239, 228, 207, .76);
    font-size: .92rem;
}
.footer-grid nav { display: flex; gap: 14px; flex-wrap: wrap; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 30px 0 54px; }
.pagination a,
.pagination span {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--panel-edge);
    background: rgba(8, 20, 15, .86);
    font-weight: 700;
}

.card-form {
    max-width: 760px;
    margin-bottom: 50px;
    padding: 28px;
    display: grid;
    gap: 16px;
}
.card-form label,
.inline-form label { display: grid; gap: 7px; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-soft); font-weight: 700; }

@media (max-width: 1200px) {
    .hero-copy { width: min(52%, 600px); padding-left: 100px; }
    .homepage-grid { grid-template-columns: 1fr 1fr; }
    .books-card { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
    .page-home .site-header { margin-bottom: 12px; }
    .site-header {
        grid-template-columns: 1fr auto auto;
        align-items: start;
    }
    .menu-toggle {
        display: block;
        border: 1px solid var(--panel-edge-strong);
        border-radius: 999px;
        padding: 10px 14px;
        background: rgba(10, 28, 20, .95);
        color: var(--gold-soft);
        text-transform: uppercase;
        letter-spacing: .08em;
        font-weight: 700;
    }
    .site-nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px;
        background: rgba(4, 10, 8, .98);
        border: 1px solid var(--panel-edge);
        border-radius: 12px;
        box-shadow: var(--shadow);
    }
    .site-nav.open { display: flex; }
    .site-nav a { padding: 12px 14px; }
    .site-social { justify-self: auto; }
    .hero-masterpiece { min-height: 980px; }
    .hero-copy {
        width: 100%;
        max-width: 760px;
        margin: 0 auto;
        padding: 150px 28px 30px;
        text-align: center;
    }
    .hero-visual {
        position: absolute;
        inset: auto 0 0 0;
        width: 100%;
        height: 52%;
        -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.82) 18%, #000 38%);
        mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.82) 18%, #000 38%);
    }
    .hero-left-top { width: 150px; height: 180px; }
    .hero-left-bottom { width: 170px; height: 260px; }
    .hero-right-bottom { width: 240px; height: 300px; }
    .books-hero,
    .about-hero,
    .about-layout,
    .storefront-empty,
    .book-detail,
    .newsletter-card,
    .split-section,
    .book-grid,
    .post-grid,
    .book-card.horizontal { grid-template-columns: 1fr; }
    .demo-bookshelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shop-book-card { grid-template-columns: 170px 1fr; }
    .inline-form { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    main { width: min(100% - 18px, 1380px); }
    .site-header,
    .page-home .site-header,
    .footer-grid,
    .newsletter-card { width: min(100% - 18px, 1380px); }
    .brand-flourish { width: 40px; height: 46px; }
    .brand strong { font-size: 1.85rem; }
    .brand em { display: none; }
    .site-social { display: none; }
    .hero-masterpiece { min-height: 860px; }
    .hero-copy { padding: 116px 18px 22px; }
    .hero-copy h1 { font-size: 3.5rem; }
    .hero-subtitle { font-size: 1.25rem; }
    .hero-lead { font-size: 1.05rem; }
    .hero-left-top { width: 110px; height: 140px; }
    .hero-left-bottom { width: 120px; height: 190px; }
    .hero-right-top { width: 150px; height: 90px; }
    .hero-right-bottom { width: 170px; height: 220px; }
    .homepage-grid,
    .featured-book-row,
    .demo-bookshelf { grid-template-columns: 1fr 1fr; }
    .homepage-grid { gap: 12px; }
    .feature-card,
    .page-hero.compact,
    .luxury-page-hero,
    .book-detail,
    .content-section,
    .post-card,
    .quote-card,
    .card-form,
    .newsletter-card,
    .shop-book-card,
    .storefront-empty,
    .book-card { padding: 20px; }
    .shop-book-card { grid-template-columns: 1fr; }
    .featured-book-item span { font-size: .9rem; }
    .blog-list-item { grid-template-columns: 60px 1fr; }
    .blog-list-item img { width: 60px; height: 64px; }
    .footer-grid { flex-direction: column; }
}


/* ===== V9 homepage refinement ===== */
main { width: min(1400px, calc(100% - 18px)); }
body.page-home { background: radial-gradient(circle at 80% 8%, rgba(16,64,46,.18), transparent 24rem), radial-gradient(circle at 12% 10%, rgba(105,26,38,.18), transparent 18rem), linear-gradient(180deg, #030806 0%, #050d09 100%); }
body.page-home .site-header {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 40;
    width: min(1400px, calc(100% - 18px));
    padding: 22px 20px 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    align-items: flex-start;
}
body.page-home main { padding-top: 0; }
.brand { gap: 14px; align-items: flex-start; }
.brand-flourish {
    display:block;
    width:72px;
    height:112px;
    margin-top: 2px;
    background: url('/assets/img/hero-left-top-decor.png') no-repeat left top / contain;
    flex: 0 0 72px;
    opacity: .95;
}
.brand strong {
    font-family: var(--script);
    font-size: clamp(2.7rem, 5vw, 4rem);
    color: #dfbc93;
    letter-spacing: .01em;
    text-shadow: 0 2px 18px rgba(0,0,0,.32);
}
.brand em { display:none; }
.site-nav { gap: 14px; margin-top: 6px; }
.site-nav a {
    padding: 10px 8px 16px;
    color: #dbbf97;
    font-family: var(--display);
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: .12em;
}
.site-nav a.active::after,
.site-nav a:hover::after { left: 0; right: 0; bottom: 8px; }
.site-social { display:flex; gap:14px; align-items:center; margin-top: 8px; }
.site-social a { color:#c9a169; font-family: var(--display); font-size:1.45rem; line-height:1; }
body.page-home .menu-toggle { margin-top: 8px; }

.hero-masterpiece {
    position: relative;
    overflow: hidden;
    min-height: 1020px;
    margin: 0 0 18px;
    padding-top: 110px;
    display: grid;
    grid-template-columns: 48% 52%;
    border: 1px solid rgba(205,157,88,.28);
    background: linear-gradient(90deg, rgba(3,11,9,.95) 0%, rgba(3,14,11,.95) 47%, rgba(3,10,8,.25) 47%, rgba(3,10,8,.04) 100%);
}
.hero-masterpiece::before {
    content:'';
    position:absolute;
    inset:0;
    background: radial-gradient(circle at 18% 32%, rgba(20,93,67,.10), transparent 22rem), radial-gradient(circle at 20% 70%, rgba(111,25,36,.10), transparent 18rem);
    pointer-events:none;
}
.hero-copy {
    position: relative;
    z-index: 2;
    padding: 92px 70px 70px 118px;
    justify-content: flex-start;
}
.hero-copy::before,.hero-copy::after { display:none; }
.hero-copy h1 {
    font-family: var(--script);
    font-weight: 400;
    font-size: clamp(4.8rem, 8vw, 7rem);
    line-height: .96;
    margin: 0 0 16px;
    color: #e0bc92;
    text-shadow: 0 4px 20px rgba(0,0,0,.35);
}
.hero-subtitle {
    margin: 0;
    max-width: 560px;
    color: #dcb993;
    font-family: var(--display);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: clamp(1.18rem, 2vw, 1.58rem);
    line-height: 1.45;
    text-align: center;
}
.hero-divider {
    width: 210px;
    height: 26px;
    margin: 24px 0 18px 72px;
    background: url('/assets/img/filigree-divider.png') no-repeat center / contain;
    filter: brightness(1.1);
}
.hero-lead {
    max-width: 440px;
    color: rgba(239, 220, 196, .9);
    font-family: var(--display);
    font-size: 1.18rem;
    line-height: 1.7;
    text-align: center;
}
.hero-actions { margin-top: 20px; }
.hero-button {
    min-width: 232px;
    min-height: 62px;
    font-size: 1.15rem;
    background: linear-gradient(90deg, rgba(8,59,46,.96), rgba(10,29,22,.96));
    border-color: rgba(214,176,112,.56);
}
.hero-visual {
    position: relative;
    min-height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.28)), url('/assets/img/hero-scene.png') center center / cover no-repeat;
}
.hero-visual::before {
    content:'';
    position:absolute;
    inset:0;
    background: linear-gradient(90deg, rgba(4,11,9,.82) 0%, rgba(4,11,9,.28) 12%, rgba(4,11,9,0) 24%);
}
.hero-ornament {
    position:absolute;
    z-index:3;
    pointer-events:none;
    background-repeat:no-repeat;
    background-size:contain;
    opacity:.98;
}
.hero-left-top { left:0; top:0; width:182px; height:220px; background-image:url('/assets/img/hero-left-top-decor.png'); }
.hero-left-bottom { left:0; bottom:0; width:220px; height:360px; background-image:url('/assets/img/hero-left-bottom-roses.png'); background-position:left bottom; }
.hero-right-top { right:0; top:0; width:210px; height:134px; background-image:url('/assets/img/hero-right-top-decor.png'); background-position:right top; }
.hero-right-bottom { right:0; bottom:0; width:280px; height:330px; background-image:url('/assets/img/hero-right-rose.png'); background-position:right bottom; }

.homepage-grid {
    display:grid;
    grid-template-columns: 1.55fr .98fr 1fr 1fr;
    gap: 10px;
    margin: 0 0 20px;
}
.feature-card {
    position:relative;
    background: linear-gradient(180deg, rgba(5,20,15,.96), rgba(4,15,11,.98));
    border: 1px solid rgba(202,154,87,.35);
    border-radius: 2px;
    padding: 26px 20px 20px;
    min-height: 456px;
}
.feature-card::before,.feature-card::after { display:none; }
.feature-card h2 {
    margin: 0;
    color: #ddbe93;
    font-family: var(--display);
    text-transform: uppercase;
    font-size: 1.04rem;
    letter-spacing: .08em;
    text-align:center;
}
.section-divider {
    width: 120px;
    height: 18px;
    margin: 10px auto 18px;
    background: url('/assets/img/filigree-divider.png') no-repeat center / contain;
}
.featured-book-row {
    display:grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 10px;
    align-items:start;
    margin-bottom: 20px;
}
.featured-book-item { display:grid; gap:10px; text-align:center; }
.featured-book-item .book-cover {
    width:100%;
    aspect-ratio: 2 / 3.12;
    object-fit:cover;
    border:1px solid rgba(198,153,92,.35);
    box-shadow: 0 10px 18px rgba(0,0,0,.25);
}
.featured-book-item span {
    color:#e3cfb5;
    font-family: var(--display);
    font-size: 1rem;
    line-height: 1.12;
    text-transform: uppercase;
}
.full-width { width:100%; }
.blog-listing { display:grid; gap:14px; margin-bottom: 22px; }
.blog-list-item {
    display:grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items:start;
}
.blog-list-item img {
    width:72px; height:84px; object-fit:cover; border:1px solid rgba(198,153,92,.28);
}
.blog-list-item strong {
    display:block;
    color:#e3ccb0;
    font-family: var(--display);
    font-size: 1.02rem;
    line-height: 1.25;
    font-weight: 600;
}
.blog-list-item em {
    display:block;
    margin-top: 6px;
    color:#c6ab82;
    font-style:normal;
    font-family: var(--display);
    font-size: .94rem;
}
.newsletter-panel-card {
    display:flex;
    flex-direction:column;
    align-items:center;
}
.mail-ornament {
    width: 170px;
    height: 120px;
    margin: 6px auto 10px;
    background: url('/assets/img/card-mail-decor.png') no-repeat center / contain;
}
.newsletter-panel-card p { text-align:center; color:#e1cab0; font-family: var(--display); font-size:1.02rem; line-height:1.6; }
.newsletter-compact-form { width:100%; max-width: 260px; display:grid; gap:12px; margin-top: 12px; }
.newsletter-compact-form input { text-align:left; background: rgba(5,20,15,.9); }
.author-panel-card { display:flex; flex-direction:column; align-items:center; }
.author-card-portrait { width:100%; max-width: 292px; margin: 4px auto 8px; }
.author-card-portrait img { width:100%; height:auto; display:block; }
.author-card-quote {
    margin: 4px 0 16px;
    text-align:center;
    color:#e0cab1;
    font-family: var(--display);
    font-size:1.04rem;
    line-height:1.5;
}
.tiny-note { color:#b99d75; font-family: var(--display); }

.site-footer { width:min(1400px, calc(100% - 18px)); }
.newsletter-card { margin-top: 20px; }

@media (max-width: 1200px) {
    body.page-home .site-header { position:relative; transform:none; left:auto; top:auto; width:min(1400px, calc(100% - 18px)); padding:16px 0 0; }
    .hero-masterpiece { min-height: 860px; padding-top: 20px; grid-template-columns: 1fr; }
    .hero-copy { padding: 88px 34px 34px; align-items:center; }
    .hero-visual { min-height: 420px; }
    .homepage-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .site-header { align-items:flex-start; }
    .site-social { display:none; }
    .brand-flourish { width:42px; height:72px; flex-basis:42px; }
    .brand strong { font-size: 2.2rem; }
    .hero-masterpiece { min-height: auto; }
    .hero-copy { padding: 70px 22px 28px; }
    .hero-copy h1 { font-size: 4rem; text-align:center; }
    .hero-subtitle,.hero-lead { text-align:center; }
    .hero-divider { margin-left: auto; margin-right: auto; }
    .hero-visual { min-height: 320px; }
    .hero-left-bottom { width:140px; height:240px; }
    .hero-right-bottom { width:170px; height:210px; }
    .homepage-grid { grid-template-columns: 1fr; }
}


/* ===== V10 cleanup override ===== */
body.page-home .site-header {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(1400px, calc(100% - 28px));
    padding: 18px 14px 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    align-items: center;
}
body.page-home .brand-flourish { display: none; }
body.page-home .brand strong {
    font-size: clamp(2.6rem, 4vw, 4.2rem);
    line-height: 1;
}
body.page-home .site-nav { margin-top: 0; gap: 18px; }
body.page-home .site-social { margin-top: 0; }
.hero-masterpiece {
    min-height: 860px;
    padding-top: 96px;
    grid-template-columns: 44% 56%;
    background: linear-gradient(90deg, rgba(3,11,9,.96) 0%, rgba(3,14,11,.96) 46%, rgba(3,14,11,.20) 46%, rgba(3,14,11,.04) 100%);
}
.hero-copy {
    align-items: flex-start;
    justify-content: center;
    padding: 74px 44px 60px 106px;
}
.hero-copy h1 {
    font-size: clamp(4.4rem, 6.4vw, 6.5rem);
    max-width: 520px;
    margin-bottom: 12px;
}
.hero-subtitle,
.hero-lead { text-align: center; }
.hero-subtitle {
    max-width: 520px;
    font-size: clamp(1.05rem, 1.8vw, 1.5rem);
}
.hero-divider {
    width: 170px;
    margin: 20px auto 18px;
    align-self: center;
}
.hero-lead {
    max-width: 420px;
    align-self: center;
    font-size: 1.12rem;
}
.hero-actions { align-self: center; }
.hero-left-top { width: 118px; height: 158px; left: 8px; top: 8px; }
.hero-left-bottom { width: 190px; height: 280px; left: 0; bottom: 0; }
.hero-right-top { width: 128px; height: 84px; right: 12px; top: 8px; }
.hero-right-bottom { width: 210px; height: 246px; right: 0; bottom: 0; }
.hero-visual {
    background-position: center center;
    background-size: cover;
}
.hero-visual::before {
    background: linear-gradient(90deg, rgba(4,11,9,.62) 0%, rgba(4,11,9,.22) 10%, rgba(4,11,9,0) 22%);
}
.homepage-grid {
    grid-template-columns: 1.55fr 1fr 1fr 1fr;
    gap: 14px;
}
.feature-card {
    min-height: 420px;
    padding: 24px 18px 18px;
}
.featured-book-row { gap: 12px; }
.featured-book-item span {
    font-size: .9rem;
    letter-spacing: .02em;
}
.author-card-portrait {
    max-width: 250px;
}
.newsletter-panel-card .mail-ornament {
    width: 150px;
    height: 106px;
}
@media (max-width: 1200px) {
    .hero-masterpiece {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-top: 88px;
    }
    .hero-copy {
        padding: 68px 28px 34px;
        align-items: center;
    }
    .hero-copy h1, .hero-subtitle, .hero-lead { max-width: 680px; }
    .hero-visual { min-height: 460px; }
    .homepage-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    body.page-home .site-header {
        position: relative;
        left: auto;
        transform: none;
        width: min(1400px, calc(100% - 18px));
        padding: 12px 0 0;
    }
    .hero-copy {
        padding: 34px 20px 26px;
    }
    .hero-copy h1 {
        font-size: 3.2rem;
    }
    .hero-subtitle { font-size: 1rem; }
    .hero-lead { font-size: 1.02rem; }
    .hero-visual { min-height: 320px; }
    .hero-left-top { width: 78px; height: 108px; }
    .hero-left-bottom { width: 112px; height: 168px; }
    .hero-right-top { width: 84px; height: 54px; }
    .hero-right-bottom { width: 130px; height: 152px; }
    .homepage-grid { grid-template-columns: 1fr; }
}

/* ===== V11 image-led homepage reset ===== */
.page-home main {
    width: min(1400px, calc(100% - 24px));
}
.page-home .site-header {
    position: relative;
    width: min(1400px, calc(100% - 24px));
    margin: 16px auto 18px;
    padding: 0 4px;
    display: grid;
    grid-template-columns: minmax(240px, auto) 1fr auto;
    align-items: center;
    gap: 16px;
    color: var(--ink-soft);
}
.page-home .brand-flourish {
    width: 48px;
    height: 56px;
    background: url('/assets/img/hero-left-top-decor.png') center center / contain no-repeat;
}
.page-home .site-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}
.page-home .site-social {
    justify-self: end;
}
.hero-image-shell {
    margin: 0 0 18px;
}
.hero-image-panel {
    position: relative;
    width: 100%;
    aspect-ratio: 1400 / 560;
    min-height: 340px;
    border-radius: var(--radius);
    border: 1px solid var(--panel-edge);
    overflow: hidden;
    background: #07100b url('/assets/img/home-hero-masterpiece.png') center center / cover no-repeat;
    box-shadow: var(--shadow);
}
.hero-image-panel::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 36.2%;
    width: 1px;
    background: linear-gradient(180deg, rgba(201,155,90,0), rgba(201,155,90,.18), rgba(201,155,90,.28), rgba(201,155,90,.18), rgba(201,155,90,0));
    box-shadow: 0 0 12px rgba(9, 14, 11, .45);
}
.structure-first-grid {
    display: grid;
    grid-template-columns: 1.55fr 1fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 22px;
}
.structure-first-grid .feature-card {
    min-height: 420px;
    padding: 24px 18px 18px;
    background: linear-gradient(180deg, rgba(7,22,16,.97), rgba(5,16,12,.98));
    border: 1px solid rgba(205,157,88,.28);
    border-radius: var(--radius);
    box-shadow: 0 14px 28px rgba(0,0,0,.22);
}
.structure-first-grid .feature-card h2 {
    margin: 0;
    color: var(--ink-soft);
    font-family: var(--display);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 1.04rem;
    text-align: center;
}
.structure-first-grid .section-divider {
    margin-top: 10px;
    margin-bottom: 18px;
}
.structure-first-grid .featured-book-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}
.structure-first-grid .featured-book-item {
    display: grid;
    gap: 8px;
    text-align: center;
}
.structure-first-grid .featured-book-item .book-cover {
    aspect-ratio: 2 / 3.1;
    object-fit: cover;
    border: 1px solid rgba(205,157,88,.25);
}
.structure-first-grid .featured-book-item span {
    color: var(--ink);
    font-family: var(--display);
    font-size: .93rem;
    line-height: 1.12;
    text-transform: uppercase;
}
.structure-first-grid .blog-listing {
    display: grid;
    gap: 14px;
    margin-bottom: 20px;
}
.structure-first-grid .blog-list-item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: start;
}
.structure-first-grid .blog-list-item img {
    width: 72px;
    height: 84px;
    object-fit: cover;
    border: 1px solid rgba(205,157,88,.25);
}
.structure-first-grid .blog-list-item strong {
    display: block;
    color: var(--ink);
    font-family: var(--display);
    font-size: 1rem;
    line-height: 1.24;
    font-weight: 600;
}
.structure-first-grid .blog-list-item em {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-style: normal;
    font-family: var(--display);
    font-size: .92rem;
}
.structure-first-grid .newsletter-panel-card,
.structure-first-grid .author-panel-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.structure-first-grid .newsletter-panel-card p,
.structure-first-grid .author-card-quote {
    text-align: center;
    font-family: var(--display);
    color: var(--ink);
    line-height: 1.58;
}
.structure-first-grid .mail-ornament {
    width: 146px;
    height: 104px;
    margin: 2px auto 10px;
    background: url('/assets/img/card-mail-decor.png') center center / contain no-repeat;
}
.structure-first-grid .newsletter-compact-form {
    width: 100%;
    max-width: 260px;
    display: grid;
    gap: 12px;
    margin-top: 10px;
}
.structure-first-grid .author-card-portrait {
    width: 100%;
    max-width: 248px;
    margin: 0 auto 12px;
}
.structure-first-grid .author-card-portrait img {
    width: 100%;
    height: auto;
    display: block;
}
.structure-first-grid .author-card-quote {
    margin: 0 0 14px;
}
.structure-first-grid .full-width {
    width: 100%;
}
@media (max-width: 1180px) {
    .structure-first-grid {
        grid-template-columns: 1fr 1fr;
    }
    .hero-image-panel {
        aspect-ratio: 1400 / 680;
    }
}
@media (max-width: 760px) {
    .page-home .site-header {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 12px;
    }
    .page-home .site-nav {
        gap: 10px 12px;
    }
    .hero-image-panel {
        aspect-ratio: 4 / 3;
        min-height: 260px;
        background-position: 62% center;
    }
    .hero-image-panel::after {
        left: 41%;
    }
    .structure-first-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== V12 homepage + subpage hero refinement ===== */
.homepage-hero-shell {
    margin: 0 0 18px;
}
.homepage-hero-panel {
    position: relative;
    width: 100%;
    aspect-ratio: 1400 / 560;
    min-height: 360px;
    border-radius: var(--radius);
    border: 1px solid var(--panel-edge);
    overflow: hidden;
    background: #07100b url('/assets/img/home-hero-masterpiece.png') center center / cover no-repeat;
    box-shadow: var(--shadow);
}
.homepage-hero-panel::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 36.2%;
    width: 1px;
    background: linear-gradient(180deg, rgba(201,155,90,0), rgba(201,155,90,.18), rgba(201,155,90,.30), rgba(201,155,90,.18), rgba(201,155,90,0));
}
.hero-html-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 38px 40px 34px 116px;
    z-index: 2;
}
.hero-author-mark {
    margin: 0 0 12px;
    max-width: 520px;
    font-family: var(--script);
    font-size: clamp(2.5rem, 4vw, 4.4rem);
    line-height: .96;
    color: var(--ink-soft);
    text-shadow: 0 4px 18px rgba(0,0,0,.35);
}
.hero-text-block {
    width: min(470px, 100%);
    text-align: center;
}
.hero-text-block h1 {
    margin: 0 0 10px;
    font-family: var(--script);
    font-size: clamp(3rem, 5vw, 5.2rem);
    font-weight: 400;
    line-height: .96;
    color: var(--ink-soft);
}
.hero-text-block .hero-subtitle {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(1.15rem, 1.9vw, 1.75rem);
    line-height: 1.22;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-soft);
}
.hero-text-block .hero-divider {
    width: 170px;
    height: 20px;
    margin: 14px auto 14px;
    background: url('/assets/img/filigree-divider.png') center center / contain no-repeat;
}
.hero-text-block .hero-lead {
    margin: 0 auto 20px;
    max-width: 420px;
    color: rgba(239,228,207,.92);
    font-family: var(--display);
    font-size: clamp(1rem, 1.5vw, 1.32rem);
    line-height: 1.55;
}
.hero-text-block .hero-actions {
    display: flex;
    justify-content: center;
}
.hero-text-block .hero-button {
    min-width: 230px;
}
.three-up-home-grid {
    grid-template-columns: 1.6fr 1fr 1fr;
}
.three-up-home-grid .books-card .featured-book-row {
    gap: 12px;
}
.three-up-home-grid .feature-card {
    min-height: 430px;
}
.site-footer .newsletter-card {
    width: min(980px, calc(100% - 24px));
    margin: 26px auto 20px;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
}
.site-footer .newsletter-card > div {
    max-width: 720px;
}
.site-footer .newsletter-card .inline-form {
    width: 100%;
    max-width: 760px;
    justify-content: center;
}

.page-hero.compact,
.luxury-page-hero {
    position: relative;
    overflow: hidden;
    min-height: 140px;
    padding: 24px 34px;
    margin: 12px 0 24px;
    border-radius: var(--radius);
    border: 1px solid var(--panel-edge);
    background:
        linear-gradient(90deg, rgba(4, 12, 9, .92) 0%, rgba(4, 12, 9, .82) 32%, rgba(4, 12, 9, .40) 56%, rgba(4, 12, 9, .16) 100%),
        #07100b url('/assets/img/home-hero-masterpiece.png') center 38% / cover no-repeat;
    box-shadow: var(--shadow);
}
.page-hero.compact::after,
.luxury-page-hero::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 36.2%;
    width: 1px;
    background: linear-gradient(180deg, rgba(201,155,90,0), rgba(201,155,90,.14), rgba(201,155,90,.24), rgba(201,155,90,.14), rgba(201,155,90,0));
}
.page-hero.compact > *,
.luxury-page-hero > * {
    position: relative;
    z-index: 1;
}
.page-hero.compact h1,
.luxury-page-hero h1 {
    margin: 0 0 6px;
    font-size: clamp(2rem, 3.4vw, 3.1rem);
    line-height: .98;
}
.page-hero.compact p,
.luxury-page-hero p {
    max-width: 640px;
    margin-bottom: 0;
}
.page-hero.compact .eyebrow,
.luxury-page-hero .eyebrow {
    margin-bottom: 8px;
}
.luxury-page-hero .ornate-divider,
.page-hero.compact .ornate-divider {
    margin: 10px 0 0;
}

@media (max-width: 980px) {
    .page-home .site-header {
        grid-template-columns: 1fr auto;
        align-items: center;
        position: relative;
    }
    .page-home .site-social {
        display: none;
    }
    .page-home .menu-toggle {
        display: block;
    }
    .page-home .site-nav {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px;
        background: rgba(4, 10, 8, .98);
        border: 1px solid var(--panel-edge);
        border-radius: 12px;
        box-shadow: var(--shadow);
        z-index: 30;
    }
    .page-home .site-nav.open {
        display: flex;
    }
    .page-home .site-nav a {
        padding: 12px 14px;
    }
    .homepage-hero-panel {
        aspect-ratio: 4 / 3;
        min-height: 420px;
    }
    .hero-html-overlay {
        padding: 30px 26px 28px 54px;
    }
    .hero-author-mark {
        max-width: 380px;
    }
    .hero-text-block {
        width: min(360px, 100%);
    }
    .three-up-home-grid {
        grid-template-columns: 1fr 1fr;
    }
    .three-up-home-grid .books-card {
        grid-column: 1 / -1;
    }
    .site-footer .newsletter-card .inline-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .page-home .site-header {
        grid-template-columns: 1fr auto;
        width: min(100% - 10px, 1400px);
        margin-bottom: 14px;
    }
    .page-home .brand strong {
        font-size: 2.2rem;
    }
    .page-home .brand-flourish {
        width: 40px;
        height: 48px;
    }
    .homepage-hero-panel {
        aspect-ratio: 4 / 5;
        min-height: 520px;
        background-position: 62% center;
    }
    .homepage-hero-panel::after,
    .page-hero.compact::after,
    .luxury-page-hero::after {
        left: 42%;
    }
    .hero-html-overlay {
        align-items: center;
        justify-content: flex-start;
        padding: 28px 18px 24px;
    }
    .hero-author-mark {
        text-align: center;
        max-width: 100%;
        margin-top: 4px;
    }
    .hero-text-block {
        width: min(100%, 340px);
    }
    .hero-text-block h1 {
        font-size: 3rem;
    }
    .hero-text-block .hero-subtitle {
        font-size: 1rem;
    }
    .hero-text-block .hero-lead {
        font-size: .98rem;
    }
    .three-up-home-grid {
        grid-template-columns: 1fr;
    }
    .page-hero.compact,
    .luxury-page-hero {
        min-height: 112px;
        padding: 18px 20px;
        background-position: 60% center;
    }
    .page-hero.compact h1,
    .luxury-page-hero h1 {
        font-size: 2rem;
    }
}

/* ===== V13 sizing, header, newsletter, contact fixes ===== */
/* Home header: move logo right and stop it colliding with hero copy */
.page-home .site-header {
    width: min(1400px, calc(100% - 24px));
    margin: 16px auto 18px;
    grid-template-columns: minmax(320px, auto) 1fr auto;
}
.page-home .brand {
    margin-left: 54px;
}
.page-home .brand strong {
    font-size: clamp(2.45rem, 3.7vw, 3.85rem);
    white-space: nowrap;
}

/* Home hero overlay: smaller text, wider usable text area */
.hero-html-overlay {
    padding-left: 150px;
    padding-top: 28px;
    padding-bottom: 30px;
    justify-content: center;
}
.hero-author-mark {
    display: none;
}
.hero-text-block {
    width: min(620px, 43vw);
    max-width: 620px;
}
.hero-text-block h1 {
    font-size: clamp(2.6rem, 4.1vw, 4.65rem);
    line-height: 1.02;
    margin-bottom: 8px;
}
.hero-text-block .hero-subtitle {
    font-size: clamp(.98rem, 1.35vw, 1.35rem);
    line-height: 1.35;
    max-width: 560px;
    margin: 0 auto;
}
.hero-text-block .hero-lead {
    font-size: clamp(.94rem, 1.1vw, 1.12rem);
    line-height: 1.55;
    max-width: 520px;
}
.hero-text-block .hero-divider {
    margin-top: 12px;
    margin-bottom: 12px;
}
.hero-text-block .hero-button {
    min-width: 218px;
    padding-top: 12px;
    padding-bottom: 12px;
}

/* Lower homepage boxes: 3 across now that the duplicate newsletter card is gone */
.three-up-home-grid,
.structure-first-grid.three-up-home-grid {
    grid-template-columns: 1.55fr 1fr 1fr;
    gap: 16px;
}
.three-up-home-grid .feature-card {
    min-height: 410px;
}

/* Footer newsletter: keep the BOX centered, but do not cram or over-center the content */
.site-footer .newsletter-card {
    width: min(1380px, calc(100% - 24px));
    margin: 28px auto 20px;
    display: grid;
    grid-template-columns: minmax(280px, .9fr) minmax(520px, 1.25fr);
    gap: 28px;
    align-items: center;
    justify-items: stretch;
    text-align: left;
}
.site-footer .newsletter-card > div {
    max-width: none;
    justify-self: stretch;
}
.site-footer .newsletter-card .eyebrow,
.site-footer .newsletter-card h2,
.site-footer .newsletter-card p {
    text-align: left;
}
.site-footer .newsletter-card .inline-form {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(200px, .95fr) auto;
    justify-content: stretch;
}

/* Sub pages: mini hero belongs behind the menu/header, not inside the title panel */
body:not(.page-home) .site-header {
    position: relative;
    width: min(1400px, calc(100% - 24px));
    min-height: 128px;
    margin: 14px auto 24px;
    padding: 18px 24px;
    border: 1px solid var(--panel-edge);
    border-radius: var(--radius);
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(4, 12, 9, .94) 0%, rgba(4, 12, 9, .76) 48%, rgba(4, 12, 9, .28) 100%),
        #07100b url('/assets/img/home-hero-masterpiece.png') center 37% / cover no-repeat;
    box-shadow: var(--shadow);
}
body:not(.page-home) .site-header::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 36.2%;
    width: 1px;
    background: linear-gradient(180deg, rgba(201,155,90,0), rgba(201,155,90,.16), rgba(201,155,90,.28), rgba(201,155,90,.16), rgba(201,155,90,0));
}
body:not(.page-home) .site-header > * {
    position: relative;
    z-index: 1;
}
body:not(.page-home) .brand strong {
    font-size: clamp(2.35rem, 3.5vw, 3.6rem);
    white-space: nowrap;
}

/* Sub page title panels go back to normal content panels */
.page-hero.compact,
.luxury-page-hero {
    min-height: auto;
    padding: 34px 36px;
    margin: 0 0 24px;
    background: linear-gradient(180deg, rgba(7,22,16,.97), rgba(5,16,12,.98));
    border: 1px solid rgba(205,157,88,.28);
    box-shadow: 0 14px 28px rgba(0,0,0,.22);
}
.page-hero.compact::after,
.luxury-page-hero::after {
    display: none;
}

/* Contact form centered */
.card-form {
    margin: 24px auto 50px;
}

/* Mobile menu: force collapse consistently on every page */
@media (max-width: 980px) {
    .site-header,
    .page-home .site-header,
    body:not(.page-home) .site-header {
        position: relative;
        grid-template-columns: 1fr auto;
        align-items: center;
        min-height: auto;
    }
    .page-home .brand {
        margin-left: 0;
    }
    .brand strong,
    .page-home .brand strong,
    body:not(.page-home) .brand strong {
        font-size: clamp(2rem, 7vw, 2.8rem);
        white-space: normal;
    }
    .site-social {
        display: none;
    }
    .menu-toggle {
        display: block;
        border: 1px solid var(--panel-edge-strong);
        border-radius: 999px;
        padding: 10px 14px;
        background: rgba(10, 28, 20, .95);
        color: var(--gold-soft);
        text-transform: uppercase;
        letter-spacing: .08em;
        font-weight: 700;
    }
    .site-nav,
    .page-home .site-nav {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        z-index: 60;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px;
        background: rgba(4, 10, 8, .98);
        border: 1px solid var(--panel-edge);
        border-radius: 12px;
        box-shadow: var(--shadow);
    }
    .site-nav.open,
    .page-home .site-nav.open {
        display: flex;
    }
    .site-nav a,
    .page-home .site-nav a {
        padding: 12px 14px;
    }
    .hero-html-overlay {
        padding-left: 54px;
    }
    .hero-text-block {
        width: min(420px, 52vw);
    }
    .three-up-home-grid,
    .structure-first-grid.three-up-home-grid {
        grid-template-columns: 1fr 1fr;
    }
    .three-up-home-grid .books-card {
        grid-column: 1 / -1;
    }
    .site-footer .newsletter-card {
        grid-template-columns: 1fr;
    }
    .site-footer .newsletter-card .inline-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .hero-html-overlay {
        padding: 24px 18px;
        align-items: center;
        justify-content: flex-start;
    }
    .hero-text-block {
        width: min(100%, 360px);
    }
    .hero-text-block h1 {
        font-size: 2.85rem;
    }
    .hero-text-block .hero-subtitle {
        font-size: .95rem;
    }
    .hero-text-block .hero-lead {
        font-size: .92rem;
    }
    .three-up-home-grid,
    .structure-first-grid.three-up-home-grid {
        grid-template-columns: 1fr;
    }
    .page-hero.compact,
    .luxury-page-hero {
        padding: 24px 22px;
    }
}

/* ===== V14 fine-tuning ===== */
.hero-html-overlay {
    padding-top: 56px;
    padding-bottom: 36px;
}
.hero-text-block {
    width: min(700px, 48vw);
    max-width: 700px;
}
.hero-text-block h1 {
    margin-bottom: 12px;
}
.hero-text-block .hero-lead {
    max-width: 560px;
}

/* Better subpage header treatment: image lives behind nav, right side only */
body:not(.page-home) .site-header {
    min-height: 118px;
    padding: 18px 26px;
    grid-template-columns: minmax(300px, auto) 1fr auto;
    background:
        linear-gradient(90deg, rgba(4, 12, 9, .97) 0%, rgba(4, 12, 9, .93) 34%, rgba(4, 12, 9, .76) 46%, rgba(4, 12, 9, .22) 64%, rgba(4, 12, 9, .10) 100%),
        #07100b url('/assets/img/home-hero-masterpiece.png') 88% 35% / 980px auto no-repeat;
}
body:not(.page-home) .site-header::after {
    left: 38%;
}
body:not(.page-home) .brand {
    margin-left: 0;
    gap: 14px;
}
body:not(.page-home) .brand-flourish {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    background: url('/assets/img/compass-rose.svg') center center / contain no-repeat;
    opacity: .95;
}
body:not(.page-home) .brand strong {
    font-size: clamp(2.3rem, 3.3vw, 3.45rem);
}

/* Reader list box centered as a box, not shoved left */
.site-footer {
    width: min(1400px, calc(100% - 24px));
    margin: 0 auto 18px;
}
.site-footer .newsletter-card {
    width: min(1240px, calc(100% - 40px));
    margin: 28px auto 20px;
    padding: 30px 34px;
    grid-template-columns: minmax(300px, .95fr) minmax(520px, 1.15fr);
}
.site-footer .newsletter-card h2 {
    max-width: 520px;
}

@media (max-width: 980px) {
    .hero-html-overlay {
        padding-top: 42px;
    }
    .hero-text-block {
        width: min(500px, 60vw);
    }
    body:not(.page-home) .site-header,
    .page-home .site-header,
    .site-header {
        grid-template-columns: 1fr auto;
    }
    body:not(.page-home) .brand-flourish {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }
    body:not(.page-home) .site-header {
        background:
            linear-gradient(90deg, rgba(4, 12, 9, .97) 0%, rgba(4, 12, 9, .88) 44%, rgba(4, 12, 9, .42) 70%, rgba(4, 12, 9, .14) 100%),
            #07100b url('/assets/img/home-hero-masterpiece.png') 82% 34% / cover no-repeat;
    }
    .site-footer .newsletter-card {
        width: min(100%, calc(100% - 18px));
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .hero-html-overlay {
        padding-top: 34px;
    }
    .hero-text-block {
        width: min(100%, 380px);
    }
    body:not(.page-home) .site-header {
        min-height: 96px;
        padding: 14px 16px;
        background:
            linear-gradient(90deg, rgba(4, 12, 9, .98) 0%, rgba(4, 12, 9, .92) 54%, rgba(4, 12, 9, .34) 78%, rgba(4, 12, 9, .12) 100%),
            #07100b url('/assets/img/home-hero-masterpiece.png') 84% 34% / cover no-repeat;
    }
    body:not(.page-home) .site-header::after {
        left: 46%;
    }
    body:not(.page-home) .brand strong {
        font-size: 2rem;
    }
    .site-footer .newsletter-card {
        width: calc(100% - 8px);
        padding: 24px 18px;
    }
    .site-footer .newsletter-card h2 {
        max-width: none;
    }
}


/* ===== V15 divider + homepage blog fix ===== */
.ornate-divider,
.hero-divider,
.section-divider {
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}
.ornate-divider {
    width: 220px;
    height: 22px;
}
.hero-divider {
    width: 180px;
    height: 22px;
}
.section-divider {
    width: 132px;
    height: 20px;
}
.three-up-home-grid .blog-listing {
    gap: 16px;
}
.three-up-home-grid .blog-list-item {
    grid-template-columns: 1fr;
    gap: 10px;
}
.three-up-home-grid .blog-list-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 6;
    object-fit: cover;
    object-position: center;
    display: block;
}
.three-up-home-grid .blog-list-item span {
    display: block;
}
.three-up-home-grid .blog-list-item strong {
    font-size: 1.1rem;
    line-height: 1.2;
}
.three-up-home-grid .blog-list-item em {
    margin-top: 4px;
}

/* ===== V24 direct EPUB store ===== */
.library-order {
    margin: 0 0 24px;
    padding: 20px 0 0;
    border-top: 1px solid var(--panel-edge);
}
.library-order:first-of-type {
    border-top: 0;
    padding-top: 0;
}
.library-items {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}
.library-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px;
    border: 1px solid rgba(225, 199, 153, .14);
    background: rgba(8, 25, 18, .72);
    border-radius: 4px;
}
.library-item h3 {
    margin: 0 0 4px;
    font-family: var(--display);
    color: var(--ink);
    font-size: 1.35rem;
}
.checkout-detail form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 18px;
}
@media (max-width: 640px) {
    .library-item {
        display: grid;
    }
    .library-item .button {
        width: 100%;
    }
}

/* ===== V25 reader account polish ===== */
.toast-stack {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: grid;
    gap: 10px;
    width: min(420px, calc(100vw - 24px));
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: start;
    padding: 14px 16px;
    border-radius: 6px;
    border: 1px solid var(--panel-edge-strong);
    background: rgba(8, 33, 23, .98);
    color: var(--ink);
    box-shadow: 0 18px 40px rgba(0,0,0,.38);
    font-weight: 700;
    animation: toast-in .18s ease-out both;
}
.toast.error {
    background: rgba(61, 18, 28, .98);
    border-color: rgba(225, 145, 160, .36);
}
.toast button {
    border: 0;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    font: inherit;
    font-size: 1.3rem;
    line-height: 1;
    padding: 0 0 0 6px;
}
.toast-hide {
    animation: toast-out .2s ease-in both;
}
@keyframes toast-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-8px); }
}
@media (max-width: 640px) {
    .toast-stack {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
    }
}


/* ===== V30 discontinued paid-copy note ===== */
.library-discontinued-note {
    margin: 8px 0 0;
    padding: 8px 10px;
    border: 1px solid rgba(225, 199, 153, .18);
    background: rgba(66, 24, 32, .22);
    color: var(--gold-soft);
    font-size: .88rem;
    letter-spacing: .01em;
}
