/* ============================================
   NICOLE PINKHAM: POINTER EFFECTS (home page)
   Dot grid, sphere cursor, card tilt. Loaded by index.html only.
   Paired with js/pointer-effects.js.
============================================ */

:root {
  /* rgb triplets the canvas reads, from the Champagne, Strawberry and Navy palette */
  --fx-ink: 28, 43, 75;
  --fx-accent: 200, 71, 90;
  /* sphere cursor color ramp, top to bottom */
  --s1: 28, 43, 75;
  --s2: 102, 112, 138;
  --s3: 200, 71, 90;
  --s4: 222, 140, 150;
  --s5: 196, 158, 104;
  /* tilt settings */
  --tilt-perspective: 1000px;
  --tilt-follow: 400ms;
  --tilt-return: 1000ms;
  --tilt-glare-opacity: 0.32;
  --fx-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* home hero: transparent background so the dot grid shows through
   (scoped to the section so the assessment page's h1.hero keeps its own styling) */
section.hero { background: transparent; }

/* dot grid: fixed layer over the whole page, header included (nav is z-index 100) */
#npField {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 150;
  pointer-events: none;
  opacity: 0.75;
  transition: opacity 400ms ease;
}
#npField.is-quiet { opacity: 0.19; }   /* a quarter of the normal 0.75 */

/* custom cursor: a miniature hero sphere centered on the pointer */
.np-cursor-sphere {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2000;
  width: 72px;
  height: 72px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 150ms;
  will-change: transform;
}
html.has-custom-cursor, html.has-custom-cursor * { cursor: none !important; }
html.has-custom-cursor input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
html.has-custom-cursor textarea { cursor: text !important; }
html.has-custom-cursor select { cursor: auto !important; }

/* card tilt: uses the standalone rotate property so it stacks on top of the site's
   own fade-in and hover transforms instead of replacing them */
.np-tilt-host { perspective: var(--tilt-perspective); }
.np-tilt.np-tilt.np-tilt {
  rotate: var(--tilt-ax, 1) var(--tilt-ay, 0) 0 var(--tilt-a, 0deg);
  transition: rotate var(--tilt-return) var(--fx-ease-out), transform 0.5s ease-out, opacity 0.6s ease-out,
              border-color 0.4s var(--easing), box-shadow 0.4s var(--easing);
}
.np-tilt.np-tilt.np-tilt.is-tilting {
  transition: rotate var(--tilt-follow) var(--fx-ease-out), transform 0.5s ease-out, opacity 0.6s ease-out,
              border-color 0.4s var(--easing), box-shadow 0.4s var(--easing);
}
.np-glare-host { position: relative; overflow: hidden; }
.np-glare {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle 95px at var(--tilt-gx, 50%) var(--tilt-gy, 50%), rgba(255,255,255,0.48), rgba(255,255,255,0.06) 52%, rgba(255,255,255,0) 84%),
    radial-gradient(circle 200px at var(--tilt-gx, 50%) var(--tilt-gy, 50%), rgba(255,255,255,0.22), rgba(255,255,255,0.04) 58%, rgba(255,255,255,0) 78%),
    radial-gradient(circle 360px at var(--tilt-gx, 50%) var(--tilt-gy, 50%), rgba(255,255,255,0.10), rgba(255,255,255,0) 88%);
  transition: opacity 300ms var(--fx-ease-out);
}
.np-tilt.is-hover .np-glare { opacity: var(--tilt-glare-opacity); }

@media (max-width: 480px), (pointer: coarse) {
  .np-cursor-sphere { display: none; }
}
