/* =====================================================================
   CUSTOM CURSOR, "dot and circle": a red dot on the pointer and a thin circle trailing it.
   Active only when assets/js/shared/cursor-dot.js adds .has-dcursor to <html> (fine pointer, no reduced motion).
   The earlier viewfinder cursor is kept in shared/cursor.css + shared/cursor.js.
   ===================================================================== */
.has-dcursor, .has-dcursor * { cursor: none !important; }
/* text fields keep the native caret cursor (the custom one hides over them) */
.has-dcursor input, .has-dcursor textarea, .has-dcursor select, .has-dcursor [contenteditable="true"] { cursor: auto !important; }

.dcursor { position: fixed; left: 0; top: 0; z-index: 2147483000; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  --red: #FF1F5A; --ink: #0B1B3A; --ease: cubic-bezier(.3, 1.4, .45, 1); }
.has-dcursor.dcursor-on .dcursor { opacity: 1; }
.dcursor.is-field { opacity: 0 !important; }

/* the dot and the ring are 0x0 anchors moved by JS; their children are centred on them */
.dcursor__dot, .dcursor__ring { position: fixed; left: 0; top: 0; width: 0; height: 0; will-change: transform; }

/* dot */
.dcursor__core { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .55); transition: transform .3s var(--ease), background-color .3s ease; }

/* circle */
.dcursor__circle { --s: 38px; position: absolute; left: calc(var(--s) / -2); top: calc(var(--s) / -2); width: var(--s); height: var(--s);
  border-radius: 50%; border: 1.5px solid rgba(11, 27, 58, .45); background: rgba(255, 31, 90, 0);
  transition: width .4s var(--ease), height .4s var(--ease), left .4s var(--ease), top .4s var(--ease),
    border-color .3s ease, background-color .3s ease, transform .25s ease; }

/* click ripple */
.dcursor__ripple { position: absolute; left: -19px; top: -19px; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--red); opacity: 0; }
@keyframes dcursor-ripple { from { opacity: .8; transform: scale(.6); } to { opacity: 0; transform: scale(2); } }
.dcursor.is-click .dcursor__ripple { animation: dcursor-ripple .55s cubic-bezier(.2, .7, .3, 1) both; }

/* optional label, from a data-cursor="View" attribute on the hovered element */
.dcursor__label { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) scale(.6); white-space: nowrap;
  font: 700 .62rem/1 "DM Sans", system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #fff;
  opacity: 0; transition: opacity .25s ease, transform .35s var(--ease); }

/* over links and buttons: the circle grows and fills lightly, the dot shrinks into it */
.dcursor.is-link .dcursor__circle { --s: 62px; border-color: rgba(255, 31, 90, .7); background: rgba(255, 31, 90, .08); }
.dcursor.is-link .dcursor__core { transform: scale(.5); }

/* labelled targets: a solid red disc with the text inside */
.dcursor.is-label .dcursor__circle { --s: 84px; border-color: var(--red); background: rgba(255, 31, 90, .92); }
.dcursor.is-label .dcursor__label { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.dcursor.is-label .dcursor__core { transform: scale(0); }

/* pressed */
.dcursor.is-down .dcursor__circle { transform: scale(.82); }
.dcursor.is-down .dcursor__core { transform: scale(1.3); }

/* dark sections: white circle */
.dcursor.is-dark .dcursor__circle { border-color: rgba(255, 255, 255, .7); }
.dcursor.is-dark.is-link .dcursor__circle { border-color: #fff; background: rgba(255, 255, 255, .1); }
.dcursor.is-dark.is-label .dcursor__circle { border-color: var(--red); background: rgba(255, 31, 90, .92); }
.dcursor.is-dark .dcursor__ripple { border-color: #fff; }
