/* ==========================================================================
   1. BRAND VARIABLES & RESET
   ========================================================================== */
:root {
    --primary: #1a2e1a;   /* Library Green */
    --accent: #c5a059;    /* Muted Gold */
    --bg: #fdfaf5;        /* Parchment */
    --text: #2d2d2d;
    --contrast: #1a4332;
    --alert: #800000;
    
    --font-serif: 'Cardo', serif;
    --font-sans: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   2. TYPOGRAPHY & HEADERS
   ========================================================================== */
.brand-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--accent);
    margin: 2rem;
    text-align: center;
}

.book-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-style: italic;
    margin: 0;
    line-height: 1.1;
    text-align: center;
}

.description {
    max-width: 480px;
    line-height: 1.7;
    margin: 2rem auto;
    font-size: 1.1rem;
    text-align: center;
}

.scarcity-note {
    font-size: 0.9rem;
    color: var(--accent);
    text-align: center;
    margin-top: 1.5rem;
    font-style: italic;
}

/* ==========================================================================
   3. COMPONENTS (FORM & FEATURES)
   ========================================================================== */
.waitlist-form {
    display: flex;
    gap: 0;
    justify-content: center;
    max-width: 450px;
    margin: 0 auto;
}

input[type="email"] {
    padding: 18px 25px;
    border: 1px solid #dcdcdc;
    background: white;
    flex-grow: 1;
    font-family: var(--font-sans);
    outline: none;
}

.btn-gold {
    background: var(--primary);
    color: white;
    border: none;
    padding: 18px 30px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-gold:hover {
    background: var(--accent);
}

.features {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin: 3rem auto;
    max-width: 1500px;
    padding: 0 20px;
}

.feature {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    flex: 1;
    min-width: 280px;
    max-width: 350px;
}

/* ==========================================================================
   4. QUOTATION SYSTEM
   ========================================================================== */
.quotation {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--primary);
    max-width: 600px;
    width: 60%;
    margin: 3rem auto;
    padding: 0;
    position: relative;
    text-align: center;
}

.quotation::before {
    content: "“";
    font-size: 4rem;
    color: var(--accent);
    position: absolute;
    left: -10px;
    top: -20px;
    opacity: 0.5;
}

.quotation::after {
    content: "”";
    font-size: 4rem;
    color: var(--accent);
    position: absolute;
    right: -10px;
    bottom: -60px;
    opacity: 0.5;
}

/* ==========================================================================
   5. LEAF ANIMATION & PHYSICS
   ========================================================================== */
.leaf-container {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
}

.leaf {
    position: absolute;
    width: 45px; 
    height: 45px;
    top: -60px;
    z-index: -1;
    /* Use cubic-bezier for a more "fluttery" feel */
    transition: transform 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 1s ease;
}

.leaf.settled {
    transform: rotate(var(--settle-rotation)) scale(0.9);
    opacity: 0.75;
}

@keyframes fall {
    to { top: var(--ground-level); }
}

@keyframes sway {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    50% { transform: translateX(50px) rotate(120deg); }
}

/* ==========================================================================
   6. RESPONSIVE (MOBILE)
   ========================================================================== */
@media (max-width: 768px) {
    main {
        width: 80%;
        margin: auto;
    }

    .quotation {
        font-size: 1.1rem;
        padding: 0 20px;
    }

    .quotation::before, 
    .quotation::after {
        font-size: 3rem;
    }

    /* Prevent mobile input zooming */
    input[type="email"] {
        font-size: 16px;
    }
}

/* Specific fix for when the height of content exceeds the height of the screen */
@media (max-width: 1220px) {
    body {
        justify-content: flex-start; /* Stop centering vertically so the top stays at the top */
    }

    .book-title {
        font-size: 3rem; /* Slightly smaller to save vertical space */
    }

    .features {
        margin: 2rem 1rem;
    }
}