/* ==========================================================================
   feature-stack — standalone block
   --------------------------------------------------------------------------
   Editorial story panel: a large headline, a centred multi-column paragraph
   set flanked by mono meta labels, then a scroll-driven photo STACK — one
   print to start, accumulating up to four (rotated/offset, print borders) as
   the section scrolls. Dark theme by default; CMS light mode via
   .fst[data-theme="light"]. SELF-CONTAINED.
   ========================================================================== */
.fst {
  --fst-bg:     #101210;
  --fst-ink:    #ECEAE3;
  --fst-dim:    rgba(236, 234, 227, 0.66);
  --fst-faint:  rgba(236, 234, 227, 0.42);
  --fst-accent: #E5481F;
  --fst-frame:  #F4F2EC;
  --fst-sans: 'IBM Plex Sans', system-ui, sans-serif;
  --fst-disp: 'Geologica', 'IBM Plex Sans', system-ui, sans-serif;
  --fst-mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: var(--fst-bg);
  color: var(--fst-ink);
  font-family: var(--fst-sans);
  -webkit-font-smoothing: antialiased;
  padding: 140px 0 0;
}
.fst[data-theme="light"] {
  --fst-bg: #F4F2EC; --fst-ink: #1C1A17; --fst-dim: rgba(28,26,23,0.66);
  --fst-faint: rgba(28,26,23,0.42); --fst-accent: #C42800; --fst-frame: #FFFFFF;
}
.fst__inner { max-width: var(--teako-page-max); margin: 0 auto; padding: 0 var(--teako-page-gutter); }

.fst__top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  font-family: var(--fst-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--fst-faint);
  padding-bottom: 22px; margin-bottom: 52px; border-bottom: 1px solid rgba(236, 234, 227, 0.16);
}
.fst[data-theme="light"] .fst__top { border-color: rgba(28, 26, 23, 0.16); }

.fst__eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 24px;
  font-family: var(--fst-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--fst-dim);
}
.fst__eyebrow::before { content: ''; width: 7px; height: 7px; background: var(--fst-accent); }

.fst__h {
  margin: 0;
  max-width: 18ch;
  font-family: var(--fst-disp); /* D1 */
  font-weight: 300;
  font-size: clamp(32px, 4.6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--fst-ink);
}

.fst__meta-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 6vw, 96px);
  margin-top: 64px;
}
.fst__meta {
  font-family: var(--fst-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fst-faint);
  white-space: nowrap;
}
.fst__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 40px;
  max-width: 720px;
  margin: 0 auto;
}
.fst__cols p {
  margin: 0;
  font-family: var(--fst-sans);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--fst-dim);
}

/* ---- Scroll-driven photo strip ----
   Four larger prints spread across a wide stage as a stepped filmstrip — they
   overlap only slightly and stagger up/down for rhythm. Each carries a mono
   index tab and a coordinate caption (Swiss data framing). They drop in one by
   one as the sticky stage scrolls. */
.fst__stack-track { position: relative; height: 260vh; margin-top: 56px; }
.fst__stack-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 56px;
}
.fst__stack {
  position: relative;
  width: min(1180px, 92vw);
  aspect-ratio: 16 / 9;
}
.fst__photo {
  position: absolute;
  width: 31%;
  opacity: 0;
  transition: opacity 600ms cubic-bezier(0.33, 1, 0.68, 1),
              transform 700ms cubic-bezier(0.33, 1, 0.68, 1);
}
.fst__photo-frame {
  position: relative;
  background: var(--fst-frame);
  padding: 9px;
  box-shadow: 0 30px 64px rgba(0, 0, 0, 0.5);
  aspect-ratio: 4 / 5;
}
.fst__photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Mono index tab above each print. */
.fst__photo-idx {
  position: absolute; top: -25px; left: 1px;
  font-family: var(--fst-mono); font-size: 12px; letter-spacing: 0.14em;
  color: var(--fst-faint); font-variant-numeric: tabular-nums;
}
/* Coordinate caption under each print. */
.fst__photo-cap {
  position: absolute; left: 1px; bottom: -24px; white-space: nowrap;
  font-family: var(--fst-mono); font-size: 10.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fst-dim);
}

/* Resting positions — a stepped, slightly-overlapping strip. */
.fst__photo[data-fst-photo="0"] { left: 0%;  top: 9%;  transform: rotate(-2deg);  z-index: 1; }
.fst__photo[data-fst-photo="1"] { left: 23%; top: 30%; transform: rotate(1.5deg); z-index: 2; }
.fst__photo[data-fst-photo="2"] { left: 46%; top: 5%;  transform: rotate(-1deg);  z-index: 3; }
.fst__photo[data-fst-photo="3"] { left: 69%; top: 26%; transform: rotate(2deg);   z-index: 4; }

/* Hidden state — drop in from below + fade (overrides the resting transform
   while not yet revealed; keep this AFTER the resting rules). */
.fst__photo:not(.is-in) { opacity: 0; transform: translateY(56px) rotate(0deg) scale(0.97); }
.fst__photo.is-in { opacity: 1; }

/* Stage corner registration marks — a measured field for the prints. */
.fst__reg { position: absolute; width: 20px; height: 20px; z-index: 6; pointer-events: none; border: 1px solid rgba(236, 234, 227, 0.30); }
.fst__reg--tl { top: -16px; left: -16px; border-right: 0; border-bottom: 0; }
.fst__reg--tr { top: -16px; right: -16px; border-left: 0; border-bottom: 0; }
.fst__reg--bl { bottom: -16px; left: -16px; border-right: 0; border-top: 0; }
.fst__reg--br { bottom: -16px; right: -16px; border-left: 0; border-top: 0; }

/* Heritage timeline beneath the prints — four nodes (year + place) on a rule,
   one under each print, with a leader line up toward it. Ties the four prints
   to the "four centuries" headline. */
.fst__timeline {
  position: absolute; left: 0; right: 0; bottom: -4%; height: 1px; z-index: 1;
  background: rgba(236, 234, 227, 0.22);
}
.fst__tl-end {
  position: absolute; top: 14px; font-family: var(--fst-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--fst-faint);
}
.fst__tl-end--l { left: 0; }
.fst__tl-end--r { right: 0; }
.fst__tl-node {
  position: absolute; left: var(--x); top: 0; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding-top: 15px;
  font-family: var(--fst-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fst-dim); white-space: nowrap;
}
.fst__tl-node::before {   /* accent tick down onto the rule */
  content: ''; position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  width: 1px; height: 8px; background: var(--fst-accent);
}
.fst__tl-node::after {    /* faint leader up toward the print above */
  content: ''; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  width: 1px; height: var(--h, 40px); background: rgba(236, 234, 227, 0.14);
}
.fst__tl-node b {
  font-family: var(--fst-sans); font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--fst-ink); font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .fst { padding: 88px 0 0; }
  .fst__inner { padding: 0 24px; }
  .fst__meta-row { grid-template-columns: 1fr; gap: 24px; }
  .fst__meta { display: none; }
  .fst__cols { grid-template-columns: 1fr; max-width: none; }
  .fst__stack-track { height: 220vh; }
  .fst__stack-stage { padding: 0 24px; }
  .fst__stack { width: 92vw; aspect-ratio: 3 / 4; }
  .fst__photo { width: 52%; }
  .fst__photo[data-fst-photo="0"] { left: 0%;  top: 2%;  }
  .fst__photo[data-fst-photo="1"] { left: 44%; top: 20%; }
  .fst__photo[data-fst-photo="2"] { left: 4%;  top: 50%; }
  .fst__photo[data-fst-photo="3"] { left: 40%; top: 70%; }
}

@media (prefers-reduced-motion: reduce) {
  .fst__photo { transition: opacity 0s; }
  .fst__photo:not(.is-in) { transform: translateY(0) rotate(0) scale(1); }
}

/* Phones (client, 29 Aug 2026): the four-video stack sat vertically centred
   in its full-height stage, leaving ~250px of dead space under the Our Story
   paragraphs. Pull the stage content to the top (clearing the fixed nav) and
   tighten the track's top margin. */
@media (max-width: 760px) {
  .fst__stack-track { margin-top: 24px; }
  .fst__stack-stage { align-items: flex-start; padding-top: 84px; }
}

