/* ========================================
   ROBERT LANCASTER AUTHOR WEBSITE STYLES
   ======================================== */

/* CSS Variables */
:root {
    /* Color Palette */
    --primary-dark: #0a0e1a;
    --secondary-dark: #1a1f2e;
    --accent-red: #d32f2f;
    --accent-blue: #2196f3;
    --accent-gold: #ffc107;
    --text-light: #ffffff;
    --text-gray: #b0b0b0;
    --text-dark: #2c3e50;
    
    /* Crime Action Colors */
    --crime-primary: #c62828;
    --crime-secondary: #8b0000;
    
    /* Paranormal Colors */
    --paranormal-primary: #1976d2;
    --paranormal-secondary: #0d47a1;
    
    /* Cozy Colors */
    --cozy-primary: #f9a825;
    --cozy-secondary: #f57c00;
    
    /* Typography */
    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--primary-dark);
    color: var(--text-light);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: var(--spacing-sm);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-red) 0%, #8b0000 100%);
    color: var(--text-light);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

.btn-secondary:hover {
    background-color: var(--text-light);
    color: var(--primary-dark);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Navigation */
.navbar {
    background-color: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem var(--spacing-md);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-menu a {
    color: var(--text-gray);
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--text-light);
}

.nav-cta {
    background: linear-gradient(135deg, var(--accent-red) 0%, #8b0000 100%);
    color: var(--text-light) !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: var(--radius-md);
    font-weight: 600;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.95) 0%, rgba(26, 31, 46, 0.9) 100%),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect fill="url(%23grid)" width="1200" height="600"/></svg>');
    padding: var(--spacing-xl) 0;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 900px;
}

.hero-title {
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, var(--text-light) 0%, var(--text-gray) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--accent-red);
    margin-bottom: var(--spacing-md);
    font-weight: 600;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-gray);
    max-width: 700px;
    margin: 0 auto var(--spacing-lg);
    line-height: 1.8;
}

/* Free Books Section */
.free-books-section {
    background: linear-gradient(180deg, var(--secondary-dark) 0%, var(--primary-dark) 100%);
    padding: var(--spacing-xl) 0;
}

.free-books-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

.free-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.free-book-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.free-book-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.free-book-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--accent-red) 0%, #8b0000 100%);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 1px;
    box-shadow: var(--shadow-md);
}

.book-cover {
    width: 100%;
    max-width: 250px;
    height: auto;
    margin: 0 auto var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.placeholder-cover {
    width: 100%;
    max-width: 250px;
    height: 375px;
    margin: 0 auto var(--spacing-md);
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(255, 255, 255, 0.2);
}

.placeholder-cover.coming-soon {
    background: linear-gradient(135deg, var(--cozy-primary) 0%, var(--cozy-secondary) 100%);
    border: none;
}

.placeholder-text {
    text-align: center;
    padding: var(--spacing-md);
}

.placeholder-text h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.placeholder-text p {
    font-size: 0.875rem;
    opacity: 0.9;
}

.free-book-card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
}

.book-genre {
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-sm);
}

.book-tagline {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Signup Form */
.signup-form-container {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.signup-form .form-group {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.signup-form input[type="email"] {
    flex: 1;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.signup-form input[type="email"]:focus {
    outline: none;
    border-color: var(--accent-red);
}

.signup-form input[type="email"]::placeholder {
    color: var(--text-gray);
}

.form-note {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-gray);
    margin: 0;
}

/* Featured Series Section */
.featured-series {
    padding: var(--spacing-xl) 0;
    background-color: var(--primary-dark);
}

.featured-series .section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg);
}

.series-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.series-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.series-card.crime-action {
    border-top: 3px solid var(--crime-primary);
}

.series-card.paranormal {
    border-top: 3px solid var(--paranormal-primary);
}

.series-card.cozy {
    border-top: 3px solid var(--cozy-primary);
}

.series-header {
    margin-bottom: var(--spacing-md);
}

.series-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-sm);
}

.crime-action .series-badge {
    background-color: var(--crime-primary);
    color: var(--text-light);
}

.paranormal .series-badge {
    background-color: var(--paranormal-primary);
    color: var(--text-light);
}

.cozy .series-badge {
    background-color: var(--cozy-primary);
    color: var(--text-dark);
}

.series-header h3 {
    font-size: 1.5rem;
    margin: 0;
}

.series-books {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.series-book-item {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
}

.series-book-cover {
    width: 100px;
    height: auto;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}

.series-book-placeholder {
    width: 100px;
    height: 150px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    position: relative;
}

.cozy-placeholder {
    background: linear-gradient(135deg, rgba(249, 168, 37, 0.2) 0%, rgba(245, 124, 0, 0.1) 100%);
}

.coming-badge {
    background-color: var(--accent-red);
    color: var(--text-light);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.625rem;
    font-weight: 700;
    text-align: center;
}

.series-book-info {
    flex: 1;
}

.series-book-info h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.book-number {
    font-size: 0.875rem;
    color: var(--text-gray);
    margin-bottom: var(--spacing-sm);
}

.series-link {
    display: inline-block;
    color: var(--accent-blue);
    font-weight: 600;
    transition: color 0.3s ease;
}

.series-link:hover {
    color: var(--text-light);
}

/* Newsletter CTA */
.newsletter-cta {
    background: linear-gradient(135deg, var(--accent-red) 0%, #8b0000 100%);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.newsletter-content h2 {
    margin-bottom: var(--spacing-sm);
}

.newsletter-content p {
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto var(--spacing-lg);
    opacity: 0.95;
}

/* Footer */
.footer {
    background-color: var(--primary-dark);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
    max-width: 1200px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-gray);
}

.footer-section p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-gray);
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--text-light);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-gray);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(10, 14, 26, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: var(--spacing-md) 0;
        gap: var(--spacing-sm);
    }

    .nav-menu.active {
        left: 0;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero {
        padding: var(--spacing-lg) 0;
        min-height: 50vh;
    }

    .free-books-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .signup-form .form-group {
        flex-direction: column;
    }

    .series-grid {
        grid-template-columns: 1fr;
    }

    .series-book-item {
        flex-direction: column;
        text-align: center;
    }

    .series-book-cover,
    .series-book-placeholder {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .btn {
        width: 100%;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 1rem;
    }
}

/* Smooth Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}
