/* Blog posts: full-bleed featured photo directly under the header, with a cream "sheet" laid over its bottom edge. */
.single-post{overflow-x:clip}
body.single-post .site-content,
body.single-post #primary,
body.single-post .site-main,
body.single-post .inside-article{padding-top:0;margin-top:0}
body.single-post .inside-article{padding-left:0;padding-right:0}

body.single-post .featured-image{
  width:100vw;max-width:none;margin:0 0 0 calc(50% - 50vw);padding:0;float:none
}
body.single-post .featured-image{margin-bottom:0!important}
.single-post .featured-image img{
  display:block;width:100%;height:auto;max-width:none   /* the whole photo, at its own ratio: never cropped */
}

/* The sheet: header, text and footer share one cream panel; the header rises over the photo. */
.single-post .entry-header,
.single-post .entry-content,
.single-post .inside-article>footer.entry-meta{
  position:relative;z-index:1;background:var(--base);padding-left:40px;padding-right:40px
}
.single-post .entry-header{
  margin-top:calc(-1 * clamp(20px,3.4vw,52px));   /* overlap on the photo */
  padding-top:clamp(24px,3vw,44px);
  border-radius:3px 3px 0 0;
  box-shadow:0 -16px 24px -14px rgba(30,20,10,.34)  /* shadow on the top edge only */
}
@media (max-width:1240px){
  .single-post .entry-header,.single-post .entry-content,.single-post .inside-article>footer.entry-meta{margin-left:12px;margin-right:12px;padding-left:20px;padding-right:20px}
  .single-post .entry-header{margin-top:calc(-1 * clamp(20px,3.4vw,52px))}
}

/* No author line, and a calmer date */
.single-post .byline{display:none}
.single-post .entry-meta .posted-on{display:inline-flex;align-items:center;gap:12px}
.single-post .entry-meta .posted-on::before{content:"";width:28px;height:2px;background:var(--accent)}
.single-post .entry-meta .posted-on time{
  font-size:.8rem;font-weight:600;letter-spacing:.2em;text-transform:uppercase;color:var(--contrast-2)
}
.single-post .entry-header .entry-meta{margin-top:.9em}

/* No category link on posts */
.single-post .cat-links,.single-post .inside-article>footer.entry-meta{display:none}

/* ---------- Drift on the featured photo ----------
   The photo is never scaled or cropped. As you scroll it slides up a little under the cream sheet (which overlaps its bottom edge),
   so the sheet seems to rise over it. The slide is capped at the sheet's overlap, so nothing empty ever shows. */
.single-post .featured-image{position:relative;overflow:hidden}
.single-post .featured-image img{will-change:transform}
@media (prefers-reduced-motion:reduce){.single-post .featured-image img{transform:none!important}}

/* ---------- Full-screen viewer for photos in a post ---------- */
.single-post .featured-image img,.single-post .zoomable img{cursor:zoom-in}
.zoomable{position:relative;display:inline-block;max-width:100%;line-height:0}
button.zoom-btn{position:absolute;top:14px;right:14px;z-index:3;width:44px;height:44px;padding:0;border:0;border-radius:50%;
  display:grid;place-items:center;background:rgba(18,12,6,.66);color:#f6f0e1;cursor:pointer;opacity:0;
  box-shadow:0 0 0 1px rgba(246,240,225,.5),0 2px 10px rgba(0,0,0,.35);
  transition:opacity .2s ease,background-color .2s ease,box-shadow .2s ease,transform .2s ease}
.featured-image:hover button.zoom-btn,.zoomable:hover button.zoom-btn,button.zoom-btn:focus-visible{opacity:1}
/* hover: darker disc, bright ring, a small lift. Readable on a white wall or a black one. */
button.zoom-btn:hover,button.zoom-btn:focus-visible{background:rgba(18,12,6,.94);color:#f6f0e1;box-shadow:0 0 0 2px #f6f0e1,0 4px 16px rgba(0,0,0,.5);transform:scale(1.08)}
button.zoom-btn svg{width:20px;height:20px;display:block;transition:transform .2s ease}
button.zoom-btn:hover svg{transform:scale(1.14)}
@media (hover:none){button.zoom-btn{opacity:1;width:40px;height:40px}}

.lb{position:fixed;left:0;top:0;width:100vw;height:100vh;height:100dvh;z-index:99999;display:flex;align-items:center;justify-content:center;background:#0a0704;cursor:zoom-out;animation:lb-in .2s ease;overscroll-behavior:contain;touch-action:none;transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}
.lb[hidden]{display:none}
.lb img{max-width:100vw;max-height:100vh;max-height:100dvh;width:auto;height:auto;object-fit:contain}
button.lb-close{position:absolute;top:max(14px,env(safe-area-inset-top));right:max(14px,env(safe-area-inset-right));width:48px;height:48px;padding:0;border:0;border-radius:50%;
  display:grid;place-items:center;background:rgba(246,240,225,.14);color:#f6f0e1;cursor:pointer}
button.lb-close:hover,button.lb-close:focus-visible{background:#f6f0e1;color:#222}
button.lb-close svg{width:22px;height:22px;display:block}
@keyframes lb-in{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){.lb{animation:none}}
body.lb-open{overflow:hidden;background:#0a0704}
html:has(body.lb-open){background:#0a0704;overflow:hidden}
/* while a picture is full screen the article underneath is not painted at all, so turning the phone can never flash it */
body.lb-open>*:not(.lb){visibility:hidden}
