/* Book Page Styles - Premium Editorial Design */

:root {
    --book-bg: #f3ebb2;
    --book-text: #2d1810;
    --book-text-light: #5a4a3a;
    --book-accent: #8b0200;
    --book-shadow: rgba(0, 0, 0, 0.08);
    --book-shadow-hover: rgba(0, 0, 0, 0.15);
    --book-spacing: clamp(2rem, 5vw, 6rem);
    --book-container: min(1200px, 90vw);
}

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

/* Book Page Container */
.book-page {
    background-color: var(--book-bg);
    position: relative;
    min-height: 100vh;
    padding: var(--book-spacing) 0;
    overflow-x: hidden;
}

/* Subtle grain texture overlay */
.book-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.01) 2px, rgba(0,0,0,0.01) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,0,0,0.01) 2px, rgba(0,0,0,0.01) 4px);
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
}

/* Floating Decorative Symbols */
.book-symbols {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.book-symbol {
    position: absolute;
    opacity: 0.12;
    will-change: transform;
    filter: blur(0.5px);
}

.book-symbol--fig {
    top: 8%;
    right: 5%;
    width: clamp(60px, 8vw, 120px);
    animation: floatSymbol 20s ease-in-out infinite;
}

.book-symbol--fig-2 {
    top: 45%;
    right: 3%;
    width: clamp(55px, 6vw, 90px);
    animation: floatSymbol 19s ease-in-out infinite 1s;
}

@keyframes floatSymbol {
    0%, 100% {
        transform: translate(0, 0) translate(var(--parallax-x, 0), var(--parallax-y, 0)) rotate(0deg);
    }
    25% {
        transform: translate(15px, -20px) translate(var(--parallax-x, 0), var(--parallax-y, 0)) rotate(5deg);
    }
    50% {
        transform: translate(-10px, -35px) translate(var(--parallax-x, 0), var(--parallax-y, 0)) rotate(-3deg);
    }
    75% {
        transform: translate(20px, -15px) translate(var(--parallax-x, 0), var(--parallax-y, 0)) rotate(4deg);
    }
}

/* Hero Section */
.book-hero {
    position: relative;
    z-index: 3;
    padding: calc(var(--book-spacing) * 1.5) 0;
    margin-bottom: calc(var(--book-spacing) * 2);
}

.book-hero-container {
    max-width: var(--book-container);
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.book-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: clamp(3rem, 6vw, 6rem);
    align-items: center;
}

/* Book Cover Card */
.book-cover-wrapper {
    position: relative;
}

.book-cover-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px var(--book-shadow), 0 0 0 1px rgba(0, 0, 0, 0.05);
    background: white;
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.book-cover-card:hover {
    box-shadow: 0 30px 80px var(--book-shadow-hover), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.book-cover-sheen {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4) 50%,
        transparent
    );
    transition: left 0.6s ease;
    pointer-events: none;
    z-index: 2;
}

.book-cover-card:hover .book-cover-sheen {
    left: 100%;
}

.book-cover-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}

/* Hero Content */
.book-hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.book-title {
    font-family: 'KO Methlama', 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 600;
    color: var(--book-text);
    line-height: 1.1;
    margin: 0;
    opacity: 0;
    filter: blur(10px);
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease, filter 0.8s ease;
}

.book-title.revealed {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

.book-tagline {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 400;
    color: var(--book-text-light);
    font-style: italic;
    margin: 0;
    opacity: 0;
    filter: blur(10px);
    transform: translateY(30px);
    transition: opacity 0.8s ease 0.2s, transform 0.8s ease 0.2s, filter 0.8s ease 0.2s;
}

.book-tagline.revealed {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

.book-description {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.8;
    color: var(--book-text-light);
    margin: 0;
    max-width: 90%;
    opacity: 0;
    filter: blur(10px);
    transform: translateY(30px);
    transition: opacity 0.8s ease 0.4s, transform 0.8s ease 0.4s, filter 0.8s ease 0.4s;
}

.book-description.revealed {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* CTA Buttons */
.book-ctas {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.book-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
}

.book-cta--primary {
    background-color: var(--book-accent);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 2, 0, 0.2);
}

.book-cta--primary:hover {
    background-color: #a00300;
    box-shadow: 0 6px 20px rgba(139, 2, 0, 0.3);
    transform: translateY(-2px);
}

.book-cta--secondary {
    background-color: transparent;
    color: var(--book-accent);
    border-color: var(--book-accent);
}

.book-cta--secondary:hover {
    background-color: var(--book-accent);
    color: white;
    transform: translateY(-2px);
}

.book-cta:active {
    transform: translateY(0) scale(0.98);
}

/* Ripple effect */
.book-cta::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.book-cta:active::after {
    width: 300px;
    height: 300px;
}

/* About Author Section */
.about-author {
    position: relative;
    z-index: 3;
    padding: calc(var(--book-spacing) * 1.5) 0;
}

.about-author-container {
    max-width: var(--book-container);
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.about-author-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: clamp(3rem, 6vw, 6rem);
    align-items: center;
}

.author-illustration-wrapper {
    position: relative;
}

.author-illustration-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px var(--book-shadow);
    background: white;
    padding: 1rem;
}

.author-illustration {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    opacity: 0;
    filter: blur(10px);
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease, filter 0.8s ease;
}

.author-illustration.revealed {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

.author-bio-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.author-bio-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    color: var(--book-text);
    margin: 0;
    opacity: 0;
    filter: blur(10px);
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease, filter 0.8s ease;
}

.author-bio-title.revealed {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

.author-bio-text {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.8;
    color: var(--book-text-light);
    margin: 0;
    opacity: 0;
    filter: blur(10px);
    transform: translateY(30px);
    transition: opacity 0.8s ease 0.2s, transform 0.8s ease 0.2s, filter 0.8s ease 0.2s;
}

.author-bio-text.revealed {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .book-hero-grid,
    .about-author-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .book-cover-wrapper {
        order: 1;
    }

    .book-hero-content {
        order: 2;
    }

    .author-illustration-wrapper {
        order: 1;
    }

    .author-bio-content {
        order: 2;
    }

    .book-symbols {
        display: none; /* Hide symbols on mobile for cleaner look */
    }

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

@media (max-width: 480px) {
    .book-ctas {
        flex-direction: column;
    }

    .book-cta {
        width: 100%;
    }
}

