/* ============================================================
   Site artwork: the paintings on the home page and the seven
   day pages. One file, so every page frames them the same way.
   Markup comes from /includes/art.php  (yl_art, yl_art_img).
   ============================================================ */

.art{margin:0;position:relative;z-index:1;}
.art__frame{overflow:hidden;border-radius:16px;
  box-shadow:0 0 0 1px rgba(212,185,106,.24),0 30px 80px -34px rgba(0,0,0,.95),0 0 110px -44px rgba(242,217,138,.30);}
.art img{display:block;width:100%;height:auto;}
.art__hint{display:none;}

/* ── the wide painting of the day: wider than the text column ── */
.art--day{
  width:min(1120px,calc(100vw - 2 * var(--pad,24px)));
  left:50%;transform:translateX(-50%);
  margin:clamp(34px,6vw,60px) 0 0;
}
.art--day .art__frame{border-radius:18px;}
/* on a phone the full width would be a thin strip, so show a taller window on the part that matters */
@media(max-width:640px){
  .art--day img{aspect-ratio:2/1;object-fit:cover;object-position:50% 50%;}
  .art--fx30 img{object-position:30% 50%;}
  .art--fx35 img{object-position:35% 50%;}
  .art--fx40 img{object-position:40% 50%;}
  .art--fx60 img{object-position:60% 50%;}
  .art--whole img{aspect-ratio:auto;}
}

/* ── the Doorway picture: sits over the poem or quote ── */
.art--door{max-width:560px;margin:0 auto clamp(28px,4.5vw,40px);}

/* ── the teaser picture: the top of the chapter card ── */
.cta-card .art--teaser{
  margin:calc(-1 * clamp(30px,5vw,44px)) calc(-1 * clamp(24px,4vw,40px)) clamp(26px,4vw,36px);
}
.cta-card .art--teaser .art__frame{border-radius:19px 19px 0 0;box-shadow:0 1px 0 rgba(212,185,106,.30);}
.cta-card .art--teaser img{aspect-ratio:16/9;object-fit:cover;}

/* ── a standing plate between sections ── */
.art--plate{max-width:640px;margin:clamp(46px,8vw,76px) auto 0;}
.art--plate-wide{max-width:none;}
@media(max-width:640px){.art--plate-wide img{aspect-ratio:2/1;object-fit:cover;object-position:22% 50%;}}

/* ============================================================
   Home page
   ============================================================ */

/* the seven days as one landscape, above the list of days */
.week__pano{
  width:min(940px,calc(100vw - 2 * var(--pad,24px)));
  left:50%;transform:translateX(-50%);
  margin:0 0 clamp(26px,4vw,38px);
}
@media(max-width:640px){
  /* a strip to swipe along, day one to day seven */
  .week__pano .art__frame{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none;border-radius:12px;}
  .week__pano .art__frame::-webkit-scrollbar{display:none;}
  .week__pano img{height:176px;width:auto;max-width:none;}
  .week__pano .art__hint{display:block;margin-top:9px;text-align:center;font-family:'Cinzel',serif;font-size:9.5px;letter-spacing:.24em;text-transform:uppercase;color:rgba(212,200,180,.5);}
}

/* each day's row opens onto its painting */
.day-row{overflow:hidden;}
.day-row > span,.day-row > .day-row__heb{position:relative;z-index:1;}
.day-row > span:not([class]){max-width:460px;text-shadow:0 1px 12px rgba(4,8,15,.95),0 0 3px rgba(4,8,15,.8);}   /* the words keep to the dark side of the row */
.day-row .day-row__art{
  position:absolute;top:0;right:0;width:48%;height:100%;
  object-fit:cover;object-position:50% 50%;z-index:0;pointer-events:none;
  opacity:.66;transition:opacity .3s ease;
  -webkit-mask-image:linear-gradient(90deg,transparent 0,rgba(0,0,0,.55) 34%,#000 62%);
          mask-image:linear-gradient(90deg,transparent 0,rgba(0,0,0,.55) 34%,#000 62%);
}
.day-row:hover .day-row__art{opacity:1;}
/* the painting takes the place of the small line emblem */
.day-row:has(.day-row__art) .day-ic{display:none;}
.day-row:has(.day-row__art) .day-row__go{position:relative;z-index:1;padding:7px 12px;border-radius:999px;background:rgba(4,8,15,.66);margin-right:10px;}
@media(max-width:560px){
  .day-row .day-row__art{width:58%;opacity:.42;object-position:62% 50%;
    -webkit-mask-image:linear-gradient(90deg,transparent 0,rgba(0,0,0,.5) 50%,#000 88%);
            mask-image:linear-gradient(90deg,transparent 0,rgba(0,0,0,.5) 50%,#000 88%);}
}

/* the Brotherhood: the fire and the scroll, over the section */
.bro .bro__art{grid-column:1 / -1;margin:0 0 clamp(4px,1.5vw,12px);}

/* the closing section: the open scroll under the lamp, melting into the page */
.ethic .ethic__art{margin:0 auto clamp(18px,3vw,28px);}
.ethic .ethic__art .art__frame{box-shadow:none;border-radius:16px 16px 0 0;
  -webkit-mask-image:linear-gradient(180deg,#000 48%,transparent 98%);
          mask-image:linear-gradient(180deg,#000 48%,transparent 98%);}
