/* ============================================================================
   CRM-Publishing — Featured Publications Parallax Folio Gallery (books.blade.php)
   ============================================================================ */

.bk-hero {
    position: relative;
    overflow: clip;
    background:
        radial-gradient(ellipse 85% 60% at 50% 0%, rgba(102, 14, 28, 0.52) 0%, transparent 65%),
        radial-gradient(ellipse 65% 50% at 85% 90%, rgba(229, 193, 88, 0.1) 0%, transparent 60%),
        linear-gradient(180deg, rgba(16, 2, 4, 0.92) 0%, rgba(12, 2, 4, 0.96) 100%);
}

/* ---------- Multi-Layer Parallax Backdrop ---------- */
.bk-parallax-backdrop {
    position: absolute;
    inset: -14% 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bk-parallax-layer {
    position: absolute;
    inset: 0;
    will-change: transform;
}

.bk-grid-lines {
    background-image:
        linear-gradient(to right, rgba(229, 193, 88, 0.045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(229, 193, 88, 0.035) 1px, transparent 1px);
    background-size: 92px 92px;
    mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, #000 35%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 45%, #000 35%, transparent 100%);
}

.bk-orb {
    position: absolute;
    border-radius: 9999px;
    filter: blur(88px);
    opacity: 0.48;
}

.bk-orb-1 {
    top: 4%;
    left: -6%;
    width: 440px;
    height: 440px;
    background: radial-gradient(circle, rgba(229, 193, 88, 0.16) 0%, transparent 70%);
}

.bk-orb-2 {
    bottom: -8%;
    right: -6%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(138, 18, 36, 0.36) 0%, transparent 70%);
}

.bk-watermark {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(6rem, 18vw, 15rem);
    font-weight: 700;
    letter-spacing: 0.18em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(229, 193, 88, 0.06);
    user-select: none;
    white-space: nowrap;
}

.bk-mote {
    position: absolute;
    border-radius: 9999px;
    background: radial-gradient(circle, rgba(255, 229, 150, 0.9) 0%, rgba(229, 193, 88, 0) 70%);
    opacity: 0.45;
    animation: bk-float 8.5s ease-in-out infinite;
}

.bk-mote-1 { top: 20%; left: 14%; width: 5px; height: 5px; animation-delay: 0s; }
.bk-mote-2 { top: 52%; left: 78%; width: 4px; height: 4px; animation-delay: -2.5s; }
.bk-mote-3 { top: 74%; left: 26%; width: 6px; height: 6px; animation-delay: -5.1s; }
.bk-mote-4 { top: 28%; right: 18%; width: 4px; height: 4px; animation-delay: -3.4s; }

@keyframes bk-float {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.25; }
    50%      { transform: translate3d(0, -18px, 0) scale(1.25); opacity: 0.7; }
}

/* ---------- Metallic Gold Text Utility ---------- */
.bk-gold-text {
    background: linear-gradient(125deg, #d4a63a 0%, #ffe8a3 48%, #c59225 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- Gallery Section & Parallax Wraps ---------- */
.bk-gallery-section {
    position: relative;
    overflow: clip;
}

.bk-col-wrap {
    will-change: transform;
}

/* ---------- Realistic Hardcover Book Folio Card ---------- */
.bk-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 1.15rem;
    border: 1px solid rgba(229, 193, 88, 0.16);
    background: linear-gradient(155deg, rgba(25, 6, 10, 0.82) 0%, rgba(11, 2, 4, 0.94) 100%);
    padding: 1.4rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    transform-style: preserve-3d;
    box-shadow:
        0 24px 52px -30px rgba(0, 0, 0, 0.94),
        inset 0 1px 0 rgba(255, 229, 150, 0.09);
    transition:
        transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.35s ease,
        box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.bk-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(
        360px circle at var(--bk-mx, 50%) var(--bk-my, 50%),
        rgba(229, 193, 88, 0.14),
        transparent 58%
    );
    transition: opacity 0.35s ease;
}

.bk-card:hover {
    border-color: rgba(229, 193, 88, 0.48);
    box-shadow:
        0 34px 70px -30px rgba(0, 0, 0, 0.98),
        0 0 34px -14px rgba(229, 193, 88, 0.34),
        inset 0 1px 0 rgba(255, 229, 150, 0.22);
}

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

/* Realistic Book Cover Stage with Spine Highlight & Depth Shadow */
.bk-cover-stage {
    position: relative;
    margin: 0 auto 1.25rem;
    width: 100%;
    max-width: 196px;
    aspect-ratio: 2 / 3;
    border-radius: 0.35rem 0.7rem 0.7rem 0.35rem;
    overflow: hidden;
    background: #090203;
    border: 1px solid rgba(229, 193, 88, 0.28);
    box-shadow:
        -6px 18px 34px -12px rgba(0, 0, 0, 0.95),
        0 4px 12px rgba(0, 0, 0, 0.65);
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease;
    cursor: pointer;
}

/* Spine groove & specular highlight on left edge of cover */
.bk-cover-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.45) 0%,
        rgba(255, 255, 255, 0.16) 4.5%,
        rgba(0, 0, 0, 0.18) 7.5%,
        transparent 14%,
        transparent 92%,
        rgba(0, 0, 0, 0.25) 100%
    );
}

.bk-card:hover .bk-cover-stage {
    transform: translateY(-6px) scale(1.025);
    border-color: rgba(229, 193, 88, 0.68);
}

.bk-cover-stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.bk-card:hover .bk-cover-stage img {
    transform: scale(1.04);
}

/* ---------- 3D Front / Back Cover Flip Inside Quick-View Modal ---------- */
.bk-flip-scene {
    perspective: 1200px;
}

.bk-flip-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    transform-style: preserve-3d;
    transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.bk-flip-inner.is-flipped {
    transform: rotateY(180deg);
}

.bk-flip-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 0.45rem 0.8rem 0.8rem 0.45rem;
    overflow: hidden;
    border: 1px solid rgba(229, 193, 88, 0.4);
    background: #0a0103;
    box-shadow: 0 28px 60px -18px rgba(0, 0, 0, 0.95);
}

.bk-flip-face-back {
    transform: rotateY(180deg);
    border-radius: 0.8rem 0.45rem 0.45rem 0.8rem;
}

/* Scroll reveal animation */
.bk-reveal {
    opacity: 0;
    transform: translate3d(0, 26px, 0);
    transition:
        opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1) var(--bk-delay, 0ms),
        transform 0.75s cubic-bezier(0.16, 1, 0.3, 1) var(--bk-delay, 0ms);
}

.bk-reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .bk-mote {
        animation: none !important;
    }
    .bk-parallax-layer,
    .bk-col-wrap,
    .bk-card,
    .bk-reveal {
        transform: none !important;
        opacity: 1 !important;
        transition: none !important;
    }
}
