/* ===== RESET & CSS VARIABLES ===== */
:root {
    /* Ethereal Minimalism Palette */
    --bg-primary: #fffdf9; /* Warm, creamy off-white for reading comfort */
    --bg-secondary: #f6f3eb; /* Slightly darker cream for cards/sections */
    --text-primary: #1a1a1a; /* Extremely dark charcoal, not pure black, for reading */
    --text-secondary: #6b6b6b; /* Soft slate for metadata */
    --accent-primary: #8c7355; /* Muted, elegant bronze/gold */
    --accent-hover: #6b573f;
    --border-soft: rgba(0, 0, 0, 0.05);
    
    /* Layout Variables */
    --header-height: 80px;
    --container-max: 1200px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    /* Shadow Utilities (0.1% Aesthetic) */
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Scale */
h1, h2, h3, h4, .serif-font {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.micro-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    color: var(--text-secondary);
}

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

/* ===== UTILITIES ===== */
.glass-pill {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-full);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.2);
}

/* ===== BUTTONS ===== */
button {
    font-family: 'Inter', sans-serif;
    cursor: pointer;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    padding: 1.1rem 2.5rem;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    background: #000;
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-amazon {
    background: #FF9900; /* Amazon Brand Color */
    color: #000;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.2);
}

.btn-amazon:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 153, 0, 0.35);
    background: #ffaa33;
}
.btn-amazon:active {
    transform: translateY(0) scale(0.96);
}

/* ===== FLOATING HEADER ===== */
.header {
    position: fixed;
    top: 1.5rem;
    left: 0;
    width: 100%;
    z-index: 1000;
    pointer-events: none; /* Let clicks pass through the full-width container */
}

.header-inner {
    max-width: max-content;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 3rem;
    pointer-events: auto; /* Re-enable clicks on the pill itself */
}

.logo h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.02em;
}

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

.nav-list a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.nav-list a:hover {
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.lang-btn.active {
    background: var(--text-primary);
    color: var(--bg-primary);
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px; /* Account for floating header */
    background: radial-gradient(circle at 50% 0%, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

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

.hero h1 {
    font-size: clamp(3rem, 6vw, 5.5rem);
    line-height: 1.05;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* ===== ABOUT / STORY SECTION ===== */
.story-section {
    padding: 8rem 0;
    background: var(--bg-primary);
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.story-image-wrap {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.story-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
    transform: scale(1.02);
    transition: transform 0.7s ease;
}
.story-image-wrap:hover img {
    transform: scale(1);
}

.story-content h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.story-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ===== BOOK STOREFRONT (CRO OPTIMIZED) ===== */
.storefront {
    padding: 8rem 0;
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-size: 3rem;
    margin-top: 0.5rem;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}

.book-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    border: 1px solid rgba(0,0,0,0.02);
}

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

.book-cover {
    height: 340px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-cover img {
    max-height: 100%;
    max-width: 100%;
    border-radius: 4px; /* Slight rounding for paperback feel */
    box-shadow: 20px 20px 40px rgba(0,0,0,0.1), -5px -5px 15px rgba(255,255,255,0.8);
    transition: transform 0.4s ease;
}

.book-card:hover .book-cover img {
    transform: scale(1.05) rotate(1deg);
}

.book-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.book-author {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.book-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-preview {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-soft);
    padding: 0.85rem;
    border-radius: var(--radius-full);
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-preview:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* ===== BESTSELLER FOCUS ===== */
.bestseller-focus {
    padding: 8rem 0;
    background: var(--text-primary);
    color: var(--bg-primary);
}

.bestseller-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.bestseller-focus h2 {
    color: var(--bg-primary);
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.bestseller-focus p {
    color: rgba(255,255,255,0.7);
    font-size: 1.25rem;
    margin-bottom: 3rem;
}

/* ===== NEWSLETTER (LEAD MAGNET) ===== */
.newsletter {
    padding: 8rem 0;
    text-align: center;
    background: var(--bg-primary);
}

.newsletter-inner {
    max-width: 600px;
    margin: 0 auto;
    padding: 4rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.newsletter h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.newsletter p {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-primary);
    padding: 0.5rem;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-soft);
}

.newsletter-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0 1.5rem;
    font-size: 1rem;
    outline: none;
    color: var(--text-primary);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--text-primary);
    color: rgba(255,255,255,0.7);
    padding: 5rem 0 2rem;
}

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

.footer-logo {
    color: var(--bg-primary);
    font-size: 1.5rem;
}

.footer-nav {
    display: flex;
    gap: 2rem;
}

.footer-nav a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--bg-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

/* Social Links */
.footer-social {
    text-align: right;
}

.social-links {
    display: flex;
    gap: 1.25rem !important; /* Force gap in case of flexbox reset issues */
}

a.social-icon {
    width: 42px;
    height: 42px;
    border-radius: 50% !important;
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 1.1rem;
    box-sizing: border-box; /* Fix for circular dimensions */
}

a.social-icon:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

a.social-icon i.fa-facebook-f {
    transition: color 0.3s ease;
    color: inherit;
}
a.social-icon:hover i.fa-facebook-f {
    color: #1877F2 !important; /* Facebook Blue */
}

a.social-icon i.fa-youtube {
    transition: color 0.3s ease;
    color: inherit;
}
a.social-icon:hover i.fa-youtube {
    color: #FF0000 !important; /* YouTube Red */
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-primary);
    width: 90%;
    max-width: 900px;
    border-radius: var(--radius-md);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-soft);
}

.close-btn {
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--text-primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-inner {
        padding: 0.75rem 1rem;
        gap: 1.5rem;
    }
    .nav-list {
        display: none; /* Add mobile hamburger later if needed, but keeping it simple for book sales is fine */
    }
    .story-grid, .bestseller-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .newsletter-form {
        flex-direction: column;
        background: transparent;
        box-shadow: none;
        padding: 0;
        gap: 1rem;
    }
    .newsletter-input {
        background: var(--bg-primary);
        padding: 1.2rem;
        border-radius: var(--radius-full);
    }
    .footer-top {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    .footer-social {
        text-align: center;
    }
    .social-links {
        justify-content: center;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}