:root {
    --emerald: #0f5132;
    --dark-emerald: #0a3622;
    --sapphire: #1e3a5f;
    --deep-blue: #0d1b2a;
    --burgundy: #6d1f3f;
    --gold: #d4af37;
    --cream: #f8f6f0;
    --charcoal: #2b2d2e;
}

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

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

body {
    font-family: 'Crimson Text', serif;
    color: var(--cream);
    background: linear-gradient(135deg, var(--deep-blue) 0%, var(--dark-emerald) 100%);
    line-height: 1.8;
    overflow-x: hidden;
    scroll-behavior: smooth;
    min-height: 100vh;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(13, 27, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    z-index: 100;
    padding: 1.5rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--gold);
    text-decoration: none;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

.logo:hover {
    color: var(--cream);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-family: 'Cinzel', serif;
    color: var(--cream);
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 44px;
    height: 44px;
    position: relative;
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--gold);
    border-radius: 2px;
    position: absolute;
    left: 10px;
    transition: all 0.3s ease;
}

.hamburger span:nth-child(1) {
    top: 12px;
}

.hamburger span:nth-child(2) {
    top: 20px;
}

.hamburger span:nth-child(3) {
    top: 28px;
}

.hamburger.active span:nth-child(1) {
    top: 20px;
    transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    top: 20px;
    transform: rotate(-45deg);
}

/* Decorative background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.02) 2px, rgba(255,255,255,0.02) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,0.02) 2px, rgba(255,255,255,0.02) 4px);
    pointer-events: none;
    z-index: 1;
}

.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='3.5' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 2;
}

.container {
    position: relative;
    z-index: 3;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
header {
    padding: 8rem 0 4rem;
    text-align: center;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: -3rem;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

h1 {
    font-family: 'Cinzel', serif;
    font-size: 4.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--cream) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInDown 1s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tagline {
    font-size: 1.3rem;
    color: var(--gold);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 600;
    animation: fadeIn 1s ease-out 0.3s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Book Hero Section */
.book-hero {
    padding: 8rem 0 4rem;
    animation: fadeIn 1s ease-out 0.6s both;
}

.hero-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 5rem;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-book-cover img {
    width: 100%;
    border: 3px solid var(--gold);
    box-shadow: 0 15px 50px rgba(0,0,0,0.5);
    display: block;
}

.cover-placeholder {
    width: 100%;
    aspect-ratio: 2/3;
    border: 2px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    text-align: center;
    background: transparent;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 0.2rem;
    text-align: left;
}

.book-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.stars {
    color: var(--gold);
    font-size: 1.1rem;
    letter-spacing: 0.15rem;
}

.rating-text {
    color: rgba(248, 246, 240, 0.7);
    font-size: 0.95rem;
    font-family: 'Crimson Text', serif;
}

.hero-text .tagline {
    font-size: 1.5rem;
    text-align: left;
    margin-bottom: 2rem;
    margin-top: 0;
    font-style: italic;
    text-transform: none;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.book-description {
    font-size: 1.25rem;
    line-height: 2;
    margin-bottom: 3rem;
    color: var(--cream);
}

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

/* Buttons */
.btn {
    padding: 0.9rem 2rem;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border: 2px solid var(--gold);
    background: transparent;
    color: var(--gold);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gold);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn:hover {
    color: var(--deep-blue);
}

.btn:hover::before {
    left: 0;
}

.btn-primary {
    background: var(--gold);
    color: var(--deep-blue);
}

.btn-primary::before {
    background: var(--cream);
}

.btn-small {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border: 2px solid var(--gold);
    background: transparent;
    color: var(--gold);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-small::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gold);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-small:hover {
    color: var(--deep-blue);
}

.btn-small:hover::before {
    left: 0;
}

/* Reviews Section */
.reviews {
    padding: 6rem 0;
    position: relative;
    background: rgba(30, 58, 95, 0.2);
}

.reviews::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 5rem;
    color: var(--gold);
    letter-spacing: 0.1em;
    position: relative;
}

.section-title::after {
    content: '◆';
    display: block;
    margin-top: 1rem;
    font-size: 1rem;
    opacity: 0.6;
}

.reviews-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.review-card {
    background: linear-gradient(135deg, rgba(15, 81, 50, 0.2), rgba(30, 58, 95, 0.2));
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 2.5rem;
    position: relative;
    transition: all 0.4s ease;
}

.review-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid var(--gold);
    margin: 10px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.review-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
}

.review-card:hover::before {
    opacity: 1;
}

.quote-mark {
    font-family: 'Cinzel', serif;
    font-size: 5rem;
    color: var(--gold);
    opacity: 0.3;
    line-height: 0.8;
    margin-bottom: 1rem;
}

.review-text {
    font-size: 1.2rem;
    line-height: 1.9;
    color: var(--cream);
    margin-bottom: 2rem;
    font-style: italic;
}

.review-footer {
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding-top: 1.5rem;
}

.review-footer .stars {
    margin-bottom: 0.5rem;
}

.reviewer {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 1rem;
}

.book-ref {
    color: rgba(248, 246, 240, 0.6);
    font-size: 0.9rem;
    font-style: italic;
    margin-top: 0.3rem;
}

/* Free Chapter Section */
.free-chapter {
    padding: 6rem 0;
    background: rgba(13, 27, 42, 0.4);
    position: relative;
}

.free-chapter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.chapter-content {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(30, 58, 95, 0.2);
    padding: 4rem;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.chapter-content h4 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--gold);
    margin-bottom: 2rem;
}

.chapter-content p {
    font-size: 1.2rem;
    line-height: 2;
    margin-bottom: 1.5rem;
    color: var(--cream);
}

.chapter-cta {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    text-align: center;
    font-size: 1.3rem;
}

.chapter-cta a {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 2px solid var(--gold);
    transition: color 0.3s ease;
}

.chapter-cta a:hover {
    color: var(--cream);
}

.back-to-top-container {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
}

.btn-back-to-top {
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
    padding: 0.9rem 2.5rem;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-back-to-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gold);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-back-to-top:hover {
    color: var(--deep-blue);
}

.btn-back-to-top:hover::before {
    left: 0;
}

/* About Page */
.about-page {
    padding: 4rem 0 6rem;
}

.about-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 4rem;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto 6rem;
}

.author-image {
    position: relative;
}

.image-frame {
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, var(--sapphire), var(--burgundy));
    border: 3px solid var(--gold);
    box-shadow: 
        0 10px 40px rgba(0,0,0,0.4),
        inset 0 0 0 8px rgba(212, 175, 55, 0.1);
    position: relative;
    overflow: hidden;
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-text h2 {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--gold);
    letter-spacing: 0.05em;
}

.about-text p {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    line-height: 2;
    color: var(--cream);
}

.social-links {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 2px solid var(--gold);
    background: transparent;
    color: var(--gold);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gold);
    transition: left 0.3s ease;
    z-index: -1;
}

.social-link:hover {
    color: var(--deep-blue);
}

.social-link:hover::before {
    left: 0;
}

/* Books List on About Page */
.single-book-showcase {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 4rem;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
}

.single-book-showcase h2 {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    color: var(--gold);
    text-align: center;
    margin-bottom: 3rem;
}

.showcase-content {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 4rem;
    align-items: start;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.3), rgba(15, 81, 50, 0.3));
    border: 2px solid rgba(212, 175, 55, 0.3);
    padding: 3rem;
    transition: all 0.4s ease;
}

.showcase-content:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
}

.showcase-cover img {
    width: 100%;
    border: 3px solid var(--gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.showcase-info h3 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: var(--cream);
    margin-bottom: 1rem;
}

.showcase-info .stars {
    color: var(--gold);
    font-size: 1.1rem;
    letter-spacing: 0.15rem;
    margin-bottom: 1.5rem;
    display: block;
}

.showcase-info p {
    font-size: 1.2rem;
    line-height: 2;
    margin-bottom: 2rem;
    color: var(--cream);
}

.books-list {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 4rem;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
}

.books-list h2 {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    color: var(--gold);
    text-align: center;
    margin-bottom: 3rem;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 3rem;
}

.book-card-small {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.3), rgba(15, 81, 50, 0.3));
    border: 2px solid rgba(212, 175, 55, 0.3);
    padding: 2rem;
    transition: all 0.4s ease;
}

.book-card-small:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
}

.book-cover-small {
    margin-bottom: 1.5rem;
}

.book-cover-small img {
    width: 100%;
    border: 2px solid var(--gold);
}

.book-cover-small img {
    width: 100%;
    border: 2px solid var(--gold);
    display: block;
}

.cover-placeholder-small {
    width: 100%;
    aspect-ratio: 2/3;
    border: 2px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    font-family: 'Cinzel', serif;
    text-align: center;
    background: transparent;
}

.book-info-small h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--cream);
    margin-bottom: 0.5rem;
}

.book-info-small .stars {
    margin-bottom: 1rem;
    display: block;
}

.book-info-small p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: rgba(248, 246, 240, 0.9);
}

/* Footer */
footer {
    padding: 4rem 0;
    text-align: center;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    margin-top: 6rem;
}

footer p {
    color: rgba(248, 246, 240, 0.6);
    font-size: 1rem;
    letter-spacing: 0.1em;
}

/* Responsive */

@media (max-width: 1024px) {
    .logo {
        font-size: 1.1rem;
    }

    .nav-container {
        padding: 0.8rem 1.5rem;
    }

    .hamburger {
        display: block;
    }

    /* Hide the golden underline dot on mobile */
    .nav-link::after {
        display: none !important;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        height: 100dvh;
        width: 60%;
        max-width: 250px;
        background: linear-gradient(135deg, var(--deep-blue) 0%, var(--dark-emerald) 100%);
        flex-direction: column;
        gap: 1rem;
        padding: 5rem 1.5rem 2rem;
        align-items: flex-start;
        box-shadow: -5px 0 15px rgba(0,0,0,0.3);
        z-index: 100;
        border-left: 1px solid var(--gold);
        transition: right 0.3s ease;
    }

    .nav-links.active {
        display: flex;
        right: 0;
    }

    .nav-link {
        font-size: 0.9rem;
        letter-spacing: 0.1em;
        padding: 0.4rem 0;
        width: 100%;
    }

    .main-nav {
        padding: 0;
    }

    h1 {
        font-size: 2.5rem;
    }

    header {
        padding: 7rem 0 3rem;
    }

    .book-hero {
        padding: 6rem 0 3rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-book-cover {
        max-width: 350px;
        margin: 0 auto;
    }

    .hero-text h1 {
        text-align: center;
        font-size: 2.2rem;
    }

    .hero-text .tagline {
        text-align: center;
        font-size: 1.2rem;
    }

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

    .book-description {
        font-size: 1.1rem;
    }

    .reviews-carousel {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .showcase-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .showcase-cover {
        max-width: 350px;
        margin: 0 auto;
    }

    .image-frame {
        max-width: 350px;
        margin: 0 auto;
    }

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

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

    .chapter-content {
        padding: 2rem;
    }

    .books-list h2,
    .single-book-showcase h2 {
        font-size: 2.2rem;
    }

    .showcase-info h3 {
        font-size: 1.8rem;
    }
}

@media (max-width: 640px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 0.8rem 1.5rem;
        font-size: 0.85rem;
    }

    .book-description {
        font-size: 1rem;
        line-height: 1.7;
    }

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

    .review-text {
        font-size: 1rem;
    }

    .chapter-content {
        padding: 1.5rem;
    }

    .chapter-content h4 {
        font-size: 1.5rem;
    }

    .chapter-content p {
        font-size: 1rem;
        line-height: 1.8;
    }

    .book-rating {
        flex-direction: column;
        align-items: center;
        gap: 0.3rem;
    }

    .about-text h2 {
        font-size: 2.2rem;
    }

    .about-text p {
        font-size: 1.1rem;
    }

    .container {
        padding: 0 1.25rem;
    }

    h1 {
        font-size: 2rem;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .hero-text .tagline {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 0.95rem;
    }

    .nav-links {
        width: 80%;
        padding: 5rem 1.5rem 2rem;
    }

    .nav-link {
        font-size: 0.95rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    .hero-text h1 {
        font-size: 1.6rem;
    }

    .review-card {
        padding: 1.5rem;
    }

    .book-card-small {
        padding: 1.25rem;
    }
}

.reviews-inner,
.free-chapter-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Mobile menu overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.nav-overlay.active {
    display: block;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--deep-blue);
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    border: 2px solid var(--deep-blue);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cream);
}
