:root {
    --primary: #D4A017;
    --secondary: #FF6B35;
    --bg: #0A0A0A;
    --text: #E5E5E5;
    --font-heading: 'Cinzel', serif;
    --font-body: 'EB Garamond', serif;
    --font-ui: 'FiraSans', sans-serif;
    --max-reading-width: 780px;
    --reading-font-size: 18px;
    --nav-height: 60px;
}

/* Font faces */
@font-face {
    font-family: 'Cinzel';
    src: url('../fonts/Cinzel-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Cinzel';
    src: url('../fonts/Cinzel-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'EB Garamond';
    src: url('../fonts/EBGaramond-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'EB Garamond';
    src: url('../fonts/EBGaramond-Italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: 'EB Garamond';
    src: url('../fonts/EBGaramond-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'FiraSans';
    src: url('../fonts/FiraSans-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'FiraSans';
    src: url('../fonts/FiraSans-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

/* Reading progress bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 1000;
    transition: width 0.1s ease;
}

/* Navigation */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 160, 23, 0.15);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    padding: 0 2rem;
}
nav .brand {
    font-family: var(--font-heading);
    color: var(--primary);
    font-size: 1.25rem;
    text-decoration: none;
    letter-spacing: 0.05em;
}
nav .nav-links {
    margin-left: auto;
    display: flex;
    gap: 1.5rem;
    list-style: none;
}
nav .nav-links a {
    color: var(--text);
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: 0.875rem;
    opacity: 0.8;
    transition: opacity 0.2s, color 0.2s;
}
nav .nav-links a:hover {
    opacity: 1;
    color: var(--primary);
}

/* Hamburger menu (mobile) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: auto;
}

/* Hero section */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #0A0A0A 0%, #1A0800 30%, #0D0600 60%, #0A0A0A 100%);
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 80%, rgba(212, 160, 23, 0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 30% 50%, rgba(255, 107, 53, 0.05) 0%, transparent 50%);
    animation: ember-glow 6s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes ember-glow {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}
.hero.has-bg-image {
    background: var(--hero-bg) center/cover no-repeat;
}
.hero.has-bg-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(10,10,10,0.7) 0%, rgba(10,10,10,0.4) 40%, rgba(10,10,10,0.8) 100%);
    pointer-events: none;
}
.hero-header {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 1100px;
    width: 100%;
    margin-bottom: 3rem;
}
.hero-header h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--primary);
    text-shadow: 0 0 30px rgba(212, 160, 23, 0.3), 0 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 0.5rem;
    letter-spacing: 0.08em;
    line-height: 1.2;
}
.hero-header .hero-author {
    font-family: var(--font-ui);
    font-size: 1.1rem;
    opacity: 0.7;
    letter-spacing: 0.03em;
}
.hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1100px;
    width: 100%;
}
.hero-cover {
    flex-shrink: 0;
    perspective: 800px;
}
.hero-cover-img {
    display: block;
    max-height: 480px;
    width: auto;
    border-radius: 6px;
    box-shadow: 0 0 40px rgba(212, 160, 23, 0.3),
                0 0 80px rgba(255, 107, 53, 0.15),
                0 20px 60px rgba(0, 0, 0, 0.6);
    transform: rotateY(-4deg);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.hero-cover-img:hover {
    transform: rotateY(0deg) scale(1.02);
    box-shadow: 0 0 60px rgba(212, 160, 23, 0.45),
                0 0 100px rgba(255, 107, 53, 0.2),
                0 25px 70px rgba(0, 0, 0, 0.7);
}
.hero-text {
    text-align: left;
}
.hero-text p {
    max-width: 500px;
    font-size: 1.2rem;
    opacity: 0.85;
    line-height: 1.7;
    margin-bottom: 2rem;
}
.hero-description {
    font-family: var(--font-body);
    font-size: 1.05rem;
    max-width: 520px;
    opacity: 0.8;
    line-height: 1.8;
    text-align: left;
}
.hero-cta {
    display: inline-block;
    padding: 0.8rem 2.5rem;
    border: 2px solid var(--primary);
    border-radius: 4px;
    color: var(--primary);
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}
.hero-cta:hover {
    background: var(--primary);
    color: var(--bg);
    box-shadow: 0 0 25px rgba(212, 160, 23, 0.4);
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}
.hero-cta-buy {
    background: var(--primary);
    color: var(--bg);
}
.hero-cta-buy:hover {
    background: transparent;
    color: var(--primary);
}
.hero-cta-soon {
    opacity: 0.45;
    cursor: default;
    border-style: dashed;
}
.hero-cta-soon:hover {
    background: transparent;
    color: var(--primary);
    box-shadow: none;
}
.hero-announcement {
    margin-top: 1.5rem;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    opacity: 0.5;
    font-style: italic;
}

/* Sections */
.section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.section h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: 0.05em;
}

/* Chapter grid */
.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.chapter-card {
    position: relative;
    border: 1px solid rgba(212, 160, 23, 0.2);
    border-radius: 8px;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(212,160,23,0.02) 100%);
    transition: border-color 0.3s, transform 0.2s, box-shadow 0.3s;
    text-decoration: none;
    color: var(--text);
    display: block;
    overflow: hidden;
}
.chapter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
.chapter-card:hover::before {
    transform: scaleX(1);
}
.chapter-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(212, 160, 23, 0.1);
}
.chapter-card .chapter-num {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}
.chapter-card h3 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Purchase links */
.purchase-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}
.purchase-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--primary);
    border-radius: 6px;
    color: var(--primary);
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: 0.875rem;
    transition: background 0.3s, color 0.3s;
}
.purchase-link:hover {
    background: var(--primary);
    color: var(--bg);
}

/* Reading controls bar */
.reading-controls {
    position: sticky;
    top: var(--nav-height);
    z-index: 90;
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(212, 160, 23, 0.1);
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 2rem;
    gap: 0.75rem;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--text);
    opacity: 0.7;
}
.reading-controls:hover { opacity: 1; }
.reading-controls label { letter-spacing: 0.05em; }
.reading-controls-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.reading-controls-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 6px rgba(212, 160, 23, 0.4);
}
.reading-controls-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(212, 160, 23, 0.4);
}
.reading-controls-value {
    min-width: 2.5em;
    text-align: center;
}

/* Chapter reading page */
.chapter-content {
    max-width: var(--max-reading-width);
    margin: 0 auto;
    padding: 3rem 2rem 6rem;
    font-size: var(--reading-font-size);
}
.chapter-content h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 15px rgba(212, 160, 23, 0.2);
}
.chapter-content .chapter-meta {
    font-family: var(--font-ui);
    font-size: 0.875rem;
    color: var(--text);
    opacity: 0.6;
    margin-bottom: 2rem;
}
.chapter-content p {
    margin-bottom: 1.2em;
    text-align: justify;
    hyphens: auto;
}
.chapter-content h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--primary);
    margin: 2rem 0 1rem;
}
.chapter-content h3 {
    font-family: var(--font-heading);
    font-size: 1.375rem;
    color: var(--primary);
    margin: 1.5rem 0 0.75rem;
}
.chapter-content blockquote {
    border-left: 3px solid var(--primary);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    opacity: 0.9;
}
.chapter-content em { font-style: italic; }
.chapter-content strong { font-weight: 700; color: #fff; }
.chapter-content a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: rgba(212, 160, 23, 0.3);
}
.chapter-content a:hover {
    text-decoration-color: var(--primary);
}

/* Chapter navigation (prev/next) */
.chapter-nav {
    display: flex;
    justify-content: space-between;
    max-width: var(--max-reading-width);
    margin: 0 auto;
    padding: 2rem;
    border-top: 1px solid rgba(212, 160, 23, 0.15);
}
.chapter-nav a {
    color: var(--primary);
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: 0.875rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.chapter-nav a:hover { opacity: 1; }

/* Footer */
footer {
    border-top: 1px solid rgba(212, 160, 23, 0.15);
    padding: 2rem;
    text-align: center;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    opacity: 0.5;
}
footer a {
    color: var(--text);
    text-decoration: none;
    margin: 0 0.5rem;
}
footer a:hover { color: var(--primary); }

/* Email reveal button */
.email-reveal-btn {
    background: none;
    border: 1px solid var(--primary);
    color: var(--primary);
    font-family: var(--font-ui);
    font-size: 0.875rem;
    padding: 0.2rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.email-reveal-btn:hover {
    background: var(--primary);
    color: var(--bg);
}

/* Dedication (Widmung) page */
.dedication-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--nav-height) - 120px);
    padding: 4rem 2rem;
    text-align: center;
}
.dedication-ornament {
    font-size: 2rem;
    color: var(--primary);
    opacity: 0.4;
    letter-spacing: 0.5em;
    margin: 1.5rem 0;
}
.dedication-text {
    font-family: var(--font-body);
    font-size: var(--reading-font-size);
    font-style: italic;
    line-height: 2;
    color: var(--text);
    max-width: var(--max-reading-width);
    margin: 0 auto;
    border: none;
    padding: 0;
}
.dedication-text p {
    margin: 0.5em 0;
}

/* Publisher banner */
.publisher-banner {
    border-top: 1px solid rgba(212, 160, 23, 0.12);
    padding: 3rem 2rem;
    text-align: center;
    margin-top: 2rem;
}
.publisher-banner-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text);
    opacity: 0.6;
    margin: 0 0 1rem;
    letter-spacing: 0.05em;
}
.publisher-banner-link {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    color: var(--primary);
    text-decoration: none;
    border: 1px solid var(--primary);
    padding: 0.6rem 1.8rem;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}
.publisher-banner-link:hover {
    background: var(--primary);
    color: var(--bg);
}

/* Footer links */
.footer-links {
    margin-top: 0.5rem;
}
.footer-links a {
    margin: 0 0.5rem;
}

/* Responsive — wide desktop */
@media (min-width: 1200px) {
    :root { --max-reading-width: 820px; }
}

/* Responsive — mobile */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    nav .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.98);
        flex-direction: column;
        padding: 1rem 2rem;
        border-bottom: 1px solid rgba(212, 160, 23, 0.15);
    }
    nav .nav-links.open { display: flex; }
    .hero { min-height: 70vh; padding: 3rem 1.5rem; }
    .hero-header { margin-bottom: 2rem; }
    .hero-inner { flex-direction: column; gap: 2rem; text-align: center; }
    .hero-text { text-align: center; }
    .hero-text p { margin-left: auto; margin-right: auto; }
    .hero-cover-img { max-height: 320px; transform: none; }
    .chapter-content { padding: 2rem 1.25rem 4rem; }
    .chapter-grid { grid-template-columns: 1fr; }
    .reading-controls { padding: 0 1rem; }
    .reading-controls-slider { width: 80px; }
    .dedication-page { min-height: 60vh; padding: 3rem 1.5rem; }
    .dedication-text { }
}
