/* Rotating "available now" announcement band */
.book-promo-band {
    overflow: hidden;
    background: linear-gradient(90deg, #13294a 0%, #1c3a63 50%, #13294a 100%);
    border-top: 1px solid rgba(224, 166, 21, 0.4);
    border-bottom: 1px solid rgba(224, 166, 21, 0.4);
}

.book-promo-track {
    display: flex;
    align-items: center;
    width: max-content;
    white-space: nowrap;
    animation: book-promo-scroll 34s linear infinite;
}

.book-promo-item {
    padding: 0.65rem 0;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #f6ead0;
}

.book-promo-item--lead {
    color: #f0b62a;
}

.book-promo-star {
    margin: 0 1.75rem;
    font-size: 0.7rem;
    color: #e0a615;
}

@keyframes book-promo-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.book-promo-band:hover .book-promo-track {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .book-promo-track {
        animation: none;
    }
}

.gray-cloud-page .content-section {
    padding-top: 2.25rem;
}

.gray-cloud-page .content-section .container {
    text-align: center;
}

.gray-cloud-page .section-header-decorated {
    margin-bottom: 0.35rem;
}

.gray-cloud-page .book-subtitle {
    display: block;
    width: 100%;
    margin: 0.25rem auto 0;
    font-size: 1.1rem;
    color: var(--text-light);
    text-align: center !important;
}

.gray-cloud-page .book-author {
    display: block;
    width: 100%;
    margin: 0.35rem auto 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center !important;
}

.gray-cloud-page .book-description {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.95;
    letter-spacing: 0.005em;
    color: var(--text-light);
    text-align: center;
}

/* ---- Centered title / subtitle / author ---- */
.gray-cloud-page .book-info-header {
    max-width: 1040px;
    margin: 0 auto 1.75rem;
    text-align: center;
}

.gray-cloud-page .book-info-header .section-header-decorated {
    text-align: center;
}

/* ---- Centered intro: description, availability, badges, cloud ---- */
.gray-cloud-page .book-info-intro {
    max-width: 1040px;
    margin: 0 auto 1.5rem;
    text-align: center;
}

/* Excerpt pull quote above the description */
.gray-cloud-page .book-excerpt-quote {
    position: relative;
    max-width: 600px;
    margin: 0 auto 2.25rem;
    padding: 0;
    text-align: center;
}

.gray-cloud-page .book-excerpt-quote::before {
    content: "\201C";
    display: block;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 3.4rem;
    line-height: 0.55;
    color: #e0a615;
    margin-bottom: 0.65rem;
}

.gray-cloud-page .book-excerpt-quote blockquote {
    margin: 0 0 1.1rem;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.22rem;
    line-height: 1.6;
    font-style: italic;
    color: #13294a;
}

.gray-cloud-page .book-excerpt-quote figcaption {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.gray-cloud-page .book-excerpt-quote figcaption::before {
    content: "";
    width: 42px;
    height: 2px;
    background: #e0a615;
    margin-bottom: 0.75rem;
    border-radius: 2px;
}

.gray-cloud-page .book-excerpt-name {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #13294a;
}

.gray-cloud-page .book-excerpt-role {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* "Available in Paperback & eBook" line */
.gray-cloud-page .book-availability {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.75rem auto 1.4rem;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #13294a;
}

.gray-cloud-page .book-availability-mark {
    color: #e0a615;
    font-size: 1rem;
}

/* ---- Store logos row (real brand logos, small) ---- */
.gray-cloud-page .book-store-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1.5rem;
    margin: 0 auto;
}

.gray-cloud-page .store-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.35rem;
    text-decoration: none !important;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.gray-cloud-page .store-logo:hover,
.gray-cloud-page .store-logo:focus-visible {
    opacity: 1;
    transform: translateY(-1px);
}

.gray-cloud-page .store-logo img {
    display: block;
    width: auto;
    height: 30px;
}

/* Apple logo pairs with a "Books" wordmark */
.gray-cloud-page .store-logo--apple img {
    height: 27px;
}

.gray-cloud-page .store-logo--apple span {
    font-size: 1.45rem;
    font-weight: 600;
    color: #111111;
    letter-spacing: -0.01em;
}

/* Google Play Books icon + wordmark */
.gray-cloud-page .store-logo--gplay img {
    height: 26px;
}

.gray-cloud-page .store-logo--gplay span {
    font-size: 1.15rem;
    font-weight: 700;
    color: #111111;
    letter-spacing: -0.01em;
}

/* Each store = logo + little "i" format tooltip */
.gray-cloud-page .store-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* "Coming soon" retailers: dimmed logo + inline badge, not clickable */
.gray-cloud-page .store-item--soon {
    cursor: default;
}

.gray-cloud-page .store-item--soon .store-logo {
    opacity: 0.4;
    filter: grayscale(0.35);
    pointer-events: none;
}

.gray-cloud-page .store-soon-badge {
    padding: 2px 9px;
    background: #13294a;
    border: 1px solid #e0a615;
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f6ead0;
    white-space: nowrap;
}

.fmt-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    flex: 0 0 auto;
    border: 1px solid #b7c1cf;
    border-radius: 50%;
    background: #fff;
    color: #6b7a8c;
    font: 700 10px/1 Georgia, 'Times New Roman', serif;
    cursor: help;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.fmt-info:hover,
.fmt-info:focus-visible {
    border-color: #13294a;
    color: #13294a;
}

.fmt-info::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    background: #13294a;
    color: #fff;
    padding: 5px 9px;
    border-radius: 6px;
    font: 600 11px/1.2 'Inter', sans-serif;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 60;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
}

.fmt-info::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: calc(100% + 3px);
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #13294a;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 60;
}

.fmt-info:hover::after,
.fmt-info:focus-visible::after,
.fmt-info:hover::before,
.fmt-info:focus-visible::before {
    opacity: 1;
    visibility: visible;
}

/* "Leave a review on Goodreads" line */
.gray-cloud-page .book-review-line {
    margin: 1.35rem auto 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.gray-cloud-page .book-review-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 0.35rem;
    text-decoration: none !important;
    font-weight: 600;
    color: #382110;
    vertical-align: middle;
}

.gray-cloud-page .book-review-link img {
    height: 17px;
    width: auto;
    display: block;
}

.gray-cloud-page .book-review-link:hover span,
.gray-cloud-page .book-review-link:focus-visible span {
    text-decoration: underline;
}

/* ---- Buttons (endorsements CTA) ---- */
.gray-cloud-page .book-buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.6rem;
    font-size: 0.98rem;
    font-weight: 700;
    text-decoration: none !important;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.gray-cloud-page .book-buy-btn-primary {
    color: #f6ead0;
    background: #13294a;
    border: 1px solid #13294a;
}

.gray-cloud-page .book-buy-btn-primary:hover,
.gray-cloud-page .book-buy-btn-primary:focus-visible {
    background: #0c1c34;
    color: #fbf5e6;
    transform: translateY(-1px);
}

.gray-cloud-page .book-buy-note {
    margin: 1rem 0 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* ---- Free preview tag above the reader ---- */
.gray-cloud-page .book-preview-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem auto 1.1rem;
    padding: 0.4rem 0.95rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #8a5a00;
    background: #fff5e0;
    border: 1px solid #f2d79a;
    border-radius: 999px;
}

.gray-cloud-page .book-preview-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e0a615;
}

.gray-cloud-page .book-reader-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1040px;
    min-height: 60vh;
    margin: 0 auto;
}

/* ---- Diagonal PREVIEW watermark over the book page ---- */
.book-page-frame {
    position: relative;
    display: inline-block;
    max-width: 100%;
    line-height: 0;
}

.book-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-32deg);
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    line-height: 1;
    white-space: nowrap;
    color: rgba(19, 41, 74, 0.24);
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.5);
    text-shadow: 0 2px 18px rgba(255, 255, 255, 0.4);
    pointer-events: none;
    user-select: none;
    font-size: clamp(2.75rem, 11vw, 8rem);
}

.gray-cloud-page .book-reader-wrap .book-watermark {
    font-size: clamp(2.75rem, 9vw, 7rem);
}

.gray-cloud-page .book-page-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 82vh;
    margin: 0 auto;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

.gray-cloud-page .book-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.85rem 1rem;
    margin-top: 1.25rem;
}

.gray-cloud-page .book-page-indicator {
    min-width: 5.5rem;
    text-align: center;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-light);
}

.gray-cloud-page .book-hint {
    display: block;
    width: 100%;
    margin: 0.85rem auto 0;
    text-align: center !important;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.gray-cloud-page .book-page-image:hover {
    box-shadow: 0 20px 52px rgba(15, 23, 42, 0.24);
}

.gray-cloud-page .book-open-fullscreen {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.1rem auto 0;
    padding: 0.7rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: #13294a;
    border: 1px solid #13294a;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.gray-cloud-page .book-open-fullscreen:hover,
.gray-cloud-page .book-open-fullscreen:focus-visible {
    background: #0c1c34;
}

/* Darker, high-contrast inline page controls */
.gray-cloud-page .book-controls .btn-mayo {
    background: #13294a;
    color: #fff;
    border: 1px solid #13294a;
    box-shadow: none;
}

.gray-cloud-page .book-controls .btn-mayo:hover:not(:disabled),
.gray-cloud-page .book-controls .btn-mayo:focus-visible {
    background: #0c1c34;
    color: #fff;
}

.gray-cloud-page .book-controls .btn-mayo:disabled {
    opacity: 0.35;
    cursor: default;
}

/* ---- Fullscreen reader (lightbox) ---- */
.book-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 4vw, 3rem);
    background: rgba(9, 14, 24, 0.88);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.book-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.book-lightbox-open {
    overflow: hidden;
}

.book-lightbox-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 100%;
}

.book-lightbox-image {
    display: block;
    width: auto;
    height: auto;
    max-width: min(1400px, 92vw);
    max-height: 90vh;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
    cursor: default;
}

.book-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 58px;
    height: 58px;
    border: none;
    border-radius: 50%;
    background: #12233d;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: background 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}

.book-lightbox-nav:hover:not(:disabled) {
    background: #0a1526;
    transform: translateY(-50%) scale(1.06);
}

.book-lightbox-nav:disabled {
    opacity: 0.28;
    cursor: default;
}

.book-lightbox-prev {
    left: clamp(0.75rem, 3vw, 2.25rem);
}

.book-lightbox-next {
    right: clamp(0.75rem, 3vw, 2.25rem);
}

.book-lightbox-close {
    position: absolute;
    top: clamp(0.75rem, 2.5vw, 1.5rem);
    right: clamp(0.75rem, 2.5vw, 1.5rem);
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: #12233d;
    color: #fff;
    font-size: 1.9rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: background 0.2s ease;
}

.book-lightbox-close:hover,
.book-lightbox-close:focus-visible {
    background: #0a1526;
}

.book-lightbox-indicator {
    position: absolute;
    bottom: clamp(0.85rem, 3vw, 1.75rem);
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: rgba(10, 18, 32, 0.75);
    padding: 0.4rem 1rem;
    border-radius: 999px;
}

.book-lightbox-frame {
    display: inline-block;
    line-height: 0;
}

.book-lightbox-frame .book-watermark {
    font-size: clamp(3.5rem, 13vw, 11rem);
    color: rgba(255, 255, 255, 0.28);
    -webkit-text-stroke: 2px rgba(19, 41, 74, 0.35);
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

/* ---- Endorsements ("Praise for The Gray Cloud") ---- */
.gray-cloud-page .book-endorsements {
    max-width: 1040px;
    margin: 3.5rem auto 0;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border-color);
}

.gray-cloud-page .book-endorsements-intro {
    max-width: 640px;
    margin: 0.25rem auto 2rem;
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--text-light);
    text-align: center;
}

.gray-cloud-page .endorsement-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    text-align: left;
}

/* 3 cards per row on desktop; the remaining 2 wrap and stay centered */
.gray-cloud-page .endorsement-card {
    flex: 0 1 calc(33.333% - 1rem);
}

@media (max-width: 900px) {
    .gray-cloud-page .endorsement-card {
        flex-basis: calc(50% - 0.75rem);
    }
}

@media (max-width: 640px) {
    .gray-cloud-page .endorsement-card {
        flex-basis: 100%;
    }
}

.gray-cloud-page .endorsement-card {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 1.6rem 1.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fd 100%);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.gray-cloud-page .endorsement-card blockquote {
    margin: 0 0 1.2rem;
    font-size: 0.98rem;
    line-height: 1.68;
    color: var(--text-color);
    font-style: italic;
}

.gray-cloud-page .endorsement-card figcaption {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: auto;
    padding-top: 0.9rem;
    min-height: 3.6rem;
    border-top: 2px solid #e0a615;
}

.gray-cloud-page .endorsement-name {
    font-size: 1rem;
    font-weight: 700;
    color: #13294a;
}

.gray-cloud-page .endorsement-role {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-muted);
}

.gray-cloud-page .book-endorsements-cta {
    margin-top: 2.25rem;
    text-align: center;
}

/* ---- "In the news" note (book featured in press) ---- */
.gray-cloud-page .book-press-note {
    margin: 2.5rem auto 0;
    max-width: 640px;
    text-align: center;
}

.gray-cloud-page .book-press-eyebrow {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #e0a615;
    margin-bottom: 0.6rem;
}

/* Article card — main article image + caption */
.gray-cloud-page .book-press-item {
    display: grid;
    grid-template-columns: 300px 1fr;
    align-items: stretch;
    max-width: 640px;
    margin: 0 auto;
    border: 1px solid rgba(19, 41, 74, 0.18);
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(19, 41, 74, 0.08);
    transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.gray-cloud-page .book-press-item:hover,
.gray-cloud-page .book-press-item:focus-visible {
    border-color: #13294a;
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(19, 41, 74, 0.16);
}

.gray-cloud-page .book-press-figure {
    margin: 0;
    min-height: 150px;
    background: #eef1f4;
}

.gray-cloud-page .book-press-figure img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gray-cloud-page .book-press-body {
    padding: 1.2rem 1.35rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.gray-cloud-page .book-press-source {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.gray-cloud-page .book-press-title {
    margin: 0.35rem 0 0.5rem;
    font-size: 1.05rem;
    line-height: 1.4;
    font-weight: 700;
    color: #13294a;
}

.gray-cloud-page .book-press-date {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.gray-cloud-page .book-press-open {
    margin-top: 0.65rem;
    font-weight: 700;
    font-size: 0.88rem;
    color: #13294a;
}

.gray-cloud-page .book-press-item:hover .book-press-open {
    text-decoration: underline;
}

@media (max-width: 560px) {
    .gray-cloud-page .book-press-item {
        grid-template-columns: 1fr;
    }
    .gray-cloud-page .book-press-figure {
        aspect-ratio: 16 / 9;
        min-height: 0;
    }
}

@media (max-width: 560px) {
    .gray-cloud-page .book-description {
        font-size: 1.02rem;
        line-height: 1.85;
    }

    .gray-cloud-page .book-store-logos {
        gap: 0.6rem 1.1rem;
    }

    .gray-cloud-page .store-logo img {
        height: 26px;
    }
}

@media (max-width: 768px) {
    .gray-cloud-page .book-reader-wrap {
        max-width: 100%;
    }

    .book-lightbox-image {
        max-height: 78vh;
    }

    .book-lightbox-nav {
        width: 48px;
        height: 48px;
        top: auto;
        bottom: 4.75rem;
        transform: none;
    }

    .book-lightbox-nav:hover:not(:disabled) {
        transform: none;
    }

    .book-lightbox-prev {
        left: 1rem;
    }

    .book-lightbox-next {
        right: 1rem;
    }

    .book-lightbox-indicator {
        bottom: 1.35rem;
    }
}
