/* ============================================
   NOBLE.PARTS - Premium Animations & Effects
   Advanced Micro-interactions System
   ============================================ */

/* ============================================
   Premium Page Loader
   ============================================ */
.page-loader {
    position: fixed;
    inset: 0;
    background: var(--darker);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.8s var(--ease-out-expo), visibility 0.8s var(--ease-out-expo);
}

.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.loader-logo {
    width: 100px;
    height: auto;
    animation: loaderPulse 2s var(--ease-in-out-circ) infinite;
    filter: drop-shadow(0 0 30px rgba(232, 224, 0, 0.3));
}

.loader-bar {
    width: 180px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.loader-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--noble-yellow), var(--noble-yellow-light));
    border-radius: 100px;
    animation: loaderBar 1.5s var(--ease-out-expo) infinite;
}

.loader-text {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: rgba(255, 255, 255, 0.4);
    animation: loaderTextFade 1.5s ease-in-out infinite;
}

@keyframes loaderPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(232, 224, 0, 0.2));
    }
    50% {
        transform: scale(1.08);
        filter: drop-shadow(0 0 40px rgba(232, 224, 0, 0.5));
    }
}

@keyframes loaderBar {
    0% {
        width: 0%;
        margin-left: 0%;
    }
    50% {
        width: 60%;
        margin-left: 20%;
    }
    100% {
        width: 0%;
        margin-left: 100%;
    }
}

@keyframes loaderTextFade {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* ============================================
   Page Transition Overlay
   ============================================ */
.page-transition {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}

.page-transition-layer {
    position: absolute;
    inset: 0;
    transform: translateY(100%);
    transition: transform 0.7s var(--ease-in-out-circ);
}

.page-transition-layer:nth-child(1) {
    background: var(--noble-yellow);
}

.page-transition-layer:nth-child(2) {
    background: var(--charcoal);
    transition-delay: 0.08s;
}

.page-transition-layer:nth-child(3) {
    background: var(--darker);
    transition-delay: 0.16s;
}

.page-transition.entering .page-transition-layer {
    transform: translateY(0);
}

.page-transition.leaving .page-transition-layer {
    transform: translateY(-100%);
}

/* ============================================
   Cursor Glow Effect
   ============================================ */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(
        circle,
        rgba(232, 224, 0, 0.08) 0%,
        rgba(232, 224, 0, 0.02) 40%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 9997;
    transform: translate(-50%, -50%);
    transition: opacity 0.4s ease;
    opacity: 0;
    mix-blend-mode: screen;
}

body:hover .cursor-glow {
    opacity: 1;
}

/* ============================================
   Enhanced Hero Section
   ============================================ */
.hero-enhanced {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--darker);
}

.hero-enhanced::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 100% 60% at 50% 100%, rgba(232, 224, 0, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 80% 50% at 80% 20%, rgba(232, 224, 0, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 50% 80% at 10% 80%, rgba(232, 224, 0, 0.04) 0%, transparent 50%);
    animation: heroGlow 12s ease-in-out infinite alternate;
}

.hero-enhanced::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.015) 1px, transparent 0);
    background-size: 50px 50px;
}

@keyframes heroGlow {
    0% {
        opacity: 0.5;
        transform: scale(1) rotate(0deg);
    }
    100% {
        opacity: 1;
        transform: scale(1.05) rotate(1deg);
    }
}

/* Floating Elements */
.hero-float-element {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        rgba(232, 224, 0, 0.08) 0%,
        rgba(232, 224, 0, 0.02) 50%,
        transparent 100%
    );
    animation: heroFloat 8s ease-in-out infinite;
    filter: blur(1px);
}

.hero-float-element:nth-child(1) {
    width: 500px;
    height: 500px;
    right: -150px;
    top: 10%;
    animation-delay: 0s;
}

.hero-float-element:nth-child(2) {
    width: 300px;
    height: 300px;
    left: 5%;
    bottom: 15%;
    animation-delay: -2.5s;
}

.hero-float-element:nth-child(3) {
    width: 200px;
    height: 200px;
    right: 25%;
    bottom: 5%;
    animation-delay: -5s;
}

@keyframes heroFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
    33% {
        transform: translateY(-30px) rotate(3deg) scale(1.02);
    }
    66% {
        transform: translateY(-15px) rotate(-2deg) scale(0.98);
    }
}

/* Hero Title Animation */
.hero-title-animated {
    overflow: hidden;
}

.hero-title-animated .line {
    display: block;
    overflow: hidden;
}

.hero-title-animated .line-inner {
    display: block;
    transform: translateY(110%);
    animation: heroSlideUp 1s var(--ease-out-expo) forwards;
}

.hero-title-animated .line:nth-child(2) .line-inner {
    animation-delay: 0.12s;
}

.hero-title-animated .line:nth-child(3) .line-inner {
    animation-delay: 0.24s;
}

@keyframes heroSlideUp {
    to {
        transform: translateY(0);
    }
}

/* ============================================
   Marquee / Ticker
   ============================================ */
.marquee {
    overflow: hidden;
    white-space: nowrap;
    background: linear-gradient(90deg, var(--noble-yellow) 0%, var(--noble-yellow-light) 50%, var(--noble-yellow) 100%);
    padding: 1rem 0;
    position: relative;
}

.marquee::before,
.marquee::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
}

.marquee::before {
    left: 0;
    background: linear-gradient(90deg, var(--noble-yellow), transparent);
}

.marquee::after {
    right: 0;
    background: linear-gradient(-90deg, var(--noble-yellow), transparent);
}

.marquee-content {
    display: inline-flex;
    animation: marqueeScroll 40s linear infinite;
}

.marquee-content span {
    display: inline-flex;
    align-items: center;
    padding: 0 3rem;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--darker);
}

.marquee-content span::before {
    content: '◆';
    margin-right: 2rem;
    font-size: 0.6rem;
    opacity: 0.5;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   Scroll-Triggered Animations
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(80px);
    transition: all 1s var(--ease-out-expo);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-80px);
    transition: all 1s var(--ease-out-expo);
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(80px);
    transition: all 1s var(--ease-out-expo);
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.85);
    transition: all 1s var(--ease-out-expo);
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger reveals */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s var(--ease-out-expo);
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.3s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.4s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.5s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.6s; }
.reveal-stagger.visible > *:nth-child(7) { transition-delay: 0.7s; }
.reveal-stagger.visible > *:nth-child(8) { transition-delay: 0.8s; }

.reveal-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Enhanced Product Cards
   ============================================ */
.product-card-enhanced {
    position: relative;
    background: linear-gradient(
        165deg,
        rgba(44, 44, 46, 0.6) 0%,
        rgba(28, 28, 30, 0.9) 100%
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    transition: all 0.6s var(--ease-out-expo);
}

.product-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    pointer-events: none;
}

.product-card-enhanced::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 80% 60% at 50% 0%,
        rgba(232, 224, 0, 0.08) 0%,
        transparent 60%
    );
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.product-card-enhanced:hover {
    transform: translateY(-16px) scale(1.02);
    border-color: rgba(232, 224, 0, 0.4);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.4),
        0 0 50px rgba(232, 224, 0, 0.15);
}

.product-card-enhanced:hover::after {
    opacity: 1;
}

.product-card-enhanced .product-image {
    transition: transform 0.8s var(--ease-out-expo);
}

.product-card-enhanced:hover .product-image {
    transform: scale(1.12) rotate(-3deg);
}

/* ============================================
   Big Bold Text
   ============================================ */
.big-text {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 12vw, 9rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: var(--white);
}

.big-text span {
    background: linear-gradient(135deg, var(--noble-yellow) 0%, var(--noble-yellow-light) 50%, var(--noble-gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.outline-text {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 12vw, 9rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: transparent;
    -webkit-text-stroke: 2px var(--noble-yellow);
    transition: all 0.5s var(--ease-out-expo);
}

.outline-text:hover {
    color: var(--noble-yellow);
    -webkit-text-stroke: 2px transparent;
    text-shadow: 0 0 40px rgba(232, 224, 0, 0.5);
}

/* ============================================
   Magnetic Buttons
   ============================================ */
.btn-magnetic {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 2.5rem;
    background: linear-gradient(135deg, var(--noble-yellow) 0%, var(--noble-yellow-dark) 100%);
    color: var(--darker);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.5s var(--ease-out-expo);
}

.btn-magnetic::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--white) 0%, rgba(255, 255, 255, 0.8) 100%);
    transform: translateY(100%);
    transition: transform 0.5s var(--ease-out-expo);
}

.btn-magnetic span {
    position: relative;
    z-index: 1;
}

.btn-magnetic:hover {
    transform: scale(1.05);
    box-shadow: 
        0 20px 40px rgba(232, 224, 0, 0.25),
        0 0 0 1px rgba(232, 224, 0, 0.5);
}

.btn-magnetic:hover::before {
    transform: translateY(0);
}

/* Outline Button */
.btn-outline-animated {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 2.5rem;
    background: transparent;
    color: var(--noble-yellow);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 2px solid var(--noble-yellow);
    border-radius: 100px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.5s var(--ease-out-expo);
}

.btn-outline-animated::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--noble-yellow);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s var(--ease-out-expo);
}

.btn-outline-animated span {
    position: relative;
    z-index: 1;
    transition: color 0.5s ease;
}

.btn-outline-animated:hover {
    box-shadow: 0 0 30px rgba(232, 224, 0, 0.3);
}

.btn-outline-animated:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.btn-outline-animated:hover span {
    color: var(--darker);
}

/* ============================================
   Split Screen Layout
   ============================================ */
.split-screen {
    display: grid;
    grid-template-columns: 1fr;
    min-height: auto;
}

@media (min-width: 768px) {
    .split-screen {
        grid-template-columns: 1fr 1fr;
        min-height: 70vh;
    }
}

.split-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-12) var(--space-8);
    background: var(--darker);
}

.split-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-12) var(--space-8);
    background: linear-gradient(
        135deg,
        var(--charcoal) 0%,
        rgba(232, 224, 0, 0.05) 100%
    );
    position: relative;
    overflow: hidden;
}

/* ============================================
   Enhanced Stats
   ============================================ */
.stat-large {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--noble-yellow) 0%, var(--noble-yellow-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 0.75rem;
    font-weight: 500;
}

/* ============================================
   Image Reveal Effect
   ============================================ */
.image-reveal {
    position: relative;
    overflow: hidden;
}

.image-reveal::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--noble-yellow);
    transform: scaleX(1);
    transform-origin: right;
    transition: transform 1.2s var(--ease-out-expo);
}

.image-reveal.revealed::after {
    transform: scaleX(0);
}

.image-reveal img {
    transform: scale(1.3);
    transition: transform 1.4s var(--ease-out-expo) 0.2s;
}

.image-reveal.revealed img {
    transform: scale(1);
}

/* ============================================
   Gradient Borders
   ============================================ */
.gradient-border {
    position: relative;
    background: var(--darker);
    border-radius: var(--radius-2xl);
    padding: 2px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        var(--noble-yellow) 0%,
        rgba(232, 224, 0, 0.3) 25%,
        transparent 50%,
        rgba(232, 224, 0, 0.3) 75%,
        var(--noble-yellow) 100%
    );
    background-size: 300% 300%;
    z-index: -1;
    animation: gradientBorderRotate 6s linear infinite;
}

.gradient-border-inner {
    background: var(--darker);
    border-radius: calc(var(--radius-2xl) - 2px);
    padding: var(--space-8);
}

@keyframes gradientBorderRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============================================
   Scroll Indicator
   ============================================ */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--gray-500);
    font-family: var(--font-heading);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    animation: scrollBounce 2.5s ease-in-out infinite;
}

.scroll-indicator::after {
    content: '';
    width: 1px;
    height: 50px;
    background: linear-gradient(
        to bottom,
        var(--noble-yellow) 0%,
        rgba(232, 224, 0, 0.3) 50%,
        transparent 100%
    );
}

@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-12px);
    }
    60% {
        transform: translateX(-50%) translateY(-6px);
    }
}

/* ============================================
   Text Gradient Animation
   ============================================ */
.text-gradient-animated {
    background: linear-gradient(
        90deg,
        var(--noble-yellow) 0%,
        var(--noble-yellow-light) 25%,
        var(--white) 50%,
        var(--noble-yellow-light) 75%,
        var(--noble-yellow) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textGradientShift 4s linear infinite;
}

@keyframes textGradientShift {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* ============================================
   Noise Texture Overlay
   ============================================ */
.noise-overlay::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.015;
    pointer-events: none;
    z-index: 10001;
}

/* ============================================
   Glow Effects
   ============================================ */
.glow {
    position: relative;
}

.glow::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: radial-gradient(
        ellipse at center,
        rgba(232, 224, 0, 0.15) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.glow:hover::before {
    opacity: 1;
}

/* ============================================
   Skeleton Loading
   ============================================ */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.03) 100%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   Parallax Elements
   ============================================ */
.parallax-element {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* ============================================
   3D Card Tilt
   ============================================ */
.tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.tilt-card-inner {
    transition: transform 0.4s var(--ease-out-expo);
    transform-style: preserve-3d;
}

/* ============================================
   Horizontal Scroll Section
   ============================================ */
.horizontal-scroll-section {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: var(--space-8) 0;
}

.horizontal-scroll-section::-webkit-scrollbar {
    display: none;
}

.horizontal-scroll-content {
    display: flex;
    gap: var(--space-6);
    padding: 0 var(--space-6);
    width: max-content;
}

/* ============================================
   Page Content Fade
   ============================================ */
.page-content {
    opacity: 0;
    animation: pageContentFade 1s var(--ease-out-expo) 0.4s forwards;
}

@keyframes pageContentFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Button Ripple Effect
   ============================================ */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
    transform: scale(0);
    opacity: 0;
}

.btn-ripple:active::after {
    transform: scale(2);
    opacity: 1;
    transition: 0s;
}

/* ============================================
   Link Underline Animation
   ============================================ */
.link-animated {
    position: relative;
    display: inline-block;
}

.link-animated::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--noble-yellow);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--ease-out-expo);
}

.link-animated:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ============================================
   Pulse Ring Animation
   ============================================ */
.pulse-ring {
    position: relative;
}

.pulse-ring::before,
.pulse-ring::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid var(--noble-yellow);
    border-radius: inherit;
    animation: pulseRing 2s ease-out infinite;
}

.pulse-ring::after {
    animation-delay: 1s;
}

@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ============================================
   Responsive Animations
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .cursor-glow {
        display: none;
    }
}
