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

:root {
    /* Cold Black Colors (from Book #1) */
    --primary-dark: #0a0b0f;     /* Deep cold black */
    --secondary-dark: #151720;   /* Dark steel blue-black */
    --tertiary-dark: #1f2332;    /* Medium cold black */
    --quaternary-dark: #2a2f45;  /* Lighter cold black */
    --accent-dark: #333854;      /* Cold dark accent */
    --accent-medium: #404968;    /* Medium cold accent */
    --accent-light: #4d5a7c;     /* Light cold accent */

    /* Red accents for highlights */
    --accent-red: #dc2626;
    --accent-maroon: #991b1b;
    --accent-wine: #7f1d1d;
    --accent-rose: #ef4444;

    /* Text colors with enhanced contrast */
    --text-light: #f8fafc;       /* Pure white with slight blue tint */
    --text-secondary: #e2e8f0;   /* Light gray with blue undertone */
    --text-muted: #94a3b8;       /* Muted blue-gray */
    --text-subtle: #64748b;      /* Subtle blue-gray */

    /* Gradients */
    --gradient-elegant: linear-gradient(135deg, #991b1b 0% 0%, #d32f2f 100% 100%);
    --gradient-cold: linear-gradient(135deg, #0a0b0f 0%, #151720 50%, #1f2332 100%);
    --gradient-subtle: linear-gradient(45deg, rgba(71, 85, 105, 0.1) 0%, rgba(100, 116, 139, 0.08) 100%);
    --border-subtle: rgba(71, 85, 105, 0.2);
    --shadow-elegant: 0 4px 20px rgba(15, 23, 42, 0.4);

    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Source Sans Pro', sans-serif;

    /* Spacing */
    --container-max-width: 1200px;
    --section-padding: 80px 0;
    --element-spacing: 2rem;
}

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 11, 15, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-rose);
    letter-spacing: 0.5px;
}

.nav-logo {
    height: 32px;
    width: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(71, 85, 105, 0.3);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
    border-color: var(--accent-rose);
}

.nav-brand-text {
    color: var(--accent-rose);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--accent-rose);
}

.nav-cta {
    background: var(--gradient-elegant);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: transform 0.3s ease;
    color: #ffffff !important;
    text-decoration: none;
}

.nav-cta:hover {
    transform: translateY(-2px);
    color: #ffffff !important;
    background: var(--accent-rose) !important;
}

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

.hero-background {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background-image: url('book01-hero-2.jpg');
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    z-index: -2;
    min-height: 120vh;
    width: 100%;
    transform: translateZ(0);
    will-change: transform;
}

.cosmic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(180deg, rgba(10, 11, 15, 0.4) 0%, rgba(31, 35, 50, 0.8) 100%),
        radial-gradient(ellipse at 25% 15%, rgba(71, 85, 105, 0.25) 0%, transparent 60%),
        radial-gradient(ellipse at 75% 85%, rgba(100, 116, 139, 0.2) 0%, transparent 55%),
        radial-gradient(ellipse at 15% 75%, rgba(51, 56, 84, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 25%, rgba(77, 90, 124, 0.2) 0%, transparent 45%);
    animation: elegantFloat 8s ease-in-out infinite;
    opacity: 1;
    will-change: transform;
    transform: translateZ(0);
    z-index: -1;
}

.cosmic-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, var(--shimmer-color1, rgba(127, 29, 29, 0.25)), var(--shimmer-color2, rgba(220, 38, 38, 0.15)));
    pointer-events: none;
    transform: translateZ(0);
    opacity: 0.9;
    transition: background 0.1s ease;
}

.cosmic-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(128, 0, 32, 0.7) 3px, transparent 3px),
        radial-gradient(circle at 80% 70%, rgba(139, 0, 35, 0.3) 2px, transparent 2px),
        radial-gradient(circle at 40% 20%, rgba(105, 0, 26, 0.35) 1.5px, transparent 1.5px),
        radial-gradient(circle at 60% 80%, rgba(115, 0, 29, 0.25) 1px, transparent 1px);
    background-size: 160px 160px, 200px 200px, 100px 100px, 260px 260px;
    animation: floatingParticles 15s linear infinite;
    opacity: 0.8;
    pointer-events: none;
    transform: translateZ(0);
    will-change: transform;
}

@keyframes elegantFloat {
    0% { 
        transform: translateY(0px) scale(1) rotate(0deg);
        opacity: 0.9;
    }
    25% { 
        transform: translateY(-20px) scale(1.03) rotate(1deg);
        opacity: 1;
    }
    50% { 
        transform: translateY(-30px) scale(1.08) rotate(0deg);
        opacity: 0.8;
    }
    75% { 
        transform: translateY(-15px) scale(1.05) rotate(-1deg);
        opacity: 1;
    }
    100% { 
        transform: translateY(0px) scale(1) rotate(0deg);
        opacity: 0.9;
    }
}



@keyframes floatingParticles {
    0% { 
        transform: translateY(-100vh) translateX(-50px);
        opacity: 0;
    }
    10% { 
        opacity: 0.8;
    }
    90% { 
        opacity: 0.8;
    }
    100% { 
        transform: translateY(100vh) translateX(50px);
        opacity: 0;
    }
}

@keyframes float-particle {
    0% {
        transform: translateY(-100vh) translateX(-50px) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(-90vh) translateX(-40px) scale(1);
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(50px) scale(0);
        opacity: 0;
    }
}

.hero-content {
    /* padding: 0 2rem; */
    padding: 0 2rem 5rem 2rem;
    z-index: 1;
    position: relative;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, rgba(10, 11, 15, 0.2) 0%, rgba(21, 23, 32, 0.4) 100%);
    backdrop-filter: blur(2px);
    padding: 1rem 2rem;
    border-radius: 15px;
    border: 1px solid rgba(71, 85, 105, 0.2);
}

.title-accent {
    color: var(--accent-rose);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.3s both;
    font-weight: 300;
    line-height: 1.5;
    background: linear-gradient(135deg, rgba(10, 11, 15, 0.3) 0%, rgba(21, 23, 32, 0.5) 100%);
    backdrop-filter: blur(2px);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(71, 85, 105, 0.2);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--accent-rose);
    border-bottom: 2px solid var(--accent-rose);
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

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

/* Buttons */
.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-button.primary {
    background: var(--gradient-elegant);
    color: var(--text-light);
    border: 2px solid rgba(220, 38, 38, 0.3);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 20px rgba(21, 23, 32, 0.6);
}

.cta-button.secondary {
    background: transparent;
    color: var(--accent-rose);
    border: 2px solid var(--accent-rose);
}

.cta-button.large {
    padding: 1.5rem 3rem;
    font-size: 1.1rem;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-elegant);
}

.cta-button.secondary:hover {
    background: var(--accent-rose);
    color: var(--primary-dark);
}

/* Sections */
.trilogy-overview,
.reader-experience,
.author-section,
.social-proof {
    padding: var(--section-padding);
}

.final-cta {
    padding: 120px 0;
}

.trilogy-overview {
    background: var(--secondary-dark);
    position: relative;
}

.trilogy-overview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-subtle);
    pointer-events: none;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: 2rem;
    color: var(--accent-rose);
    font-weight: 400;
    letter-spacing: -0.5px;
}

.series-hook {
    text-align: center;
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
    line-height: 1.5;
}

/* Book Spotlight */
.book-spotlight {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
    align-items: center;
}

.book-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--accent-rose);
    margin-bottom: 1rem;
    font-weight: 500;
    letter-spacing: -0.5px;
}

.book-tagline {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-style: italic;
    font-weight: 300;
}

.book-description p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.book-question {
    font-style: italic;
    color: var(--accent-rose);
    font-weight: 500;
}

.book-cover-image {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: var(--shadow-elegant);
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book-cover-image:hover {
    transform: scale(1.02);
}

.book-cover-placeholder {
    background: var(--gradient-elegant);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-elegant);
}

.cover-design {
    text-align: center;
    padding: 2rem;
}

.cover-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.25px;
}

.cover-author {
    font-size: 0.9rem;
    color: var(--accent-rose);
    font-weight: 600;
    letter-spacing: 2px;
}

/* Book Teasers */
.book-teasers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.teaser-card {
    background: linear-gradient(135deg, rgba(10, 11, 15, 0.9) 0%, rgba(21, 23, 32, 0.95) 100%);
    border-radius: 20px;
    border: 1px solid rgba(71, 85, 105, 0.2);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.teaser-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(71, 85, 105, 0.4);
}

.teaser-book-cover {
    width: 170px;
    height: 270px;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.teaser-card:hover .teaser-book-cover,
.teaser-card:focus-within .teaser-book-cover {
    transform: scale(1.05);
}

.teaser-card:focus-within {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(71, 85, 105, 0.4);
    outline: 2px solid rgba(71, 85, 105, 0.6);
    outline-offset: 2px;
}

.teaser-cover-image {
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
}

.teaser-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.teaser-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--accent-rose);
    margin-bottom: 0.5rem;
    font-weight: 500;
    letter-spacing: -0.25px;
}

.teaser-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.teaser-description {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.teaser-status {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: var(--gradient-elegant);
    color: var(--text-light);
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border: 1px solid rgba(128, 0, 32, 0.3);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(128, 0, 32, 0.3);
    margin-top: 1rem;
}

/* Reader Experience */
.reader-experience {
    background: var(--primary-dark);
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.experience-item {
    text-align: center;
    padding: 2rem;
    background: rgba(26, 26, 26, 0.5);
    border-radius: 15px;
    border: 1px solid var(--border-subtle);
}

.experience-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.reader-quote {
    text-align: center;
    font-size: 1.5rem;
    font-style: italic;
    color: var(--accent-rose);
    font-family: var(--font-heading);
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    border-left: 4px solid var(--accent-rose);
    font-weight: 300;
}

/* Author Section */
.author-section {
    background: var(--secondary-dark);
}

.author-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 15px;
    font-style: italic;
    font-weight: 300;
    font-size: 1.1rem;
}

.author-content {
    display: flex;
    gap: 3rem;
    align-items: stretch;
    max-width: 1000px;
    margin: 0 auto;
}

.author-image {
    flex: 0 0 320px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.author-bio {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.author-photo {
    width: 100%;
    border-radius: 15px;
    object-fit: cover;
    object-position: center;
    border: 1px solid var(--border-subtle);
    transition: transform 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.author-photo:hover {
    transform: scale(1.05);
    border-color: var(--accent-rose);
}

.author-bio p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.author-fun-fact {
    color: var(--accent-rose);
    font-style: italic;
}



/* Final CTA */
.final-cta {
    background: 
        linear-gradient(135deg, rgba(10, 11, 15, 0.8) 0%, rgba(21, 23, 32, 0.7) 100%),
        url('section-bg.jpg');
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    text-align: center;
    position: relative;
    overflow: hidden;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.cta-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-light);
    font-weight: 400;
    letter-spacing: -0.5px;
}

.cta-book-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--accent-rose);
    margin-bottom: 0.5rem;
    font-weight: 500;
    letter-spacing: -0.5px;
}

.cta-subtitle {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.cta-price {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-light);
}

/* Footer */
.footer {
    background: var(--primary-dark);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--border-subtle);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: rgba(10, 11, 15, 0.9);
    border: 2px solid rgba(71, 85, 105, 0.3);
    border-radius: 50%;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.scroll-to-top:hover {
    background: rgba(21, 23, 32, 0.95);
    border-color: var(--accent-rose);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top svg {
    transition: transform 0.3s ease;
}

.scroll-to-top:hover svg {
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-background {
        background-image: url('book01-hero-mobile.jpg');
    }

    .nav-menu {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
        font-weight: 300;
    }

    .book-spotlight {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .author-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .author-image {
        flex: none;
    }

    .author-photo {
        width: 220px;
        height: 220px;
    }

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

    .container {
        padding: 0 1rem;
    }

    .book-teasers {
        grid-template-columns: 1fr;
    }

    .teaser-book-cover {
        width: 100px;
        height: 150px;
    }
    
    .scroll-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .hero-background {
        background-image: url('book01-hero-mobile.jpg');
    }

    .hero {
        padding: 0 1rem;
    }

    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        letter-spacing: 0.5px;
    }

    .section-title {
        font-size: 2rem;
        font-weight: 400;
    }

    .book-title {
        font-size: 2rem;
        font-weight: 500;
    }

    .cta-title {
        font-size: 2rem;
        font-weight: 400;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Focus states for keyboard navigation */
.cta-button:focus,
.nav-menu a:focus {
    outline: 2px solid var(--accent-rose);
    outline-offset: 2px;
}
