/*
Theme Name: tRobot Theme
Theme URI: https://trobot.online
Author: Artem Moroz
Description: Custom Premium Financial Theme. Stack: Tailwind CSS, Light Theme, Premium Violet.
Version: 2.0.0
Text Domain: trobot
*/

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
    /* Colors */
    --color-primary: #7C3AED;
    --color-primary-dark: #5B21B6;
    --color-primary-light: #A78BFA;
    --color-secondary: #8B5CF6;
    --color-accent: #C4B5FD;

    /* Text */
    --color-text-primary: #0F172A;
    --color-text-secondary: #475569;
    --color-text-muted: #94A3B8;

    /* Backgrounds */
    --color-bg: #FFFFFF;
    --color-bg-subtle: #F8FAFC;
    --color-bg-muted: #F1F5F9;

    /* Glow */
    --glow-primary: rgba(124, 58, 237, 0.4);
    --glow-soft: rgba(124, 58, 237, 0.15);
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   3D TRANSFORMS
   ============================================ */
.perspective-1000 {
    perspective: 1000px;
}

.transform-style-3d {
    transform-style: preserve-3d;
}

.backface-hidden {
    backface-visibility: hidden;
}

/* ============================================
   GLASSMORPHISM
   ============================================ */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-subtle {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ============================================
   GLOW EFFECTS
   ============================================ */
.glow-violet {
    box-shadow:
        0 0 20px var(--glow-soft),
        0 0 40px var(--glow-soft);
}

.glow-violet-intense {
    box-shadow:
        0 0 20px var(--glow-primary),
        0 0 60px var(--glow-soft),
        0 0 100px rgba(124, 58, 237, 0.1);
}

/* ============================================
   GRADIENT UTILITIES
   ============================================ */
.gradient-text {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-primary-light) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-border {
    position: relative;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ============================================
   ANIMATION KEYFRAMES
   ============================================ */

/* Floating Animation - Smooth Y movement */
@keyframes float-y {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-12px);
    }
}

.animate-float-y {
    animation: float-y 6s ease-in-out infinite;
}

/* Slow Spin - For orbital elements */
@keyframes spin-slow {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spin-slow var(--duration, 20s) linear infinite;
}

/* Reverse Spin */
@keyframes spin-reverse {
    from {
        transform: translate(-50%, -50%) rotate(360deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(0deg);
    }
}

.animate-spin-reverse {
    animation: spin-reverse var(--duration, 25s) linear infinite;
}

/* Core Pulse - Soft breathing effect */
@keyframes pulse-core {

    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.08);
    }
}

.animate-pulse-core {
    animation: pulse-core 4s ease-in-out infinite;
}

/* Particle Float - For decorative elements */
@keyframes float-particle {

    0%,
    100% {
        transform: translateY(0px) scale(1);
        opacity: 0.7;
    }

    50% {
        transform: translateY(-25px) scale(0.9);
        opacity: 0.4;
    }
}

.animate-float-particle {
    animation: float-particle 5s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

/* Gradient Shift - For animated backgrounds */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

/* Orbit Animation - Circular path */
@keyframes orbit {
    from {
        transform: rotate(0deg) translateX(var(--orbit-radius, 120px)) rotate(0deg);
    }

    to {
        transform: rotate(360deg) translateX(var(--orbit-radius, 120px)) rotate(-360deg);
    }
}

.animate-orbit {
    animation: orbit var(--orbit-duration, 15s) linear infinite;
}

/* Data Flow - Line animation */
@keyframes data-flow {
    0% {
        stroke-dashoffset: 100;
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
}

.animate-data-flow {
    stroke-dasharray: 10 90;
    animation: data-flow 3s ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

/* Ping with custom timing */
@keyframes ping-slow {

    75%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.animate-ping-slow {
    animation: ping-slow 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Bounce X - For navigation arrows */
@keyframes bounce-x {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(5px);
    }
}

.animate-bounce-x {
    animation: bounce-x 1s infinite;
}

/* Pulse Slow - For background glows */
@keyframes pulse-slow {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 8s ease-in-out infinite;
}

/* Scale In - Entrance animation */
@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-scale-in {
    animation: scale-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ============================================
   INTERACTIVE ELEMENTS - HOVER STATES
   Only applied to clickable elements per 2026 UX standards
   ============================================ */

/* Primary CTA Button */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 100%);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 25px -5px rgba(124, 58, 237, 0.3),
        0 4px 6px -2px rgba(124, 58, 237, 0.1);
}

.btn-primary:hover::before {
    transform: translateX(100%);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Secondary CTA Button */
.btn-secondary {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary-light);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.12);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Navigation Links */
.nav-link {
    position: relative;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-link:hover::after {
    width: 100%;
}

/* Logo Link */
.logo-link {
    transition: opacity 0.2s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Background mesh gradient */
.bg-mesh {
    background-image:
        radial-gradient(at 40% 20%, rgba(124, 58, 237, 0.08) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(139, 92, 246, 0.06) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(167, 139, 250, 0.05) 0px, transparent 50%),
        radial-gradient(at 80% 50%, rgba(124, 58, 237, 0.04) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(196, 181, 253, 0.08) 0px, transparent 50%);
}

/* Technical grid pattern */
.bg-grid {
    background-image:
        linear-gradient(to right, rgba(148, 163, 184, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
}

.bg-grid-large {
    background-image:
        linear-gradient(to right, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
    background-size: 96px 96px;
}

/* Center glow effect */
.center-glow {
    position: relative;
}

.center-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, var(--glow-soft) 0%, transparent 70%);
    pointer-events: none;
}

/* Focus states for accessibility */
.focus-ring:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 2px var(--color-bg),
        0 0 0 4px var(--color-primary);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}