:root {
    --gold: #C9A84C;
    --bg: #050505;
    --text: #f0ebe3;
    --text-muted: rgba(240, 235, 227, 0.55);
    --border: rgba(240, 235, 227, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Spectral', serif;
    font-size: 20px;
    line-height: 1.8;
    overflow-x: hidden;
    background-color: #050505;
}

/* Ambient Backgrounds */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 10s ease-out;
    z-index: -1;
    filter: brightness(0.4) contrast(1.1); /* Brightened so user can see them */
}

.ambient-bg.active {
    opacity: 0.85;
    transform: scale(1.05);
}

.noise-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    opacity: 0.04;
    z-index: -1;
    pointer-events: none;
}

/* Layout */
.reader-container {
    max-width: 750px;
    margin: 0 auto;
    padding: 20vh 2rem 40vh;
    position: relative;
    z-index: 10;
}

/* Scrollytelling Sections */
.episode-block {
    display: flex;
    flex-direction: column;
}

.episode-header {
    margin-bottom: 5rem;
    text-align: center;
    background: rgba(0,0,0,0.6);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.05);
}

.episode-title {
    font-family: 'Lora', serif;
    font-size: 3.2rem;
    color: var(--gold);
    margin-bottom: 1rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 20px rgba(0,0,0,0.9);
}

.episode-pov {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    display: inline-block;
    border-bottom: 1px solid var(--gold);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.paragraph {
    margin-bottom: 2.5rem;
    opacity: 0.5; /* Improved visibility for unread text */
    transform: translateY(15px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out, color 0.5s ease;
    text-shadow: 0 2px 10px rgba(0,0,0,0.9);
    cursor: pointer;
    font-size: 22px; /* Increased legibility */
    line-height: 1.9;
    background: rgba(0,0,0,0.4);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 2px solid transparent;
}

.paragraph:hover {
    opacity: 0.8;
}

.transcript-line.active .paragraph {
    opacity: 1;
    transform: translateY(0) scale(1.02);
    color: #ffffff;
    background: rgba(0,0,0,0.7);
    border-left: 2px solid var(--gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* End credits: author + publication cards */
.end-credits {
    margin-top: 6rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.credit-card {
    text-align: center;
    background: rgba(0,0,0,0.6);
    padding: 3rem 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
}

.credit-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    display: inline-block;
    border-bottom: 1px solid var(--gold);
    padding-bottom: 0.5rem;
    margin-bottom: 1.75rem;
}

.author-photo {
    display: block;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold);
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
    margin: 0 auto 1.25rem;
}

.author-logo {
    display: block;
    width: 190px;
    max-width: 60%;
    margin: 0 auto 1.25rem;
}

.pub-logo {
    display: block;
    width: 200px;
    max-width: 60%;
    margin: 0 auto 1.5rem;
    border-radius: 8px;
}

.author-blurb {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 48ch;
    margin: 0 auto 2rem;
}

.card-tagline {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 2rem auto 0;
    opacity: 0.85;
}

/* Footer: 18+ disclaimer banner */
.site-footer {
    position: relative;
    z-index: 10;
    width: 100%;
    line-height: 0;
}

.site-footer img {
    display: block;
    width: 100%;
    height: auto;
}

/* Legacy subscribe CTA (retained for .subscribe-button) */
.subscribe-cta {
    margin-top: 6rem;
    text-align: center;
    background: rgba(0,0,0,0.6);
    padding: 3rem 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
}

.subscribe-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.subscribe-heading {
    font-family: 'Lora', serif;
    font-size: 1.8rem;
    color: var(--text);
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.9);
}

.subscribe-copy {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.subscribe-button {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--bg);
    background: var(--gold);
    text-decoration: none;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.subscribe-button:hover {
    transform: translateY(-3px);
    background: #e0bf63;
    box-shadow: 0 10px 30px rgba(201, 168, 76, 0.3);
}

/* Audio Player */
.audio-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    z-index: 100;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 10px;
}

audio {
    filter: invert(1) hue-rotate(180deg) brightness(1.5) contrast(1.2);
    opacity: 0.8;
}

/* Spotify Player */
.spotify-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    height: 80px;
    z-index: 100;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

.spotify-container:hover {
    transform: translateY(-5px);
}

/* Header Nav */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    z-index: 50;
    background: linear-gradient(to bottom, rgba(5,5,5,0.9) 0%, rgba(5,5,5,0) 100%);
}

.brand {
    font-family: 'Lora', serif;
    font-size: 1.2rem;
    color: var(--gold);
    text-decoration: none;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
}

.brand-logo {
    height: 84px;
    width: auto;
    display: block;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

.brand-logo:hover { opacity: 0.85; }

.book-title-nav {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Loading */
#loader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--gold);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: opacity 1s ease;
}
