/* ══════════════════════════════════════════════════════════
   TradesOnSmash — hud.css   Ed. 04
   Custom cursor, glass panels, buttons, canvas.
   ══════════════════════════════════════════════════════════ */

/* ─── 3D CANVAS ────────────────────────────────────────────
   Fixed behind everything; the page scrolls over the scene.  */

#scene {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}
#scene.is-live { opacity: 1; }

.wrap {
  position: relative;
  z-index: 1;
  /* the marquee track is intentionally wider than the viewport;
     clip here so it cannot inflate document scroll width */
  overflow-x: clip;
}

/* Low-power / reduced-motion fallback: a static CSS gradient field
   instead of a WebGL scene. */
.void-fallback {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 22% 18%, rgba(139,80,193,.20), transparent 70%),
    radial-gradient(ellipse 55% 40% at 78% 72%, rgba(95,212,163,.15), transparent 70%),
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.6) 100%);
}

/* ─── CUSTOM CURSOR ────────────────────────────────────────
   Dot + spring-eased trailing ring. Hidden on touch/coarse
   pointers, where a custom cursor is meaningless.            */

.cur, .cur-ring {
  position: fixed; top: 0; left: 0; z-index: 1100;
  pointer-events: none;
  border-radius: 50%;
  will-change: transform;
  opacity: 0;
  /* never contribute to document scroll width */
  contain: layout size style;
  transition: opacity .3s ease;
}
.cur {
  width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}
.cur-ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1px solid rgba(242,242,245,.55);
  mix-blend-mode: difference;
  transition: opacity .3s ease, width .28s ease, height .28s ease,
              margin .28s ease, border-color .28s ease;
}
.has-cursor .cur, .has-cursor .cur-ring { opacity: 1; }
.has-cursor.is-hot .cur-ring {
  width: 62px; height: 62px; margin: -31px 0 0 -31px;
  border-color: var(--magenta);
}
.has-cursor.is-hot .cur { background: var(--magenta); box-shadow: 0 0 16px var(--magenta); }

@media (hover: none), (pointer: coarse) {
  .cur, .cur-ring { display: none; }
}

/* ─── GLASS PANEL ──────────────────────────────────────────
   The HUD surface. Text sits on a darker inner layer so it
   stays legible -- contrast first, spectacle second.         */

.glass {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-lg);
  backdrop-filter: blur(14px) saturate(130%);
  box-shadow:
    0 30px 70px -30px rgba(0,0,0,.9),
    inset 0 1px 0 rgba(255,255,255,.16);
  overflow: hidden;
  transform-style: preserve-3d;
}
/* specular sweep that catches "light" as you scroll past */
.glass::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.10) 45%, transparent 60%);
  transform: translateX(-30%);
  opacity: .8;
}
.glass--green  { border-color: rgba(95,212,163,.32);  box-shadow: 0 30px 70px -34px rgba(0,0,0,.9), 0 0 40px -12px rgba(95,212,163,.4), inset 0 1px 0 rgba(255,255,255,.16); }
.glass--purple { border-color: rgba(139,80,193,.36); box-shadow: 0 30px 70px -34px rgba(0,0,0,.9), 0 0 40px -12px rgba(139,80,193,.45), inset 0 1px 0 rgba(255,255,255,.16); }

.glass__bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: .55rem .95rem;
  font-family: var(--f-mono); font-size: .62rem;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-faint);
  background: rgba(0,0,0,.42);
  border-bottom: 1px solid var(--hair);
}
.glass__cap {
  margin: 0; padding: .6rem .95rem;
  font-family: var(--f-mono); font-size: .63rem;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-faint);
  background: rgba(0,0,0,.42);
  border-top: 1px solid var(--hair);
}

/* tilt is applied by JS via CSS vars, so reduced-motion can zero it out */
.tilt {
  transform: perspective(1000px)
             rotateX(var(--rx, 0deg))
             rotateY(var(--ry, 0deg))
             translateZ(0);
  transition: transform .5s cubic-bezier(.2,.8,.3,1);
}

/* ─── BUTTONS ──────────────────────────────────────────────
   One CTA label everywhere: "Get the indicators".            */

.btn {
  position: relative; display: inline-block;
  font-family: var(--f-display);
  font-size: .95rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  padding: 1.05rem 2.2rem;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  will-change: transform;
}
.btn__l { position: relative; z-index: 2; display: block; }

.btn--cta {
  color: var(--white);
  background: linear-gradient(100deg, var(--purple-deep), var(--purple) 45%, var(--magenta));
  box-shadow: var(--glow-purple), inset 0 1px 0 rgba(255,255,255,.22);
  transition: box-shadow .25s ease, filter .25s ease;
}
.btn--cta:hover { box-shadow: var(--glow-mag), inset 0 1px 0 rgba(255,255,255,.3); filter: brightness(1.09); }

.btn--ghost {
  color: var(--green);
  background: rgba(95,212,163,.06);
  border-color: rgba(95,212,163,.45);
  box-shadow: 0 0 14px rgba(95,212,163,.14);
  transition: background-color .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.btn--ghost:hover { background: rgba(95,212,163,.14); border-color: var(--green); box-shadow: var(--glow-green); }

.btn--sm { padding: .62rem 1.15rem; font-size: .78rem; border-radius: var(--r-sm); }
.btn--lg { padding: 1.25rem 3rem; font-size: 1.05rem; }

/* ─── REDUCED MOTION ───────────────────────────────────────
   The calm fallback: no parallax, no 3D, no particles.       */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  #scene { display: none !important; }
  .cur, .cur-ring { display: none !important; }
  .tilt { transform: none !important; }
  .glass::after { display: none; }
}
