/* Global transitions + shared effects (Barba / View Transitions) */

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.55s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Cursor trail segments (Postnov-inspired) */
.trail-segment {
  position: fixed;
  pointer-events: none;
  z-index: 99998;
  border-radius: 1px;
  will-change: opacity, transform;
  mix-blend-mode: screen;
}

/* Hide system cursor when custom trail is active — only animated cursor remains */
@media (hover: hover) and (pointer: fine) {
  html.has-cursor-trail,
  html.has-cursor-trail * {
    cursor: none !important;
  }
  /* Keep text caret on form fields */
  html.has-cursor-trail input,
  html.has-cursor-trail textarea,
  html.has-cursor-trail select,
  html.has-cursor-trail [contenteditable="true"] {
    cursor: text !important;
  }
}

.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: rgba(255, 80, 100, 0.95);
  box-shadow: 0 0 12px rgba(255, 60, 80, 0.75), 0 0 2px #fff;
  pointer-events: none;
  z-index: 99999;
  mix-blend-mode: screen;
  opacity: 0;
  transition: transform 0.12s ease, opacity 0.2s ease;
}
.cursor-dot.is-ready { opacity: 1; }
.cursor-dot.is-down {
  transform: scale(0.65);
  opacity: 0.7;
}
.cursor-ring {
  position: fixed;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  border: 1px solid rgba(90, 210, 255, 0.55);
  box-shadow: 0 0 16px rgba(90, 210, 255, 0.25);
  pointer-events: none;
  z-index: 99999;
  mix-blend-mode: screen;
  opacity: 0;
  transition: width 0.2s ease, height 0.2s ease, margin 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.cursor-ring.is-ready { opacity: 1; }
.cursor-ring.is-hover {
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  border-color: rgba(255, 90, 110, 0.65);
}

/* Story reveal helpers during cosmic handoff */
.story-reveal-prep {
  opacity: 0 !important;
  filter: blur(14px);
  transform: translateY(32px) scale(0.98);
  will-change: opacity, transform, filter;
}
