/* ============================================================
   NVFX Studio — shared base for design versions 1 & 2
   Layout mechanics only; colour and type live in v1.css / v2.css
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
input, textarea { font: inherit; }

.wrap { max-width: 1320px; margin: 0 auto; padding: 0 var(--pad); }
.reveal { opacity: 0; transform: translateY(34px); }
.no-js .reveal { opacity: 1; transform: none; }
.no-js #loader { display: none; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- loader ---------- */
#loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
}
.loader-inner { display: grid; justify-items: center; gap: 18px; }
.loader-bar { width: min(260px, 64vw); height: 3px; overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; }

/* ---------- cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  border-radius: 50%;
  mix-blend-mode: difference;
}
.cursor-dot { width: 6px; height: 6px; background: #fff; }
.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1.5px solid #fff;
  transition: width 0.25s ease, height 0.25s ease;
}
.cursor-ring.is-hover { width: 64px; height: 64px; }
@media (hover: none), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; white-space: nowrap; position: relative; z-index: 2; }
.marquee-track { display: inline-flex; align-items: center; animation: marquee 34s linear infinite; }
.marquee-track > span { display: inline-flex; align-items: center; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- roto hero frame ---------- */
.roto {
  position: relative;
  width: min(100%, 470px, calc((100vh - 250px) * 0.857));
  margin-inline: auto;
  will-change: transform;
}
.roto-view { position: relative; overflow: hidden; line-height: 0; }
.roto-svg { width: 100%; height: auto; display: block; }
.roto-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.roto-mode { padding: 3px 9px; }
.roto-num { font-variant-numeric: tabular-nums; min-width: 3.2em; }
.roto-pts { font-variant-numeric: tabular-nums; }
.roto-track { position: relative; flex: 1; height: 2px; margin: 0 8px; }
.roto-track i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; }
.roto-track b {
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translate(-50%, -50%) rotate(45deg);
}
.roto-steps { display: flex; justify-content: space-between; gap: 6px; padding: 10px 14px; }
.roto-steps li { transition: color 0.3s ease, background 0.3s ease; }
.roto-hint {
  position: absolute;
  left: 50%;
  bottom: 118px;
  transform: translateX(-50%);
  padding: 7px 14px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.4s ease;
  animation: hint-bob 2.2s ease-in-out infinite;
}
.roto.is-started .roto-hint { opacity: 0; }
@keyframes hint-bob { 50% { transform: translate(-50%, -6px); } }

.r-spline { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.r-fly, .r-hair-hl, .r-eye, .r-ear-in, .r-rig, .r-marker,
.r-comp-ring, .r-comp-line, .r-matte-fly { fill: none; stroke-linecap: round; }
.r-matte-fg path { fill: #fff; }
.r-matte-fg .r-matte-fly { fill: none; stroke: #fff; stroke-width: 2; }
.r-matte-bg { fill: #000; }
.r-tag { font-size: 13px; letter-spacing: 0.08em; }

/* ---------- background spline (opt-in: [data-bg-spline]) ----------
   Line sits above section backgrounds but under each section's .wrap,
   so panels and cards occlude it the way a roto shape passes behind. */
.flow { position: relative; }
.flow .wrap { position: relative; z-index: 2; }
.bg-spline {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}
.bg-spline-path { fill: none; stroke-linecap: round; }
.bg-pt {
  opacity: 0;
  transform: scale(0.3);
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.bg-pt.is-on { opacity: 1; transform: none; }
@media (max-width: 880px) { .bg-spline { display: none; } }

/* ---------- showreel modal ---------- */
.reel-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: clamp(14px, 4vw, 48px);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.reel-modal.is-open { visibility: visible; opacity: 1; }
.reel-backdrop { position: absolute; inset: 0; background: rgba(10, 10, 12, 0.9); }
.reel-body {
  position: relative;
  width: min(1100px, 100%);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.35s ease;
}
.reel-modal.is-open .reel-body { transform: none; }
.reel-frame { aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.reel-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.reel-close {
  position: absolute;
  top: -50px;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 15px;
  transition: transform 0.3s ease;
}
.reel-close:hover { transform: rotate(90deg); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track, .roto-hint, .spin-text, .scroll-btn, .scroll-cue::before, .reel-play { animation: none !important; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
