/* ============================================================================
   RHP POLISH LAYER — the "not vibe-coded" pass
   Additive only. Scoped, reduced-motion-safe, touch-safe. Loads on top of
   style.css without touching it. Kills the flat-template feel with:
   texture (film grain), depth (vignette + layered shadow), motion
   (scroll-reveal + magnetic), a custom cursor, and kinetic brand type.
   ========================================================================== */

/* ── 1. FILM GRAIN — fixed, full-viewport, barely-there texture ─────────── */
.rhp-grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* ── 2. VIGNETTE — depth at the edges, draws the eye to center ──────────── */
.rhp-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 38%, transparent 55%, rgba(2, 8, 16, 0.55) 100%);
}

/* ── 3. SCROLL-REVEAL — content rises + fades into place ────────────────── */
.rhp-reveal {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.rhp-reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ── 4. CUSTOM CURSOR — a gold reticle that breathes on interactive els ─── */
.rhp-cursor-dot,
.rhp-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
}
.rhp-cursor-dot {
  width: 6px;
  height: 6px;
  background: #e8c97a;
}
.rhp-cursor-ring {
  width: 30px;
  height: 30px;
  border: 1.5px solid rgba(201, 168, 76, 0.7);
  transition: width 0.18s ease, height 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.rhp-cursor-ring.is-hot {
  width: 46px;
  height: 46px;
  border-color: rgba(232, 201, 122, 0.95);
  background: rgba(201, 168, 76, 0.10);
}
/* hide the OS cursor only when ours is active (desktop + fine pointer) */
body.rhp-has-cursor,
body.rhp-has-cursor a,
body.rhp-has-cursor button { cursor: none; }

/* ── 5. MAGNETIC / TILT — premium micro-interaction on CTAs + cards ─────── */
.rhp-magnetic {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.rhp-tilt {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

/* ── 6. KINETIC BRAND TYPE — the wordmark sweeps in, letter by letter ───── */
.rhp-kinetic { display: inline-block; }
.rhp-kinetic .rhp-ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5em) rotate(6deg);
  animation: rhp-ch-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes rhp-ch-in {
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

/* ── 7. SECTION HAIRLINE — a thin gold rule that draws itself on reveal ─── */
.rhp-reveal .rhp-rule { transform: scaleX(0); transform-origin: left; }
.rhp-reveal.is-in .rhp-rule {
  transform: scaleX(1);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

/* ── Touch + reduced-motion: strip motion + cursor, keep content visible ── */
@media (hover: none), (pointer: coarse) {
  .rhp-cursor-dot, .rhp-cursor-ring { display: none !important; }
  body.rhp-has-cursor, body.rhp-has-cursor a, body.rhp-has-cursor button { cursor: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .rhp-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .rhp-kinetic .rhp-ch { opacity: 1 !important; transform: none !important; animation: none !important; }
  .rhp-magnetic, .rhp-tilt { transition: none !important; transform: none !important; }
  .rhp-cursor-dot, .rhp-cursor-ring { display: none !important; }
}
body.mode-reduced-motion .rhp-reveal { opacity: 1 !important; transform: none !important; }
body.mode-reduced-motion .rhp-kinetic .rhp-ch { opacity: 1 !important; transform: none !important; animation: none !important; }
