/* ============================================
   RAMEDIA CUSTOM CURSOR - TECH/GEOMETRIC AESTHETIC
   ============================================ */

/* Hide default cursor */
.ramedia-cursor-enabled,
.ramedia-cursor-enabled * {
    cursor: none !important;
}

/* Main cursor container */
.ramedia-cursor {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 999999;
    mix-blend-mode: difference;
}

/* Inner dot */
.ramedia-cursor-dot {
    position: absolute;
    width: 0.5rem;
    height: 0.5rem;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease, background 0.2s ease;
}

/* Outer ring */
.ramedia-cursor-ring {
    position: absolute;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease-out, width 0.3s ease, height 0.3s ease, border-color 0.2s ease, opacity 0.2s ease;
}

/* Crosshair lines */
.ramedia-cursor-cross {
    position: absolute;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.ramedia-cursor-cross-h,
.ramedia-cursor-cross-v {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
}

.ramedia-cursor-cross-h {
    width: 1.25rem;
    height: 1px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ramedia-cursor-cross-v {
    width: 1px;
    height: 1.25rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Corner brackets */
.ramedia-cursor-bracket {
    position: absolute;
    width: 3.75rem;
    height: 3.75rem;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.ramedia-cursor-bracket::before,
.ramedia-cursor-bracket::after,
.ramedia-cursor-bracket span::before,
.ramedia-cursor-bracket span::after {
    content: '';
    position: absolute;
    width: 0.5rem;
    height: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.ramedia-cursor-bracket::before {
    top: 0; left: 0;
    border-right: none; border-bottom: none;
}

.ramedia-cursor-bracket::after {
    top: 0; right: 0;
    border-left: none; border-bottom: none;
}

.ramedia-cursor-bracket span::before {
    bottom: 0; left: 0;
    border-right: none; border-top: none;
}

.ramedia-cursor-bracket span::after {
    bottom: 0; right: 0;
    border-left: none; border-top: none;
}

/* Trail container */
.ramedia-cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 999998;
}

.ramedia-cursor-particle {
    position: absolute;
    width: 0.25rem;
    height: 0.25rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.1s ease;
}

/* ============================================
   HOVER STATES
   ============================================ */

/* Hovering over clickable elements */
.ramedia-cursor.hovering .ramedia-cursor-dot {
    transform: translate(-50%, -50%) scale(0.5);
    background: transparent;
    border: 2px solid #fff;
    width: 0.75rem;
    height: 0.75rem;
}

.ramedia-cursor.hovering .ramedia-cursor-ring {
    width: 3.75rem;
    height: 3.75rem;
    border-color: rgba(255, 255, 255, 0.8);
}

.ramedia-cursor.hovering .ramedia-cursor-cross {
    opacity: 1;
}

.ramedia-cursor.hovering .ramedia-cursor-cross-h { width: 1.875rem; }
.ramedia-cursor.hovering .ramedia-cursor-cross-v { height: 1.875rem; }

/* Text hover */
.ramedia-cursor.text-hover .ramedia-cursor-dot {
    width: 0.1875rem;
    height: 1.5rem;
    border-radius: 2px;
    background: #fff;
}

.ramedia-cursor.text-hover .ramedia-cursor-ring {
    opacity: 0;
}

/* Media/image hover */
.ramedia-cursor.media-hover .ramedia-cursor-dot {
    transform: translate(-50%, -50%) scale(0);
}

.ramedia-cursor.media-hover .ramedia-cursor-ring {
    width: 5rem;
    height: 5rem;
    border-width: 2px;
}

.ramedia-cursor.media-hover .ramedia-cursor-bracket {
    opacity: 1;
    width: 5rem;
    height: 5rem;
}

/* Clicking state */
.ramedia-cursor.clicking .ramedia-cursor-dot {
    transform: translate(-50%, -50%) scale(2);
}

.ramedia-cursor.clicking .ramedia-cursor-ring {
    transform: translate(-50%, -50%) scale(0.8);
}

/* Hidden state */
.ramedia-cursor.hidden {
    opacity: 0;
}

/* View project cursor */
.ramedia-cursor.view-project .ramedia-cursor-dot {
    width: 5rem;
    height: 5rem;
    background: #fff;
    border-radius: 50%;
}

.ramedia-cursor.view-project .ramedia-cursor-ring {
    opacity: 0;
}

.ramedia-cursor.view-project::after {
    content: 'VIEW';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #000;
    mix-blend-mode: normal;
}

/* Dragging cursor */
.ramedia-cursor.dragging .ramedia-cursor-dot {
    width: 3.75rem;
    height: 3.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.ramedia-cursor.dragging .ramedia-cursor-ring {
    opacity: 0;
}

.ramedia-cursor.dragging::after {
    content: 'DRAG';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: #fff;
}

/* Glitch effect */
.ramedia-cursor.glitch .ramedia-cursor-dot {
    animation: cursorGlitch 0.3s steps(2) infinite;
}

@keyframes cursorGlitch {
    0%, 100% { transform: translate(-50%, -50%); filter: none; }
    25% { transform: translate(calc(-50% + 2px), calc(-50% - 1px)); filter: hue-rotate(90deg); }
    50% { transform: translate(calc(-50% - 2px), calc(-50% + 1px)); filter: hue-rotate(-90deg); }
    75% { transform: translate(calc(-50% + 1px), calc(-50% + 2px)); filter: none; }
}

/* Cursor label */
.ramedia-cursor-label {
    position: absolute;
    top: 50%;
    left: calc(100% + 0.9375rem);
    transform: translateY(-50%);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: #fff;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.ramedia-cursor.show-label .ramedia-cursor-label {
    opacity: 1;
}

/* Mobile - disable custom cursor */
@media (max-width: 768px), (hover: none), (pointer: coarse) {
    .ramedia-cursor,
    .ramedia-cursor-trail {
        display: none !important;
    }
    .ramedia-cursor-enabled,
    .ramedia-cursor-enabled * {
        cursor: auto !important;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .ramedia-cursor-ring,
    .ramedia-cursor-dot {
        transition: none !important;
    }
    .ramedia-cursor.glitch .ramedia-cursor-dot {
        animation: none;
    }
}