/* Depends on: base.css. This is the shared "scroll-hijack" scaffolding
   (#viewport / #track / .slide) that every section-N.css builds on top of. */

/* ============================================================
   SLIDES / VIEWPORT
   ============================================================ */
#viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}
body[data-mode="free"] #viewport {
  position: relative;
  height: auto;
  overflow: visible;
}
#track {
  will-change: transform;
  transition: transform 0.85s var(--ease);
}
body[data-mode="free"] #track {
  transition: none;
  transform: none !important;
}

.slide {
  position: relative;
  width: 100%;
  height: 100vh; /* fallback for browsers before --vh is set (see render.js syncViewportHeight) */
  height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.slide-inner {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
}

/* ============================================================
   SCROLL CUE — "PRZEWIŃ / W DÓŁ" (bottom-left)
   ============================================================
   A fixed, always-available stand-in for one scroll gesture: the
   markup is in index.html just before #viewport (outside it, so it
   doesn't ride up with #track), and js/scroll-engine.js points its
   click at goStepDown().

   It lives here rather than in a section-N.css because it belongs to
   no single section — it floats over all seven, the same way the
   header does.

   z-index sits above every slide (Section 1's burgundy panel, the
   highest of them, is 7) but below the header's 500, the nav menu and
   the modals — it is a hint, and should never paint over something
   the user has deliberately opened. */
.scroll-cue {
  position: fixed;
  z-index: 480;
  left: clamp(16px, 3vw, 40px);
  bottom: clamp(16px, 3vh, 34px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: none;
  padding: 6px 8px;
  background: none;
  /* Burgundy by default — most sections are light behind this corner.
     The dark ones flip it to paper-2 further down, mirroring the list
     header.css already keeps for its own icons. */
  color: var(--burgundy);
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(0.7rem, 1.5vw, 0.9rem);
  letter-spacing: 0.14em;
  line-height: 1.35;
  text-align: center;
  opacity: 0.9;
  /* Every background this corner crosses is a photograph or a flat
     brand colour, and a few of them (Section 1's roofline, most of
     all) are busy enough to swallow bare type at this size. A soft
     halo in the opposite tone keeps both states readable without
     putting the cue in a box. */
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  transition:
    opacity 0.25s ease,
    color 0.3s ease,
    transform 0.25s var(--ease);
}
.scroll-cue:hover {
  opacity: 1;
  transform: translateY(2px);
}
/* Once the last section hands over to normal browser scrolling there
   is no step left to advance, so the cue takes itself off the page
   rather than sitting there doing nothing. The nav menu gets the same
   treatment for a different reason: the menu panel paints below this
   (z-index 480), so the cue sat on top of it looking like part of the
   menu, and its click is swallowed while the menu is open anyway (see
   the guards in scroll-engine.js). */
body[data-mode="free"] .scroll-cue,
body.menu-open .scroll-cue {
  opacity: 0;
  pointer-events: none;
}
.scroll-cue-arrows {
  position: relative;
  display: block;
  width: 1.6em;
  height: 2.1em;
}
.scroll-cue-arrow {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 1.6em;
  stroke: currentColor;
  animation: scrollCueBounce 1.9s var(--ease) infinite;
}
/* The second chevron runs the same bounce a beat later and fades out
   further, so the pair reads as one arrow trailing its own echo
   downward rather than as two shapes moving in lockstep. */
.scroll-cue-arrow:nth-child(2) {
  animation-delay: 0.22s;
  opacity: 0.45;
}
/* Small travel on purpose — this is meant to catch the eye at the
   edge of vision, not to compete with the section it sits on. */
@keyframes scrollCueBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(0.45em);
  }
}
/* Dark backgrounds this corner can sit over, where burgundy would
   disappear: Section 4 (index 3), Section 6 (index 5), the footer,
   and Section 1 at every one of its steps — unlike the header, this
   corner of Section 1 sits over the dark burgundy roofline of the
   hero photo from the very first frame, not just once the burgundy
   panel opens.
   Otherwise the same set of selectors header.css uses for
   --header-icon — if a section's background changes, both lists want
   changing together. */
body[data-slide="3"] .scroll-cue,
body[data-slide="5"] .scroll-cue,
body[data-slide="footer"] .scroll-cue,
body[data-slide="0"] .scroll-cue {
  color: var(--paper-2);
}
/* Phones: tucked further into the corner, but the label STAYS. It was
   dropped here at first, and what was left — two chevrons barely
   20px across, over whatever photograph the section happens to be
   showing — was easy to miss entirely and a poor thing to try and
   tap. A scroll hint nobody notices is no hint. The arrows are given
   a size in px rather than inheriting one from the label's smaller
   type, so they stay readable at a glance, and the padding keeps the
   whole thing a comfortable touch target. */
/* Phones don't get the cue at all. There is no corner for it to sit
   in: Section 1's tagline badge runs nearly the full width of the
   screen, Section 3's photo and Section 6's pager reach the bottom
   edge, and wherever it was put it ended up over something. It is
   also the least necessary here — a swipe is the obvious gesture on a
   touchscreen, and scroll-engine.js handles that natively, so nothing
   is lost by dropping the hint. */
@media (max-width: 760px) {
  .scroll-cue {
    display: none;
  }
}
