/* ==================== VARIABLES ==================== */
:root {
    --ink: #1a1a1a;
    --paper: #faf9f6;
    --warm-gray: #8a8578;
    --light-rule: #e2ded6;
    --cream: #f5f3ed;
    --system-green: #3a6a3a;
}

/* ==================== RESET & BASE ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Libre Franklin', sans-serif;
    background-color: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ==================== HEADER ==================== */
header {
    text-align: center;
    border-bottom: 1px solid var(--light-rule);
}

.logo-mark {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--warm-gray);
    margin-bottom: 1.5rem;
    opacity: 0; animation: fadeUp 0.8s ease forwards;
}

.logo {
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
}

.logo span { font-weight: 600; }
.logo:hover { color: var(--warm-gray); }

/* ==================== NAV (homepage) ==================== */
nav {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--light-rule);
    opacity: 0; animation: fadeUp 0.8s ease 0.45s forwards;
}

nav a {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--warm-gray);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 1px;
    background: var(--ink);
    transition: width 0.3s ease;
}

nav a:hover { color: var(--ink); }
nav a:hover::after { width: 100%; }

/* ==================== BREADCRUMB (book page) ==================== */
.breadcrumb {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.25rem 2rem 0;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--warm-gray);
    opacity: 0; animation: fadeUp 0.6s ease 0.1s forwards;
}

.breadcrumb a {
    color: var(--warm-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { margin: 0 0.5rem; }

/* ==================== MAIN ==================== */
main { margin: 0 auto; }

/* ==================== SHARED BOOK STYLES ==================== */
.book-cover {
    aspect-ratio: 6/9;
    box-shadow:
        8px 8px 0 var(--cream),
        8px 8px 0 1px var(--light-rule),
        16px 16px 30px rgba(0,0,0,0.08);
    overflow: hidden;
}

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

.section-label {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--warm-gray);
}

.meta-row { display: flex; gap: 1rem; font-size: 0.78rem; font-weight: 300; }

.meta-label {
    color: var(--warm-gray);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.68rem;
    font-weight: 500;
    padding-top: 1px;
}

.cta-row { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }

.cta-link {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
    padding: 0.85rem 2.5rem;
    border: 1px solid var(--ink);
    transition: all 0.3s ease;
}

.cta-link:hover { background: var(--ink); color: var(--paper); }

.cta-link.secondary { border-color: var(--light-rule); color: var(--warm-gray); }
.cta-link.secondary:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }

/* ==================== FEATURED (homepage) ==================== */
.featured {
    padding: 5rem 0;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 4rem;
    align-items: start;
    border-bottom: 1px solid var(--light-rule);
    opacity: 0; animation: fadeUp 0.8s ease 0.6s forwards;
}

.featured .section-label { margin-bottom: 1.25rem; }

.book-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 300;
    line-height: 1.15;
    margin-bottom: 0.3rem;
}

.book-author {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-style: italic;
    color: var(--warm-gray);
    margin-bottom: 2rem;
}

.book-description {
    font-size: 0.92rem;
    font-weight: 300;
    line-height: 1.85;
    color: #4a4a4a;
    margin-bottom: 1.25rem;
}

.book-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--light-rule);
}

.book-meta .meta-label { min-width: 100px; }

/* ==================== ABOUT (homepage) ==================== */
.about { padding: 4.5rem 0; border-bottom: 1px solid var(--light-rule); }
.about-content { max-width: 580px; }

.about-content h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
}

.about-content p {
    font-size: 0.92rem;
    font-weight: 300;
    line-height: 1.85;
    color: #4a4a4a;
    margin-bottom: 1rem;
}

/* ==================== CONTACT (homepage) ==================== */
.contact { padding: 4.5rem 0; }

.contact h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
}

.contact-info {
    font-size: 0.92rem;
    font-weight: 300;
    line-height: 2;
    color: #4a4a4a;
}

.contact-info a {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--light-rule);
    transition: border-color 0.3s ease;
}

.contact-info a:hover { border-color: var(--ink); }

/* ==================== HERO (book page) ==================== */
.hero {
    padding: 3.5rem 0 4rem;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 4rem;
    align-items: start;
    border-bottom: 1px solid var(--light-rule);
    opacity: 0; animation: fadeUp 0.8s ease 0.2s forwards;
}

.cover-wrapper { position: sticky; top: 2rem; }
.hero-details { padding-top: 0.25rem; }
.hero .section-label { margin-bottom: 1rem; }

.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.4rem, 5vw, 3.2rem);
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 0.4rem;
}

.hero-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--warm-gray);
    margin-bottom: 0.3rem;
}

.hero-author {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    font-style: italic;
    color: var(--warm-gray);
    margin-bottom: 2.5rem;
}

.hero-tagline {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    font-weight: 400;
    font-style: italic;
    line-height: 1.6;
    color: var(--ink);
    margin-bottom: 2rem;
    padding-left: 1.25rem;
    border-left: 2px solid var(--light-rule);
}

.hero-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--light-rule);
}

.hero-meta .meta-label { min-width: 110px; }

/* ==================== BLURB (book page) ==================== */
.blurb-section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--light-rule);
}

.blurb-section h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    margin-bottom: 2rem;
}

.system-line {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--system-green);
    margin-bottom: 1.25rem;
    letter-spacing: 0.02em;
}

.blurb-text {
    font-size: 0.92rem;
    font-weight: 300;
    line-height: 1.9;
    color: #4a4a4a;
    margin-bottom: 1.5rem;
    max-width: 640px;
}

.blurb-text strong { font-weight: 500; color: var(--ink); }

.character-block {
    margin-bottom: 1.5rem;
    max-width: 640px;
}

.character-name {
    font-family: 'Libre Franklin', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: 0.4rem;
}

.character-desc {
    font-size: 0.92rem;
    font-weight: 300;
    line-height: 1.9;
    color: #4a4a4a;
}

.blurb-closing {
    font-size: 0.92rem;
    font-weight: 300;
    line-height: 1.9;
    color: #4a4a4a;
    max-width: 640px;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

.blurb-closing em {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    color: var(--ink);
    margin-top: 0.75rem;
}

.system-closing {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    font-weight: 300;
    color: var(--system-green);
    margin-top: 2rem;
    line-height: 2;
}

/* ==================== EDITIONS (book page) ==================== */
.editions-section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--light-rule);
}

.editions-section h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    margin-bottom: 2rem;
}

.editions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.edition-card {
    padding: 1.5rem;
    border: 1px solid var(--light-rule);
    transition: border-color 0.3s ease;
}

.edition-card:hover { border-color: var(--warm-gray); }

.edition-format {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--warm-gray);
    margin-bottom: 0.75rem;
}

.edition-price {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.edition-isbn {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.72rem;
    font-weight: 300;
    color: var(--warm-gray);
}

/* ==================== CONTENT WARNINGS (book page) ==================== */
.warnings-section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--light-rule);
}

.warnings-section h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
}

.warnings-text {
    font-size: 0.85rem;
    font-weight: 300;
    line-height: 1.85;
    color: #4a4a4a;
    max-width: 640px;
    margin-bottom: 1.5rem;
}

.format-note {
    font-size: 0.82rem;
    font-weight: 300;
    font-style: italic;
    color: var(--warm-gray);
    max-width: 640px;
}

/* ==================== FOOTER ==================== */
footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid var(--light-rule);
}

.footer-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--warm-gray);
    margin-bottom: 0.75rem;
}

.footer-logo a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-logo a:hover { color: var(--ink); }

.footer-copy {
    font-size: 0.7rem;
    font-weight: 300;
    color: var(--warm-gray);
}

/* ==================== ANIMATION ==================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 700px) {
    header { padding: 2.5rem 1.5rem 1.5rem; }
    nav { gap: 1.5rem; flex-wrap: wrap; }
    .featured { grid-template-columns: 1fr; gap: 2.5rem; padding: 3.5rem 0; }
    .featured .book-cover { max-width: 220px; margin: 0 auto; }
    .about, .contact { padding: 3rem 0; }
    .hero { grid-template-columns: 1fr; gap: 2.5rem; padding: 2.5rem 0 3rem; }
    .hero .book-cover { max-width: 220px; margin: 0 auto; }
    .cover-wrapper { position: static; }
    .editions-grid { grid-template-columns: 1fr; }
    main { padding: 0 1.5rem; }
    .breadcrumb { padding: 1rem 1.5rem 0; }
}
