/* Additions to the supplied Headwaters site: series navigation and book pages. */
:root { --book-navy: #0f172a; --book-ink: #0a1628; --book-gold: #c9a84c; --book-cream: #fbf8f0; --book-warm: #f4efe4; }
#book-series *, #book-series *::before, #book-series *::after, .book-page *, .book-page *::before, .book-page *::after { box-sizing: border-box; }
#book-series { scroll-margin-top: 5rem; padding: clamp(3.8rem,7vw,6rem) 1.5rem; background: var(--book-cream); color: var(--book-ink); font-family: 'Lora',Georgia,serif; }
#book-series .series-wrap { max-width: 1160px; margin: auto; }
#book-series .series-heading { text-align: center; margin-bottom: 2.4rem; }
#book-series .series-eyebrow, .book-page .book-eyebrow { margin: 0 0 .65rem; font-size: .75rem; font-weight: 700; line-height: 1.7; letter-spacing: .25em; text-transform: uppercase; color: #99752e; }
#book-series h2, #book-series h3, .book-page h1, .book-page h2, .book-page h3 { font-family: 'Playfair Display',Georgia,serif; }
#book-series h2 { margin: 0; font-size: clamp(2rem,4vw,3rem); line-height: 1.2; }
#book-series .series-rule { display: block; width: 80px; height: 2px; background: var(--book-gold); margin: 1.2rem auto 0; }
#book-series .series-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.5rem; }
#book-series .series-card { display: flex; flex-direction: column; min-width: 0; background: #fff; box-shadow: 0 12px 32px rgba(15,23,42,.08); border: 1px solid rgba(201,168,76,.25); text-decoration: none; color: var(--book-ink); transition: transform .2s,box-shadow .2s; }
#book-series .series-card:hover, #book-series .series-card:focus-visible { transform: translateY(-5px); box-shadow: 0 18px 36px rgba(15,23,42,.14); outline: 2px solid var(--book-gold); outline-offset: 2px; }
#book-series .series-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
#book-series .series-card-copy { display: flex; flex-direction: column; flex: 1; padding: 1.3rem 1.4rem 1.5rem; }
#book-series .series-card-kicker { color: #98712a; font-size: .7rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
#book-series .series-card h3 { font-size: clamp(1.25rem,2vw,1.65rem); line-height: 1.25; margin: .5rem 0 .35rem; }
#book-series .series-card-subtitle { color: #625c55; font-size: .9rem; font-style: italic; line-height: 1.5; margin: 0 0 1.2rem; }
#book-series .series-card-action { display: inline-block; align-self: flex-start; margin-top: auto; border-bottom: 2px solid var(--book-gold); padding-bottom: .2rem; color: var(--book-ink); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
#book-series .series-amazon { text-align: center; margin: 2rem 0 0; font-size: .82rem; }
#book-series .series-amazon a { color: #755922; text-decoration: underline; text-underline-offset: 3px; }
/* The same accessible details/summary menu is inserted into desktop and mobile navigation. */
.series-menu { position: relative; font-family: 'Lora',Georgia,serif; }
.series-menu summary { list-style: none; cursor: pointer; color: rgba(255,255,255,.78); font-size: .85rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.series-menu summary::-webkit-details-marker { display: none; }
.series-menu summary::after { content: '⌄'; display: inline-block; margin-left: .5rem; color: var(--book-gold); }
.series-menu summary:hover, .series-menu summary:focus-visible, .series-menu[open] summary { color: var(--book-gold); }
.series-menu summary:focus-visible, .series-menu-panel a:focus-visible { outline: 2px solid var(--book-gold); outline-offset: 3px; }
.series-menu-panel { position: absolute; z-index: 70; top: calc(100% + 16px); left: -.8rem; width: min(335px,90vw); padding: .55rem; background: #122038; border: 1px solid rgba(201,168,76,.65); box-shadow: 0 14px 32px rgba(0,0,0,.26); }
.series-menu-panel::before { content: ''; position: absolute; left: 0; right: 0; height: 17px; top: -17px; }
.series-menu-panel a { display: block; padding: .8rem .9rem; color: #f6f0df !important; text-decoration: none; font-size: .8rem; line-height: 1.5; white-space: normal; }
.series-menu-panel a:hover { background: rgba(201,168,76,.16); }
.series-menu-panel .series-soon { display: block; color: #d7b965; font-size: .67rem; letter-spacing: .05em; text-transform: uppercase; }
@media (min-width: 768px) { .series-menu:not([open]):hover .series-menu-panel { display: block; } .series-menu:not([open]) .series-menu-panel { display: none; } }
.series-menu-mobile { width: 100%; }
.series-menu-mobile summary { display: block; padding: .75rem 1rem; border-radius: 2px; font-size: .875rem; color: rgba(255,255,255,.74); }
.series-menu-mobile .series-menu-panel { position: static; width: 100%; margin: .3rem 0 .5rem; box-shadow: none; }
.series-menu-mobile .series-menu-panel::before { display: none; }
.series-footer-link { white-space: normal; }
#book-one { scroll-margin-top: 5rem; }
/* Standalone book pages use the original site's typography, colors, and spacing. */
.book-page { margin: 0; background: var(--book-cream); color: var(--book-ink); font-family: 'Lora',Georgia,serif; line-height: 1.7; }
.book-page a { transition: opacity .2s; }
.book-page a:hover { opacity: .85; }
.book-page .book-shell { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; }
.book-page .book-nav { position: sticky; top: 0; z-index: 60; background: #0a1628; color: #fff; border-bottom: 1px solid rgba(201,168,76,.28); }
.book-page .book-nav-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.book-page .book-brand { display: inline-flex; align-items: center; gap: .7rem; color: #fff; font-size: .82rem; letter-spacing: .13em; text-decoration: none; text-transform: uppercase; font-weight: 700; }
.book-page .book-brand img { width: 33px; height: 33px; border-radius: 50%; }
.book-page .book-nav-links { display: flex; align-items: center; gap: clamp(1rem,2vw,2rem); }
.book-page .book-nav-links > a { color: rgba(255,255,255,.75); text-transform: uppercase; font-size: .79rem; letter-spacing: .05em; text-decoration: none; white-space: nowrap; }
.book-page .book-nav-links > a:hover { color: var(--book-gold); }
.book-page .book-mobile { display: none; }
.book-page .book-mobile > summary { cursor: pointer; list-style: none; color: #f6eed9; font-size: 1.4rem; line-height: 1; }
.book-page .book-mobile > summary::-webkit-details-marker { display: none; }
.book-page .book-mobile-panel { position: absolute; left: 0; right: 0; top: 100%; padding: .8rem 1.5rem 1.4rem; background: #0a1628; border-bottom: 1px solid rgba(201,168,76,.4); }
.book-page .book-mobile-panel > a { display: block; padding: .7rem 1rem; color: #eee6d3; text-decoration: none; text-transform: uppercase; font-size: .82rem; }
.book-page .book-mobile-panel .series-menu-panel { position: static; width: 100%; margin: .4rem 0; box-shadow: none; }
.book-page .book-mobile-panel .series-menu-panel::before { display: none; }
.book-page .book-hero { background: #0f172a; color: #fff; padding: clamp(3.5rem,7vw,6.5rem) 0; }
.book-page .book-hero-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: center; gap: clamp(2rem,6vw,5rem); }
.book-page .book-hero-art img { display: block; width: 100%; max-width: 540px; height: auto; margin: auto; border: 1px solid rgba(201,168,76,.45); box-shadow: 0 22px 45px rgba(0,0,0,.28); }
.book-page .book-hero .book-eyebrow { color: #e3c173; }
.book-page .book-coming { display: inline-block; border: 1px solid rgba(201,168,76,.75); color: #f0d588; padding: .38rem .7rem; margin: .4rem 0 .6rem; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.book-page h1 { font-size: clamp(2.5rem,5vw,4.65rem); line-height: 1.13; margin: .2rem 0 .65rem; }
.book-page .book-subtitle { font-family: 'Playfair Display',Georgia,serif; font-size: clamp(1.2rem,2.3vw,1.8rem); font-style: italic; color: #e6d7b4; margin: 0 0 1.5rem; }
.book-page .book-hero-lede { color: rgba(255,255,255,.78); font-size: 1.06rem; line-height: 1.8; max-width: 550px; }
.book-page .book-actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-top: 2rem; }
.book-page .book-button { display: inline-block; padding: .88rem 1.25rem; border: 1px solid var(--book-gold); background: var(--book-gold); color: #0a1628; font-size: .79rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; border-radius: 2px; line-height: 1.5; }
.book-page .book-button-outline { background: transparent; color: #eddbac; }
.book-page .book-section { padding: clamp(4rem,7vw,6.5rem) 0; }
.book-page .book-section-warm { background: var(--book-warm); }
.book-page .book-section h2 { font-size: clamp(2rem,3.6vw,3rem); line-height: 1.2; margin: 0 0 1.15rem; }
.book-page .book-section-intro { max-width: 740px; margin: 0 auto 2.3rem; text-align: center; }
.book-page .book-section-intro p:last-child { color: #5a5550; margin: 0; }
.book-page .book-movements { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1rem; }
.book-page .book-movement { padding: 1.4rem; border-top: 3px solid var(--book-gold); background: #fff; box-shadow: 0 7px 22px rgba(15,23,42,.055); }
.book-page .book-movement span { display: block; color: #9b762c; font-size: .72rem; letter-spacing: .18em; margin-bottom: .65rem; }
.book-page .book-movement h3 { font-size: 1.35rem; margin: 0 0 .55rem; line-height: 1.3; }
.book-page .book-movement p { margin: 0; color: #58514a; font-size: .87rem; line-height: 1.75; }
.book-page .book-gallery { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.25rem; }
.book-page .book-gallery article { background: #fff; border: 1px solid rgba(201,168,76,.2); }
.book-page .book-gallery img { display: block; width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.book-page .book-gallery-body { padding: 1.1rem 1.25rem 1.4rem; }
.book-page .book-gallery h3 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 .4rem; }
.book-page .book-gallery p { margin: 0; color: #5a5550; font-size: .87rem; }
.book-page .book-center { text-align: center; max-width: 720px; margin: auto; }
.book-page .book-center p { color: #5a5550; }
.book-page .book-center .book-button { margin-top: .5rem; }
.book-page .book-next { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.book-page .book-next a { color: #69501e; text-underline-offset: 3px; }
.book-page .book-footer { background: #0a1628; color: rgba(255,255,255,.55); text-align: center; padding: 2.5rem 1.5rem; font-size: .75rem; }
.book-page .book-footer-links { display: flex; justify-content: center; gap: .85rem 1.4rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.book-page .book-footer a { color: rgba(255,255,255,.76); text-decoration: none; text-transform: uppercase; letter-spacing: .08em; }
.book-page .book-footer a:hover { color: var(--book-gold); }
.book-page .book-footer p { margin: .35rem 0; }
.book-page .book-footer .book-credit a { color: var(--book-gold); text-transform: none; }
@media (max-width: 880px) { .book-page .book-nav-links { display: none; } .book-page .book-mobile { display: block; } .book-page .book-movements { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 740px) { #book-series .series-cards { grid-template-columns: 1fr; max-width: 440px; margin: auto; } .book-page .book-hero-grid { grid-template-columns: 1fr; } .book-page .book-hero-art { order: -1; } .book-page .book-hero-art img { max-width: 480px; } .book-page .book-gallery { grid-template-columns: 1fr; max-width: 500px; margin: auto; } }
@media (max-width: 480px) { .book-page .book-movements { grid-template-columns: 1fr; } .book-page .book-brand { font-size: .7rem; letter-spacing: .07em; } }
