/* ============================================
   ROOT VARIABLES
   ============================================ */
:root {
    --brand-white: #ffffff;
    --brand-cream: #fdf9f0;
    --brand-brown-dark: #3a2d24;
    --brand-brown: #6b4f3a;
    --brand-brown-light: #a07b5c;
    --brand-yellow: #e8b923;
    --brand-yellow-soft: #f5d76e;
}

* { box-sizing: border-box; }

body {
    font-family: 'Lato', sans-serif;
    color: var(--brand-brown-dark);
    background: var(--brand-cream);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    color: var(--brand-brown-dark);
}

.handwritten {
    font-family: 'Caveat', cursive;
    color: var(--brand-yellow);
    font-size: 1.8rem;
}

/* ============================================
   NAVBAR
   ============================================ */
.custom-nav {
    background: rgb(253 249 240);
    backdrop-filter: blur(12px);
    padding: 20px 0;
    transition: all 0.4s ease;
}
.custom-nav.scrolled {
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(58, 45, 36, 0.08);
}
.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--brand-brown-dark) !important;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-mark {
    background: var(--brand-brown-dark);
    color: var(--brand-yellow);
    width: 36px; height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}
.nav-link {
    color: var(--brand-brown-dark) !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 1.5px;
    margin: 0 12px;
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 2px;
    background: var(--brand-yellow);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.nav-link:hover::after, .nav-link.active::after { width: 70%; }
.nav-link.active { color: var(--brand-yellow) !important; }

.btn-brand {
    background: var(--brand-yellow);
    color: var(--brand-brown-dark);
    font-weight: 700;
    border-radius: 50px;
    padding: 10px 26px;
    font-size: 0.85rem;
    border: 2px solid var(--brand-yellow);
    transition: all 0.3s ease;
}
.btn-brand:hover {
    background: var(--brand-brown-dark);
    color: var(--brand-yellow);
    border-color: var(--brand-brown-dark);
    transform: translateY(-2px);
}

/* ============================================
   HERO SECTION — STABLE (FIXED)
   ============================================ */
.hero-stable {
    position: relative;
    min-height: 100vh;
    padding: 160px 0 80px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-stable-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgb(24 24 24) 0%, rgb(0 0 0 / 79%) 50%, rgba(253, 249, 240, 0.35) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-text-col {
    padding-right: 30px;
}

.hero-title {
    font-size: clamp(2.5rem, 5.5vw, 4.5rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 12px;
    color: #ffffff;
}

.hero-title .lottery {
    font-family: 'Caveat', cursive;
    color: var(--brand-yellow);
    font-size: clamp(3.5rem, 7vw, 6.5rem);
    display: block;
    line-height: 0.85;
    margin-top: -10px;
}

.hero-sub {
    font-size: 0.95rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 25px;
    font-weight: 700;
}

.hero-desc {
    color: #ffffff;
    max-width: 480px;
    line-height: 1.7;
}

.btn-outline-custom {
    border-radius: 50px;
    padding: 10px 26px;
    font-weight: 700;
    border: 2px solid #ffffff;
    color: #ffffff;
    transition: all 0.3s ease;
}
.btn-outline-custom:hover {
    background: var(--brand-brown-dark);
    color: var(--brand-white);
}

/* Book Column — STABLE */
.hero-book-col {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.book-wrapper {
    position: relative;
    max-width: 340px;
    width: 100%;
}

.book-cover-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 
        25px 30px 60px rgba(58, 45, 36, 0.30),
        0 0 0 1px rgba(232, 185, 35, 0.15);
    /* STABLE — no animation, no transform */
}

/* ============================================
   SECTION HEADS
   ============================================ */
.section-head {
    text-align: center;
    margin-bottom: 60px;
}
.section-head .kicker {
    font-family: 'Caveat', cursive;
    color: var(--brand-yellow);
    font-size: 1.6rem;
    display: block;
    margin-bottom: 5px;
}
.section-head h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    position: relative;
    display: inline-block;
}
.section-head h2::after {
    content: '';
    display: block;
    width: 60px; height: 3px;
    background: var(--brand-yellow);
    margin: 18px auto 0;
}

/* ============================================
   ASYMMETRIC BOOK FEATURE
   ============================================ */
.book-feature {
    padding: 120px 0;
    background: var(--brand-white);
    position: relative;
    overflow: hidden;
}
.book-feature::before {
    content: '';
    position: absolute;
    top: 50px; right: -100px;
    width: 400px; height: 400px;
    background: var(--brand-yellow-soft);
    border-radius: 50%;
    opacity: 0.25;
    filter: blur(60px);
}
.book-card-tilt {
    transform: rotate(-3deg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 25px 25px 60px rgba(58,45,36,0.18);
    transition: transform 0.5s ease;
}
.book-card-tilt:hover { transform: rotate(0deg) scale(1.02); }

.quote-mark {
    font-family: 'Playfair Display', serif;
    font-size: 6rem;
    color: var(--brand-yellow);
    line-height: 0.5;
    opacity: 0.6;
}

.pull-quote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.35rem;
    color: var(--brand-brown);
    border-left: 4px solid var(--brand-yellow);
    padding-left: 25px;
    margin: 35px 0;
}

/* ============================================
   TRAILER PARALLAX
   ============================================ */
.trailer-parallax {
    position: relative;
    padding: 140px 0;
    overflow: hidden;
    color: #fff;
}
.trailer-parallax .parallax-bg {
    position: absolute;
    top: -20%; left: 0;
    width: 100%; height: 140%;
    background-size: cover;
    background-position: center;
    z-index: 0;
    filter: brightness(0.5);
    will-change: transform;
}

.trailer-box {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    border: 3px solid var(--brand-yellow);
    background: #000;
}

.trailer-box video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Custom Video Controls Styling (optional) */
.trailer-box video::-webkit-media-controls-panel {
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
}

/* ============================================
   AUTHOR PREVIEW
   ============================================ */
.author-preview {
    padding: 120px 0;
    background: var(--brand-cream);
    position: relative;
}
.author-img-wrap {
    position: relative;
    padding: 20px;
}
.author-img-wrap::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 75%; height: 75%;
    border: 3px solid var(--brand-yellow);
    border-radius: 12px;
    z-index: 0;
}
.author-img-wrap img {
    position: relative;
    z-index: 1;
    border-radius: 12px;
    width: 100%;
    box-shadow: 20px 20px 50px rgba(58,45,36,0.2);
}
.philosophy-badge {
    display: inline-block;
    background: var(--brand-brown-dark);
    color: var(--brand-yellow);
    font-family: 'Caveat', cursive;
    font-size: 1.5rem;
    padding: 15px 30px;
    border-radius: 50px;
    margin-top: 20px;
    transform: rotate(-2deg);
}

/* ============================================
   STATS STRIP
   ============================================ */
.stats-strip {
    background: var(--brand-brown-dark);
    color: var(--brand-cream);
    padding: 70px 0;
}
.stat-item h3 {
    color: var(--brand-yellow);
    font-size: 3rem;
    margin-bottom: 5px;
}
.stat-item p {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    opacity: 0.8;
}

/* ============================================
   BUY CTA
   ============================================ */
.buy-cta {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--brand-yellow-soft), var(--brand-yellow));
    text-align: center;
}
.buy-cta h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
.btn-dark-brand {
    background: var(--brand-brown-dark);
    color: var(--brand-yellow);
    padding: 16px 45px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    transition: all 0.3s ease;
}
.btn-dark-brand:hover {
    background: #000;
    color: var(--brand-yellow);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

/* ============================================
   FOOTER
   ============================================ */
.custom-footer {
    background: #2a2119;
    color: #b8a99a;
    padding: 45px 0;
    font-size: 0.9rem;
}
.social-icon {
    color: var(--brand-yellow);
    font-size: 1.3rem;
    margin: 0 12px;
    transition: transform 0.3s ease;
    display: inline-block;
}
.social-icon:hover {
    color: #fff;
    transform: translateY(-3px);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.9s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .hero-stable {
        padding: 130px 0 60px;
        min-height: auto;
    }
    .hero-text-col {
        padding-right: 15px;
        text-align: center;
    }
    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-btns {
        justify-content: center;
    }
    .hero-book-col {
        margin-top: 40px;
    }
    .book-wrapper {
        max-width: 260px;
    }
    .book-feature, .author-preview { padding: 70px 0; }
    .trailer-parallax { padding: 80px 0; }
}

@media (max-width: 576px) {
    .hero-stable {
        padding: 120px 0 50px;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-title .lottery {
        font-size: 3.2rem;
    }
    .hero-sub {
        font-size: 0.8rem;
        letter-spacing: 2px;
    }
    .book-wrapper {
        max-width: 220px;
    }
}


/* ============================================
   PAGE HERO (Inner Pages)
   ============================================ */
.page-hero {
    position: relative;
    padding: 220px 0 100px;
    overflow: hidden;
    text-align: center;
}
.page-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}
.page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(24, 24, 24, 0.92) 0%, 
        rgba(0, 0, 0, 0.75) 100%);
    z-index: 1;
}
.page-hero .container { z-index: 2; }
.page-hero-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: #fff;
    margin: 10px 0;
    font-weight: 700;
}
.page-hero-sub {
    color: var(--brand-yellow);
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 0.95rem;
    font-weight: 700;
}

/* ============================================
   BOOK INTRO
   ============================================ */
.book-intro {
    padding: 120px 0;
    background: var(--brand-white);
    position: relative;
    overflow: hidden;
}
.book-intro::before {
    content: '';
    position: absolute;
    top: 50px; left: -100px;
    width: 400px; height: 400px;
    background: var(--brand-yellow-soft);
    border-radius: 50%;
    opacity: 0.2;
    filter: blur(70px);
}
.book-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(58, 45, 36, 0.1);
}
.meta-item { display: flex; flex-direction: column; }
.meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--brand-brown-light);
    font-weight: 700;
    margin-bottom: 4px;
}
.meta-value {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    color: var(--brand-brown-dark);
    font-weight: 700;
}

/* ============================================
   BUY SECTION
   ============================================ */
.buy-section {
    padding: 100px 0;
    background: var(--brand-brown-dark);
    position: relative;
    overflow: hidden;
}
.buy-section .section-head h2 { color: #fff; }
.buy-card {
    background: var(--brand-white);
    border-radius: 16px;
    padding: 40px 25px;
    text-align: center;
    height: 100%;
    transition: all 0.4s ease;
    border-top: 4px solid var(--brand-yellow);
}
.buy-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}
.buy-card i {
    font-size: 2.5rem;
    color: var(--brand-yellow);
    display: block;
    margin-bottom: 18px;
}
.buy-card h5 {
    font-size: 1.1rem;
    margin-bottom: 18px;
}

/* ============================================
   AUTHOR BIO + SLIDESHOW
   ============================================ */
.author-bio {
    padding: 120px 0;
    background: var(--brand-cream);
}
.author-carousel {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 20px 20px 60px rgba(58, 45, 36, 0.18);
    border: 4px solid var(--brand-yellow-soft);
}
.author-carousel .carousel-item img {
    height: 500px;
    object-fit: cover;
}
.author-carousel .carousel-indicators button {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--brand-yellow);
    border: none;
}
.author-carousel .carousel-control-prev-icon,
.author-carousel .carousel-control-next-icon {
    filter: invert(1) sepia(1) saturate(5) hue-rotate(10deg);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-section {
    padding: 120px 0;
    background: var(--brand-cream);
    min-height: 60vh;
}
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 35px;
    padding: 25px 30px;
    background: var(--brand-white);
    border-radius: 14px;
    border-left: 4px solid var(--brand-yellow);
    box-shadow: 0 10px 30px rgba(58, 45, 36, 0.06);
    transition: transform 0.3s ease;
}
.contact-info-item:hover { transform: translateX(8px); }
.contact-icon {
    flex-shrink: 0;
    width: 55px; height: 55px;
    border-radius: 50%;
    background: var(--brand-yellow);
    color: var(--brand-brown-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}
.contact-info-item h6 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--brand-brown-light);
    margin-bottom: 6px;
    font-weight: 700;
}
.contact-info-item a {
    color: var(--brand-brown-dark);
    font-weight: 700;
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}
.contact-info-item a:hover { color: var(--brand-yellow); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .page-hero { padding: 160px 0 70px; }
    .book-intro, .author-bio, .contact-section { padding: 70px 0; }
    .buy-section { padding: 70px 0; }
    .book-meta { grid-template-columns: 1fr; }
    .author-carousel .carousel-item img { height: 400px; }
}
@media (max-width: 576px) {
    .page-hero { padding: 140px 0 60px; }
    .author-carousel .carousel-item img { height: 300px; }
    .contact-info-item { padding: 20px; gap: 15px; }
    .contact-icon { width: 45px; height: 45px; font-size: 1.1rem; }
}


/* ============================================
   AUTHOR PORTRAIT (Bio Side Image)
   ============================================ */
.author-portrait-wrap {
    position: relative;
    padding: 20px;
}
.author-portrait-wrap::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 70%; height: 70%;
    border: 4px solid var(--brand-yellow);
    border-radius: 16px;
    z-index: 0;
}
.author-portrait-wrap::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 50%; height: 50%;
    background: var(--brand-yellow-soft);
    border-radius: 16px;
    opacity: 0.3;
    z-index: 0;
}
.author-portrait-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 520px;
    object-fit: cover;
    object-position: center top;
    border-radius: 16px;
    box-shadow: 25px 25px 60px rgba(58, 45, 36, 0.25);
    transition: transform 0.4s ease;
}
.author-portrait-img:hover {
    transform: translateY(-8px);
}

/* ============================================
   AUTHOR GALLERY SECTION
   ============================================ */
.author-gallery-section {
    padding: 120px 0;
    background: var(--brand-white);
    position: relative;
    overflow: hidden;
}
.author-gallery-section::before {
    content: '';
    position: absolute;
    top: 50px; right: -100px;
    width: 400px; height: 400px;
    background: var(--brand-yellow-soft);
    border-radius: 50%;
    opacity: 0.2;
    filter: blur(70px);
}

.author-gallery-carousel {
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(58, 45, 36, 0.2);
    border: 4px solid var(--brand-yellow-soft);
    position: relative;
}

.author-gallery-carousel .carousel-item img {
    height: 600px;
    object-fit: cover;
    width: 100%;
}

.carousel-caption-custom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 30px 25px;
    background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
    text-align: center;
}

.carousel-caption-custom .handwritten {
    color: var(--brand-yellow);
    font-size: 2rem;
    display: inline-block;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.author-gallery-carousel .carousel-indicators {
    bottom: 15px;
}
.author-gallery-carousel .carousel-indicators button {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--brand-yellow);
    border: 2px solid #fff;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}
.author-gallery-carousel .carousel-indicators button.active {
    opacity: 1;
    transform: scale(1.2);
}

.author-gallery-carousel .carousel-control-prev,
.author-gallery-carousel .carousel-control-next {
    width: 60px;
    opacity: 0.85;
}
.author-gallery-carousel .carousel-control-prev-icon,
.author-gallery-carousel .carousel-control-next-icon {
    width: 40px; height: 40px;
    background-color: rgba(232, 185, 35, 0.9);
    border-radius: 50%;
    background-size: 50%;
    padding: 8px;
}

/* ============================================
   RESPONSIVE — Author Page
   ============================================ */
@media (max-width: 991px) {
    .author-portrait-img { height: 420px; }
    .author-gallery-section { padding: 70px 0; }
    .author-gallery-carousel .carousel-item img { height: 450px; }
    .author-gallery-carousel .carousel-control-prev,
    .author-gallery-carousel .carousel-control-next { width: 45px; }
}

@media (max-width: 576px) {
    .author-portrait-img { height: 380px; }
    .author-gallery-carousel .carousel-item img { height: 320px; }
    .carousel-caption-custom { padding: 25px 15px 15px; }
    .carousel-caption-custom .handwritten { font-size: 1.4rem; }
    .author-gallery-carousel .carousel-control-prev,
    .author-gallery-carousel .carousel-control-next { width: 40px; }
}