/* Home: the sideways inspection. Site.css makes the track; this file composes each strip. */

.strip{
  --pad:.875rem; --peek:6vw;
  display:grid;gap:1rem var(--gap);align-content:start;
  padding:.5rem .5rem 5rem var(--pad);
  scroll-margin-top:var(--chrome);
}
.strip:focus,.site-foot:focus{outline:none}
@media (min-width:48rem){
  .strip{--pad:var(--inset);--peek:10vw}
}
/* Phone: every strip after the first starts clear of the 6vw peek, so only plain ground shows in it */
@media (max-width:47.99rem){
  .strip + .strip{--pad:calc(var(--peek) + .25rem)}
}

/* The pinned Index stub stands on its own opaque ground: the page passes beneath it.
   Site.css holds the stub's own background at none with !important, so the ground is stated
   here with !important and a heavier selector. The stub is its own stacking context and the
   cedar scalloped face (::before, z-index -1) is painted over this ground, so the shape is
   unchanged: the ground only shows in the scallop cuts. */
.sideways header.chrome > button.index-btn{background:var(--ground)!important}

/* The scene: one painting, its mark key, and the way onward under it */
.scene{display:flex;flex-direction:column;gap:.5rem;min-width:0}
.scene .mount img,.scene .mount video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.scene__foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:0 1.5rem}
.scene__key{display:flex;align-items:center;gap:.7rem;min-height:2.75rem;margin:0}

/* A strip that is not the one in the window shows only its picture and ground in the peek:
   its caption, which would be chopped at the window's edge, waits until the strip arrives
   (index.js sets .is-here on the strip in the window; without script every caption stands) */
.js .strip:not(.is-here) > .scene:first-child .scene__key{visibility:hidden}

/* The back-step painting: scaled so its own pale scalloped border is cropped away top and bottom,
   and drawn from its right-hand side, where the pink mark sits by the door sweep */
#ticket .mount img,#ticket .mount video{object-position:100% 50%;transform:scale(1.14)}

/* Leave the peeking sliver of the next painting uncovered by its curtain */
.js .scene:first-child .curtain::after{left:max(0rem,calc(var(--peek) - var(--pad)))}

/* Previous, count, Next */
.strip-nav{display:flex;flex-wrap:wrap;align-items:center;gap:0 1.25rem;font-size:var(--fs-body);line-height:1.3}
.strip-nav a{display:inline-flex;align-items:center;min-height:2.75rem}
.strip-nav a,.strip-nav .text-btn:not([disabled]){color:var(--ink);text-decoration-thickness:.12em}
.site-foot .strip-nav{margin-top:1rem;padding-left:1.75rem}
/* The step to the footer strip is made by script; without script the track is simply scrolled */
html:not(.js) .strip-nav button[data-go]{display:none}

/* The note column */
.tell{display:flex;flex-direction:column;gap:1.1rem;min-width:0}
.onward{display:flex;flex-wrap:wrap;align-items:center;gap:0 2rem}
.onward a:not(.btn){display:inline-flex;align-items:center;min-height:2.75rem;font-size:var(--fs-h3);line-height:1.25}
.onward--call{flex-direction:column;align-items:flex-start;gap:.5rem}

/* Three-line work note on stout rules */
.worknote{border-bottom:.15rem solid var(--ink)}
.worknote li{padding:.55rem 0;border-top:.15rem solid var(--ink);font-size:var(--fs-h3);line-height:1.25}

/* The opening ticket, tightened so the whole stub sits in the first window */
.ticket--open{gap:1rem;padding:1.25rem 1.5rem}
.ticket--open h1{line-height:1.06}
.ticket--open .slogan{font-size:clamp(1.125rem,.95rem + .5vw,1.25rem);line-height:1.42}
.ticket--open .rows>div{grid-template-columns:4.5rem 1fr;padding-block:.5rem}

/* Phone: the stub is drawn tight, so the painting's top edge reads above the consent band */
@media (max-width:47.99rem){
  #ticket{gap:.75rem var(--gap)}
  .ticket--open{gap:.6rem;padding:.9rem 1.25rem}
  .ticket--open h1{line-height:1.02}
  .ticket--open .slogan{line-height:1.32}
  .ticket--open .rows>div{padding-block:.28rem;line-height:1.25}
  .ticket--open .ticket__foot{padding-top:.15rem}
}

@media (min-width:56rem){
  /* Each strip is as tall as the window under the chrome, not as tall as the footer strip,
     so the action, the caption and Previous / Next all sit in the first window */
  .strip{grid-template-columns:minmax(0,5fr) minmax(0,7fr);align-content:stretch;align-items:stretch;align-self:flex-start;min-height:calc(100vh - var(--chrome));padding:.5rem 0 1.25rem var(--pad)}
  .strip--lead{grid-template-columns:minmax(0,7fr) minmax(0,5fr)}
  .strip--over{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}

  .scene .mount{flex:1 1 auto;aspect-ratio:auto;min-height:14rem}
  .tell .onward{margin-top:auto}

  .strip--over .tell{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:.75rem var(--gap);align-items:start}
  .strip--over .tell>h2{grid-row:span 2}
  .strip--over .tell .onward{margin-top:0}

  .ticket--open{gap:1.15rem;padding:1.5rem 2rem}
  /* The three rows share whatever height the ticket has left, so no hollow opens above the action */
  .ticket--open .rows{flex:1 1 auto;display:grid;grid-auto-rows:1fr}
  .ticket--open .rows>div{grid-template-columns:5.5rem 1fr;padding-block:.55rem;align-content:center}
}
