/* Find your system (#systems): the four-system story after the Garden film, after forgeautomotive.co.uk's Approach
 * sequence (ANALYSIS.md beside the 2026-10-26 handoff). By default — no script, reduced motion, a failed build — it is a
 * plain list of four systems, every picture and link in view. The pinned story exists only under [data-fys-live], which
 * systems-steps.js sets inside a LatveraLux motion context, and only transform, opacity and clip-path change per frame.
 * Selectors beat lux/home.css's B2 box (`html #systems.systems-gateway[data-lux="systems"]`) and systems-gateway.css. */
html #systems.systems-gateway[data-lux="systems"][data-fys] {
  --fys-ground:#0d0c0b; --fys-hair:rgba(244,239,231,.28); --fys-radius:max(10px, calc(16 * var(--lux-unit)));
  position:relative; height:auto !important; margin:0 !important; padding:var(--lux-break) var(--lux-edge) var(--lux-close) !important;
  border-top:0 !important; background:var(--lux-ground); color:var(--lux-cream); overflow:clip;
}

/* ── The list (default) ───────────────────────────────────────────────────────────────────────────────────────────── */
#systems[data-fys] .fys-layer--back, #systems[data-fys] .fys-frame { display:none; }
#systems[data-fys] .fys-head { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:20px 32px; margin:0 0 calc(120 * var(--lux-unit)); }
#systems[data-fys] .fys-title { margin:0; font-size:var(--lux-fs-name); line-height:.98; letter-spacing:-.05em; font-weight:400; }
#systems[data-fys] .fys-steps { list-style:none; margin:0; padding:0; display:grid; gap:calc(120 * var(--lux-unit)); }
#systems[data-fys] .fys-copy {
  display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); grid-template-areas:"still count" "still text" "still link";
  grid-template-rows:auto 1fr auto; column-gap:calc(96 * var(--lux-unit)); row-gap:24px;
}
#systems[data-fys] .fys-still { grid-area:still; margin:0; aspect-ratio:5 / 4; overflow:hidden; border-radius:var(--fys-radius); background:var(--fys-ground); }
#systems[data-fys] .fys-still picture, #systems[data-fys] .fys-still img { display:block; width:100%; height:100%; object-fit:cover; }
#systems[data-fys] .fys-count { grid-area:count; margin:0; font-size:max(16px, calc(26 * var(--lux-unit))); line-height:1.2; letter-spacing:-.01em; font-variant-numeric:tabular-nums; }
#systems[data-fys] .fys-count-total { opacity:.6; }
#systems[data-fys] .fys-text { grid-area:text; align-self:center; }
#systems[data-fys] .fys-name { margin:0; font-size:clamp(40px, calc(84 * var(--lux-unit)), 92px); line-height:.98; letter-spacing:-.045em; font-weight:400; }
#systems[data-fys] .fys-word { display:inline-block; overflow:clip; vertical-align:top; padding-bottom:.14em; margin-bottom:-.14em; }
#systems[data-fys] .fys-word > span { display:inline-block; }
#systems[data-fys] .fys-line { margin:calc(28 * var(--lux-unit)) 0 0; max-width:31ch; font-size:max(16px, calc(21 * var(--lux-unit))); line-height:1.4; color:rgba(244,239,231,.8); text-wrap:pretty; }
/* Beats lux/fx.css's old menu-row styling of .lux-index-row (full width, hairline rules, :last-child border). */
html #systems[data-fys] .fys-copy > .fys-link.lux-index-row {
  grid-area:link; align-self:end; justify-self:start; display:inline-flex; align-items:center; gap:.36em; min-height:48px; box-sizing:border-box; width:auto; opacity:1;
  padding:0 24px; border:1px solid var(--fys-hair); border-radius:999px; font-size:15px; line-height:1.2; letter-spacing:-.005em;
  color:var(--lux-cream); text-decoration:none; transition:background-color .3s var(--lux-ease-ui), border-color .3s var(--lux-ease-ui);
}
#systems[data-fys] .fys-link .lux-index-name { text-transform:lowercase; }
#systems[data-fys] .fys-link-arrow { margin-left:.2em; transition:transform .5s var(--lux-ease-out); }
#systems[data-fys] .fys-link:focus-visible, #systems[data-fys] .fys-all:focus-visible { outline:2px solid var(--lux-cream); outline-offset:4px; }
@media (hover:hover) and (pointer:fine) {
  html #systems[data-fys] .fys-copy > .fys-link.lux-index-row:hover { background:rgba(244,239,231,.1); border-color:rgba(244,239,231,.6); }
  html.is-motion #systems[data-fys] .fys-link:hover .fys-link-arrow { transform:translate(3px, -3px); }
}

/* ── The story ([data-fys-live]): two sticky layers around the text — the blurred backdrops behind it, the heading and
 * the picture in front (on phones the text tucks under the picture). Geometry at 1728 × 1117: picture 674 × 539 at 9vw,
 * centred; text column at 57vw. ───────────────────────────────────────────────────────────────────────────────────── */
html #systems.systems-gateway[data-lux="systems"][data-fys][data-fys-live] {
  --fys-pw:min(39vw, calc((100vh - 220px) * 1.25)); --fys-ph:calc(var(--fys-pw) * .8);
  --fys-pl:9vw; --fys-pt:calc((100vh - var(--fys-ph)) / 2); --fys-tx:57vw; --fys-tw:min(34vw, 640px); --fys-stage:100vh; --fys-step:100vh;
  padding:0 !important; background:var(--fys-ground);
}
#systems[data-fys-live] .fys-layer { display:block; position:absolute; inset:0; pointer-events:none; }
#systems[data-fys-live] .fys-layer--back { z-index:0; }
#systems[data-fys-live] .fys-layer--front { z-index:2; }
#systems[data-fys-live] .fys-sticky { position:sticky; top:0; height:var(--fys-stage); }
#systems[data-fys-live] .fys-layer--back .fys-sticky { overflow:clip; }
#systems[data-fys-live] .fys-backdrops { position:absolute; inset:0; background:var(--fys-ground); }
#systems[data-fys-live] .fys-backdrop { position:absolute; inset:-16px; display:block; }
#systems[data-fys-live] .fys-backdrop img { display:block; width:100%; height:100%; object-fit:cover; }
#systems[data-fys-live] .fys-backdrop[data-step="0"] { z-index:4; }
#systems[data-fys-live] .fys-backdrop[data-step="1"] { z-index:3; }
#systems[data-fys-live] .fys-backdrop[data-step="2"] { z-index:2; }
#systems[data-fys-live] .fys-backdrop[data-step="3"] { z-index:1; }
#systems[data-fys-live] .fys-group { position:absolute; inset:0; }
#systems[data-fys-live] .fys-frame {
  display:block; position:absolute; left:var(--fys-pl); top:var(--fys-pt); width:var(--fys-pw); height:var(--fys-ph);
  overflow:hidden; border-radius:var(--fys-radius); isolation:isolate; background:var(--fys-ground);
}
#systems[data-fys-live] .fys-plate { position:absolute; inset:0; display:block; }
#systems[data-fys-live] .fys-plate img { display:block; width:100%; height:100%; object-fit:cover; }
#systems[data-fys-live] .fys-plate[data-step="1"] { z-index:1; }
#systems[data-fys-live] .fys-plate[data-step="2"] { z-index:2; }
#systems[data-fys-live] .fys-plate[data-step="3"] { z-index:3; }
#systems[data-fys-live] .fys-plate:not([data-step="0"]) { clip-path:inset(50% 30% 50% 70% round var(--fys-radius)); visibility:hidden; }
/* The heading row sits over the picture only, so the travelling text column never crosses its link. */
#systems[data-fys-live] .fys-head {
  position:absolute; left:var(--fys-pl); width:var(--fys-pw); top:calc(var(--fys-pt) - 84px); margin:0;
  display:grid; grid-template-columns:minmax(0, 1fr) auto; align-items:baseline; gap:0 24px;
}
#systems[data-fys-live] .fys-title { font-size:max(22px, calc(40 * var(--lux-unit))); line-height:1.1; letter-spacing:-.035em; }
#systems[data-fys-live] .fys-all { justify-self:end; pointer-events:auto; color:var(--lux-cream); }
#systems[data-fys-live] .fys-steps { position:relative; z-index:1; display:block; margin:0 0 0 var(--fys-tx); width:var(--fys-tw); }
#systems[data-fys-live] .fys-step { height:var(--fys-step); }
#systems[data-fys-live] .fys-copy {
  display:flex; flex-direction:column; justify-content:space-between; box-sizing:border-box;
  height:calc(var(--fys-pt) + var(--fys-ph)); padding-top:var(--fys-pt);
}
#systems[data-fys-live] .fys-still { display:none; }
#systems[data-fys-live] .fys-text { align-self:stretch; }
html #systems[data-fys-live] .fys-copy > .fys-link.lux-index-row { align-self:flex-start; }
#systems[data-fys-active] .fys-group, #systems[data-fys-active] .fys-backdrop { will-change:transform, opacity; }

/* ── Phones and portrait tablets: forge's phone version (owner 2026-10-26: the pinned story "glitches out" on mobile).
 * No pinned stage: the four systems scroll as a list on the dark ground, each a counter, a 4:5 picture with slightly
 * rounded corners, a large light title, one line and an outlined link. With motion ([data-fys-phone], set by
 * systems-steps.js) each picture settles from a slight zoom as it scrolls in and its title rises; without it, the
 * same list stands still. ─────────────────────────────────────────────────────────────────────────────────────────── */
@media (max-width:700px), (orientation:portrait) and (max-width:1000px) {
  html #systems.systems-gateway[data-lux="systems"][data-fys] { --fys-radius:14px; padding:112px 20px 96px !important; background:var(--fys-ground); }
  #systems[data-fys] .fys-head { margin-bottom:64px; gap:16px 24px; }
  #systems[data-fys] .fys-title { font-size:clamp(46px, 13vw, 66px); line-height:.98; letter-spacing:-.055em; font-weight:300; }
  #systems[data-fys] .fys-steps { gap:96px; }
  #systems[data-fys] .fys-copy { display:flex; flex-direction:column; align-items:stretch; gap:0; }
  #systems[data-fys] .fys-count { margin:0 0 16px; font-size:15px; letter-spacing:.02em; }
  #systems[data-fys] .fys-still { aspect-ratio:4 / 5; width:100%; }
  #systems[data-fys] .fys-text { margin:28px 0 0; }
  #systems[data-fys] .fys-name { font-size:clamp(40px, 11.6vw, 58px); line-height:1; letter-spacing:-.05em; font-weight:300; }
  #systems[data-fys] .fys-line { max-width:none; margin-top:14px; font-size:16px; line-height:1.45; }
  html #systems[data-fys] .fys-copy > .fys-link.lux-index-row { align-self:flex-start; margin-top:26px; min-height:48px; padding:0 22px; font-size:14px; }
  #systems[data-fys] .fys-still img { transform-origin:50% 50%; }

  /* Arrival: the title's words rise from their own clip, then the line and the link (once per step, never reversed). */
  #systems[data-fys-phone] .fys-word > span { transform:translate3d(0, 108%, 0); transition:transform .95s var(--lux-ease-out); }
  #systems[data-fys-phone] .fys-word + .fys-word > span { transition-delay:.08s; }
  #systems[data-fys-phone] :is(.fys-line, .fys-link, .fys-count) { opacity:0; transform:translate3d(0, 14px, 0); transition:opacity .7s var(--lux-ease-out) .18s, transform .9s var(--lux-ease-out) .18s; }
  #systems[data-fys-phone] .fys-step.is-in .fys-word > span, #systems[data-fys-phone] .fys-step.is-in :is(.fys-line, .fys-link, .fys-count) { opacity:1; transform:none; }
  /* The picture settles from 1.22× to 1× while its frame travels from the bottom of the screen to the middle
   * (forge: 1.5 → 1), on the browser's own scroll timeline: no script runs per frame. */
  @supports (animation-timeline: view()) {
    #systems[data-fys-phone] .fys-still img { animation:fys-settle linear both; animation-timeline:view(); animation-range:entry 0% cover 50%; }
  }
}
@keyframes fys-settle { from { transform:scale(1.22); } to { transform:scale(1); } }
@media (max-height:540px) and (orientation:landscape) {
  html #systems.systems-gateway[data-lux="systems"][data-fys][data-fys-live] { --fys-pw:min(39vw, calc((100vh - 120px) * 1.25)); }
  #systems[data-fys-live] .fys-head { top:16px; }
}
