/* ============================================================
   EMCGBOOKS — CUSTOM STYLESHEET
   booksite-child/css/custom-style.css
   ============================================================ */

/* ============================================================
   1. GOOGLE FONTS IMPORT
   ============================================================ */
@import url("https://fonts.googleapis.com/css2?family=Questrial&display=swap");

/* ============================================================
   2. GLOBAL DESIGN TOKENS
   ============================================================ */
:root {
    --global--font-size-base: 1.125rem; /* 18px */
    --color-bg:   #0d0d0d;
    --color-text: #ffffff;
    --font-main:  "Questrial", sans-serif;

    /* Typography */
    --text-h1:               40px;
    --text-h2:               30px;
    --text-h3:               25px;
    --text-paragraph:        18px;
    --text-mobile-paragraph: 15px;
    --text-small:            16px;

    /* Layout */
    --max-width:        1100px;
    --max-width-wide:   1200px;
    --max-width-narrow:  800px;

    /* Spacing */
    --section-pad-v:            160px;
    --half-section-pad-v:        80px;
    --section-pad-h:             40px;
    --mobile-section-pad-v:      40px;
    --mobile-half-section-pad-v: 20px;
    --mobile-section-large-pad-v: 80px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
}

/* ============================================================
   3. RESET & BASE STYLES
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg) !important;
    color: var(--color-text) !important;
    font-family: var(--font-main) !important;
}

#page,
.site-content,
.site {
    background-color: var(--color-bg) !important;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-text) !important;
    font-family: var(--font-main) !important;
}

p,
li {
    font-family: var(--font-main);
    font-size: 1.125rem; /* 18px */
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-text);
}

/* ============================================================
   4. HIDE PARENT THEME CHROME
   ============================================================ */
#masthead,
#colophon,
#header,
header.wp-block-template-part,
footer.wp-block-template-part,
.wp-block-site-title {
    display: none !important;
}

/* ============================================================
   5. HEADER & NAVIGATION
   ============================================================ */
#site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-text);
    padding: 0 40px;
}

.site-nav {
    width: 100%;
    display: flex;
    align-items: center;
    height: 70px;
}

.nav-logo-img {
    height: 28px;
    width: auto;
    display: block;
}

/* Hide sticky header on home page — hero supplies its own logo */
.home #site-header {
    display: none;
}

/* ============================================================
   6. HERO (SCROLL-DRIVEN, HOME PAGE)
   ============================================================ */

/* Tall scroll container — creates the scroll distance for the sticky panel */
.scroll-hero {
    height: 400vh;
    position: relative;
}

/* Sticky panel that pins to the viewport while scrolling */
.scroll-hero__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image layer */
.scroll-hero__images {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-hero__image,
.scroll-hero__image-colour {
    position: absolute;
    height: 90vh;
    width: auto;
    object-fit: contain;
    opacity: 0;
    display: block;
}

.scroll-hero__image {
    transition: opacity 0.8s ease;
}

.scroll-hero__image-colour {
    transition: opacity 5s ease;
}

.scroll-hero__image.is-active,
.scroll-hero__image-colour.is-active {
    opacity: 1;
}

/* Author name block — bottom-left of the sticky panel */
.scroll-hero__author {
    position: absolute;
    bottom: 8vh;
    left: 50%;
    font-size: var(--text-h1);
    color: var(--color-text);
    line-height: 1.2;
    z-index: 4;
    text-align: left;
    letter-spacing: 0.02em;
}

.scroll-hero__author-sub {
    display: block;
    font-size: 0.45em;
    letter-spacing: 0.15em;
    opacity: 0.7;
    margin-top: 0.3em;
    text-transform: uppercase;
}

/* Giant marquee title — mix-blend-mode cuts through the cover images */
.scroll-hero__text {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    width: 100%;
    pointer-events: none;
    z-index: 5;
}

.scroll-hero__text--inner {
    z-index: 3;
    color: var(--color-text);
}

.scroll-hero__marquee {
    display: inline-block;
    font-family: var(--font-main);
    font-size: clamp(10rem, 32vw, 67rem);
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1;
    will-change: transform;
    color: var(--color-text);
    mix-blend-mode: difference;
}

/* Accessible title — visually hidden, readable by screen readers */
.scroll-hero__sr-title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* Logo overlay in top-left of hero (replaces sticky header on home page) */
.hero-logo {
    position: absolute;
    top: 0;
    left: 0;
    padding-left: 40px;
    height: 70px;
    display: flex;
    align-items: center;
    z-index: 200;
}

.hero-logo-img {
    height: 28px;
    width: auto;
    display: block;
}

/* ============================================================
   7. BOOK CAROUSEL (HOME PAGE)
   ============================================================ */

/* Section wrapper */
.home-books {
    width: 100%;
    background-color: var(--color-bg);
    overflow: hidden;
    padding: 0;
}

/* Viewport — clips the scrolling track */
.book-carousel {
    width: 100%;
    height: 90vh;
    overflow: hidden;
    position: relative;
    cursor: grab;
}

.book-carousel:active {
    cursor: grabbing;
}

/* Track — shifted by JS translateX */
.book-carousel__track {
    display: flex;
    flex-direction: row;
    height: 100%;
    will-change: transform;
}

/* Card — portrait ratio derived from height */
.book-card {
    flex: 0 0 auto;
    height: 100%;
    width: calc(90vh * 0.65);
    padding: 5vw;
    border-right: 1px solid var(--color-text);
    box-sizing: border-box;
    cursor: pointer;
}

.book-card:first-child {
    border-left: 1px solid var(--color-text);
}

/* Inner box — clips front/back faces */
.book-card__inner {
    width: 100%;
    height: 100%;
    border: 1px solid var(--color-text);
    position: relative;
    overflow: hidden;
}

/* Front face */
.book-card__front {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-bg);
    opacity: 1;
    pointer-events: all;
}

.book-card__front img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Preserves aspect ratio — letterboxes if needed */
    display: block;
}

/* Placeholder shown when no cover image exists */
.book-card__no-cover {
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
}

/* Back face */
.book-card__back {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2vw;
    background-color: var(--color-bg);
    opacity: 0;
    pointer-events: none;
}

/* Hover: swap front → back */
.book-card:hover .book-card__front {
    opacity: 0;
    pointer-events: none;
}

.book-card:hover .book-card__back {
    opacity: 1;
    pointer-events: all;
}

/* Quote text */
.book-card__quote {
    font-family: var(--font-main);
    font-size: clamp(14px, 1.4vw, 20px);
    color: var(--color-text);
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.book-card__quote::before { content: "\201C"; }
.book-card__quote::after  { content: "\201D"; }

.book-card__quote--empty {
    opacity: 0.4;
    font-style: italic;
}

/* "Read More" button */
.book-card__read-more {
    display: block;
    width: 100%;
    padding: 1.2vh 0;
    border: 1px solid var(--color-text);
    background: transparent;
    color: var(--color-text);
    font-family: var(--font-main);
    font-size: clamp(12px, 1vw, 16px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    flex: 0 0 auto;
    margin-top: 2vh;
    transition: background-color 0.2s, color 0.2s;
}

.book-card__read-more:hover {
    background-color: var(--color-text);
    color: var(--color-bg);
}

/* Empty state */
.no-books {
    font-family: var(--font-main);
    font-size: var(--text-paragraph);
    color: var(--color-text);
    opacity: 0.5;
    padding: 40px;
    align-self: center;
}

/* Show/hide excerpt variants */
.mobile-excerpt  { display: none; }
.desktop-excerpt { display: block; }

/* ============================================================
   8. ABOUT SECTION (HOME PAGE)
   ============================================================ */
.home-about {
    padding-left: var(--half-section-pad-v);
    padding-right: var(--half-section-pad-v);
    padding-top: var(--section-pad-v);
    overflow: visible;
}

.about-inner {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 100px;
    overflow: visible;
}

.about-banksia {
    flex: 0 0 auto;
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
}

.about-text {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    max-width: 600px;
    gap: 20px;
    will-change: transform;
}

.about-heading {
    font-size: var(--text-h2);
    font-weight: 400;
    color: var(--color-text) !important;
    margin: 0;
}

.about-rule {
    border: none;
    border-top: 1px solid var(--color-text);
    margin: 0;
}

.about-bio {
    font-size: var(--text-paragraph);
    line-height: 1.9;
    color: var(--color-text);
}

.about-image-wrap {
    position: relative;
    padding-left: 7%;
    padding-top: 12%;
    max-width: 400px;
}

/* Rotating quotation image stack */
.about-quotation-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 70%;
    pointer-events: none;
    z-index: 0;
}

.about-quotation-img,
.about-quotation-img-colour,
.sb-form-img-colour {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
}

.about-quotation-img {
    transition: opacity 0.6s ease;
}

.about-quotation-img-colour,
.sb-form-img-colour {
    transition: opacity 0s;
}

.about-quotation-img.is-active,
.about-quotation-img-colour.is-active,
.sb-form-img-colour.is-active {
    opacity: 1;
}

/* ============================================================
   9. BOOK THUMBNAILS (HOME PAGE — SCROLL ROW)
   ============================================================ */
.home-thumbs {
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    flex-direction: row;
    scrollbar-width: none;
    margin-top: var(--section-pad-v);
    cursor: grab;
}

.home-thumbs::-webkit-scrollbar {
    display: none;
}

/* Outer card including padding */
.card-holder {
    flex: 0 0 auto;
    padding: 10vh;
    border: 1px solid var(--color-text);
    position: relative;
    width: calc(70vh * (758 / 1220) + 20vh);
    height: calc(70vh + 20vh);
    overflow: hidden;
}

.card-holder:hover {
    z-index: 10;
}

/* Book cover — 3D flip card */
.thumb-card {
    height: 70vh;
    width: calc(70vh * (758 / 1220));
    border: 1px solid var(--color-text);
    position: relative;
    perspective: 800px;
    z-index: 2;
}

.thumb-card__inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform-origin: left center;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-holder:hover .thumb-card__inner {
    transform: rotateY(-180deg);
}

.thumb-card__front,
.thumb-card__back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.thumb-card img {
    display: block;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    max-width: none !important;
}

.thumb-card__back {
    background-color: var(--color-bg);
    border-right: 1px solid var(--color-text);
    transform: rotateY(180deg);
}

.card-holder:hover .thumb-card {
    z-index: 0;
}

.card-holder:hover .thumb-card__back {
    opacity: 0;
    transition: opacity 0.7s ease 0.7s;
    pointer-events: none;
}

/* Quote block on back face */
.thumb-card__quote {
    font-family: var(--font-main);
    font-size: clamp(14px, 1.2vw, 18px);
    color: var(--color-text);
    line-height: 1.6;
    flex: 1;
    white-space: normal;
    background-image: url("/wp-content/themes/booksite-child/img/quotation-white.svg");
    background-repeat: no-repeat;
    background-size: 24px auto;
    background-position: top left;
    padding-top: 50px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 10;
}

.thumb-card__quote p          { margin: 0 0 10px 0; }
.thumb-card__quote p:last-child { margin-bottom: 0; }

.thumb-card__quotation {
    display: block;
    width: 5px;
    height: auto;
    margin-bottom: 10px;
}

/* Read More button (non-interactive on this component — navigates via card click) */
.thumb-card__read-more {
    display: block;
    width: 100%;
    padding: 1.2vh 0;
    border: 1px solid var(--color-text);
    background: transparent;
    color: var(--color-text);
    font-family: var(--font-main);
    font-size: clamp(12px, 1vw, 16px);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    margin-top: 2vh;
    cursor: default;
    pointer-events: none;
}

/* Excerpt overlay that slides in after the flip */
.thumb-card__page {
    position: absolute;
    top: 10vh;
    left: 10vh;
    height: 70vh;
    width: calc(70vh * (758 / 1220));
    border: 1px solid var(--color-text);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2vw;
    background-color: var(--color-bg);
    opacity: 0;
    transition: opacity 0.4s ease 0.3s;
    pointer-events: none;
    z-index: 1;
}

.card-holder:hover .thumb-card__page,
.card-holder:hover .thumb-card__page * {
    opacity: 1;
    pointer-events: all;
    cursor: pointer;
}

/* ============================================================
   10. SINGLE BOOK PAGE — HERO
   ============================================================ */
.single-book-page {
    background: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
}

.sb-hero {
    position: relative;
    padding: 80px 60px;
    overflow: hidden;
}

/* Decorative SVG watermark */
.sb-hero__watermark {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translate(-30%, -50%);
    opacity: 0.2;
    width: 70%;
    pointer-events: none;
    will-change: transform;
}

.sb-hero__watermark svg {
    width: 80%;
    height: auto;
    fill: var(--color-text);
}

/* Hidden on desktop; shown on mobile (see @media block) */
.sb-hero__watermark-mobile {
    display: none;
}

.sb-hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 80px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Cover image with 3D flip to excerpt */
.sb-hero__cover-wrap {
    position: relative;
    height: 70vh;
    width: calc(70vh * (758 / 1220));
    flex: 0 0 auto;
}

.sb-hero__cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    border: 1px solid var(--color-text);
    perspective: 800px;
}

.sb-hero__cover-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform-origin: left center;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sb-hero__cover-wrap:hover .sb-hero__cover-inner {
    transform: rotateY(-180deg);
}

.sb-hero__cover-wrap:hover .sb-hero__cover {
    z-index: 0;
}

.sb-hero__cover-front,
.sb-hero__cover-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.sb-hero__cover-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sb-hero__cover-back {
    background-color: var(--color-bg);
    transform: rotateY(180deg);
    border-right: 1px solid var(--color-text);
}

.sb-hero__cover-wrap:hover .sb-hero__cover-front {
    opacity: 0;
    transition: opacity 0s ease 1.2s;
}

/* Excerpt panel revealed after flip */
.sb-hero__cover-excerpt-panel {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-color: var(--color-bg);
    border: 1px solid var(--color-text);
    padding: 2vw;
    padding-top: calc(2vw + 54px);
    background-image: url("/wp-content/themes/booksite-child/img/quotation-white.svg");
    background-repeat: no-repeat;
    background-size: 24px auto;
    background-position: top 2vw left 2vw;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease 0.4s;
}

.sb-hero__cover-wrap:hover .sb-hero__cover-excerpt-panel {
    opacity: 1;
    pointer-events: all;
}

.sb-hero__cover-excerpt {
    font-size: clamp(14px, 1.2vw, 18px);
    line-height: 1.6;
    color: var(--color-text);
}

.sb-hero__cover-excerpt p          { margin: 0 0 12px 0; }
.sb-hero__cover-excerpt p:last-child { margin-bottom: 0; }

/* Book metadata */
.sb-hero__details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 40px;
}

.sb-hero__title {
    font-size: var(--text-h1);
    font-weight: 400;
    margin: 0;
}

.sb-hero__tagline {
    font-style: italic;
    font-size: var(--text-paragraph);
    margin: 0;
    opacity: 0.85;
}

.sb-hero__date {
    font-size: var(--text-small);
    letter-spacing: 0.08em;
    margin: 0;
    opacity: 0.6;
}

.sb-hero__blurb {
    font-size: var(--text-paragraph);
    line-height: 1.6;
    margin: 0;
}

.sb-hero__blurb p          { margin: 0 0 12px 0; }
.sb-hero__blurb p:last-child { margin-bottom: 0; }

/* Buy button */
.sb-hero__buy {
    margin-top: 20px;
    display: inline-block;
    align-self: flex-start;
    border: 1px solid var(--color-text);
    color: var(--color-text);
    padding: 12px 32px;
    font-size: var(--text-small);
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.sb-hero__buy:hover {
    background: var(--color-text);
    color: var(--color-bg);
}

.sb-rule {
    border: none;
    border-top: 1px solid var(--color-text);
    margin: 20px 0;
}

/* ============================================================
   11. SINGLE BOOK PAGE — REVIEWS STRIP
   ============================================================ */
.sb-reviews__heading {
    text-align: center;
    color: var(--color-text);
    font-size: var(--text-h2);
    margin-bottom: 30px;
}

.sb-reviews {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    padding-bottom: 60px;
    cursor: grab;
}

.sb-reviews::-webkit-scrollbar {
    display: none;
}

.sb-reviews__track {
    display: flex;
    gap: 0;
    width: max-content;
}

.sb-review-card {
    flex: 0 0 33.333vw;
    width: 33.333vw;
    border: 1px solid var(--color-text);
    padding: 40px;
    padding-top: 100px;
    margin-right: -1px;
    display: flex;
    flex-direction: column;
    background-image: url("/wp-content/themes/booksite-child/img/quotation-white.svg");
    background-repeat: no-repeat;
    background-size: 24px auto;
    background-position: top 40px left 40px;
}

.sb-review-card__text {
    font-size: var(--text-paragraph);
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.sb-review-card__name {
    font-size: var(--text-small);
    letter-spacing: 0.05em;
    margin: 0;
    opacity: 0.6;
}

/* ============================================================
   12. SINGLE BOOK PAGE — REVIEW FORM
   ============================================================ */
.sb-form-section {
    padding: 80px 120px;
    overflow: hidden;
}

.sb-form-section__inner {
    display: flex;
    gap: 160px;
    align-items: center;
    max-width: 1100px;
    padding: 0 2rem;
    margin: 0 auto;
}

.sb-form-section__image {
    flex: 1;
    min-width: 0;
    max-width: 500px;
    position: relative;
}

.sb-form-section__image img {
    width: 100%;
    height: auto;
    display: block;
}

.sb-form-section__form {
    flex: 1;
    min-width: 0;
    max-width: 700px;
}

.sb-form-section__heading {
    font-size: var(--text-h2);
    font-weight: 400;
    margin: 0 0 32px 0;
}

.sb-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    --global--color-primary: transparent;
    --global--color-background: var(--color-text);
}

.sb-form__row,
.sb-form__row--half {
    display: flex;
    gap: 16px;
}

.sb-form__input {
    flex: 1;
    background: transparent;
    border: 1px solid var(--color-text);
    color: var(--color-text);
    -webkit-text-fill-color: var(--color-text);
    font-family: inherit;
    font-size: var(--text-small);
    padding: 14px 16px;
    outline: none;
    width: 100%;
}

.sb-form__input::placeholder { color: var(--color-text); }
.sb-form__input:focus        { border-color: var(--color-text); opacity: 1; }

.sb-form__textarea {
    resize: vertical;
    min-height: 120px;
}

.sb-form__submit {
    align-self: flex-start;
    background: transparent;
    border: 1px solid var(--color-text);
    color: var(--color-text);
    font-family: inherit;
    font-size: var(--text-small);
    letter-spacing: 0.1em;
    padding: 12px 32px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.sb-form__submit:hover {
    background: var(--color-text);
    color: var(--color-bg);
}

.sb-form__checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--text-small);
    color: var(--color-text);
    cursor: pointer;
}

.sb-form__checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--color-text);
    cursor: pointer;
}

/* WordPress native comment form fields — overridden to match site style */
#author,
#email,
#comment {
    background: transparent !important;
    border: 1px solid var(--color-text) !important;
    color: var(--color-text) !important;
    -webkit-text-fill-color: var(--color-text) !important;
    font-family: inherit !important;
    font-size: var(--text-small) !important;
    padding: 14px 16px !important;
    outline: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
}

/* Override theme button styles on the submit button */
.site .sb-form__submit,
.site .sb-form__submit:not(:hover):not(:active) {
    background-color: transparent !important;
    background: transparent !important;
    color: var(--color-text) !important;
    border: 1px solid var(--color-text) !important;
    border-radius: 0 !important;
}

.site .sb-form__submit:hover {
    background-color: var(--color-text) !important;
    color: var(--color-bg) !important;
}

/* Hide WordPress cookie-consent checkbox (GDPR) */
.comment-form-cookies-consent { display: none; }

/* Rotating author image in the form section */
.sb-form-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.sb-form-img.is-active {
    opacity: 1;
    position: relative;
}

/* ============================================================
   13. SINGLE BOOK PAGE — LEGACY COMMENT FORM OVERRIDES
   ============================================================ */

/* Hide WordPress-generated comment UI chrome */
.comments-title,
h2.comments-title,
h3#comments,
.comment-metadata,
.says,
.reply,
.comment-author .avatar,
#reply-title {
    display: none !important;
}

.comment-author .fn {
    font-size: 0.95rem;
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
    color: var(--color-text) !important;
}

.comment-content p {
    color: var(--color-text) !important;
    font-size: 0.9rem;
    line-height: 1.7;
}

/* Style the comment list as a flex card grid */
ol.comment-list,
ol.commentlist {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0;
    margin-bottom: 50px;
}

ol.comment-list li.comment,
ol.commentlist li.comment {
    background: var(--color-bg);
    border: 1px solid var(--color-text);
    padding: 24px;
    flex: 1 1 250px;
    max-width: 350px;
}

/* Override theme styles on comment form inputs */
.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"] {
    background: var(--color-bg) !important;
    border: 1px solid var(--color-text) !important;
    color: var(--color-text) !important;
    padding: 12px;
    width: 100%;
    font-family: var(--font-main);
    margin-bottom: 10px;
}

.comment-form input[type="submit"] {
    background: transparent !important;
    border: 1px solid var(--color-text) !important;
    color: var(--color-text) !important;
    padding: 12px 28px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background var(--transition-base), color var(--transition-base);
}

.comment-form input[type="submit"]:hover {
    background: var(--color-text) !important;
    color: var(--color-bg) !important;
}

/* ============================================================
   14. REVIEW THANKS MODAL
   ============================================================ */
.review-thanks {
    display: none; /* Shown via JS after successful form submission */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-bg);
    border: 1px solid var(--color-text);
    padding: 60px 80px;
    z-index: 9999;
    min-width: 400px;
    text-align: center;
    --global--color-primary: transparent;
    --global--color-background: var(--color-text);
}

.review-thanks__text {
    font-size: var(--text-paragraph);
    margin: 0;
}

.review-thanks__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--color-text);
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    -webkit-appearance: none;
    appearance: none;
}

/* Override theme button styles on the close button */
.site .review-thanks__close,
.site .review-thanks__close:not(:hover):not(:active) {
    background-color: transparent !important;
    background: transparent !important;
    color: var(--color-text) !important;
    border: none !important;
    border-radius: 0 !important;
}

/* ============================================================
   15. STATIC PAGES (Privacy Policy, etc.)
   ============================================================ */
.entry-title,
.entry-content,
.entry-content p,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content li {
    color: var(--color-text) !important;
}

.entry-content {
    max-width: var(--max-width-narrow);
    margin: 60px auto;
    padding: 0 var(--section-pad-h);
    line-height: 1.8;
}

/* Privacy Policy page (page ID 3) */
.page-id-3 .entry-header {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 60px 40px 0;
}

.page-id-3 .entry-title {
    font-size: var(--text-h1) !important;
    margin-bottom: 8px;
}

.page-id-3 .entry-title::after {
    content: "emcgbooks";
    display: block;
    font-size: var(--text-small);
    font-weight: normal;
    margin-top: 4px;
}

.page-id-3 .entry-header .wp-block-separator,
.page-id-3 hr {
    margin-top: 16px !important;
    margin-bottom: 16px !important;
}

.page-id-3 .entry-content {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 40px 80px;
}

/* ============================================================
   16. FOOTER
   ============================================================ */
#site-footer {
    border-top: 1px solid var(--color-text);
    margin-top: var(--half-section-pad-v);
    display: flex;
    flex-direction: column;
    min-height: 120px;
}

.footer-inner {
    width: 100%;
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
}

.footer-col {
    padding: 32px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    background: var(--color-bg);
    transition: background var(--transition-base);
}

.footer-col:hover {
    background: rgba(255, 255, 255, 0.2);
}

.footer-col--left   { border-right: 1px solid var(--color-text); }
.footer-col--centre { border-right: 1px solid var(--color-text); }

.footer-logo-img {
    height: 36px;
    width: auto;
    display: block;
}

.footer-email,
.footer-privacy {
    color: var(--color-text);
    font-size: var(--text-small);
    letter-spacing: 0.05em;
    text-decoration: none;
}

/* ============================================================
   RESPONSIVE — TABLET (max-width: 1024px)
   ============================================================ */
@media (max-width: 1024px) {

    /* Hero */
    .scroll-hero__author {
        left: 40px !important;
        bottom: 40px !important;
        top: auto !important;
    }

    .scroll-hero__image,
    .scroll-hero__image-colour {
        height: 80vh;
    }

    /* Book thumbnails */
    .home-thumbs {
        height: calc((45vw - 10vw) * (1220 / 758) + 10vw);
    }

    .card-holder {
        width: 45vw;
        height: calc((45vw - 10vw) * (1220 / 758) + 10vw);
        padding: 5vw;
    }

    .thumb-card {
        width: calc(45vw - 10vw);
        height: calc((45vw - 10vw) * (1220 / 758));
    }

    .thumb-card__page {
        top: 5vw;
        left: 5vw;
        width: calc(45vw - 10vw);
        height: calc((45vw - 10vw) * (1220 / 758));
    }

    /* About section */
    .about-inner {
        flex-direction: column;
        gap: 120px;
    }

    .about-image-wrap {
        padding-left: 15%;
        padding-top: 30%;
        margin: 0 auto;
        width: 70%;
        max-width: 100%;
    }

    .about-banksia {
        width: auto;
        max-width: none;
    }

    .home-about {
        padding: var(--mobile-section-pad-v);
        padding-top: var(--mobile-section-large-pad-v);
    }

    .about-text {
        transform: none !important;
        will-change: auto;
        margin: 0 auto;
        max-width: 700px;
    }

    .about-quotation-images {
        width: 60% !important;
    }

    /* Single book hero */
    .sb-hero__cover-wrap {
        height: 30vw;
        width: calc(30vw * (758 / 1220));
    }

    /* Review form */
    .sb-form-section {
        padding: 80px;
        overflow: hidden;
    }

    .sb-form-section__inner {
        display: flex;
        gap: 80px;
        align-items: center;
        max-width: none;
        padding: 0;
        margin: 0 auto;
    }

    .sb-form-section__form {
        will-change: auto;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
}

/* ============================================================
   RESPONSIVE — MOBILE (max-width: 700px)
   ============================================================ */
@media (max-width: 700px) {

    p {
        font-size: var(--text-mobile-paragraph);
    }

    /* Hero */
    .scroll-hero {
        height: 200vh;
    }

    .scroll-hero__image,
    .scroll-hero__image-colour {
        height: 65vh;
    }

    .scroll-hero__images {
        align-items: flex-start;
        padding-top: 10vh;
    }

    .scroll-hero__author {
        left: 24px !important;
        bottom: 10vh !important;
        top: auto !important;
        font-size: 28px !important;
    }

    .scroll-hero__author-sub {
        font-size: 11px;
        letter-spacing: 0.18em;
    }

    .hero-logo {
        padding-left: 20px;
    }

    /* Book thumbnails */
    .home-thumbs {
        margin-top: 40px;
        height: calc((70vw - 20vw) * (1220 / 758) + 20vw);
        overflow-x: scroll;
        overflow-y: hidden;
        flex-wrap: nowrap;
    }

    .card-holder {
        width: 70vw;
        height: calc((70vw - 20vw) * (1220 / 758) + 20vw);
        padding: 10vw;
    }

    .thumb-card {
        width: calc(70vw - 20vw);
        height: calc((70vw - 20vw) * (1220 / 758));
    }

    .thumb-card__page {
        top: 10vw;
        left: 10vw;
        width: calc(70vw - 20vw);
        height: calc((70vw - 20vw) * (1220 / 758));
        padding: 5vw;
    }

    /* On mobile, flip is triggered by tap (.is-flipped class) not hover */
    .card-holder:hover .thumb-card__inner { transform: none; }
    .card-holder:hover .thumb-card__page  { opacity: 0; pointer-events: none; }
    .card-holder:hover .thumb-card        { z-index: 2; }
    .card-holder:hover .thumb-card__back  { opacity: 1; }

    .card-holder.is-flipped .thumb-card__inner { transform: rotateY(-180deg); }
    .card-holder.is-flipped .thumb-card__page  { opacity: 1; pointer-events: all; }
    .card-holder.is-flipped .thumb-card        { z-index: 0; }
    .card-holder.is-flipped .thumb-card__back  { opacity: 0; }

    /* Show mobile excerpt variant */
    .mobile-excerpt  { display: block; }
    .desktop-excerpt { display: none; }

    /* About section */
    .about-inner {
        flex-direction: column;
        gap: 80px;
    }

    .about-image-wrap {
        max-width: 100%;
        width: 100%;
        padding-left: 15%;
        padding-top: 30%;
    }

    .about-banksia {
        max-width: 100%;
    }

    .home-about {
        padding: var(--mobile-section-pad-v);
        padding-top: var(--mobile-section-large-pad-v);
    }

    .about-text {
        transform: none !important;
        will-change: auto;
    }

    .about-quotation-images {
        width: 60%;
    }

    /* Reviews strip */
    .sb-review-card {
        flex: 0 0 80vw;
        width: 80vw;
        padding: 80px 24px 24px 24px;
        background-position: top 24px left 24px;
    }

    /* Footer */
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-col {
        justify-content: center;
        border-right: none;
        border-bottom: 1px solid var(--color-text);
        padding: 24px;
    }

    .footer-col--right {
        border-bottom: none;
    }

    /* Single book hero */
    .sb-hero {
        padding: var(--mobile-section-pad-v);
        position: relative;
    }

    .sb-hero__inner {
        flex-direction: column;
        gap: 0;
    }

    .sb-hero__cover-wrap {
        width: 100%;
        height: calc((100vw - 80px) * (1220 / 758));
    }

    .sb-hero__cover {
        max-width: none;
    }

    .sb-hero__cover-excerpt-panel {
        padding: 6vw;
        padding-top: calc(6vw + 54px);
        background-position: top 6vw left 6vw;
    }

    .sb-hero__watermark {
        display: none;
    }

    .sb-hero__watermark-mobile {
        display: block;
        position: absolute;
        bottom: -13%;
        left: 80%;
        transform: translateX(-50%);
        width: 190%;
        opacity: 0.15;
        pointer-events: none;
    }

    .sb-hero__watermark-mobile svg {
        width: 100%;
        height: auto;
    }

    
    .sb-reviews__heading {
    padding: 0 20px;
    }
    
    /* Review form */
    .sb-form-section {
        padding: var(--mobile-section-pad-v);
    }

    .sb-form-section__inner {
        flex-direction: column;
        gap: 32px;
        padding: 0;
        align-items: flex-start;
    }

    .sb-form__row--half {
        flex-direction: column;
    }

    .sb-form-section__form {
        max-width: 100%;
        width: 100%;
    }

    .sb-form-section__image {
        display: block;
        max-width: 50%;
        align-self: flex-start;
    }
}
