/* Buildner Books: what the home page adds to the Codex home (home_page.py builds it from additions/home/).
   Real photos of the printed books in the hero and in "Made to be held.", the Show It Better review, two
   architects' comments and a row of numbers. The blocks borrow the story look (book-story.css); sizes stay
   the home's own: section titles as the Codex section titles, notes as their notes. */

/* The hero: the editor's pick and two more books, three real photos with white joints */
.hero-mosaic{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);grid-template-rows:repeat(2,minmax(0,1fr));gap:6px;background:var(--paper)}
.hm-main{grid-row:1/3;position:relative;min-width:0;overflow:hidden;background:#dbd7cc}
.hm-tile{position:relative;display:block;min-width:0;overflow:hidden;background:#efeee8}
.hm-main>img,.hm-tile>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .8s}
.hm-main>img{object-position:center 45%}
.hm-main:hover>img,.hm-tile:hover>img{transform:scale(1.025)}
.hm-label{position:absolute;left:16px;bottom:16px;max-width:calc(100% - 32px);display:inline-flex;align-items:center;gap:10px;padding:9px 12px;background:var(--paper);font-size:13px;line-height:1.35}

/* Every home addition sits on the page's own margins and type */
.bs-home{--ad-pad:var(--pad);padding-bottom:0}
.bs.bs-home h2{font-size:clamp(40px,4.3vw,70px);margin-top:19px}
.bs.bs-home .bs-row>.bs-side{font-size:14px;line-height:1.7}
.bs-home .hl,.bs-home .bs-video{padding-top:90px}

/* Made to be held: the printed books, photographed */
.hl-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:44px var(--bs-gap);list-style:none;margin:36px 0 0;padding:0}
.hl-item{grid-column:span 4;min-width:0}
.hl-item.is-wide{grid-column:span 7}
.hl-item.is-side{grid-column:span 5}
.hl-item a{display:block}
.hl-photo{position:relative;display:block;overflow:hidden;aspect-ratio:1;background:#efeee8}
.hl-item.is-wide .hl-photo,.hl-item.is-side .hl-photo{aspect-ratio:auto;height:clamp(340px,34vw,600px)}
.hl-photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .8s}
.hl-item a:hover img{transform:scale(1.025)}
.bs .hl-name{display:block;margin-top:14px;font-size:16px;line-height:1.3;color:var(--ink)}
.bs .hl-meta{display:block;margin-top:4px}

/* Two architects, two questions: a grey band like the stories' quote */
.hv{margin-top:90px;padding:84px 0 90px;background:#f0f0eb}
.hv-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:56px calc(var(--bs-gap) * 3);margin-top:48px}
.hv-item{display:flex;flex-direction:column;align-items:flex-start;gap:26px;margin:0}
.hv-by{display:flex;align-items:flex-end;gap:22px;padding-bottom:22px;border-bottom:1px solid var(--ink);align-self:stretch}
.hv-face{flex:0 0 150px}
.hv-face img{display:block;width:100%;mix-blend-mode:multiply}
.hv-who{display:grid;gap:4px;padding-bottom:2px;font-size:16px}
.hv-who strong{font-weight:400}
.hv-item blockquote{margin:0}
.bs .hv-item blockquote p{font-size:clamp(28px,2.6vw,40px);line-height:1.2;color:var(--ink)}
.hv-book{margin-top:auto;font-size:14px;border-bottom:1px solid var(--ink)}

/* Numbers at the end of "From the world of Buildner" (on yellow, so the labels stay ink) */
.home-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));column-gap:32px;margin:72px 0 0;border-top:1px solid var(--ink)}
.home-facts>div{padding-top:22px}
.home-facts dt{font-size:clamp(40px,4.3vw,70px);letter-spacing:-.065em;line-height:1}
.home-facts dd{margin:8px 0 0;font-size:13px;line-height:1.5}

@media(max-width:1200px){
  /* a narrower hero column: the editor's pick across the top, the other two books under it */
  .hero-mosaic{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,1.9fr) minmax(0,1fr)}
  .hm-main{grid-column:1/-1;grid-row:1}
}
@media(max-width:1000px){
  .bs-home .hl,.bs-home .bs-video{padding-top:65px}
  .hv{margin-top:65px;padding:64px 0}
  .hv-grid{grid-template-columns:minmax(0,1fr);row-gap:64px}
  /* the wide photo across, the other four two by two */
  .hl-item,.hl-item.is-side{grid-column:span 6}
  .hl-item.is-wide{grid-column:span 12}
  .hl-item.is-wide .hl-photo{height:auto;aspect-ratio:3/2}
  .hl-item.is-side .hl-photo{height:auto;aspect-ratio:1}
}
@media(max-width:700px){
  .hero-mosaic{height:auto;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none}
  .hm-main{grid-column:1/-1;grid-row:auto;height:465px}
  .hm-tile{height:170px}
  .hm-label{left:10px;bottom:10px;max-width:calc(100% - 20px);padding:7px 9px}
  .bs.bs-home h2{font-size:46px;margin-top:17px}
  .bs-home .hl,.bs-home .bs-video{padding-top:55px}
  .hl-grid{gap:28px 12px;margin-top:28px}
  .hv{margin-top:55px;padding:56px 0}
  .hv-grid{margin-top:32px;row-gap:56px}
  .hv-by{gap:16px}
  .hv-face{flex-basis:112px}
  .home-facts{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:8px;margin-top:48px}
  .home-facts dt{font-size:46px}
}
@media(prefers-reduced-motion:reduce){.hm-main>img,.hm-tile>img,.hl-photo img{transition:none}}
