/* Doodle Domino additions on top of page.css (the ripped landing-page styles).
   Uses the palette tokens page.css defines on .dd-page. */

/* Domino brand mark: a standalone tile instead of the original round badge. */
.dd-brandMark--domino{background:none;border-radius:0;width:auto;height:44px;transform:rotate(-8deg)}
.dd-brandMark--domino svg.dd-domino{width:30px;height:44px}
.dd-brand:hover .dd-brandMark--domino,.dd-footerBrand:hover .dd-brandMark--domino{transform:rotate(4deg);transition:transform .25s ease}

/* Section shells shared by the shelf, gallery and detail pages. */
.dd-shelf,.dd-gallery,.dd-previews,.dd-detail,.dd-pageHead,.dd-crumbs{max-width:1440px;margin:0 auto;padding-left:clamp(1.25rem,5.5vw,5.5rem);padding-right:clamp(1.25rem,5.5vw,5.5rem)}
.dd-shelf{padding-top:clamp(4rem,8vw,7rem);padding-bottom:clamp(2rem,4vw,3rem)}
.dd-shelfHeading{display:flex;justify-content:space-between;align-items:flex-end;gap:2rem;flex-wrap:wrap;margin-bottom:2.5rem}
.dd-shelfHeading h2,.dd-pageHead h1,.dd-detailCopy h1{font-family:Georgia,"Times New Roman",serif;font-weight:400;letter-spacing:-.05em;line-height:1;margin:.6rem 0 0}
.dd-shelfHeading h2{font-size:clamp(2.2rem,4.5vw,3.6rem)}
.dd-shelfHeading h2 em,.dd-pageHead h1 em{color:var(--orange)}

.dd-pageHead{padding-top:clamp(3.5rem,7vw,6rem);padding-bottom:clamp(2rem,4vw,3rem)}
.dd-pageHead h1{font-size:clamp(2.8rem,6vw,5rem)}
.dd-pageHead .dd-heroLead{max-width:38rem;margin-top:1.25rem}
.dd-pageHead--center{text-align:center;padding-bottom:clamp(5rem,10vw,8rem)}
.dd-pageHead--center .dd-heroLead{margin-left:auto;margin-right:auto}
.dd-pageHead--center .dd-heroActions{justify-content:center}
.dd-gallery{padding-bottom:clamp(4rem,8vw,7rem)}
.dd-empty{color:var(--ink-soft);font-size:1.05rem;padding:3rem 0}

/* Book cards: square covers, styled like a book resting on the shelf. */
.dd-bookGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));gap:clamp(1.5rem,3vw,2.5rem)}
.dd-bookCard{display:flex;flex-direction:column;gap:1.1rem}
.dd-bookCover{display:block;aspect-ratio:1;background:#fff;border:1px solid var(--line);border-radius:4px 14px 14px 4px;box-shadow:inset 6px 0 0 var(--paper-deep),0 1px 0 var(--line),10px 12px 0 -2px var(--green-light);overflow:hidden;transition:transform .25s ease,box-shadow .25s ease}
.dd-bookCover img{width:100%;height:100%;object-fit:cover;display:block}
.dd-bookCard:hover .dd-bookCover{transform:translate(-3px,-4px) rotate(-.6deg);box-shadow:inset 6px 0 0 var(--paper-deep),0 1px 0 var(--line),14px 16px 0 -2px var(--gold)}
.dd-bookMeta{display:flex;flex-direction:column;gap:.3rem}
.dd-bookTheme{font-size:.72rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--orange)}
.dd-bookTitle{font-family:Georgia,"Times New Roman",serif;font-size:1.45rem;letter-spacing:-.03em;line-height:1.15}
.dd-bookSub{color:var(--ink-soft);font-size:.95rem;line-height:1.45}
.dd-bookStatus{font-size:.78rem;font-weight:600;color:var(--ink-soft);margin-top:.2rem}

/* Detail page. */
.dd-crumbs{padding-top:1.75rem;font-size:.85rem;font-weight:600}
.dd-crumbs a:hover{color:var(--orange)}
.dd-detail{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(2rem,5vw,5rem);align-items:start;padding-top:2rem;padding-bottom:clamp(3rem,6vw,5rem)}
.dd-detailCover{aspect-ratio:1;background:#fff;border:1px solid var(--line);border-radius:6px 20px 20px 6px;box-shadow:inset 10px 0 0 var(--paper-deep),16px 18px 0 -2px var(--green-light);overflow:hidden}
.dd-detailCover img{width:100%;height:100%;object-fit:cover;display:block}
.dd-detailCopy h1{font-size:clamp(2.6rem,5vw,4.4rem)}
.dd-detailCopy .dd-heroLead{margin-top:1.1rem}
.dd-detailBody{color:var(--ink-soft);line-height:1.7;margin-top:1.25rem}
.dd-detailBody p{margin:0 0 1rem}
.dd-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line);border-radius:12px;overflow:hidden;margin:1.75rem 0}
.dd-facts div{background:var(--paper);padding:1rem 1.1rem}
.dd-facts dt{font-size:.7rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-soft)}
.dd-facts dd{margin:.35rem 0 0;font-size:.95rem;line-height:1.4}
.dd-soon{display:inline-flex;align-items:center;gap:.5rem;border:1.5px dashed var(--green);border-radius:999px;padding:.85rem 1.4rem;font-size:.88rem;font-weight:700;color:var(--green)}

.dd-previews{padding-top:clamp(2.5rem,5vw,4rem);padding-bottom:clamp(4rem,8vw,7rem);border-top:1px solid var(--line)}
.dd-previewGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr));gap:1.25rem}
.dd-previewTile{display:block;aspect-ratio:1;background:#fff;border:1px solid var(--line);border-radius:10px;overflow:hidden;transition:transform .2s ease}
.dd-previewTile img{width:100%;height:100%;object-fit:cover;display:block}
.dd-previewTile:hover{transform:translateY(-3px)}

@media (max-width:860px){
  .dd-detail{grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce){
  .dd-bookCover,.dd-previewTile,.dd-brandMark--domino{transition:none}
}

/* Lightbox for the detail page previews (public/scripts/lightbox.js). */
.dd-lbOpen{overflow:hidden}
.dd-lightbox{position:fixed;inset:0;z-index:100;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:clamp(.5rem,2vw,1.5rem);padding:clamp(1rem,4vw,3rem);background:rgba(24,55,46,.96);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);opacity:0;transition:opacity .18s ease}
.dd-lightbox.is-visible{opacity:1}
.dd-lightbox[hidden]{display:none}
.dd-lbFigure{margin:0;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.9rem;min-height:0}
.dd-lbFigure img{max-width:100%;max-height:calc(100vh - 7rem);aspect-ratio:1;object-fit:contain;background:#fff;border-radius:6px;box-shadow:0 24px 60px rgba(0,0,0,.35)}
.dd-lbCount{color:#f7f2e8;font-size:.8rem;font-weight:600;letter-spacing:.14em;opacity:.8}
.dd-lbNav,.dd-lbClose{appearance:none;border:0;background:rgba(247,242,232,.12);color:#f7f2e8;border-radius:999px;cursor:pointer;display:grid;place-items:center;transition:background .15s ease}
.dd-lbNav{width:52px;height:52px;font-size:2rem;line-height:1;padding-bottom:4px}
.dd-lbClose{position:absolute;top:clamp(.75rem,2vw,1.25rem);right:clamp(.75rem,2vw,1.25rem);width:44px;height:44px;font-size:1.7rem;line-height:1;padding-bottom:3px}
.dd-lbNav:hover,.dd-lbClose:hover{background:rgba(247,242,232,.24)}
.dd-lbNav:focus-visible,.dd-lbClose:focus-visible{outline:2px solid var(--gold,#e9b477);outline-offset:3px}
.dd-previewTile{cursor:zoom-in}
@media (max-width:640px){
  .dd-lightbox{grid-template-columns:minmax(0,1fr);padding:3.5rem .75rem 1.25rem}
  .dd-lbNav{position:absolute;bottom:1rem;width:46px;height:46px}
  .dd-lbPrev{left:1rem}.dd-lbNext{right:1rem}
  .dd-lbFigure img{max-height:calc(100vh - 9rem)}
}
@media (prefers-reduced-motion:reduce){.dd-lightbox{transition:none}}

/* Sticky header: the nav stays reachable after jumping to a home-page section (#themes, #about).
   .dd-page's overflow:hidden would disable sticky, so it clips horizontally instead. */
.dd-page{overflow:visible;overflow-x:clip}
.dd-header{position:sticky;top:0;z-index:50;background:var(--paper);box-shadow:0 0 0 100vmax var(--paper);clip-path:inset(0 -100vmax)}
.dd-page section[id]{scroll-margin-top:96px}
@media (prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}

/* Nav links: spacing lives in each link's padding and links fill the header's height,
   so the whole area between items is clickable (no dead gaps). */
.dd-nav{gap:0;align-self:stretch}
.dd-nav a{display:flex;align-items:center;align-self:stretch;padding:0 clamp(.75rem,1.75vw,1.7rem)}
.dd-nav a[aria-current="page"]{color:var(--ink)}

@media (max-width:1000px){
  .dd-nav{gap:0}
  .dd-nav a{padding:0 .65rem}
}
/* Phones: page.css hides the nav entirely; show it as a second, full-width row instead. */
@media (max-width:720px){
  .dd-header{flex-wrap:wrap;row-gap:0}
  .dd-nav{display:flex;order:3;flex:1 0 100%;margin:0 -1.15rem;border-top:1px solid var(--line);overflow-x:auto;scrollbar-width:none}
  .dd-nav a{flex:1 0 auto;justify-content:center;padding:.9rem .85rem;white-space:nowrap}
  .dd-page section[id]{scroll-margin-top:124px}
}

/* Bigger click targets for small text links. The back link gets real padding (offset by a
   negative margin so it stays aligned) and a hover pill; underlined links keep their look and
   get an invisible enlarged hit area instead, so the underline doesn't stretch. */
.dd-crumbs a{display:inline-flex;align-items:center;gap:.45rem;padding:.7rem 1.05rem;margin:-.7rem -1.05rem;border-radius:999px;transition:background .15s,color .15s}
.dd-crumbs a:hover{background:var(--paper-deep)}
.dd-buttonText,.dd-contactLink,.dd-headerLink,.dd-footer a{position:relative}
.dd-buttonText::before,.dd-contactLink::before,.dd-headerLink::before,.dd-footer a::before{content:"";position:absolute;inset:-.75rem -1rem}

/* Footer links (Contact, Log in): one grid cell, same style; hit areas sized so they don't overlap. */
.dd-footerLinks{display:inline-flex;align-items:center;gap:1.6rem}
.dd-footerLinks a::before{inset:-.75rem -.75rem}
