/* Scroll hero — styles for the "Hero - scroll lines" HTML Block (Elementor).
   .qst-hero         tall wrapper (its height = scroll length, set by hero.js)
   .qst-hero__stage  the screen that stays pinned (background image set in Elementor)
   .qst-hero__row    one line of product images; line 1 shows on load, the rest on scroll */

@property --qst-accent { syntax: '<color>'; inherits: true; initial-value: #c6ff00; }   /* lets the accent colour fade between lines */

.qst-hero-wrap {                       /* full-bleed when auto-placed at the top of the page */
  position: relative;
  width: var(--qst-vw, 100vw);
  left: calc(50% - var(--qst-vw, 100vw) / 2);
  margin-top: calc(-1 * var(--qst-pull, 40px)) !important;   /* cancels the theme's content padding; hero.js sets the real value */
  margin-bottom: 40px;
}

/* Header set to overlap the content: no padding to cancel, and the hero text starts below the header */
.wd-header-overlap .qst-hero-wrap { --qst-pull: 0px; }
.wd-header-overlap .elementor .e-con.qst-hero { --qst-hero-head: 90px; }   /* hero.js replaces this with the measured header height */

.elementor .e-con.qst-hero {
  --qst-accent: #c6ff00;               /* default accent; each line's heading Text Color (Elementor) replaces it while that line is in focus */
  --n: 2;                              /* number of rows (hero.js updates it) */
  --h: calc(68vh / (1 + 0.42 * (min(var(--n), 2) - 1)));   /* image height of a line; never more than two lines are on screen */
  display: block;
  position: relative;
  padding: 0;
  gap: 0;
  background: #0a0a0a;
}
.elementor .e-con.qst-hero__stage {
  display: block;
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 0;
  gap: 0;
  overflow: hidden;
  perspective: 1100px;                 /* real depth: lines move away from the camera */
  perspective-origin: 50% 30%;
}
.qst-hero.is-js { height: calc(100vh + (var(--n) - 1) * 70vh + 28vh); }
.qst-hero.is-js > .qst-hero__stage,
.qst-hero.is-js > .e-con-inner > .qst-hero__stage { position: sticky; top: 0; height: 100vh; min-height: 0; }

/* ── Copy ── */
.elementor .e-con.qst-hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  position: relative;
  z-index: 20;
  width: auto;
  max-width: 100%;
  padding: calc(clamp(1.2rem, 3.5vh, 2.6rem) + var(--qst-hero-head, 0px)) clamp(1.25rem, 3.6vw, 4.5rem) 0;
}
.qst-hero .elementor-widget { margin: 0; }
.qst-hero .qst-hero__eyebrow .elementor-heading-title {
  margin: 0 0 0.5rem;
  font-family: inherit;
  font-size: clamp(0.62rem, 0.8vw, 0.8rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--qst-accent);
}
.qst-hero .qst-hero__title .elementor-heading-title {
  margin: 0 0 1rem;
  padding: 0;
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-size: clamp(2.6rem, 5.8vw, 6.4rem);
  line-height: 0.88;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: #fff;
}
.qst-hero .qst-hero__accent { color: var(--qst-accent); }
.qst-hero .qst-hero__btn .elementor-button {
  padding: 0.9em 1.6em;
  border: 0;
  border-radius: 0;
  background: var(--qst-accent);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0a0a0a;
  fill: #0a0a0a;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: filter 0.25s ease;
}
.qst-hero .qst-hero__btn .elementor-button:hover,
.qst-hero .qst-hero__btn .elementor-button:focus-visible { background: var(--qst-accent); color: #0a0a0a; filter: brightness(1.12); }

/* ── Rows of product images (back row first, later rows lower and in front) ── */
.elementor .e-con.qst-hero__row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(0.3rem, 1vw, 1.4rem);
  width: 100%;
  padding: 0 3vw;
  margin-top: 1.5rem;
}
.qst-hero__row .qst-hero__item { position: relative; flex: 0 1 auto; min-width: 0; width: auto; }
.qst-hero__row .qst-hero__item img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 34vh;
  border-radius: 0;
  filter: drop-shadow(0 18px 22px rgba(0,0,0,0.55));
  transition: transform 0.35s ease;
}
.qst-hero__row .qst-hero__item a:hover img { transform: translateY(-6px); }
.qst-hero__row .qst-hero__item figure { margin: 0; position: relative; }
.qst-hero__row .qst-hero__item figcaption {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  margin: 0 0 0.35rem;
  padding: 0.35em 0.7em 0.3em;
  background: rgba(10,10,10,0.82);
  border: 1px solid rgba(255,255,255,0.16);
  font-size: clamp(0.56rem, 0.72vw, 0.72rem);
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
}
.qst-hero__row .qst-hero__item figcaption::before {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-right: 0.6em;
  background: var(--qst-accent);
}

/* ── Pinned mode (hero.js adds .is-js) ─────────────────────────────
   Scrolling only decides WHICH line is in focus; the movement itself is
   a timed, eased CSS transition (transform / opacity / filter), so it
   plays at the same smooth speed whatever the mouse wheel does.
   hero.js sets:  .is-in    on rows that have arrived
                  --dz      on each row = how many newer lines stand in front
                  .is-awake on the hero once the visitor starts scrolling    */
.elementor .e-con.qst-hero { transition: --qst-accent 0.9s ease; }
.elementor .e-con.qst-hero { --qst-t: 0.85s; --qst-ease: cubic-bezier(0.22, 0.85, 0.24, 1); }

.qst-hero__glow {                                    /* soft light that follows the pointer */
  position: absolute;
  left: 50%;
  top: 58%;
  width: 84vw;
  height: 92vh;
  margin: -46vh 0 0 -42vw;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--qst-accent) 11%, transparent), transparent 72%);
  will-change: translate;
}
.qst-hero.is-js .qst-hero__stage::after {            /* floor haze + vignette */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(0,0,0,0.78), transparent 26%),
    radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0,0,0,0.55));
}

.qst-hero.is-js .qst-hero__eyebrow,
.qst-hero.is-js .qst-hero__btn { animation: qstHeroFade 0.55s ease both; }
.qst-hero.is-js .qst-hero__btn { animation-delay: 0.4s; }
.qst-hero.is-js .qst-hero__title .elementor-heading-title {
  animation: qstHeroTitle 0.7s cubic-bezier(0.16, 0.8, 0.2, 1) 0.05s both;
}
@keyframes qstHeroFade  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes qstHeroTitle { from { clip-path: inset(0 0 100% 0); transform: translateY(0.5em); } to { clip-path: inset(0 0 -10% 0); transform: none; } }
@keyframes qstHeroRise  { from { opacity: 0; transform: translate3d(0, 12vh, 0) scale(1.3); } to { opacity: 1; transform: none; } }

/* A line: each newer line pushes it up, back (translateZ) and out of focus */
.qst-hero.is-js .qst-hero__row {
  --dz: 0;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3vh;
  z-index: calc(2 + var(--i));
  margin: 0;
  transform-origin: 50% 100%;
  transform: translate3d(0, calc(var(--dz) * -0.24 * var(--h)), calc(var(--dz) * -380px));
  filter: blur(calc(min(var(--dz), 1) * 3px)) brightness(calc(1 - min(var(--dz), 1) * 0.62));
  opacity: clamp(0, calc(1 - 0.45 * var(--dz) - max(0, var(--dz) - 1) * 0.6), 1);          /* only the line in focus and the one behind it stay visible */
  transition: transform var(--qst-t) var(--qst-ease), filter var(--qst-t) var(--qst-ease), opacity calc(var(--qst-t) * 0.7) ease;
  will-change: transform, filter, opacity;
  /* `translate` (pointer parallax + header offset) is set by hero.js and is not transitioned */
}
/* Its images: arrive from the camera (big, low, transparent) one after another */
.qst-hero.is-js .qst-hero__row .qst-hero__item {
  opacity: 0;
  transform: translate3d(0, 12vh, 0) scale(1.3);
  transform-origin: 50% 100%;
  transition: opacity calc(var(--qst-t) * 0.7) ease, transform var(--qst-t) var(--qst-ease);
  transition-delay: calc(var(--k, 0) * 45ms);
  will-change: transform, opacity;
}
.qst-hero.is-js .qst-hero__row.is-in .qst-hero__item { opacity: 1; transform: none; }
.qst-hero.is-js .qst-hero__row:not(.is-in),
.qst-hero.is-js .qst-hero__row.is-gone { pointer-events: none; }
.qst-hero.is-js .qst-hero__row .qst-hero__item img {
  max-height: var(--h);
  max-width: min(calc(94vw / var(--c, 5)), 24vw);
  filter: none;
}
/* labels only on the line in focus */
.qst-hero.is-js .qst-hero__row .qst-hero__item figcaption { opacity: 0; transition: opacity 0.3s ease; }
.qst-hero.is-js .qst-hero__row.is-in:not(.is-back) .qst-hero__item figcaption { opacity: 1; transition-delay: calc(0.45s + var(--k, 0) * 45ms); }

/* Line 1: arrives on load; only the middle item is lit until the visitor scrolls */
.qst-hero.is-js .qst-hero__row--first .qst-hero__item {
  animation: qstHeroRise 0.7s cubic-bezier(0.16, 0.8, 0.2, 1) backwards;
  animation-delay: calc(0.2s + var(--d, 0) * 60ms);
}
.qst-hero.is-js .qst-hero__row--first .qst-hero__item img { transition: filter 0.6s ease, transform 0.35s ease; }
.qst-hero.is-js:not(.is-awake) .qst-hero__row--first .qst-hero__item:not(.is-lead) img { filter: brightness(0.42); }
.qst-hero.is-js:not(.is-awake) .qst-hero__row--first .qst-hero__item:not(.is-lead) figcaption { opacity: 0; }
.qst-hero.is-js:not(.is-awake) .qst-hero__row--first .qst-hero__item.is-lead img { filter: drop-shadow(0 0 30px color-mix(in srgb, var(--qst-accent) 28%, transparent)); }

/* ── Line headings ────────────────────────────────────────────────
   Each row holds a Heading widget with the class qst-hero__row-title
   (edit its text in Elementor). hero.js shows that text at the top
   right of the stage: .is-on = the line in focus, .is-past = lines behind it. */
.qst-hero__row .qst-hero__row-title { flex: 0 0 100%; width: 100%; text-align: center; }
.qst-hero__row .qst-hero__row-title .elementor-heading-title {
  margin: 0 0 0.6rem;
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-size: clamp(1.4rem, 2.4vw, 2.4rem);
  line-height: 1;
  text-transform: uppercase;
  color: #fff;
}
.elementor .e-con.qst-hero:not(.is-js) .qst-hero__row { flex-wrap: wrap; }
.qst-hero.is-js .qst-hero__row .qst-hero__row-title {      /* still read by screen readers / search */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.qst-hero__layers {
  position: absolute;
  top: calc(clamp(2.8rem, 10vh, 6.5rem) + var(--qst-hero-head, 0px));
  right: clamp(1.25rem, 3.6vw, 4.5rem);
  z-index: 20;
  pointer-events: none;
}
.qst-hero__layer {                                    /* waiting: off to the right */
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  white-space: nowrap;
  opacity: 0;
  transform: translate3d(7vw, 0, 0);
  transition: opacity 0.45s ease, transform 0.7s var(--qst-ease);
  will-change: transform, opacity;
}
.qst-hero__layer.is-on   { opacity: 1; transform: none; transition-delay: 0.18s; }
.qst-hero__layer.is-past { opacity: 0; transform: translate3d(0, -6vh, 0); }      /* leaves upwards */
.qst-hero__layer-num {
  margin-bottom: 0.5rem;
  font-size: clamp(0.62rem, 0.8vw, 0.8rem);
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--qst-accent);
}
.qst-hero__layer-name {
  padding-bottom: 0.12em;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.7rem, 3.4vw, 3.8rem);
  line-height: 0.92;
  text-transform: uppercase;
  color: #fff;
}
.qst-hero__layer::after {                             /* accent rule draws in from the right */
  content: "";
  width: 100%;
  height: 3px;
  margin-top: 0.5rem;
  background: var(--qst-accent);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.6s var(--qst-ease);
}
.qst-hero__layer.is-on::after { transform: scaleX(1); transition-delay: 0.4s; }

/* Scroll hint */
.qst-hero__hint {
  position: absolute;
  left: clamp(1.25rem, 3.6vw, 4.5rem);
  bottom: 2.2vh;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.8em;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.qst-hero.is-awake .qst-hero__hint { opacity: 0; }
.qst-hero__hint::before {
  content: "";
  width: 1px;
  height: 2.6em;
  background: linear-gradient(var(--qst-accent), transparent);
  animation: qstHeroHint 1.6s ease-in-out infinite;
  transform-origin: 50% 0;
}
@keyframes qstHeroHint { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

@media (max-width: 768px) {
  .qst-hero.is-js { height: calc(100vh + (var(--n) - 1) * 60vh + 24vh); }
  .elementor .e-con.qst-hero { --h: calc(46vh / (1 + 0.5 * (min(var(--n), 2) - 1))); }
  .qst-hero.is-js .qst-hero__row { gap: 0.3rem; padding: 0 2vw; bottom: 5vh; }
  .qst-hero.is-js .qst-hero__row .qst-hero__item img { max-width: calc(92vw / var(--c, 5)); }
  .qst-hero__row .qst-hero__item figcaption { display: none; }
  .qst-hero__hint, .qst-hero__glow { display: none; }
  .qst-hero__layers { top: auto; bottom: calc(100% - 46vh); }
  .qst-hero__layer-name { font-size: 1.7rem; }
  .qst-hero__layer-num { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .elementor .e-con.qst-hero { --qst-t: 0.01s; transition: none; }
  .qst-hero.is-js .qst-hero__row--first .qst-hero__item,
  .qst-hero.is-js .qst-hero__eyebrow,
  .qst-hero.is-js .qst-hero__btn,
  .qst-hero.is-js .qst-hero__title .elementor-heading-title { animation: none; }
  .qst-hero__layer, .qst-hero__layer::after { transition-duration: 0.01s; transition-delay: 0s; }
  .qst-hero__hint::before { animation: none; }
}
