
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600&family=Inter:wght@400;500;600&display=swap');

/* =========================================
   GLOBAL VARIABLES AND BASE STYLES
========================================= */

:root {
    --gold: #e5c189;
    --ink: #070e13;
    --muted: #c8c5be;
    --line: #9c753f;
    --hero-bg: linear-gradient(130deg, #132a38, #15100e);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #090c10;
    color: #f5eee2;
    font: 16px/1.7 Georgia, 'Times New Roman', serif;
}

a {
    color: inherit;
}

a:hover {
    color: var(--gold);
}


/* =========================================
   SITE HEADER AND NAVIGATION
========================================= */

.site-header {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px clamp(20px, 5vw, 100px);
    background: rgba(5, 9, 13, .96);
    border-bottom: 1px solid #473522;
    position: relative;
    z-index: 10;
}

.brand {
    text-decoration: none;
    font-family: Cinzel, Georgia, serif;
    font-size: clamp(19px, 2.3vw, 30px);
    letter-spacing: .08em;
    color: var(--gold);
    line-height: 1.3;
    text-align: center;
}

.brand span {
    display: block;
    font-size: 10px;
    letter-spacing: .65em;
    color: #f2e6d1;
    margin-top: 5px;
}

.site-header nav {
    display: flex;
    gap: clamp(18px, 3vw, 48px);
}

.site-header nav a {
    font: 500 12px Inter, sans-serif;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .15em;
}

.menu-toggle {
    display: none;
}


/* =========================================
   HOMEPAGE HERO AND BACKGROUND
========================================= */

.hero {
    min-height: calc(100vh - 100px);
    position: relative;
    background-image: var(--hero-bg);
    background-size: cover;
    background-position: center;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(2, 7, 10, .64),
            rgba(3, 8, 11, .77) 49%,
            rgba(1, 6, 10, .88)
        ),
        linear-gradient(
            0deg,
            rgba(2, 5, 7, .9),
            transparent 25%
        );
}

.hero-inner {
    position: relative;
    max-width: 1360px;
    min-height: 690px;
    display: grid;
    grid-template-columns:
        minmax(250px, .83fr)
        minmax(360px, 1.17fr);
    gap: clamp(32px, 6vw, 100px);
    align-items: center;
    margin: auto;
    padding: 65px clamp(22px, 4vw, 70px) 90px;
}


/* =========================================
   FEATURED BOOK COVER
========================================= */

.feature-cover {
    text-align: center;
    filter: drop-shadow(0 25px 25px #000);
}

.feature-cover img {
    display: block;
    max-height: 600px;
    max-width: 100%;
    width: auto;
    margin: auto;
    border: 1px solid rgba(232, 191, 129, .6);
    box-shadow:
        14px 13px 0 #100e0d,
        20px 19px 0 #9b763d;
}


/* =========================================
   TYPOGRAPHY AND FEATURED DESCRIPTION
========================================= */

.eyebrow {
    font: 500 12px Inter, sans-serif;
    letter-spacing: .3em;
    color: var(--gold);
    text-transform: uppercase;
}

.rule {
    display: inline-block;
    width: 30px;
    height: 1px;
    background: var(--gold);
    vertical-align: middle;
    margin: 0 12px;
}

.feature-copy h1,
.detail-page h1,
.reading-page h1 {
    font: 500 clamp(40px, 5vw, 78px)/1.15 Cinzel, Georgia, serif;
    letter-spacing: .04em;
    color: #f1c892;
    text-shadow: 0 3px 9px #000;
    margin: 22px 0;
}

.subtitle {
    color: var(--gold);
}

.blurb {
    font-size: clamp(16px, 1.3vw, 19px);
    line-height: 1.7;
    color: #f6ecdf;
    max-height: 430px;
    overflow: auto;
    padding-right: 7px;
    white-space: normal;
    text-shadow: 0 1px 2px #000;
}


/* =========================================
   BUTTONS AND ACTION LINKS
========================================= */

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

.button,
button {
    display: inline-block;
    cursor: pointer;
    font: 600 12px Inter, sans-serif;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: 14px 20px;
    text-decoration: none;
    border-radius: 3px;
    border: 1px solid var(--line);
    transition: filter .2s;
}

.button:hover,
button:hover {
    filter: brightness(1.18);
    color: inherit;
}

.gold {
    background: linear-gradient(#f0cf97, #b78548);
    color: #211609;
    border-color: #dfb975;
}

.red {
    background: linear-gradient(#86313a, #4d1520);
    color: #fff;
}

.outline {
    background: rgba(2, 7, 10, .65);
    color: #f6e8d5;
}


/* =========================================
   BOOK CATALOG
========================================= */

.book-section {
    padding: 45px 25px 75px;
    background-image:
        linear-gradient(
            rgba(2, 5, 9, .55),
            rgba(2, 5, 9, .75)
        ),
        var(--hero-bg);
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

.section-heading {
    display: flex;
    gap: 26px;
    align-items: center;
    max-width: 1000px;
    margin: auto auto 42px;
}

.section-heading span {
    height: 1px;
    background: #896b42;
    flex: 1;
}

.section-heading h2,
.content-panel h2 {
    font: 400 24px Cinzel, serif;
    letter-spacing: .22em;
    color: var(--gold);
    text-align: center;
}

.book-grid {
    max-width: 1130px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 32px;
}

.book-tile {
    text-align: center;
}

.book-tile img {
    width: 100%;
    max-width: 210px;
    aspect-ratio: 2/3;
    object-fit: cover;
    border: 1px solid #947341;
    box-shadow: 0 12px 20px #000;
}

.book-tile a {
    text-decoration: none;
}

.book-tile h3 {
    font: 500 17px/1.4 Cinzel, serif;
    margin: 14px 0 4px;
}

.book-tile p,
.book-tile small {
    color: #c4bbaa;
    margin: 0;
}


/* =========================================
   ABOUT AND CONTENT SECTIONS
========================================= */

.content-panel {
    max-width: 900px;
    padding: 50px 28px;
    margin: 35px auto;
}

.content-panel p {
    color: #ded3c4;
}


/* =========================================
   CONTACT FORM
========================================= */

.contact-panel {
    border-top: 1px solid #5f503b;
}

.contact-panel form,
.installer form {
    display: grid;
    gap: 18px;
}

.contact-panel label,
.installer label,
.admin-form label {
    display: grid;
    gap: 6px;
    color: var(--gold);
    font: 500 13px Inter, sans-serif;
}

input,
textarea,
select {
    width: 100%;
    background: #131923;
    border: 1px solid #75634d;
    color: #fff;
    font: 16px Georgia, serif;
    padding: 12px;
    border-radius: 3px;
}

textarea {
    resize: vertical;
}

.trap {
    position: absolute;
    left: -9999px;
    visibility: hidden;
}

.success {
    color: #b5e9a7 !important;
}

.error {
    color: #ffaaa5 !important;
}


/* =========================================
   FOOTER
========================================= */

footer {
    padding: 30px;
    text-align: center;
    border-top: 1px solid #332b25;
    color: #9e9589;
    font: 13px Inter, sans-serif;
}

footer a {
    margin-left: 26px;
}


/* =========================================
   INDIVIDUAL BOOK DETAIL PAGE
========================================= */

.detail-page {
    max-width: 1250px;
    margin: 70px auto;
    display: grid;
    grid-template-columns: minmax(200px, 400px) 1fr;
    gap: 65px;
    padding: 30px;
}

.detail-cover {
    display: block;
    width: 100%;
    max-width: 350px;
    height: auto;
    object-fit: contain;
    background: transparent !important;
    opacity: 1 !important;
    filter: none !important;
    box-shadow: 12px 16px 30px #000;
}


/* =========================================
   SAMPLE READING PAGE
========================================= */

.reading-page {
    max-width: 790px;
    margin: 70px auto;
    padding: 0 24px 90px;
}

.reading-page h1 {
    text-align: center;
    font-size: 40px;
}

.reading-page .eyebrow {
    text-align: center;
}

.sample-text {
    white-space: normal;
    font: 19px/1.95 Georgia, serif;
    color: #e8dfd2;
    margin: 65px 0;
}


/* =========================================
   WEBSITE INSTALLER
========================================= */

.installer {
    max-width: 560px;
    margin: 7vh auto;
    background: #15191f;
    padding: 32px;
}

.installer h1 {
    font: 32px Cinzel, serif;
    color: var(--gold);
}

.installer button {
    background: #a77b48;
    color: #fff;
}


/* =========================================
   MOBILE AND TABLET RESPONSIVENESS
========================================= */

@media (max-width: 820px) {

    .site-header {
        height: auto;
        min-height: 80px;
    }

    .menu-toggle {
        display: block;
        background: none;
        color: #fff;
        border: 0;
        font-size: 24px;
    }

    .site-header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #090c10;
        padding: 25px;
        flex-direction: column;
    }

    .site-header nav.show {
        display: flex;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 55px 22px 75px;
        gap: 40px;
    }

    .feature-cover img {
        max-height: 480px;
    }

    .feature-copy h1 {
        text-align: center;
        font-size: 44px;
    }

    .eyebrow {
        text-align: center;
    }

    .blurb {
        max-height: none;
    }

    .detail-page {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .detail-cover {
        max-width: 370px;
        margin: auto;
    }

    .section-heading h2 {
        font-size: 18px;
    }

}


/* 3D book layer over matching fixed hero wallpaper */
.hero {
    background-attachment: fixed;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}
.hero-shade {
    /* Keep scene visible while protecting text against the wallpaper */
    background: linear-gradient(90deg, rgba(4,7,10,.10) 0%, rgba(3,7,11,.14) 40%, rgba(3,7,11,.66) 65%, rgba(3,7,11,.78) 100%);
}
.feature-cover { filter: none; }
.feature-cover a { display: inline-block; max-width: 100%; }
.feature-cover img {
    width: auto;
    max-width: 100%;
    max-height: min(70vh, 650px);
    height: auto;
    object-fit: contain;
    border: 0;
    box-shadow: none;
    filter: drop-shadow(15px 24px 18px rgba(0,0,0,.65));
    transition: transform .2s ease;
}
.feature-cover a:hover img { transform: translateY(-5px) scale(1.015); }
/* Mobile browser support: fixed backgrounds are unreliable on iOS */
@media (max-width: 767px) {
  .hero { background-attachment: scroll; background-position: center top; }
  .hero-shade { background: rgba(2,7,11,.56); }
  .feature-cover img { max-height: 54vh; }
}
@media (prefers-reduced-motion: reduce) {
  .feature-cover img { transition: none; }
}
