/* OMFC International | fx.css: the styles for fx.js (progress line,
   magnetic buttons, marquee, speed skew), for the 3D models (dragging). */


/* === 1. Reading progress: a hi-vis line along the top edge; fx.js sets its scaleX === */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: calc(var(--z-header) + 1);
  height: 2px;
  pointer-events: none;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--hivis);
  transform: scaleX(0);
  transform-origin: 0 50%;
}


/* === 2. Magnetic buttons: fx.js eases --mx / --my towards the pointer; the label follows a little further.
   The translate property adds to any transform GSAP or the hover states set. === */

.is-magnetic {
  --mx: 0px;
  --my: 0px;
  translate: var(--mx) var(--my);
}

.is-magnetic .btn__label,
.is-magnetic .menu-toggle__label {
  translate: calc(var(--mx) * 0.35) calc(var(--my) * 0.35);
}


/* === 3. Marquee: the disciplines in large type, and the clients beneath, running sideways ===
   fx.js doubles each track and moves it; with reduced motion the bands stand still. */

.marquee {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 3vw, 3rem);
  background: var(--graphite);
  border-bottom: var(--hair) solid var(--line);
  user-select: none;
}

.marquee__row {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
}

.marquee__track {
  display: flex;
  flex: none;
  will-change: transform;
}

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 0.32em;
  padding-right: 0.32em;
  font-family: var(--font-narrow);
  font-size: clamp(3.4rem, 9.5vw, 10rem);
  font-weight: 250;
  font-stretch: 62%;
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

/* Every other word drawn in outline, like a line drawing */
.marquee__item--outline {
  color: transparent;
  -webkit-text-stroke: 1px var(--bone);
}

/* A small hi-vis square between the words */
.marquee__item::after {
  content: "";
  flex: none;
  width: 0.12em;
  height: 0.12em;
  background: var(--hivis);
}

/* Second band: the clients, smaller and quieter */
.marquee__row--sub {
  margin-top: clamp(1rem, 2vw, 1.75rem);
}

.marquee__row--sub .marquee__item {
  gap: 0.9em;
  padding-right: 0.9em;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  font-stretch: 100%;
  letter-spacing: var(--track-label);
}

.marquee__row--sub .marquee__item::after {
  width: 0.5em;
  height: 1px;
  background: var(--line);
}


/* === 4. Speed skew: the sequence photographs lean into a fast scroll (--skew set by fx.js) === */

.stage__media {
  transform: skewX(var(--skew, 0deg));
}


/* === 5. Drag to orbit (focus.js): sideways drags turn the model; vertical swipes still scroll === */

.focus__canvas {
  touch-action: pan-y;
}


/* === 6. Blueprint torch (fx.js): on dark sections the pointer lights up a drafting grid beneath
   the content. --tx / --ty are registered so the light glides after the pointer. === */

@property --tx {
  syntax: "<length>";
  inherits: true;
  initial-value: -999px;
}

@property --ty {
  syntax: "<length>";
  inherits: true;
  initial-value: -999px;
}

[data-torch] {
  isolation: isolate;
  transition: --tx 0.4s var(--ease-out), --ty 0.4s var(--ease-out);
}

.torch {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background-image:
    linear-gradient(90deg, rgba(220, 245, 60, 0.34) 1px, transparent 1px),
    linear-gradient(0deg, rgba(220, 245, 60, 0.34) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 243, 238, 0.1) 1px, transparent 1px),
    linear-gradient(0deg, rgba(245, 243, 238, 0.1) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: var(--margin) 0, 0 0, var(--margin) 0, 0 0;
  -webkit-mask-image: radial-gradient(circle 17rem at var(--tx) var(--ty), #000 0%, rgba(0, 0, 0, 0.45) 45%, transparent 100%);
  mask-image: radial-gradient(circle 17rem at var(--tx) var(--ty), #000 0%, rgba(0, 0, 0, 0.45) 45%, transparent 100%);
  transition: opacity 0.7s var(--ease-out);
}

[data-torch].is-lit .torch {
  opacity: 1;
}


/* === 7. Hero titles letter by letter (hero.js): words keep lines breaking between them === */

.hero__word {
  display: inline-block;
  white-space: nowrap;
}

/* No will-change: a layer per letter would cost memory; the browser promotes them while they move */
.hero__char {
  display: inline-block;
}

