/* Custom Animations */
@keyframes loading-lens-spin {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-20deg); }
    100% { transform: rotate(0deg); }
}

#loading-lens {
    animation: loading-lens-spin 3s ease-in-out infinite;
}

@keyframes animate-camera-shutter {
    0% { transform: translateY(0) scale(1); }
    25% { transform: translateY(4px) scale(0.98); }
    75% { transform: translateY(-2px) scale(1); }
    100% { transform: translateY(0) scale(1); }
}

.animate-camera-shutter {
    animation: animate-camera-shutter 0.15s forwards;
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-scale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounce-custom {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

.animate-fade-in-up {
    animation: fade-in-up 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in-up-delay {
    opacity: 0;
    animation: fade-in-scale 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

.animate-fade-in-delay-long {
    opacity: 0;
    animation: fade-in 1s ease-out 1.5s forwards;
}

.animate-bounce-custom {
    animation: bounce-custom 2s ease-in-out infinite;
}

/* Global Custom Cursor */
#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  background-color: #ED2127;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: normal;
  transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
  will-change: transform;
  opacity: 0;
}

#custom-cursor.cursor-active {
  opacity: 0.6;
}

#custom-cursor.cursor-hover {
  width: 40px;
  height: 40px;
  background-color: transparent;
  border: 1px solid #ED2127;
  opacity: 1;
}
@keyframes text-glow { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } } .text-glow-animated { background: linear-gradient(to right, #ea580c, #eab308, #22c55e, #06b6d4, #3b82f6, #a855f7, #ea580c); background-size: 200% auto; color: transparent; -webkit-background-clip: text; background-clip: text; animation: text-glow 4s linear infinite; filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.15)); }

/* Portfolio Hover Effects */
.portfolio-item iframe {
    pointer-events: none; /* Prevent any direct interaction with YouTube native UI */
    /* Scale up slightly to crop out YouTube logo/title bar; parent has overflow:hidden */
    width: 110% !important;
    height: 110% !important;
    position: absolute;
    top: -5%;
    left: -5%;
}

/* Transparent overlay to block YouTube native controls from flashing */
.portfolio-item .yt-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: transparent;
    cursor: default;
}

/* Force hide the custom cursor when any portfolio item is hovered to prevent it sticking at the iframe edge */
body:has(.portfolio-item:hover) #custom-cursor {
    opacity: 0 !important;
    visibility: hidden;
}

/* Loading Sequence Animations */
@keyframes animate-flash-fill {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0); }
    15% { opacity: 1; transform: translate(-50%, -50%) scale(2); }
    40% { opacity: 1; transform: translate(-50%, -50%) scale(60); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(60); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(60); }
}

.animate-flash-fill {
    animation: animate-flash-fill 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Video Loading Transitions */
.video-placeholder iframe {
    opacity: 0;
    transition: opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.video-placeholder iframe.playing {
    opacity: 1 !important;
}

.video-placeholder .thumbnail {
    transition: opacity 1.2s ease-out;
}

/* --- Premium Experience UI --- */

/* Staggered Reveal Observer Classes */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: opacity 0.8s cubic-bezier(0.2, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.2, 0, 0.2, 1);
    will-change: transform, opacity;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Portfolio Filter Tags */
.filter-container {
    padding-top: 2rem;
    padding-bottom: 3rem;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.filter-container::-webkit-scrollbar { display: none; }

.filter-chip {
    padding: 0.6rem 1.5rem;
    border-radius: 2px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    cursor: pointer;
}

.filter-chip:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.05);
}

.filter-chip.active {
    background: #ED2127;
    border-color: #ED2127;
    color: #fff;
    box-shadow: 0 4px 20px rgba(237, 33, 39, 0.3);
}

/* Dynamic Grid Item Hover */
.portfolio-batch-item {
    transition: transform 0.6s cubic-bezier(0.2, 0, 0.2, 1);
}

.portfolio-batch-item:hover {
    transform: translateY(-8px);
}

/* Custom Magnetic Pointer Feedback */
.magnetic-text {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1);
}

/* Smooth Hero Parallax Placeholder */
.parallax-hero {
    will-change: transform;
}
