/* =====================================================================
   POINT OF VIEW — Cursor follower (user side only)
   ---------------------------------------------------------------------
   A small "Orange Sunset" dot + a faint halo that trail the real mouse
   pointer. The native cursor stays visible. Created by public/js/cursor-follow.js
   (it builds the element, so nothing is added on touch screens or with
   prefers-reduced-motion). Only transform + opacity animate.
   ===================================================================== */

/* ---------------------------------------------------------------------
   CONTROLS
   --------------------------------------------------------------------- */
:root {
  --cursor-size: 18px;               /* main dot */
  --cursor-halo-size: 44px;          /* soft trail behind it */
  --cursor-opacity: 0.8;             /* dot opacity at rest */
  --cursor-halo-color: rgba(255, 107, 53, 0.12);
  --cursor-hover-scale: 2.2;         /* over links, buttons, cards, tabs, chips */
  --cursor-hover-opacity: 0.35;
  --cursor-text-scale: 0.6;          /* over text inputs / textareas */
  --cursor-text-opacity: 0.4;
  --cursor-logo-opacity: 0.3;        /* over the logo eye, so the eye stays the focus */
  --cursor-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* Lerp speeds (how quickly dot / halo catch up) are JS constants: DOT_LERP, HALO_LERP in cursor-follow.js */

/* ---------------------------------------------------------------------
   Structure: the outer *-pos elements are moved by JS (translate3d),
   the inner elements are scaled / faded by CSS, so the two never fight.
   --------------------------------------------------------------------- */
.pov-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 0;
  height: 0;
  pointer-events: none;           /* never blocks clicks or text selection */
  mix-blend-mode: screen;         /* brightens instead of covering → text stays readable */
  opacity: 0;
  transition: opacity 0.3s ease;
}
.pov-cursor.is-visible { opacity: 1; }

.pov-cursor__pos {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
}

.pov-cursor__dot,
.pov-cursor__halo,
.pov-cursor__ripple {
  position: absolute;
  border-radius: 50%;
  transition: transform 0.35s var(--cursor-spring), opacity 0.25s ease;
}

.pov-cursor__dot {
  width: var(--cursor-size);
  height: var(--cursor-size);
  left: calc(var(--cursor-size) / -2);   /* centre the circle on the pointer */
  top: calc(var(--cursor-size) / -2);
  background: radial-gradient(circle at 50% 50%, #ff9f6b 0%, #ff6b35 100%);
  box-shadow: 0 0 18px rgba(255, 107, 53, 0.45);
  opacity: var(--cursor-opacity);
}

.pov-cursor__halo {
  width: var(--cursor-halo-size);
  height: var(--cursor-halo-size);
  left: calc(var(--cursor-halo-size) / -2);
  top: calc(var(--cursor-halo-size) / -2);
  background: var(--cursor-halo-color);
}

/* ---------------------------------------------------------------------
   States (classes set by cursor-follow.js)
   --------------------------------------------------------------------- */
.pov-cursor.is-hover .pov-cursor__dot { transform: scale(var(--cursor-hover-scale)); opacity: var(--cursor-hover-opacity); }
.pov-cursor.is-hover .pov-cursor__halo { transform: scale(0.8); }

.pov-cursor.is-text .pov-cursor__dot { transform: scale(var(--cursor-text-scale)); opacity: var(--cursor-text-opacity); }
.pov-cursor.is-text .pov-cursor__halo { transform: scale(0.6); opacity: 0.5; }

.pov-cursor.is-logo .pov-cursor__dot { opacity: var(--cursor-logo-opacity); }
.pov-cursor.is-logo .pov-cursor__halo { opacity: 0.4; }

/* mousedown: quick squeeze (wins over hover / text scale) */
.pov-cursor.is-down .pov-cursor__dot { transform: scale(0.7); transition-duration: 0.12s, 0.12s; }

/* mouseup: expanding ripple ring */
.pov-cursor__ripple {
  width: var(--cursor-size);
  height: var(--cursor-size);
  left: calc(var(--cursor-size) / -2);
  top: calc(var(--cursor-size) / -2);
  border: 2px solid #ff6b35;
  opacity: 0;
}
.pov-cursor.is-rippling .pov-cursor__ripple { animation: pov-cursor-ripple 0.5s ease-out both; }
@keyframes pov-cursor-ripple {
  from { opacity: 0.9; transform: scale(1); }
  to   { opacity: 0;   transform: scale(3.2); }
}

/* ---------------------------------------------------------------------
   Off on touch / no-hover devices and with reduced motion
   (the JS also skips creating the element in these cases)
   --------------------------------------------------------------------- */
@media (hover: none), (pointer: coarse) {
  .pov-cursor { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pov-cursor { display: none; }
}
