/* Book Now modal — warm ivory + lavender, purple-tinted scrim */

.book-now-trigger {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.book-now-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(123, 82, 160, 0.55) !important;
}
.book-now-trigger:focus-visible {
    outline: 2px solid #9b72b8;
    outline-offset: 3px;
}

.book-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    padding: 1.25rem;
    isolation: isolate;
}
.book-modal[hidden] {
    display: none !important;
}
.book-modal:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    animation: bookModalFadeIn 0.38s ease forwards;
}
@keyframes bookModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Brand-aligned dim: deep plum + blur (less flat grey than pure black) */
.book-modal-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(
        165deg,
        rgba(45, 27, 78, 0.82) 0%,
        rgba(22, 12, 40, 0.9) 45%,
        rgba(10, 6, 20, 0.92) 100%
    );
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    cursor: pointer;
}

.book-modal-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 72rem;
    max-height: min(92vh, 900px);
    overflow: auto;
    padding: 2rem 1.6rem 2.1rem;
    border-radius: 1.35rem;
    background: linear-gradient(
        168deg,
        #fffcfd 0%,
        #faf6fc 38%,
        #f4ecf8 100%
    );
    border: 1px solid rgba(200, 175, 225, 0.65);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.85) inset,
        0 1px 2px rgba(123, 82, 160, 0.06),
        0 24px 64px rgba(30, 14, 56, 0.22),
        0 0 0 1px rgba(123, 82, 160, 0.08);
    transform: translateY(12px) scale(0.992);
    transition: transform 0.42s cubic-bezier(0.22, 0.68, 0, 1);
}
.book-modal:not([hidden]) .book-modal-shell {
    transform: translateY(0) scale(1);
}

.book-modal-close {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    z-index: 2;
    width: 2.65rem;
    height: 2.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    cursor: pointer;
    color: #5a3578;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(196, 166, 219, 0.55);
    box-shadow: 0 2px 8px rgba(30, 14, 56, 0.06);
    transition: background 0.22s ease, transform 0.22s ease, color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.book-modal-close:hover {
    background: linear-gradient(135deg, #8b5fb0 0%, #6b4494 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(123, 82, 160, 0.45);
    transform: rotate(90deg);
}
.book-modal-close:focus-visible {
    outline: 2px solid #7b52a0;
    outline-offset: 2px;
}

.book-modal-head {
    text-align: center;
    margin-bottom: 1.75rem;
    padding: 0.35rem 2.6rem 0;
}
@media (min-width: 640px) {
    .book-modal-head {
        margin-bottom: 2rem;
    }
}

.book-modal-eyebrow {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #6b4494;
    margin-bottom: 0.65rem;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    background: linear-gradient(180deg, rgba(123, 82, 160, 0.14) 0%, rgba(123, 82, 160, 0.08) 100%);
    border: 1px solid rgba(196, 166, 219, 0.45);
}

.book-modal-title {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 700;
    color: #241038;
    margin: 0;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.book-modal-lead {
    margin: 0.7rem auto 0;
    max-width: 29rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #5a6573;
}

.book-modal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 768px) {
    .book-modal-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.1rem;
        align-items: stretch;
    }
}

.book-modal-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 0.95rem;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(180deg, #fefdff 0%, #faf7fc 100%);
    border: 1px solid rgba(210, 190, 232, 0.55);
    box-shadow: 0 2px 12px rgba(58, 31, 94, 0.06);
    transition:
        transform 0.35s cubic-bezier(0.22, 0.68, 0, 1),
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}
.book-modal-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 12px 36px rgba(123, 82, 160, 0.14),
        0 4px 12px rgba(30, 14, 56, 0.06);
    border-color: rgba(180, 140, 210, 0.65);
}
.book-modal-card:focus-visible {
    outline: 2px solid #9b72b8;
    outline-offset: 3px;
}

.book-modal-card-media {
    position: relative;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: linear-gradient(145deg, #ede3f5 0%, #e5d8ef 100%);
}
.book-modal-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s cubic-bezier(0.22, 0.68, 0, 1);
}
.book-modal-card:hover .book-modal-card-img {
    transform: scale(1.05);
}

.book-modal-card-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        125deg,
        transparent 0%,
        transparent 38%,
        rgba(255, 255, 255, 0.42) 50%,
        transparent 62%,
        transparent 100%
    );
    transform: translateX(-100%);
    transition: transform 0.75s ease;
    pointer-events: none;
}
.book-modal-card:hover .book-modal-card-shine {
    transform: translateX(100%);
}

.book-modal-card-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(250, 247, 252, 0.55) 100%);
    pointer-events: none;
}

.book-modal-card-body {
    position: relative;
    padding: 1.05rem 1.05rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #fdfbff 100%);
}

.book-modal-card-num {
    position: absolute;
    top: -2.3rem;
    right: 0.7rem;
    font-family: ui-monospace, monospace;
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(107, 68, 148, 0.22);
    pointer-events: none;
    user-select: none;
}

.book-modal-card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.18rem;
    font-weight: 700;
    color: #2a1744;
    margin: 0 0 0.38rem;
    line-height: 1.22;
}

.book-modal-card-desc {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.52;
    color: #5f6a78;
    flex: 1;
}

.book-modal-card-cta {
    margin-top: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #7b52a0;
}
.book-modal-card:hover .book-modal-card-cta {
    color: #5a2d7a;
}
.book-modal-card-cta i {
    font-size: 0.68rem;
    transition: transform 0.25s ease;
    opacity: 0.9;
}
.book-modal-card:hover .book-modal-card-cta i {
    transform: translateX(4px);
}
.book-modal-card--3:hover .book-modal-card-cta i {
    transform: translate(2px, -2px);
}

/* Per-card accent (inset top bar) */
.book-modal-card--1 {
    box-shadow:
        inset 0 3px 0 0 #8b5aaf,
        0 2px 12px rgba(58, 31, 94, 0.06);
}
.book-modal-card--1:hover {
    box-shadow:
        inset 0 3px 0 0 #8b5aaf,
        0 12px 36px rgba(123, 82, 160, 0.14),
        0 4px 12px rgba(30, 14, 56, 0.06);
}

.book-modal-card--2 {
    box-shadow:
        inset 0 3px 0 0 #b592d0,
        0 2px 12px rgba(58, 31, 94, 0.06);
}
.book-modal-card--2:hover {
    box-shadow:
        inset 0 3px 0 0 #b592d0,
        0 12px 36px rgba(123, 82, 160, 0.14),
        0 4px 12px rgba(30, 14, 56, 0.06);
}

.book-modal-card--3 {
    box-shadow:
        inset 0 3px 0 0 #6b4494,
        0 2px 12px rgba(58, 31, 94, 0.06);
}
.book-modal-card--3:hover {
    box-shadow:
        inset 0 3px 0 0 #6b4494,
        0 12px 36px rgba(123, 82, 160, 0.14),
        0 4px 12px rgba(30, 14, 56, 0.06);
}

@media (prefers-reduced-motion: reduce) {
    .book-modal:not([hidden]) {
        animation: none !important;
    }
    .book-modal,
    .book-modal-shell,
    .book-modal-card,
    .book-modal-card-img,
    .book-modal-card-shine,
    .book-modal-close {
        transition: none !important;
    }
    .book-modal-card:hover .book-modal-card-img {
        transform: none;
    }
}
