/* ============================================
   Herman & Rusty - Website Styles
   Color Palette from Logo:
   - Primary Red: #C8102E
   - Gold/Yellow: #F2A900
   - Dark: #1A1A2E
   - White: #FFFFFF
   - Accent Dark Red: #8B0000
   - Light BG: #FFF9F0
   ============================================ */

/* --- CSS Variables --- */
:root {
    --red: #C8102E;
    --red-dark: #8B0000;
    --red-light: #E8344E;
    --gold: #F2A900;
    --gold-light: #FFD54F;
    --gold-dark: #C98600;
    --dark: #1A1A2E;
    --dark-light: #2D2D44;
    --white: #FFFFFF;
    --off-white: #FFF9F0;
    --cream: #FFF3E0;
    --gray-light: #F5F5F5;
    --gray: #888;
    --shadow: rgba(26, 26, 46, 0.15);
    --shadow-strong: rgba(26, 26, 46, 0.3);

    --font-display: 'Bangers', cursive;
    --font-heading: 'Fredoka One', cursive;
    --font-body: 'Nunito', sans-serif;

    --radius: 12px;
    --radius-lg: 20px;
    --transition: 0.3s ease;
    --transition-slow: 0.6s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--dark);
    background-color: var(--off-white);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--red);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--red-dark);
}

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

.text-center {
    text-align: center;
}

/* --- Floating Atoms Background --- */
.atoms-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.atom {
    position: absolute;
    font-size: 2rem;
    color: var(--gold);
    opacity: 0.08;
    animation: floatAtom 20s infinite ease-in-out;
}

.atom-1 { top: 10%; left: 5%; animation-delay: 0s; font-size: 3rem; }
.atom-2 { top: 30%; right: 10%; animation-delay: -4s; font-size: 2.5rem; }
.atom-3 { top: 60%; left: 15%; animation-delay: -8s; font-size: 2rem; }
.atom-4 { top: 80%; right: 20%; animation-delay: -12s; font-size: 3.5rem; }
.atom-5 { top: 45%; left: 70%; animation-delay: -16s; font-size: 2rem; }

@keyframes floatAtom {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-30px) rotate(90deg); }
    50% { transform: translateY(10px) rotate(180deg); }
    75% { transform: translateY(-20px) rotate(270deg); }
}

/* --- Header & Navigation --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px var(--shadow);
    transition: all var(--transition);
}

.site-header.scrolled {
    background: rgba(26, 26, 46, 0.98);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo-img {
    height: 45px;
    width: auto;
    transition: transform var(--transition);
}

.nav-logo-img:hover {
    transform: scale(1.05);
}

.logo-herman {
    color: var(--red);
}

.logo-and {
    color: var(--gold);
    font-size: 1.2rem;
}

.logo-rusty {
    color: var(--red);
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 0.5rem;
}

.nav-link {
    color: var(--white);
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: all var(--transition);
    font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
    background: rgba(242, 169, 0, 0.1);
}

.nav-cta {
    background: var(--red) !important;
    color: var(--white) !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: 50px !important;
    font-weight: 800 !important;
}

.nav-cta:hover {
    background: var(--red-dark) !important;
    color: var(--white) !important;
    transform: scale(1.05);
}

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--white);
    border-radius: 3px;
    position: relative;
    transition: all var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 28px;
    height: 3px;
    background: var(--white);
    border-radius: 3px;
    transition: all var(--transition);
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--dark) 0%, #2D1B3D 50%, var(--dark-light) 100%);
    padding: 8rem 0 4rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(242, 169, 0, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 4s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(200, 16, 46, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 5s ease-in-out infinite reverse;
}

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

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-tagline {
    color: var(--gold);
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: 4px;
}

.title-line-1 {
    display: block;
}

.title-herman {
    color: var(--red);
}

.title-and {
    color: var(--gold);
    font-size: 3rem;
    margin: 0 0.25rem;
}

.title-rusty {
    color: var(--red);
    display: block;
}

.hero-subtitle {
    font-family: var(--font-heading);
    color: var(--gold);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.hero-description {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Book Display */
.book-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    perspective: 800px;
}

.book-placeholder {
    width: 280px;
    height: 400px;
    position: relative;
    transform-style: preserve-3d;
    animation: bookFloat 3s ease-in-out infinite;
}

@keyframes bookFloat {
    0%, 100% { transform: translateY(0) rotateY(-15deg); }
    50% { transform: translateY(-15px) rotateY(-10deg); }
}

.book-spine {
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(to right, var(--red-dark), var(--red));
    transform: rotateY(90deg) translateX(-15px);
    transform-origin: left;
    border-radius: 4px 0 0 4px;
}

.book-cover {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, var(--red), var(--red-dark));
    border-radius: 4px 12px 12px 4px;
    box-shadow:
        5px 5px 20px rgba(0, 0, 0, 0.4),
        inset 0 0 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--gold);
    overflow: hidden;
}

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

.book-series {
    display: block;
    font-family: var(--font-display);
    color: var(--gold);
    font-size: 1.4rem;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.book-title-display {
    display: block;
    font-family: var(--font-heading);
    color: var(--white);
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.book-atom-icon {
    font-size: 3rem;
    color: var(--gold);
    margin: 1rem 0;
    animation: spin 10s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.book-subtitle {
    display: block;
    font-family: var(--font-body);
    color: var(--gold-light);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.book-shadow {
    width: 200px;
    height: 20px;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.3) 0%, transparent 70%);
    margin-top: 1rem;
    animation: shadowPulse 3s ease-in-out infinite;
}

@keyframes shadowPulse {
    0%, 100% { transform: scaleX(1); opacity: 0.7; }
    50% { transform: scaleX(0.85); opacity: 0.4; }
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gold);
    font-size: 2rem;
    opacity: 0.6;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 800;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: var(--red);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(200, 16, 46, 0.4);
}

.btn-primary:hover {
    background: var(--red-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(200, 16, 46, 0.5);
}

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

.btn-secondary:hover {
    background: var(--gold);
    color: var(--dark);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1.1rem 2.5rem;
    font-size: 1.15rem;
}

.btn-glow {
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 4px 15px rgba(200, 16, 46, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(200, 16, 46, 0.7), 0 0 60px rgba(200, 16, 46, 0.2); }
}

.btn-icon {
    font-size: 1.2em;
}

/* --- Section Titles --- */
.section-title {
    font-family: var(--font-display);
    font-size: 3rem;
    text-align: center;
    color: var(--dark);
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 3rem;
}

/* --- Features Section --- */
.features {
    padding: 6rem 0;
    background: var(--white);
    position: relative;
    z-index: 1;
}

.features.has-bg-illustration {
    overflow: hidden;
}

.illustration-title {
    color: var(--white) !important;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

.illustration-subtitle {
    font-family: var(--font-heading);
    color: var(--white);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 0, 0, 0.3);
    font-size: 1.8rem;
    text-align: center;
    margin-top: 3rem;
    margin-bottom: 0;
}

.features.has-bg-illustration::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/Herman and Rusty Illustration.jpg') center center / cover no-repeat;
    opacity: 1;
    z-index: -1;
    pointer-events: none;
}

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

.feature-card {
    background: var(--off-white);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--red), var(--gold));
    transform: scaleX(0);
    transition: transform var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px var(--shadow);
    border-color: var(--gold-light);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h3 {
    font-family: var(--font-heading);
    color: var(--red);
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--dark-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* --- Characters Preview --- */
.characters-preview {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--dark) 0%, #2D1B3D 100%);
    position: relative;
    z-index: 1;
}

.characters-preview .section-title {
    color: var(--white);
}

.characters-preview .section-subtitle {
    color: rgba(255, 255, 255, 0.6);
}

.characters-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.character-preview-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all var(--transition);
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.character-preview-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--gold);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.character-img-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--gold);
    position: relative;
    overflow: hidden;
}

.herman-placeholder {
    background: linear-gradient(135deg, #3A3A5C, #4A4A6A);
}

.rusty-placeholder {
    background: linear-gradient(135deg, #4A3A2A, #5C4A3A);
}

.hannah-placeholder {
    background: linear-gradient(135deg, #3A4A5C, #4A5A6A);
}

.skip-placeholder {
    background: linear-gradient(135deg, #4A2A3A, #5C3A4A);
}

.placeholder-icon {
    font-size: 4rem;
}

/* Real character images - home page circular */
.character-home-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 50%;
}

/* Real character images - character page */
.character-full-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: var(--radius-lg);
}

/* Real book cover image - hero */
.book-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px 12px 12px 4px;
    box-shadow:
        5px 5px 20px rgba(0, 0, 0, 0.4);
}

/* Real book cover image - about & buy pages */
.about-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px 16px 16px 8px;
}

.character-preview-card h3 {
    font-family: var(--font-heading);
    color: var(--gold);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.character-preview-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* --- Pull Quote --- */
.pull-quote-section {
    padding: 5rem 0;
    background: var(--cream);
    position: relative;
    z-index: 1;
}

.pull-quote {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    padding: 2rem;
}

.pull-quote::before {
    content: '\201C';
    font-family: var(--font-display);
    font-size: 8rem;
    color: var(--red);
    opacity: 0.15;
    position: absolute;
    top: -2rem;
    left: 0;
    line-height: 1;
}

.pull-quote p {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--dark);
    line-height: 1.9;
    font-weight: 600;
}

/* --- About Page Illustration Banner --- */
.about-illustration-banner {
    position: relative;
    z-index: 1;
    padding: 8rem 0;
    background: url('../images/About Book 1.jpg') center center / cover no-repeat;
    overflow: hidden;
}

.about-illustration-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(26, 26, 46, 0.75) 0%,
        rgba(45, 27, 61, 0.65) 50%,
        rgba(26, 26, 46, 0.75) 100%
    );
    z-index: 0;
}

.about-illustration-banner .container {
    position: relative;
    z-index: 1;
}

.pull-quote-on-image {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    padding: 2rem;
}

.pull-quote-on-image::before {
    color: var(--gold);
    opacity: 0.3;
}

.pull-quote-on-image p {
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    font-size: 1.5rem;
}

/* --- Home Page Illustration Banner --- */
.home-illustration-banner {
    position: relative;
    z-index: 1;
    padding: 8rem 0;
    background: url('../images/About Book 2.jpg') center center / cover no-repeat;
    overflow: hidden;
}

.home-illustration-banner .container {
    position: relative;
    z-index: 1;
}

/* --- CTA Section --- */
.cta-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.cta-section::before {
    content: '\269B';
    position: absolute;
    font-size: 15rem;
    color: rgba(255, 255, 255, 0.05);
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
    animation: spin 30s linear infinite;
}

.cta-content {
    text-align: center;
}

.cta-content h2 {
    font-family: var(--font-display);
    color: var(--white);
    font-size: 3rem;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.15rem;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-section .btn-primary {
    background: var(--gold);
    color: var(--dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.cta-section .btn-primary:hover {
    background: var(--gold-light);
    color: var(--dark);
}

.cta-section .btn-glow {
    animation: glowGold 2s ease-in-out infinite;
}

@keyframes glowGold {
    0%, 100% { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); }
    50% { box-shadow: 0 4px 30px rgba(242, 169, 0, 0.5), 0 0 60px rgba(242, 169, 0, 0.2); }
}

/* --- YouTube Video Section --- */
.video-section {
    padding: 6rem 0;
    background: var(--dark);
    position: relative;
    z-index: 1;
}
.video-section .container {
    text-align: center;
}

.video-section .btn-watch-now {
    display: inline-block;
    margin-top: 2rem; /* Adds some breathing room below the title */
}
.video-section .section-title {
    color: var(--white);
}

.video-section .section-subtitle {
    color: var(--gold);
    font-size: 1.3rem;
    font-weight: 800;
}

.btn-watch-now {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 3rem;
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--white);
    background: #FF0000;
    border-radius: 50px;
    text-decoration: none;
    transition: all var(--transition);
    box-shadow: 0 6px 25px rgba(255, 0, 0, 0.4);
}

.btn-watch-now:hover {
    background: #CC0000;
    color: var(--white);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 35px rgba(255, 0, 0, 0.5);
}

.watch-now-icon {
    font-size: 1.6rem;
}

/* --- Footer --- */
.site-footer {
    background: var(--dark);
    color: var(--white);
    padding: 3rem 0 1.5rem;
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.footer-logo-line {
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 2px;
    line-height: 1.3;
}

.footer-brand .logo-herman,
.footer-brand .logo-rusty {
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.footer-brand .logo-and {
    font-size: 0.9rem;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color var(--transition);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

/* --- Animation Classes --- */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-bounce {
    animation: bounce 2s ease-in-out infinite;
}

/* Scroll-triggered animations */
[data-animate] {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate].animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* --- Page Header (for inner pages) --- */
.page-header {
    background: linear-gradient(135deg, var(--dark) 0%, #2D1B3D 100%);
    padding: 8rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(242, 169, 0, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.page-header h1 {
    font-family: var(--font-display);
    color: var(--white);
    font-size: 3.5rem;
    letter-spacing: 3px;
    position: relative;
    z-index: 1;
}

.page-header .page-subtitle {
    color: var(--gold);
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 0.5rem;
    position: relative;
    z-index: 1;
}

/* --- About Page --- */
.about-section {
    padding: 5rem 0;
    background: var(--white);
    position: relative;
    z-index: 1;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: start;
}

.about-book-visual {
    position: sticky;
    top: 6rem;
}

.about-book-placeholder {
    width: 100%;
    max-width: 350px;
    border-radius: 8px 16px 16px 8px;
    margin: 0 auto;
    border: 4px solid var(--gold);
    overflow: hidden;
    box-shadow: 8px 8px 30px var(--shadow-strong);
    transition: transform var(--transition);
}

.about-book-placeholder:hover {
    transform: rotate(-2deg) scale(1.02);
}

.about-book-inner {
    text-align: center;
    padding: 2rem;
}

.about-book-inner .book-series {
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 1rem;
}

.about-book-inner .book-title-display {
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.about-book-inner .book-atom-icon {
    font-size: 3rem;
    color: var(--gold);
    display: block;
    margin: 1rem 0;
}

.about-text h2 {
    font-family: var(--font-heading);
    color: var(--red);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.about-text h3 {
    font-family: var(--font-heading);
    color: var(--dark);
    font-size: 1.3rem;
    margin: 2rem 0 0.75rem;
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--dark-light);
    font-size: 1.05rem;
    line-height: 1.8;
}

.book-details {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--cream);
    border-radius: var(--radius);
    border-left: 4px solid var(--gold);
}

.book-details p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.book-details strong {
    color: var(--red);
}

.about-cta {
    margin-top: 2rem;
}

/* --- Characters Page --- */
.characters-section {
    padding: 5rem 0;
    background: var(--white);
    position: relative;
    z-index: 1;
}

.character-full-card {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    align-items: center;
    padding: 3rem;
    margin-bottom: 3rem;
    background: var(--off-white);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    border: 2px solid transparent;
}

.character-full-card:hover {
    border-color: var(--gold-light);
    box-shadow: 0 10px 40px var(--shadow);
    transform: translateY(-4px);
}

.character-full-card:nth-child(even) {
    grid-template-columns: 1fr 250px;
}

.character-full-card:nth-child(even) .character-full-img {
    order: 2;
}

.character-full-img {
    width: 250px;
    height: 250px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--gold);
    position: relative;
    overflow: hidden;
}

.character-full-img .placeholder-icon {
    font-size: 6rem;
}

.character-full-img.herman-bg {
    background: linear-gradient(135deg, #3A3A5C, #4A4A6A);
}

.character-full-img.rusty-bg {
    background: linear-gradient(135deg, #4A3A2A, #5C4A3A);
}

.character-full-img.hannah-bg {
    background: linear-gradient(135deg, #3A4A5C, #4A5A6A);
}

.character-full-img.skip-bg {
    background: linear-gradient(135deg, #5C2A3A, #7A3A4A);
}

.character-info h3 {
    font-family: var(--font-heading);
    color: var(--red);
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
}

.character-role {
    color: var(--gold-dark);
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    display: block;
}

.character-info p {
    color: var(--dark-light);
    font-size: 1rem;
    line-height: 1.8;
}

.character-traits {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.trait-tag {
    background: var(--cream);
    color: var(--red);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid var(--gold-light);
}

/* --- Buy Page --- */
.buy-section {
    padding: 5rem 0;
    background: var(--white);
    position: relative;
    z-index: 1;
}

.buy-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

.buy-book-visual {
    text-align: center;
}

.buy-info h2 {
    font-family: var(--font-heading);
    color: var(--dark);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.buy-info .price-tag {
    font-family: var(--font-heading);
    color: var(--red);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.buy-info p {
    color: var(--dark-light);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.buy-features {
    list-style: none;
    margin-bottom: 2rem;
}

.buy-features li {
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
    font-weight: 600;
    color: var(--dark);
}

.buy-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--red);
    font-weight: 800;
    font-size: 1.2rem;
}

.buy-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Reviews placeholder */
.reviews-section {
    padding: 4rem 0;
    background: var(--cream);
    position: relative;
    z-index: 1;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.review-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px var(--shadow);
}

.review-stars {
    color: var(--gold);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.review-card p {
    font-style: italic;
    color: var(--dark-light);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.review-author {
    font-weight: 800;
    color: var(--red);
    font-size: 0.9rem;
}

/* --- Responsive Design --- */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

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

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

    .hero-description {
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }

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

    .about-book-visual {
        position: static;
    }

    .character-full-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .character-full-card:nth-child(even) {
        grid-template-columns: 1fr;
    }

    .character-full-card:nth-child(even) .character-full-img {
        order: 0;
    }

    .character-full-img {
        margin: 0 auto;
    }

    .buy-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .section-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--dark);
        flex-direction: column;
        justify-content: center;
        gap: 1rem;
        padding: 2rem;
        transition: right var(--transition);
        box-shadow: -5px 0 20px var(--shadow-strong);
    }

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

    .nav-link {
        font-size: 1.2rem;
        text-align: center;
        width: 100%;
    }

    .hero {
        min-height: auto;
        padding: 7rem 0 3rem;
    }

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

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

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

    .book-placeholder {
        width: 200px;
        height: 290px;
    }

    .book-title-display {
        font-size: 1.6rem !important;
    }

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

    .characters-scroll {
        grid-template-columns: 1fr;
        max-width: 350px;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }

    .character-full-card {
        padding: 2rem 1.5rem;
    }

    .character-full-img {
        width: 180px;
        height: 180px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .pull-quote p {
        font-size: 1.1rem;
    }

    .cta-content h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

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

    .book-placeholder {
        width: 180px;
        height: 260px;
    }

    .buy-buttons {
        flex-direction: column;
    }
}

/* --- Utility: Wiggle on hover --- */
.wiggle:hover {
    animation: wiggle 0.5s ease-in-out;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

/* --- Fun cursor trail (added by JS) --- */
.sparkle {
    position: fixed;
    pointer-events: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: sparkleOut 0.6s forwards;
    z-index: 9999;
}

@keyframes sparkleOut {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0) translateY(-20px); opacity: 0; }
}
