/* 
    Owen R. Shepard | Novelist Website
    Master Stylesheet - Production Version
*/

:root {
    /* Colors sampled from the 'Majestic' book cover */
    --color-bg: #06090c;
    --color-surface: #0d1218;
    --color-accent: #5d7a8c; /* Steel Blue */
    --color-text: #d1d9e0;
    --color-text-muted: #6b7280;
    --color-bright: #ffffff;
    
    /* Typography */
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Josefin Sans', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

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

html { 
    scroll-behavior: smooth; 
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 1.5rem; 
}

/* --- Global Typography --- */
h1, h2, h3 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.6em;
    font-weight: 200;
}

.small-caps {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5em;
    display: block;
}

.muted { color: var(--color-text-muted); }
.text-bright { color: var(--color-bright); }
.text-center { text-align: center; }

/* --- Cinematic Grain Overlay --- */
.grain-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.035;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0; width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 2rem;
    z-index: 100;
    mix-blend-mode: difference;
}

.nav-logo {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.8em;
    opacity: 0.6;
}

.nav-links a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    margin-left: 2rem;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.nav-links a:hover { opacity: 1; }

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 40%, #121c26 0%, #0b1118 40%, #06090c 100%);
}

.hero-content { 
    position: relative; 
    z-index: 10;
    animation: heroFadeIn 2s ease-out forwards;
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.sub-label {
    display: block;
    margin-bottom: 3rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.2em;
    opacity: 0.3;
}

.hero h1 { 
    font-size: 3rem; 
}

.line-accent {
    width: 4rem;
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 3rem auto 0;
}

/* --- Tagline Section --- */
.tagline-section { 
    padding: 12rem 0; 
    background: #040608; 
}

.tagline-text {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.75rem;
    color: #9ca3af;
    max-width: 900px;
    margin: 0 auto;
}

/* --- Book Feature --- */
.book-feature { 
    padding: 8rem 0; 
}

.feature-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 5rem; 
    align-items: start; 
}

.sticky-wrapper { 
    position: sticky; 
    top: 8rem; 
    text-align: center; 
}

.book-cover { 
    width: 100%; 
    max-width: 400px; 
    box-shadow: 0 40px 80px -20px rgba(0,0,0,0.9); 
    border: 1px solid rgba(255,255,255,0.05); 
}

.book-meta { 
    margin-top: 3rem; 
}

/* --- Buttons --- */
.btn-premium {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 1.2rem 3rem;
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.4em;
    font-size: 0.7rem;
    transition: all 0.4s;
    background: transparent;
    cursor: pointer;
}

.btn-premium:hover { 
    border-color: white; 
    background: rgba(255,255,255,0.05); 
    letter-spacing: 0.5em; 
}

.book-title { 
    font-size: 3rem; 
    margin-bottom: 1.5rem; 
}

.book-hook {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.25rem;
    color: white;
    border-left: 2px solid var(--color-accent);
    padding-left: 1.5rem;
    margin-bottom: 4rem;
}

.blurb-text p { 
    color: #9ca3af; 
    font-weight: 300; 
    margin-bottom: 2rem; 
    font-size: 1.125rem; 
}

.highlight-callout { 
    color: white; 
    text-transform: uppercase; 
    letter-spacing: 0.4em; 
    font-size: 0.875rem; 
}

/* --- Specs Grid --- */
.specs-section { 
    margin-top: 4rem; 
    padding-top: 3rem; 
    border-top: 1px solid rgba(255,255,255,0.05); 
}

.specs-heading { 
    font-size: 0.7rem; 
    color: var(--color-text-muted); 
    margin-bottom: 2.5rem; 
}

.specs-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 2rem; 
}

.spec-card { 
    border-left: 1px solid rgba(93, 122, 140, 0.3); 
    padding-left: 1.5rem; 
}

.spec-label { 
    font-size: 0.65rem; 
    text-transform: uppercase; 
    letter-spacing: 0.2em; 
    color: var(--color-accent); 
    display: block; 
    margin-bottom: 0.5rem; 
}

.spec-card p { 
    font-size: 0.875rem; 
    color: #d1d5db; 
}

/* --- Teaser Section (Book 2) --- */
.teaser-section { 
    padding: 12rem 0; 
    background: #030507; 
    border-top: 1px solid rgba(255,255,255,0.05); 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
    text-align: center; 
}

.teaser-section .small-caps { 
    margin-bottom: 4rem; 
}

.teaser-title { 
    font-size: 2.25rem; 
    color: var(--color-text-muted); 
    line-height: 1.1; 
}

.teaser-line { 
    display: block; 
    margin-bottom: 0.5rem; 
}

/* --- About Section --- */
.about-section { 
    padding: 10rem 0; 
}

.about-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 5rem; 
    align-items: center; 
}

.author-frame { 
    position: relative; 
    text-align: center; 
}

.author-photo { 
    width: 66%; 
    display: block; 
    margin: 0 auto; 
    filter: none; 
}

.section-heading { 
    font-size: 1.75rem; 
    margin-bottom: 2.5rem; 
}

.author-bio p { 
    color: #9ca3af; 
    font-size: 1.125rem; 
    margin-bottom: 1.5rem; 
    font-weight: 300; 
}

/* --- Newsletter Section --- */
.newsletter-section { 
    padding: 10rem 0; 
    border-top: 1px solid rgba(255,255,255,0.05); 
}

.newsletter-copy { 
    color: #9ca3af; 
    font-weight: 300; 
    margin-bottom: 4rem; 
    font-size: 1.1rem; 
}

.newsletter-form { 
    display: flex; 
    max-width: 600px; 
    margin: 0 auto; 
    gap: 0; 
}

.newsletter-input { 
    flex-grow: 1; 
    background: rgba(255,255,255,0.02); 
    border: 1px solid rgba(255,255,255,0.1); 
    padding: 1.2rem 1.5rem; 
    color: white; 
    font-family: var(--font-main); 
    font-size: 0.75rem; 
    letter-spacing: 0.2em; 
    outline: none;
}

.newsletter-input:focus { 
    border-color: var(--color-accent); 
}

.newsletter-form .btn-premium { 
    margin-top: 0; 
    border-left: none; 
    white-space: nowrap; 
}

.newsletter-feedback { 
    margin-top: 2.5rem; 
    font-family: var(--font-serif); 
    font-style: italic; 
    font-size: 1rem; 
    color: var(--color-accent); 
    min-height: 1.5em; 
}

.btn-loading { 
    opacity: 0.5; 
    pointer-events: none; 
}

/* --- Contact Section --- */
.contact-section { 
    padding: 10rem 0; 
    border-top: 1px solid rgba(255,255,255,0.05); 
    background: #020305; 
}

.contact-links { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 4rem; 
    margin-top: 5rem; 
}

.contact-item .small-caps { 
    margin-bottom: 1rem; 
}

.contact-link { 
    color: var(--color-text); 
    text-decoration: none; 
    font-size: 1.125rem; 
    letter-spacing: 0.1em; 
    padding-bottom: 0.5rem; 
    border-bottom: 1px solid rgba(255,255,255,0.1); 
    transition: border-color 0.3s; 
}

.contact-link:hover { 
    border-color: var(--color-accent); 
}

/* --- Footer --- */
.footer { 
    padding: 5rem 0; 
    border-top: 1px solid rgba(255,255,255,0.05); 
}

.footer-content { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    color: #4b5563; 
}

.footer-meta { 
    display: flex; 
    gap: 2rem; 
}

/* --- Scroll Reveal Logic --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- 📱 MOBILE OPTIMIZATIONS --- */
@media (max-width: 768px) {
    /* Navbar Adjustment */
    .navbar {
        flex-direction: column;
        padding: 1.5rem 1rem;
        gap: 0.8rem;
    }
    .nav-logo {
        letter-spacing: 0.4em;
    }
    .nav-links a {
        margin: 0 0.75rem;
    }

    /* Hero Fix: Prevents Name Breaking */
    .hero {
        height: 70vh;
    }
    .hero h1 {
        font-size: 1.6rem !important;
        letter-spacing: 0.35em !important;
        white-space: nowrap; /* Ensures Owen R. Shepard stays on one line */
    }
    .sub-label {
        letter-spacing: 0.6em;
        margin-bottom: 1.5rem;
    }

    /* Tagline Spacing */
    .tagline-section { padding: 6rem 1rem; }
    .tagline-text { font-size: 1.2rem; line-height: 1.6; }

    /* Book Details Fix */
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .book-cover {
        max-width: 85%;
    }
    .book-title {
        font-size: 2rem !important;
        letter-spacing: 0.25em !important;
    }
    .highlight-callout {
        letter-spacing: 0.2em;
        font-size: 0.8rem;
    }

    /* Teaser Fix: Fits 'DEVELOPMENT' on screen */
    .teaser-section {
        padding: 6rem 1rem;
    }
    .teaser-title {
        font-size: 1.3rem !important;
        letter-spacing: 0.15em !important; /* Tight letter spacing for long words */
        line-height: 1.6 !important;
    }
    .teaser-line {
        margin-bottom: 0.8rem;
    }

    /* Photo & Grid Layouts */
    .about-grid {
        grid-template-columns: 1fr;
    }
    .author-photo {
        width: 80%;
    }

    /* Newsletter Layout */
    .newsletter-form {
        flex-direction: column;
    }
    .newsletter-form .btn-premium {
        border-left: 1px solid rgba(255,255,255,0.1);
        margin-top: 10px;
        width: 100%;
    }

    /* Footer & Links */
    .contact-links {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* Extra small device adjustment */
@media (max-width: 380px) {
    .hero h1 {
        font-size: 1.3rem !important;
        letter-spacing: 0.25em !important;
    }
    .teaser-title {
        font-size: 1.1rem !important;
    }
}