:root {
    --violet-glow: #8b5cf6;
    --violet-dark: #4c1d95;
    --gold-bright: #fbbf24;
    --gold-dim: #b45309;
    --charcoal: #0f172a; /* Very dark blue-grey */
    --parchment: #fefce8;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--charcoal);
    color: #e2e8f0;
    line-height: 1.6;
}

/* Header & Nav */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: rgba(15, 23, 42, 0.9);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--violet-dark);
}

.logo img { height: 50px; }

nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 600;
    transition: 0.3s;
}

nav a:hover { color: var(--gold-bright); }

/* Hero Section */
.hero {
    height: 30vh;
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)), url('images/book_website_background.png');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-bottom: 4px solid var(--violet-glow);
    padding-top: 20px;    /* Adjust this number lower to shrink the top */
    padding-bottom: 20px; /* Adjust this number lower to shrink the bottom */
}

h1 { font-size: 3.5rem; margin: 0; color: var(--gold-bright); text-shadow: 0 0 20px rgba(139, 92, 246, 0.5); }
.tagline { font-size: 1.2rem; color: #cbd5e1; margin-top: 10px; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 35px;
    background: var(--violet-glow);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 25px;
    transition: 0.3s;
    box-shadow: 0 0 15px var(--violet-dark);
}

.btn:hover { background: var(--gold-bright); color: var(--charcoal); box-shadow: 0 0 20px var(--gold-bright); }

/* Book Section */
.container { max-width: 1000px; margin: 50px auto; padding: 0 20px; }

.book-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; align-items: center; }

.book-card img { width: 100%; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid var(--gold-dim); }

/* Reading Section */
.reading-box {
    /* Base color: A slightly richer cream */
    background-color: #fdfaf0; 
    
    /* Layer 1: Subtle fibers (diagonal lines)
       Layer 2: A radial gradient that makes the center lighter and edges darker (age stains) */
    background-image: 
        repeating-linear-gradient(45deg, rgba(180, 83, 9, 0.03) 0px, rgba(180, 83, 9, 0.03) 1px, transparent 1px, transparent 10px),
        radial-gradient(circle, transparent 40%, rgba(180, 83, 9, 0.1) 100%);
    
    /* The "Aged Edge" effect: 
       Inner shadow makes the edges look slightly burnt/older
       Outer shadow makes the paper look like it is floating above the dark background */
    box-shadow: 
        inset 0 0 60px rgba(180, 83, 9, 0.15), 
        0 20px 50px rgba(0,0,0,0.5);

    /* A darker, more "sepia" border */
    border: 1px solid #d2b48c; 
    
    color: #1a1a1a;
    padding: 80px;
    border-radius: 4px;
    font-family: 'Merriweather', serif;
    line-height: 1.8;
}

.drop-cap {
    float: left;
    font-size: 4rem;
    line-height: 1;
    font-weight: bold;
    margin-right: 10px;
    color: var(--violet-dark);
}

footer { text-align: center; padding: 40px; font-size: 0.9rem; color: #64748b; }

/* Reading Box Enhancements */
.reading-box {
    background: var(--parchment);
    color: #1a1a1a;
    padding: 80px; /* More padding for a premium feel */
    max-width: 800px; /* Narrower reading width is easier on the eyes */
    margin: 0 auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    border: 1px solid #e2e8f0;
}

/* Cliffhanger Styling */
.cliffhanger-highlight {
    margin-top: 40px;
    padding: 30px;
    border-left: 4px solid var(--violet-glow);
    background: rgba(139, 92, 246, 0.05);
    font-style: italic;
    font-size: 1.2rem;
}

/* Email Signup Form */
.next-steps {
    text-align: center;
    margin-top: 60px;
    padding-bottom: 100px;
}

.cta-box {
    background: var(--charcoal);
    border: 1px solid var(--violet-dark);
    padding: 40px;
    border-radius: 10px;
    margin: 30px auto;
    max-width: 500px;
}

.email-signup {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.email-signup input {
    padding: 12px;
    border-radius: 5px;
    border: 1px solid var(--violet-dark);
    background: #1e293b;
    color: white;
    flex-grow: 1;
}
/* Container for the Logo and the CTA Box */
.top-flex-container {
    display: flex;
    justify-content: space-between; /* Pushes logo to left, box to right */
    align-items: center;           /* Centers them vertically against each other */
    gap: 40px;                     /* Space between the logo and the box */
    margin-bottom: 40px;           /* Space before the chapter text starts */
}

/* Mobile Responsive Fix */
@media (max-width: 768px) {
    .top-flex-container {
        flex-direction: column;    /* Stacks them on top of each other on small screens */
        text-align: center;
    }
    
    .cta-box {
        max-width: 100% !important; /* Let the box take full width on mobile */
    }
}