/* Basic Setup */
body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    /* Deep black background */
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
    /* Premium font feel */
    color: #ffffff;
    overflow: hidden;
    /* No scrolling */
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    box-sizing: border-box;
}

.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 800px;
    /* No generic fade-in on the whole container, we animate parts separately */
}

/* Book Cover */
.book-cover {
    width: auto;
    max-width: 80%;
    max-height: 45vh;
    /* Keep it compact */
    box-shadow: 0 20px 50px rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    opacity: 0;
    /* Start hidden */
    animation: bookFadeIn 1.5s ease-out forwards;
    z-index: 2;
}

/* Info Wrapper: Holds Details + Kindle */
.info-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-height: 0;
    /* Initially collapsed */
    opacity: 0;
    /* Initially invisible */
    overflow: hidden;
    /* Hide content while collapsed */
    animation: revealInfo 1.2s cubic-bezier(0.25, 1, 0.5, 1) 1.5s forwards;
    /* Delay to let book sit first */
}

/* Details Section */
.details-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    margin-top: 1rem;
    /* Space from book */
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.subtitle {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: #cccccc;
    margin: 0;
    letter-spacing: 0.5px;
    line-height: 1.4;
    max-width: 600px;
}

.author {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
    opacity: 0.8;
    margin: 0;
}

/* Kindle Section */
.kindle-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.available-text {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #666;
    margin: 0;
}

.kindle-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    color: #fff;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.kindle-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

.kindle-logo {
    width: 20px;
    height: 20px;
    fill: #fff;
}

/* Pricing Info */
.pricing-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #888;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.85rem;
}

.price {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

.divider {
    opacity: 0.3;
}

.ku-text {
    font-size: 0.75rem;
    line-height: 1.2;
    text-align: left;
}

.ku-text strong {
    color: #dedede;
}

/* ANIMATIONS */

/* 1. Book appears in center */
@keyframes bookFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        /* Ends at natural scale in center of flex line */
    }
}

/* 2. Info Wrapper expands and fades in, pushing book up naturally via Flexbox */
@keyframes revealInfo {
    0% {
        max-height: 0;
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        max-height: 60vh;
        /* Allow enough space for content to show */
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .book-cover {
        max-height: 40vh;
    }

    .subtitle {
        font-size: 0.9rem;
        padding: 0 10px;
    }
}