/**
 * Aurora v5.0 — Premium Motion System
 * Inspired by Apple News, Linear, Arc Browser, The Verge, Bloomberg
 */

/* === SCROLL REVEAL === */
.aurora-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 700ms var(--ease-out-expo), transform 700ms var(--ease-out-expo);
    will-change: opacity, transform;
}
.aurora-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.aurora-reveal--scale {
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 600ms var(--ease-out-quart), transform 600ms var(--ease-out-quart);
}
.aurora-reveal--scale.is-visible {
    opacity: 1;
    transform: scale(1);
}
.aurora-reveal--slide-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 700ms var(--ease-out-expo), transform 700ms var(--ease-out-expo);
}
.aurora-reveal--slide-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 700ms var(--ease-out-expo), transform 700ms var(--ease-out-expo);
}
.aurora-reveal--slide-left.is-visible,
.aurora-reveal--slide-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* === STAGGER ANIMATION === */
.aurora-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms var(--ease-out-expo), transform 600ms var(--ease-out-expo);
}
.aurora-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms;  opacity:1; transform:translateY(0); }
.aurora-stagger.is-visible > *:nth-child(2) { transition-delay: 80ms; opacity:1; transform:translateY(0); }
.aurora-stagger.is-visible > *:nth-child(3) { transition-delay: 160ms; opacity:1; transform:translateY(0); }
.aurora-stagger.is-visible > *:nth-child(4) { transition-delay: 240ms; opacity:1; transform:translateY(0); }
.aurora-stagger.is-visible > *:nth-child(5) { transition-delay: 320ms; opacity:1; transform:translateY(0); }
.aurora-stagger.is-visible > *:nth-child(6) { transition-delay: 400ms; opacity:1; transform:translateY(0); }
.aurora-stagger.is-visible > *:nth-child(7) { transition-delay: 480ms; opacity:1; transform:translateY(0); }
.aurora-stagger.is-visible > *:nth-child(8) { transition-delay: 560ms; opacity:1; transform:translateY(0); }
.aurora-stagger.is-visible > *:nth-child(n+9) { transition-delay: 640ms; opacity:1; transform:translateY(0); }

/* === CINEMATIC HOVER === */
.aurora-cinematic-card {
    position: relative;
    transition: transform 500ms var(--ease-out-quart), box-shadow 500ms var(--ease-out-quart);
    will-change: transform;
    transform-origin: center bottom;
}
.aurora-cinematic-card:hover {
    transform: translateY(-8px) scale(1.015);
    box-shadow: 0 30px 60px -20px rgba(15, 15, 25, 0.18);
}
.aurora-cinematic-card .aurora-cinematic-card__image {
    overflow: hidden;
    position: relative;
}
.aurora-cinematic-card .aurora-cinematic-card__image img {
    transition: transform 800ms var(--ease-out-expo), filter 600ms;
    will-change: transform;
}
.aurora-cinematic-card:hover .aurora-cinematic-card__image img {
    transform: scale(1.08);
}

/* === MAGNETIC BUTTONS === */
.aurora-magnetic {
    transition: transform 250ms var(--ease-spring);
    will-change: transform;
}

/* === SKELETON LOADER (Apple style) === */
.aurora-skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 25%,
        var(--bg-tertiary) 37%,
        var(--bg-secondary) 63%
    );
    background-size: 400% 100%;
    animation: aurora-skeleton 1.4s ease-in-out infinite;
    border-radius: 8px;
}
@keyframes aurora-skeleton {
    0%   { background-position: 100% 50%; }
    100% { background-position: -100% 50%; }
}
.aurora-skeleton--text { height: 14px; margin: 8px 0; }
.aurora-skeleton--title { height: 24px; width: 70%; }
.aurora-skeleton--image { aspect-ratio: 16/10; }
.aurora-skeleton--circle { border-radius: 50%; }

/* === STICKY NAVIGATION (Smart hide/show) === */
.novara-header {
    transition: transform 400ms var(--ease-out-expo), background 300ms ease, box-shadow 300ms ease;
    will-change: transform;
}
.novara-header.is-hidden {
    transform: translateY(-100%);
}
.novara-header.is-condensed {
    background: var(--bg-glass);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* === CINEMATIC PAGE TRANSITION === */
.aurora-page-transition {
    position: fixed;
    inset: 0;
    background: var(--novara-crimson);
    z-index: 99999;
    transform: scaleY(0);
    transform-origin: bottom;
    pointer-events: none;
    transition: transform 600ms var(--ease-in-out-quart);
}
.aurora-page-transition.is-active {
    transform: scaleY(1);
    transform-origin: top;
}

/* === FOCUS RING (Linear style) === */
.aurora-focus:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--bg-primary), 0 0 0 5px var(--novara-crimson);
    border-radius: var(--radius-md);
}

/* === SHIMMER ON HOVER (Apple) === */
.aurora-shimmer {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.aurora-shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        transparent 35%,
        rgba(255, 255, 255, 0.15) 50%,
        transparent 65%
    );
    transform: translateX(-100%);
    transition: transform 800ms var(--ease-out-quart);
    pointer-events: none;
}
.aurora-shimmer:hover::after {
    transform: translateX(100%);
}

/* === PARALLAX SUPPORT === */
.aurora-parallax {
    will-change: transform;
}

/* === FLOATING DOCK (like Arc Browser) === */
.aurora-dock {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-glass);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 8px;
    display: flex;
    gap: 6px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: all 500ms var(--ease-spring);
}
.aurora-dock.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.aurora-dock__item {
    width: 44px; height: 44px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 250ms var(--ease-spring);
    border: none;
}
.aurora-dock__item:hover {
    background: var(--novara-crimson);
    color: white;
    transform: translateY(-4px) scale(1.08);
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    .aurora-reveal, .aurora-reveal--scale, .aurora-reveal--slide-left, .aurora-reveal--slide-right,
    .aurora-stagger > *, .aurora-cinematic-card, .aurora-skeleton,
    .aurora-page-transition, .aurora-shimmer::after {
        animation: none !important;
        transition: none !important;
    }
    .aurora-reveal, .aurora-reveal--scale,
    .aurora-reveal--slide-left, .aurora-reveal--slide-right,
    .aurora-stagger > * {
        opacity: 1 !important;
        transform: none !important;
    }
}
