/* ==========================================
   Global Styles & Variables
   ========================================== */
:root {
    --primary-color: #C9A961;
    --secondary-color: #8B7355;
    --accent-color: #D4AF37;
    --dark-color: #3E3E3E;
    --light-color: #F5F5F0;
    --white: #FFFFFF;
    --cream: #FAF9F6;
    --text-dark: #2C2C2C;
    --text-light: #6B6B6B;
    --border-color: #E0DDD5;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.8;
    color: var(--text-dark);
    background-color: var(--cream);
}

/* Main headings - Elegant serif for editorial feel */
h1,
h2,
h3 {
    font-family: 'Cormorant Garamond', 'Spectral', serif;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Subheadings - Refined serif */
h4,
h5,
h6 {
    font-family: 'Crimson Pro', serif;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   Header
   ========================================== */
.header {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(250, 249, 246, 0.95) 100%);
    padding: 25px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(224, 221, 213, 0.5);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrolled state - more transparent */
.header.scrolled {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.75) 0%,
            rgba(250, 249, 246, 0.75) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(201, 169, 97, 0.2);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(201, 169, 97, 0.03) 50%,
            transparent 100%);
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {

    0%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.8rem;
    color: var(--dark-color);
    margin-bottom: 0;
    font-weight: 600;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.tagline {
    font-family: 'Lora', serif;
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: -5px;
    letter-spacing: 1px;
    font-weight: 400;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 400;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-bottom: 2px solid transparent;
    letter-spacing: 0.5px;
}

.nav a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    background:
        linear-gradient(135deg, rgba(201, 169, 97, 0.12) 0%, rgba(212, 175, 55, 0.18) 100%),
        linear-gradient(to bottom, var(--white) 0%, var(--light-color) 100%);
    padding: 140px 20px 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--primary-color), transparent) 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(201, 169, 97, 0.2) 0%, transparent 70%);
    animation: rotate-slow 40s linear infinite;
}

@keyframes rotate-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    opacity: 0.5;
}

.floating-lemon {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
            rgba(212, 175, 55, 0.5),
            rgba(201, 169, 97, 0.35),
            rgba(139, 115, 85, 0.2));
    filter: blur(40px);
    animation: float-gentle 20s ease-in-out infinite;
}

.lemon-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.lemon-2 {
    top: 60%;
    right: 15%;
    animation-delay: 5s;
    animation-duration: 30s;
}

.lemon-3 {
    bottom: 20%;
    left: 50%;
    animation-delay: 10s;
    animation-duration: 35s;
}

@keyframes float-gentle {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }

    25% {
        transform: translate(30px, -20px) scale(1.1);
        opacity: 0.5;
    }

    50% {
        transform: translate(-20px, 30px) scale(0.9);
        opacity: 0.4;
    }

    75% {
        transform: translate(20px, 20px) scale(1.05);
        opacity: 0.45;
    }
}

/* Sparkle effects - Star field style */
.sparkle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.sparkle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    box-shadow:
        0 0 3px white,
        0 0 6px var(--accent-color),
        0 0 10px var(--accent-color);
    animation: star-pulse 2s ease-in-out infinite;
}

.sparkle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 1px;
    background: linear-gradient(90deg, transparent, white, transparent);
    opacity: 0;
    animation: star-flash 2s ease-in-out infinite;
}

.sparkle-1 {
    top: 15%;
    left: 20%;
    animation-delay: 0s;
}

.sparkle-1::before {
    animation-delay: 0s;
}

.sparkle-1::after {
    animation-delay: 0s;
    transform: translate(-50%, -50%) rotate(45deg);
}

.sparkle-2 {
    top: 25%;
    right: 25%;
}

.sparkle-2::before {
    animation-delay: 0.7s;
}

.sparkle-2::after {
    animation-delay: 0.7s;
    transform: translate(-50%, -50%) rotate(-45deg);
}

.sparkle-3 {
    top: 70%;
    left: 15%;
}

.sparkle-3::before {
    animation-delay: 1.4s;
}

.sparkle-3::after {
    animation-delay: 1.4s;
    transform: translate(-50%, -50%) rotate(20deg);
}

.sparkle-4 {
    top: 40%;
    right: 30%;
}

.sparkle-4::before {
    animation-delay: 0.3s;
}

.sparkle-4::after {
    animation-delay: 0.3s;
    transform: translate(-50%, -50%) rotate(-20deg);
}

.sparkle-5 {
    top: 80%;
    right: 20%;
}

.sparkle-5::before {
    animation-delay: 1s;
}

.sparkle-5::after {
    animation-delay: 1s;
    transform: translate(-50%, -50%) rotate(60deg);
}

.sparkle-6 {
    top: 50%;
    left: 25%;
}

.sparkle-6::before {
    animation-delay: 1.7s;
}

.sparkle-6::after {
    animation-delay: 1.7s;
    transform: translate(-50%, -50%) rotate(-60deg);
}

@keyframes star-pulse {

    0%,
    100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(0.8);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

@keyframes star-flash {

    0%,
    40%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 0.8;
    }
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    color: var(--dark-color);
    margin-bottom: 25px;
    font-weight: 500;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.hero-subtitle {
    font-family: 'Lora', serif;
    font-size: 1.35rem;
    color: var(--text-light);
    font-weight: 400;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 35px;
    font-style: italic;
}

.decorative-line {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin: 0 auto;
    position: relative;
}

.decorative-line::before,
.decorative-line::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.decorative-line::before {
    left: -15px;
}

.decorative-line::after {
    right: -15px;
}

/* ==========================================
   Books Section
   ========================================== */
.books-section {
    padding: 100px 20px;
    background-color: var(--cream);
}

.section-title {
    font-family: 'Spectral', serif;
    font-size: 2.8rem;
    text-align: center;
    color: var(--dark-color);
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: 1px;
}

.section-subtitle {
    font-family: 'Lato', sans-serif;
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 60px;
    font-weight: 300;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 50px;
    margin-top: 40px;
}

.book-card {
    background: linear-gradient(135deg, var(--white) 0%, var(--cream) 100%);
    border-radius: 0;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    will-change: transform;
    /* Ensure cards are visible immediately */
    opacity: 1;
    visibility: visible;
}

.book-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(201, 169, 97, 0.1),
            transparent);
    transition: left 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.book-card:hover::before {
    left: 100%;
}

.book-card:hover {
    box-shadow:
        var(--shadow-hover),
        0 0 30px rgba(201, 169, 97, 0.15);
    transform: translateY(-8px);
    border-color: var(--primary-color);
}

.book-image {
    width: 100%;
    height: 450px;
    overflow: hidden;
    background: linear-gradient(135deg,
            rgba(245, 245, 240, 0.3) 0%,
            rgba(250, 249, 246, 0.4) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.02) 100%);
    pointer-events: none;
}

.book-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(1) contrast(1.05);
    will-change: transform;
}

/* Second book image - smaller scale */
.book-image-2 img {
    width: 85%;
    height: 85%;
}

.book-card:hover .book-image img {
    transform: scale(1.06);
    filter: brightness(1.03) contrast(1.08);
}

.book-info {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    color: var(--dark-color);
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 1px;
}

.book-subtitle {
    font-family: 'Crimson Pro', serif;
    font-size: 1.2rem;
    color: var(--primary-color);
    font-style: italic;
    margin-bottom: 25px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.book-description {
    font-family: 'Lato', sans-serif;
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 25px;
    flex: 1;
}

.book-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn {
    display: inline-block;
    padding: 14px 40px;
    text-decoration: none;
    border-radius: 2px;
    font-weight: 400;
    text-align: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid var(--dark-color);
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(201, 169, 97, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border-color: var(--dark-color);
    box-shadow: 0 4px 15px rgba(62, 62, 62, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-color: var(--primary-color);
    color: var(--dark-color);
    box-shadow: 0 6px 20px rgba(201, 169, 97, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(62, 62, 62, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--dark-color);
    border-color: var(--dark-color);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(62, 62, 62, 0.3);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(62, 62, 62, 0.2);
}

.format-info {
    display: flex;
    justify-content: center;
    gap: 25px;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* ==========================================
   About Section
   ========================================== */
.about-section {
    padding: 100px 20px;
    background:
        linear-gradient(135deg, rgba(201, 169, 97, 0.03) 0%, transparent 50%, rgba(212, 175, 55, 0.03) 100%),
        var(--white);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.about-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.about-content {
    max-width: 750px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-family: 'Crimson Pro', serif;
    font-size: 1.3rem;
    line-height: 1.9;
    color: var(--text-light);
    margin-bottom: 28px;
    font-weight: 300;
    letter-spacing: 0.3px;
}

.about-content p:first-of-type {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: var(--dark-color);
    font-weight: 500;
    margin-bottom: 35px;
    line-height: 1.75;
    letter-spacing: 0.5px;
    font-style: normal;
}

.about-content p:last-of-type {
    font-family: 'Lora', serif;
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-light);
    font-weight: 400;
    margin-top: 35px;
    opacity: 0.85;
}

/* ==========================================
   Recipes Section
   ========================================== */
.recipes-section {
    padding: 100px 20px;
    background: linear-gradient(135deg, var(--cream) 0%, var(--light-color) 100%);
    text-align: center;
}

/* ==========================================
   Contact Section
   ========================================== */
.contact-section {
    padding: 100px 20px;
    background-color: var(--cream);
    text-align: center;
}

.contact-text {
    font-family: 'Lora', serif;
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 30px;
    font-weight: 400;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--secondary-color) 100%);
    color: var(--light-color);
    padding: 50px 20px;
    text-align: center;
    border-top: 3px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(201, 169, 97, 0.1) 0%, transparent 70%);
    animation: rotate-slow 50s linear infinite;
}

.footer .container {
    position: relative;
    z-index: 1;
}

.footer p {
    font-size: 0.9rem;
    font-weight: 300;
}

.footer-tagline {
    font-family: 'Lora', serif;
    margin-top: 10px;
    font-style: italic;
    color: var(--accent-color);
    font-weight: 400;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 20px;
    }

    .logo h1 {
        font-size: 2rem;
    }

    .nav {
        gap: 15px;
    }

    .hero h2 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .books-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .section-title {
        font-size: 2rem;
    }

    .book-title {
        font-size: 1.5rem;
    }

    .book-image {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.8rem;
    }

    .nav {
        flex-direction: column;
        gap: 10px;
    }

    .hero {
        padding: 60px 20px;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .books-section,
    .about-section,
    .contact-section {
        padding: 50px 20px;
    }
}