/* Grace Matthews Books Tweens & Teens page */
body.gmbh-tweens-page {
    background:
        radial-gradient(circle at 12% 8%, rgba(75, 104, 159, 0.2), transparent 28%),
        linear-gradient(180deg, #101d3b 0 760px, var(--gmb-cream) 760px 100%);
}

/* Hero */
.gmb-tweens-hero {
    padding: 44px 0 82px;
    background: linear-gradient(180deg, var(--gmb-navy-deep), #122144 70%, transparent);
}

.gmb-tweens-hero-card {
    position: relative;
    aspect-ratio: 16 / 9;
    min-height: 590px;
    overflow: hidden;
    border: 1px solid rgba(225, 201, 120, 0.25);
    border-radius: var(--gmb-radius-xl);
    background: #08142d;
    box-shadow: 0 24px 70px rgba(2, 9, 24, 0.46);
}

.gmb-tweens-hero-visual,
.gmb-tweens-hero-visual > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.gmb-tweens-hero-visual > img {
    object-fit: cover;
}

.gmb-tweens-hero-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(4, 14, 36, 0.92) 0%, rgba(6, 18, 43, 0.8) 26%, rgba(8, 23, 52, 0.32) 54%, transparent 76%),
        linear-gradient(180deg, rgba(4, 14, 36, 0.1), rgba(4, 14, 36, 0.26));
    pointer-events: none;
}

.gmb-tweens-weather,
.gmb-tweens-rain,
.gmb-tweens-mist,
.gmb-tweens-lantern-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.gmb-tweens-rain {
    z-index: 2;
    opacity: 0.42;
    background-image: repeating-linear-gradient(
        105deg,
        transparent 0,
        transparent 24px,
        rgba(220, 235, 255, 0.56) 25px,
        transparent 26px,
        transparent 58px
    );
    background-size: 118px 170px;
    mix-blend-mode: screen;
    animation: gmb-rain-fall 1.1s linear infinite;
}

.gmb-tweens-rain-back {
    opacity: 0.22;
    background-size: 92px 138px;
    animation-duration: 1.65s;
    filter: blur(0.5px);
}

.gmb-tweens-rain-front {
    inset: -10% -5%;
    opacity: 0.36;
    background-size: 146px 208px;
    animation-duration: 0.95s;
}

.gmb-tweens-mist {
    z-index: 1;
    inset: auto -16% 0 -16%;
    height: 45%;
    opacity: 0.48;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(187, 208, 232, 0.27), transparent 58%),
        radial-gradient(ellipse at 68% 86%, rgba(181, 206, 234, 0.2), transparent 60%);
    filter: blur(15px);
    animation: gmb-mist-drift 12s ease-in-out infinite alternate;
}

.gmb-tweens-lantern-glow {
    z-index: 3;
    inset: 0;
    opacity: 0.62;
    background: radial-gradient(circle at 72.5% 54%, rgba(255, 203, 102, 0.5) 0%, rgba(255, 187, 66, 0.2) 5%, transparent 14%);
    mix-blend-mode: screen;
    animation: gmb-lantern-pulse 3.4s ease-in-out infinite;
}

@keyframes gmb-rain-fall {
    from { background-position: 0 -180px; }
    to { background-position: -55px 190px; }
}

@keyframes gmb-mist-drift {
    from { transform: translate3d(-2.5%, 0, 0) scale(1); }
    to { transform: translate3d(3.5%, -4%, 0) scale(1.08); }
}

@keyframes gmb-lantern-pulse {
    0%, 100% { opacity: 0.5; transform: scale(0.98); }
    50% { opacity: 0.78; transform: scale(1.035); }
}

.gmb-tweens-hero-copy {
    position: absolute;
    z-index: 5;
    top: 50%;
    left: clamp(36px, 5.5vw, 82px);
    width: min(43%, 570px);
    transform: translateY(-50%);
    color: var(--gmb-cream);
}

.gmb-tweens-hero-copy .gmb-eyebrow {
    color: var(--gmb-gold-light);
}

.gmb-tweens-hero-copy h1,
.gmb-tweens-hero-copy .gmb-lead {
    color: var(--gmb-cream);
}

.gmb-tweens-hero-copy h1 {
    font-size: clamp(2.75rem, 5.1vw, 5.25rem);
    text-shadow: 0 7px 24px rgba(0, 0, 0, 0.42);
}

.gmb-tweens-hero-copy .gmb-lead {
    max-width: 550px;
    color: rgba(250, 246, 238, 0.9);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.gmb-button-ghost {
    border-color: rgba(250, 246, 238, 0.65);
    background: rgba(10, 24, 53, 0.48);
    color: var(--gmb-cream) !important;
    box-shadow: none;
    backdrop-filter: blur(8px);
}

.gmb-button-ghost:hover,
.gmb-button-ghost:focus-visible {
    border-color: var(--gmb-gold-light);
    background: rgba(16, 29, 59, 0.84);
}

/* Shared series world structure */
.gmb-series-world {
    position: relative;
    overflow: hidden;
}

.gmb-series-intro {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(32px, 7vw, 92px);
    align-items: end;
    margin-bottom: 42px;
}

.gmb-series-intro > div:last-child > p {
    color: rgba(43, 43, 51, 0.77);
    font-size: 1.1rem;
}

.gmb-series-intro h2 {
    margin-bottom: 0;
}

.gmb-series-book-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.gmb-series-book-card {
    display: grid;
    grid-template-columns: minmax(200px, 0.4fr) minmax(0, 0.6fr);
    gap: clamp(24px, 4vw, 48px);
    align-items: center;
    min-height: 560px;
    padding: clamp(26px, 4vw, 46px);
    border-radius: var(--gmb-radius-xl);
    box-shadow: var(--gmb-shadow);
}

.gmb-series-book-cover {
    position: relative;
    display: flex;
    height: 430px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 18px;
    border-radius: 20px;
}

.gmb-series-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 17px 18px rgba(0, 0, 0, 0.26));
}

.gmb-series-book-copy {
    min-width: 0;
}

.gmb-series-book-copy h3 {
    font-size: clamp(1.75rem, 2.6vw, 2.75rem);
}

.gmb-series-book-copy > p:not(.gmb-release) {
    margin: 18px 0 26px;
}

.gmb-series-book-copy .gmb-age-chip {
    margin-bottom: 14px;
}

/* Stuffed Creatures world */
.gmb-stuffed-world {
    color: var(--gmb-cream);
    background:
        radial-gradient(circle at 88% 8%, rgba(88, 82, 160, 0.24), transparent 28%),
        radial-gradient(circle at 5% 78%, rgba(28, 72, 127, 0.36), transparent 32%),
        linear-gradient(160deg, #08142d, #101d3b 54%, #162b52);
}

.gmb-stuffed-world::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background-image:
        radial-gradient(circle, rgba(225, 201, 120, 0.75) 0 1px, transparent 1.5px),
        linear-gradient(115deg, transparent 49%, rgba(120, 164, 214, 0.15) 50%, transparent 51%);
    background-size: 68px 68px, 180px 180px;
    pointer-events: none;
}

.gmb-stuffed-world .gmb-container {
    position: relative;
    z-index: 1;
}

.gmb-series-intro-dark h2,
.gmb-series-intro-dark > div:last-child > p {
    color: var(--gmb-cream);
}

.gmb-series-intro-dark > div:last-child > p {
    color: rgba(250, 246, 238, 0.8);
}

.gmb-text-link-light {
    color: var(--gmb-cream) !important;
}

.gmb-series-book-card-dark {
    border: 1px solid rgba(225, 201, 120, 0.22);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(6px);
}

.gmb-series-book-card-dark .gmb-series-book-cover {
    background: radial-gradient(circle at 50% 15%, rgba(108, 130, 185, 0.25), transparent 54%), rgba(4, 14, 36, 0.56);
}

.gmb-series-book-card-dark h3,
.gmb-series-book-card-dark p {
    color: var(--gmb-cream);
}

.gmb-series-book-card-dark .gmb-series-book-copy > p:not(.gmb-release) {
    color: rgba(250, 246, 238, 0.79);
}

.gmb-series-book-card-dark .gmb-age-chip {
    border-color: rgba(225, 201, 120, 0.38);
    background: rgba(250, 246, 238, 0.08);
    color: var(--gmb-gold-light);
}

/* Money Map world */
.gmb-money-world {
    background:
        radial-gradient(circle at 88% 12%, rgba(194, 161, 74, 0.18), transparent 27%),
        linear-gradient(180deg, #fffdf8, #f4efe4);
    border-top: 1px solid rgba(194, 161, 74, 0.18);
    border-bottom: 1px solid rgba(194, 161, 74, 0.18);
}

.gmb-money-world::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.25;
    background-image:
        linear-gradient(30deg, transparent 48%, rgba(194, 161, 74, 0.16) 49%, rgba(194, 161, 74, 0.16) 50%, transparent 51%),
        linear-gradient(-30deg, transparent 48%, rgba(27, 42, 77, 0.09) 49%, rgba(27, 42, 77, 0.09) 50%, transparent 51%);
    background-size: 130px 130px;
    pointer-events: none;
}

.gmb-money-world .gmb-container {
    position: relative;
    z-index: 1;
}

.gmb-series-book-card-light {
    border: 1px solid rgba(27, 42, 77, 0.12);
    background: rgba(255, 255, 255, 0.88);
}

.gmb-series-book-card-light .gmb-series-book-cover {
    background: linear-gradient(150deg, rgba(220, 230, 243, 0.72), rgba(250, 246, 238, 0.95));
}

/* Choose section */
.gmb-choose-section {
    position: relative;
    background:
        radial-gradient(circle at 15% 0%, rgba(71, 105, 161, 0.26), transparent 34%),
        var(--gmb-navy-deep);
}

.gmb-section-heading-light h2,
.gmb-section-heading-light p:last-child {
    color: var(--gmb-cream);
}

.gmb-section-heading-light p:last-child {
    color: rgba(250, 246, 238, 0.74);
}

.gmb-choose-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.gmb-choose-card {
    min-height: 430px;
    padding: clamp(34px, 5vw, 58px);
    border-radius: var(--gmb-radius-xl);
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.24);
}

.gmb-choose-card h3 {
    font-size: clamp(1.9rem, 3vw, 3rem);
}

.gmb-choose-card ul {
    margin: 22px 0 30px;
    padding-left: 1.25em;
}

.gmb-choose-card li {
    margin: 9px 0;
}

.gmb-choose-stuffed {
    border: 1px solid rgba(225, 201, 120, 0.25);
    background: linear-gradient(145deg, rgba(78, 92, 145, 0.46), rgba(8, 20, 45, 0.86));
    color: var(--gmb-cream);
}

.gmb-choose-stuffed h3,
.gmb-choose-stuffed li {
    color: var(--gmb-cream);
}

.gmb-choose-money {
    background: linear-gradient(145deg, #fffdf9, #eadfca);
    color: var(--gmb-charcoal);
}

/* Coming soon */
.gmb-tweens-coming {
    background: linear-gradient(180deg, var(--gmb-cream), rgba(220, 230, 243, 0.34));
}

.gmb-tweens-coming-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.gmb-tweens-coming-card {
    display: grid;
    grid-template-columns: minmax(170px, 0.37fr) minmax(0, 0.63fr);
    gap: 28px;
    align-items: center;
    padding: 26px;
    border: 1px solid var(--gmb-border);
    border-radius: var(--gmb-radius-xl);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--gmb-shadow-soft);
}

.gmb-tweens-coming-cover {
    position: relative;
    display: flex;
    height: 330px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(220, 230, 243, 0.86), rgba(250, 246, 238, 0.96));
}

.gmb-tweens-coming-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 14px 13px rgba(27, 42, 77, 0.22));
}

.gmb-tweens-coming-copy h3 {
    font-size: clamp(1.55rem, 2.2vw, 2.25rem);
}

.gmb-tweens-coming-copy > p:last-child {
    color: rgba(43, 43, 51, 0.74);
}

.gmb-tweens-coming-action {
    margin-top: 34px;
    text-align: center;
}

/* Theme tags */
.gmb-series-tags-section {
    background: rgba(255, 255, 255, 0.58);
    border-top: 1px solid rgba(194, 161, 74, 0.14);
}

.gmb-series-tags-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.gmb-series-tags-card {
    padding: 38px;
    border: 1px solid var(--gmb-border);
    border-radius: var(--gmb-radius-lg);
    background: var(--gmb-white);
    box-shadow: var(--gmb-shadow-soft);
}

.gmb-series-tags-dark {
    border-color: rgba(225, 201, 120, 0.22);
    background: var(--gmb-navy);
}

.gmb-series-tags-dark h3 {
    color: var(--gmb-cream);
}

.gmb-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.gmb-tag-list span {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 8px 14px;
    border: 1px solid rgba(194, 161, 74, 0.3);
    border-radius: 999px;
    background: rgba(194, 161, 74, 0.08);
    color: var(--gmb-navy);
    font-size: 0.9rem;
    font-weight: 700;
}

.gmb-series-tags-dark .gmb-tag-list span {
    border-color: rgba(225, 201, 120, 0.32);
    background: rgba(250, 246, 238, 0.08);
    color: var(--gmb-cream);
}

@media (max-width: 1120px) {
    .gmb-series-book-card {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .gmb-series-book-cover {
        height: 420px;
    }

    .gmb-tweens-coming-card {
        grid-template-columns: 1fr;
    }

    .gmb-tweens-coming-cover {
        height: 390px;
    }
}

@media (max-width: 900px) {
    body.gmbh-tweens-page {
        background: var(--gmb-cream);
    }

    .gmb-series-intro,
    .gmb-series-book-grid,
    .gmb-choose-grid,
    .gmb-tweens-coming-grid,
    .gmb-series-tags-grid {
        grid-template-columns: 1fr;
    }

    .gmb-series-intro {
        gap: 14px;
    }
}

@media (max-width: 760px) {
    .gmb-tweens-hero {
        padding: 22px 0 58px;
    }

    .gmb-tweens-hero-card {
        display: flex;
        aspect-ratio: auto;
        min-height: 0;
        flex-direction: column;
    }

    .gmb-tweens-hero-visual {
        position: relative;
        aspect-ratio: 16 / 9;
        flex: 0 0 auto;
    }

    .gmb-tweens-hero-visual::after {
        background: linear-gradient(180deg, transparent 55%, rgba(4, 14, 36, 0.55));
    }

    .gmb-tweens-rain {
        opacity: 0.26;
    }

    .gmb-tweens-lantern-glow {
        background: radial-gradient(circle at 72.5% 54%, rgba(255, 203, 102, 0.48) 0%, rgba(255, 187, 66, 0.18) 5%, transparent 18%);
    }

    .gmb-tweens-hero-copy {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        transform: none;
        padding: 34px 24px 38px;
        text-align: center;
        background: linear-gradient(180deg, #0b1834, var(--gmb-navy-deep));
    }

    .gmb-tweens-hero-copy .gmb-button-row {
        align-items: stretch;
        flex-direction: column;
    }

    .gmb-tweens-hero-copy .gmb-button {
        width: 100%;
    }

    .gmb-series-book-card,
    .gmb-choose-card,
    .gmb-series-tags-card {
        padding: 26px 22px;
    }

    .gmb-series-book-cover,
    .gmb-tweens-coming-cover {
        height: 390px;
    }

    .gmb-series-book-copy,
    .gmb-tweens-coming-copy {
        text-align: center;
    }

    .gmb-series-book-copy .gmb-age-chip {
        margin-inline: auto;
    }

    .gmb-series-book-copy .gmb-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .gmb-series-book-cover,
    .gmb-tweens-coming-cover {
        height: 330px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gmb-tweens-rain,
    .gmb-tweens-mist,
    .gmb-tweens-lantern-glow {
        animation: none !important;
    }

    .gmb-tweens-rain {
        opacity: 0.12;
    }
}

.gmb-series-book-card-dark .gmb-release {
    color: var(--gmb-gold-light);
}

/* v2.8 contrast repair for dark Tweens & Teens sections */
.gmb-series-intro-dark h2,.gmb-series-intro-dark h3,.gmb-choose-section .gmb-section-heading h2,.gmb-choose-section .gmb-section-heading p,.gmb-choose-stuffed h3,.gmb-series-tags-dark h3{color:#faf6ee!important}.gmb-series-intro-dark p:not(.gmb-eyebrow),.gmb-choose-stuffed li{color:rgba(250,246,238,.9)!important}.gmb-series-tags-dark .gmb-tag-list span{color:#fff!important}.gmb-choose-section .gmb-section-heading .gmb-eyebrow{color:#d9b95f!important}

/* v3.4.0 Money Map game callout */
.gmb-tweens-money-game{display:grid;grid-template-columns:130px 1fr auto;gap:24px;align-items:center;margin-top:34px;padding:24px 28px;border:1px solid rgba(194,161,74,.34);border-radius:22px;background:linear-gradient(135deg,#fff,#f5efe2);box-shadow:0 16px 36px rgba(27,42,77,.1)}.gmb-tweens-money-game>img{width:120px;height:120px;object-fit:contain;filter:drop-shadow(0 10px 14px rgba(27,42,77,.18))}.gmb-tweens-money-game h3{margin-bottom:6px}.gmb-tweens-money-game p:last-child{margin-bottom:0;color:rgba(43,43,51,.74)}
@media(max-width:860px){.gmb-tweens-money-game{grid-template-columns:100px 1fr}.gmb-tweens-money-game>a{grid-column:1/-1;justify-self:start}.gmb-tweens-money-game>img{width:96px;height:96px}}
@media(max-width:520px){.gmb-tweens-money-game{grid-template-columns:1fr;text-align:center}.gmb-tweens-money-game>img{margin:auto}.gmb-tweens-money-game>a{justify-self:stretch}}

/* v3.5.1 complete-cover and dark-title repair
   The shared image reset sets height:auto with greater specificity. Lock the
   Tweens & Teens cover art to both dimensions so object-fit:contain can show
   every edge of each complete book cover instead of allowing overflow crop. */
body.gmbh-tweens-page .gmb-series-book-cover img,
body.gmbh-tweens-page .gmb-tweens-coming-cover img {
    width: 100%;
    max-width: 100%;
    height: 100% !important;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

body.gmbh-tweens-page .gmb-series-book-card-dark .gmb-series-book-copy h3 {
    color: var(--gmb-cream) !important;
}

@media (max-width: 760px) {
    body.gmbh-tweens-page .gmb-series-book-cover,
    body.gmbh-tweens-page .gmb-tweens-coming-cover {
        height: auto;
        aspect-ratio: 5 / 8;
    }
}
