/* ════════════════════════════════════════════════════════════════════════
   F-MAX cinematic scroll presentation (v52)
   Base styles = static stacked version (no JS / reduced motion).
   .fmx--cinema (added by fmx.js) = pinned, scroll-driven stage.
   ════════════════════════════════════════════════════════════════════════ */
.fmx {
  --fmx-red: var(--brand-red, #e1251b);
  --fmx-glass: rgba(14, 18, 26, 0.58);
  --fmx-glass-line: rgba(255, 255, 255, 0.14);
  position: relative;
  background: #050608;
  color: #fff;
  isolation: isolate;
}
.fmx__skip {
  position: absolute; z-index: 30; top: 16px; right: 16px;
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px;
  font-size: 13px; font-weight: 700; letter-spacing: .04em; color: #e2e8f0;
  background: rgba(10, 13, 19, .62); border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  text-decoration: none; transition: background .2s ease, color .2s ease;
}
.fmx__skip:hover, .fmx__skip:focus-visible { background: #fff; color: #07090e; }
.fmx__backdrop { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.fmx__tunnel { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.fmx__glow {
  position: absolute; left: 50%; bottom: -20%; width: 120%; height: 70%; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(225, 37, 27, .28), transparent 70%);
}

/* ── static (stacked) layout ── */
.fmx__scene { position: relative; z-index: 1; min-height: 88vh; display: grid; align-items: end; overflow: hidden; }
.fmx__media { position: absolute; inset: 0; display: grid; place-items: center; }
.fmx__poster, .fmx__macro, .fmx__cab, .fmx__cluster { width: 100%; height: 100%; object-fit: cover; }
.fmx__canvas, .fmx__macro, .fmx__cluster { display: none; }
.fmx__zoom { position: relative; width: min(78vw, 82vh); aspect-ratio: 1; }
.fmx__zoom--cab { width: 100%; height: 100%; aspect-ratio: auto; }
.fmx__cutout { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 40px 60px rgba(0, 0, 0, .55)); }
.fmx__cutout--final { width: min(70vw, 78vh); height: auto; aspect-ratio: 1; }
.fmx__scene--intro .fmx__media::after, .fmx__scene--cab .fmx__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 6, 8, .2) 0%, rgba(5, 6, 8, 0) 40%, rgba(5, 6, 8, .78) 100%);
}

.fmx__copy {
  position: relative; z-index: 2; margin: 0 clamp(16px, 5vw, 72px) clamp(28px, 6vh, 64px);
  max-width: 520px; padding: clamp(18px, 2.4vw, 28px);
  background: var(--fmx-glass); border: 1px solid var(--fmx-glass-line); border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 24px 60px -20px rgba(0, 0, 0, .7);
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.fmx__copy--center { justify-self: center; text-align: center; background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; max-width: min(92vw, 1100px); }
.fmx__copy--right { justify-self: end; }
.fmx__copy--wide { justify-self: center; align-self: center; max-width: 1080px; width: calc(100% - 2 * clamp(16px, 5vw, 72px)); margin-top: clamp(28px, 8vh, 80px); }
.fmx__copy--final { justify-self: center; text-align: center; background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; max-width: min(92vw, 980px); }

.fmx__title {
  margin: 0; font-family: 'Barlow Condensed', Arial, sans-serif; font-weight: 800;
  font-size: clamp(44px, 7vw, 104px); line-height: .96; letter-spacing: -.01em; color: #fff;
  text-shadow: 0 10px 40px rgba(0, 0, 0, .55);
}
.fmx__copy--final .fmx__title { font-size: clamp(32px, 3.6vw, 56px); line-height: 1.02; }
.fmx__lead { margin: 14px auto 0; max-width: 46ch; color: #cbd5e1; font-size: clamp(16px, 1.3vw, 19px); }
.fmx__h { margin: 0 0 10px; font-family: 'Barlow Condensed', Arial, sans-serif; font-weight: 800; font-size: clamp(28px, 3vw, 42px); line-height: 1.05; color: #fff; }
.fmx__copy p:not(.fmx__step):not(.fmx__source) { margin: 0; color: #cbd5e1; font-size: 16px; line-height: 1.6; }
.fmx__step { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .12em; color: #fca5a5; font-variant-numeric: tabular-nums; }

.fmx__panels { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.fmx__panel {
  display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
}
.fmx__panel strong { font-size: 15px; color: #fff; }
.fmx__panel span { font-size: 14.5px; color: #cbd5e1; line-height: 1.5; }
.fmx__ticks { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.fmx__ticks li { position: relative; padding-left: 22px; color: #e2e8f0; font-size: 16px; }
.fmx__ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 2px; background: var(--fmx-red); }

/* performance figures */
.fmx__figs { margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.fmx__fig { position: relative; padding: 16px 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1); }
.fmx__fig dt { font-family: 'Barlow Condensed', Arial, sans-serif; font-weight: 800; font-size: clamp(38px, 4.2vw, 60px); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.fmx__fig dt small { font-size: .42em; font-weight: 700; color: #cbd5e1; letter-spacing: .02em; }
.fmx__fig dd { margin: 6px 0 12px; color: #cbd5e1; font-size: 14.5px; line-height: 1.45; }
.fmx__bar { display: block; position: relative; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.fmx__bar-fill, .fmx__bar-eco { position: absolute; inset: 0; transform-origin: left center; background: linear-gradient(90deg, var(--fmx-red), #ff7a6a); border-radius: inherit; }
.fmx__bar-eco { left: calc(var(--from) * 100%); right: 0; background: linear-gradient(90deg, #ff7a6a, var(--fmx-red)); }
.fmx__note { display: block; margin-top: 8px; font-size: 13px; color: #94a3b8; }
.fmx__gears { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; }
.fmx__gears i { height: 10px; border-radius: 2px; background: var(--fmx-red); }
.fmx__source { margin: 14px 0 0; font-size: 12.5px; color: #94a3b8; }

.fmx__actions { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* hotspots */
.fmx__hot {
  position: absolute; left: var(--x); top: var(--y); z-index: 3; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  padding: 0; border: 0; background: none; cursor: pointer; color: #fff;
}
.fmx__hot-dot {
  position: absolute; inset: 12px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); box-shadow: 0 0 0 6px rgba(255, 255, 255, .22), 0 0 24px rgba(255, 255, 255, .5);
}
.fmx__hot-dot::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5); animation: fmx-ping 2.4s ease-out infinite; }
@keyframes fmx-ping { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.fmx__hot-tip {
  position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translate(-50%, 6px);
  width: max-content; max-width: 220px; padding: 8px 12px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; line-height: 1.35; text-align: left; color: #fff;
  background: rgba(10, 13, 19, .82); border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.fmx__hot:hover .fmx__hot-tip, .fmx__hot:focus-visible .fmx__hot-tip, .fmx__hot.is-open .fmx__hot-tip { opacity: 1; transform: translate(-50%, 0); }
.fmx__hot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 50%; }

/* scroll cue */
.fmx__cue { display: inline-block; margin-top: 22px; width: 26px; height: 42px; border: 2px solid rgba(255, 255, 255, .55); border-radius: 14px; position: relative; }
.fmx__cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: fmx-cue 1.6s ease-in-out infinite; }
@keyframes fmx-cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

.fmx__progress { display: none; }

/* ── cinema mode ── */
.fmx--cinema .fmx__stage { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
.fmx--cinema .fmx__scene { position: absolute; inset: 0; min-height: 0; opacity: 0; visibility: hidden; }
.fmx--cinema .fmx__scene[data-scene="1"] { opacity: 1; visibility: visible; }
.fmx--cinema .fmx__canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.fmx--cinema.fmx--frames .fmx__poster { opacity: 0; }
.fmx--cinema .fmx__macro { display: block; position: absolute; inset: 0; opacity: 0; }
.fmx--cinema .fmx__cluster { display: block; position: absolute; inset: 0; opacity: 0; }
.fmx--cinema .fmx__zoom { will-change: transform; }
.fmx--cinema .fmx__scene--design .fmx__zoom { width: min(92vw, 96vh); }
.fmx--cinema .fmx__scene--tech .fmx__media { justify-items: start; padding-left: 2vw; }
.fmx--cinema .fmx__scene--tech .fmx__zoom { width: min(66vw, 92vh); }
.fmx--cinema .fmx__scene--tech .fmx__copy--right { align-self: center; margin-bottom: 0; }
.fmx--cinema .fmx__scene--perf { align-items: center; }
.fmx--cinema .fmx__scene--final { align-items: end; }
.fmx--cinema .fmx__scene--final .fmx__media { place-items: start center; padding-top: 7vh; }
.fmx--cinema .fmx__scene--final .fmx__cutout--final { width: min(62vw, 66vh); }
.fmx--cinema .fmx__progress {
  display: flex; position: absolute; z-index: 25; left: 50%; bottom: 18px; transform: translateX(-50%);
  list-style: none; margin: 0; padding: 6px 10px; gap: 4px; border-radius: 999px;
  background: rgba(10, 13, 19, .5); border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.fmx--cinema .fmx__progress li { position: relative; padding: 4px 10px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: rgba(255, 255, 255, .5); border-radius: 999px; transition: color .25s ease, background .25s ease; white-space: nowrap; }
.fmx--cinema .fmx__progress li.is-active { color: #fff; background: rgba(225, 37, 27, .85); }
.fmx--cinema .fmx__scene--final .fmx__copy--final { margin-bottom: 8vh; }

/* lite (phones, low-power, save-data) */
.fmx--lite .fmx__copy:not(.fmx__copy--center):not(.fmx__copy--final) { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(10, 13, 19, .86); }
.fmx--lite .fmx__hot-dot::after { animation: none; }

@media (max-width: 768px) {
  .fmx__copy { margin: 0 12px 76px; border-radius: 14px; }
  .fmx__copy--right { justify-self: stretch; }
  .fmx__title { font-size: clamp(40px, 12vw, 60px); }
  .fmx__h { font-size: 28px; }
  .fmx--cinema .fmx__scene--tech .fmx__media { justify-items: center; align-items: start; padding: 10vh 0 0; }
  .fmx--cinema .fmx__scene--tech .fmx__zoom { width: 108vw; }
  .fmx--cinema .fmx__scene--tech .fmx__copy--right { align-self: end; margin-bottom: 76px; }
  .fmx__panels { gap: 6px; }
  .fmx__panel { padding: 9px 12px; }
  .fmx__panel span { font-size: 13.5px; }
  .fmx--cinema .fmx__scene--design .fmx__media { align-items: start; padding-top: 6vh; }
  .fmx--cinema .fmx__scene--design .fmx__zoom { width: 116vw; }
  .fmx__figs { grid-template-columns: 1fr 1fr; gap: 8px; }
  .fmx__fig { padding: 12px; }
  .fmx__fig:first-child { grid-column: 1 / -1; }
  .fmx__fig dd { font-size: 13px; margin-bottom: 8px; }
  .fmx--cinema .fmx__progress { bottom: 10px; padding: 4px 6px; }
  .fmx--cinema .fmx__progress li { font-size: 0; width: 8px; height: 8px; padding: 0; background: rgba(255, 255, 255, .35); }
  .fmx--cinema .fmx__progress li.is-active { background: var(--fmx-red); width: 22px; }
  .fmx__skip { top: 10px; right: 10px; }
  .fmx--cinema .fmx__scene--final .fmx__media { padding-top: 9vh; }
  .fmx--cinema .fmx__scene--final .fmx__cutout--final, .fmx__cutout--final { width: 100vw; }
  .fmx--cinema .fmx__scene--final .fmx__copy--final { margin-bottom: 64px; }
  .fmx__hot-tip { max-width: 170px; font-size: 12.5px; }
}
@media (max-width: 768px) and (max-height: 700px) {
  .fmx__fig dd { display: none; }
  .fmx__note { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fmx__hot-dot::after, .fmx__cue span { animation: none; }
}
.fmx__copy--center .fmx__title { white-space: nowrap; font-size: clamp(40px, 10.5vw, 104px); }
.fmx--static .fmx__scene--final { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-top: 24px; }
.fmx--static .fmx__scene--final .fmx__media { position: relative; inset: auto; }
.fmx--static .fmx__scene--final .fmx__cutout--final { width: min(56vw, 60vh); }
.fmx--static .fmx__scene--tech .fmx__media { justify-items: start; }
.fmx--static .fmx__scene--tech .fmx__zoom { width: min(60vw, 80vh); }
@media (max-width: 768px) {
  .fmx__scene--tech .fmx__panel span { display: none; }
  .fmx__scene--tech .fmx__panel { padding: 8px 12px; }
}

/* intro and finale copy: centred as one column, lead clear of the title's descenders */
.fmx__copy--center, .fmx__copy--final { display: flex; flex-direction: column; align-items: center; }
.fmx__copy--center .fmx__lead { margin-top: clamp(20px, 2.6vw, 34px); text-align: center; text-shadow: 0 2px 18px rgba(0, 0, 0, .8); }
.fmx__copy--center .fmx__title { line-height: 1.04; padding-bottom: .04em; }
.fmx__copy--center .fmx__cue { margin-top: clamp(16px, 2.4vw, 28px); }
/* every caption sits above the scene pills (they are ~40px tall, 22px from the bottom), also on short laptop screens */
@media (min-width: 769px) {
  .fmx--cinema .fmx__copy:not(.fmx__copy--center) { margin-bottom: max(84px, 9vh) !important; }
  .fmx--cinema .fmx__scene--final .fmx__copy--final { margin-bottom: max(96px, 10vh) !important; }
}
@media (min-width: 769px) and (max-height: 760px) {
  .fmx--cinema .fmx__copy:not(.fmx__copy--center):not(.fmx__copy--final) { padding: 16px 20px; max-width: 480px; }
  .fmx--cinema .fmx__copy .fmx__h { font-size: clamp(24px, 2.4vw, 34px); }
}
/* scroll performance: no live filters on scaled cut-outs, lighter glass while the stage is pinned */
.fmx--cinema .fmx__cutout { filter: none; }
.fmx--cinema .fmx__stage { contain: paint; }
.fmx--cinema .fmx__media, .fmx--cinema .fmx__canvas { will-change: transform; }
.fmx--cinema * { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
/* live blur over a moving stage costs a full re-blur every frame (it halved the frame rate in tests);
   the glass look is kept with tinted gradients, a light edge and an inner highlight instead */
.fmx--cinema .fmx__copy:not(.fmx__copy--center):not(.fmx__copy--final) { background: linear-gradient(160deg, rgba(30, 36, 48, .86), rgba(10, 13, 19, .9) 60%); border-color: rgba(255, 255, 255, .16); }
.fmx--cinema .fmx__panel { background: linear-gradient(160deg, rgba(36, 42, 56, .82), rgba(12, 15, 22, .88)); }
.fmx--cinema .fmx__progress { background: rgba(10, 13, 19, .82); }
