/* stations.css: the station component (lead only).
   Markup:  <div class="station" id="st-NAME" data-station="NAME" data-art="OBJECT">
              <div class="st-art"></div>      <- the garden object (img/garden/OBJECT.webp, lazy-loaded by core.js)
              <section class="card">...</section>   <- the existing content, never edited
            </div>
   States set by core.js: .is-near (about to be reached: art loads), .is-here (in focus), .has-art. */
.station{position:relative;display:flex;flex-direction:column;align-items:center;scroll-margin-top:72px}
.station > .paper, .station > .card{width:100%;position:relative;z-index:1}

/* the object stands just behind its card (z-index 0, the card is 1), so the card's top edge hides its feet
   cleanly; in front, posts and table legs used to end in mid-air across the stained-glass frame */
.st-art{position:relative;width:min(300px,78%);margin:0 auto -34px;z-index:0;pointer-events:none;display:none}
.station.has-art .st-art{display:block}
.st-art img{width:100%;height:auto;filter:drop-shadow(0 10px 14px rgba(27,42,74,.12))}

/* focus: the object comes forward a little as you reach it, then settles back */
.st-art img{transform:translateY(14px) scale(.96);opacity:.0;transition:transform 1.2s var(--ease-out), opacity 1.2s var(--ease-out)}
.station.is-near .st-art img.ready{opacity:1}
.station.is-here .st-art img.ready{transform:none}

/* open garden between stations: a stretch of path where nothing covers the world, so guests see themselves
   walk through the garden (cards step onto the path and off again: journey.js). Reduced motion keeps the gaps. */
.station + .station{margin-top:var(--open, 50vh)}
main{--open:64vh}
@media (min-width:1100px){main{--open:50vh}}

/* no object is ever taller than about half the screen, so a tall one (the trellis, the signpost, the tree)
   can't fill a phone or push its card out of sight on a short or sideways screen. The cap is set on the width
   (height = width / the picture's own ratio, --ar from base.css), so the reserved space stays exact. */
.station:not(#st-invitation):not(#st-closing) > .st-art{max-width:calc(46vh * (var(--ar, 1)))}
@supports (height:1svh){.station:not(#st-invitation):not(#st-closing) > .st-art{max-width:calc(46svh * (var(--ar, 1)))}}

/* every garden object stands on a soft wash of ivory paper, like a vignette in a botanical plate, so it reads
   as one picture with its card and never as a cut-out hanging in the sky (10 Nov 2026). The invitation's
   plinth and the finale's arch have their own settings. */
.station:not(#st-invitation):not(#st-closing) > .st-art::after{content:"";position:absolute;inset:-5% -16% 0;z-index:-1;pointer-events:none;border-radius:50%;
  background:radial-gradient(closest-side, rgba(253,251,245,.94), rgba(253,251,245,.66) 54%, rgba(253,251,245,0) 100%);
  opacity:0;transition:opacity 1.2s var(--ease-out)}
.station.has-art.is-near:not(#st-invitation):not(#st-closing) > .st-art::after{opacity:calc(.96 - var(--night, 0) * .42)}

/* wide screens (laptops, iPads on their side): the same picture as on a phone, the object standing on its
   card, but the pair stands to one side of the path, alternating, so the path, the house and the gate stay
   clear in the middle. The invitation (on its plinth) and the finale stay centred.
   Before 10 Nov 2026 the object stood on the far side of the path from its card, where it hung in the sky. */
@media (min-width:1100px){
  /* --wide: the band the stations sit in, wider than the 620px page column and centred on it (no 100vw: that includes the scrollbar) */
  .station{--wide:min(1240px, calc(100vw - 64px));--cw:clamp(500px, 37vw, 540px)}
  .station:not(#st-closing){width:var(--cw);margin-left:calc((100% - var(--wide)) / 2)}
  .station:nth-child(even):not(#st-closing){margin-left:calc((100% - var(--wide)) / 2 + var(--wide) - var(--cw))}
  #st-invitation{width:min(620px,52vw);margin-left:calc((100% - min(620px,52vw)) / 2)}
  /* the finale keeps its own full-width stage (closing.css) */
  #st-closing{display:grid;grid-template-columns:var(--cw) minmax(0,1fr) var(--cw);align-items:center;width:var(--wide);margin-left:calc((100% - var(--wide)) / 2)}
  #st-closing > .paper, #st-closing > .card{grid-column:1;grid-row:1}
  #st-closing > .st-art{grid-row:1;grid-column:3;margin:0;width:min(320px,74%);justify-self:center;transform:none}
}

@media (prefers-reduced-motion: reduce){.st-art img{transform:none!important;transition:opacity .4s!important}}
