/* ========================================
   AXT Brand Animations & Dynamic Backgrounds
   Based on brand identity guidelines
   ======================================== */

/* ----------------------------------------
   Manrope Font Family (Brand Typography)
   ---------------------------------------- */
@font-face {
    font-family: 'Manrope';
    src: url('../fonts/Manrope-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/Manrope-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/Manrope-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/Manrope-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/Manrope-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Manrope';
    src: url('../fonts/Manrope-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* ----------------------------------------
   CSS Custom Properties (Brand Colors)
   ---------------------------------------- */
:root {
    --axt-bg-dark: #03071C;
    --axt-cyan: #5AB3CB;
    --axt-cyan-bright: #00D4FF;
    --axt-blue-deep: #2645DD;
    --axt-blue-muted: #2C4B91;
    --axt-gray-blue: #B1C6D4;
    --axt-purple: #7458E8;
    --axt-purple-light: #A860E6;
}

/* ----------------------------------------
   Animated Background Container
   ---------------------------------------- */
.axt-animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    background: var(--axt-bg-dark);
}

/* For sections that need their own animated bg */
.axt-section-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* ----------------------------------------
   Floating Shape Base Styles
   ---------------------------------------- */
.axt-shape {
    position: absolute;
    border-radius: 30%;
    filter: blur(80px);
    opacity: 0;
    animation: axtFadeIn 2s ease-out forwards;
    will-change: transform, opacity;
}

@keyframes axtFadeIn {
    to {
        opacity: 1;
    }
}

/* ----------------------------------------
   Individual Floating Shapes
   Based on brand SVG shapes
   ---------------------------------------- */

/* Shape 1: Cyan - Top Left */
.axt-shape-1 {
    width: 600px;
    height: 400px;
    background: var(--axt-cyan);
    top: -10%;
    left: -10%;
    transform: rotate(-11deg);
    opacity: 0.25;
    animation:
        axtFadeIn 2s ease-out forwards,
        axtFloat1 20s ease-in-out infinite;
    animation-delay: 0s, 2s;
}

/* Shape 2: Gray-Blue - Top Right */
.axt-shape-2 {
    width: 700px;
    height: 500px;
    background: var(--axt-gray-blue);
    top: -5%;
    right: -15%;
    transform: rotate(-40deg);
    opacity: 0.18;
    animation:
        axtFadeIn 2s ease-out forwards,
        axtFloat2 25s ease-in-out infinite;
    animation-delay: 0.5s, 2.5s;
}

/* Shape 3: Deep Blue - Center Left */
.axt-shape-3 {
    width: 400px;
    height: 600px;
    background: var(--axt-blue-deep);
    top: 30%;
    left: -5%;
    transform: rotate(-40deg);
    opacity: 0.3;
    animation:
        axtFadeIn 2s ease-out forwards,
        axtFloat3 22s ease-in-out infinite;
    animation-delay: 1s, 3s;
}

/* Shape 4: Muted Blue - Bottom Right */
.axt-shape-4 {
    width: 700px;
    height: 600px;
    background: var(--axt-blue-muted);
    bottom: -20%;
    right: -10%;
    transform: rotate(-40deg);
    opacity: 0.2;
    animation:
        axtFadeIn 2s ease-out forwards,
        axtFloat4 18s ease-in-out infinite;
    animation-delay: 1.5s, 3.5s;
}

/* Shape 5: Cyan accent - Bottom Left */
.axt-shape-5 {
    width: 350px;
    height: 400px;
    background: var(--axt-cyan);
    bottom: 10%;
    left: 20%;
    transform: rotate(-11deg);
    opacity: 0.2;
    animation:
        axtFadeIn 2s ease-out forwards,
        axtFloat5 24s ease-in-out infinite;
    animation-delay: 2s, 4s;
}

/* Shape 6: Deep Blue accent - Center */
.axt-shape-6 {
    width: 400px;
    height: 450px;
    background: var(--axt-blue-deep);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-40deg);
    opacity: 0.15;
    animation:
        axtFadeIn 2s ease-out forwards,
        axtFloat6 28s ease-in-out infinite;
    animation-delay: 2.5s, 4.5s;
}

/* ----------------------------------------
   Floating Animations (Subtle & Elegant)
   ---------------------------------------- */
@keyframes axtFloat1 {
    0%, 100% {
        transform: rotate(-11deg) translate(0, 0);
    }
    25% {
        transform: rotate(-8deg) translate(30px, 20px);
    }
    50% {
        transform: rotate(-14deg) translate(15px, 40px);
    }
    75% {
        transform: rotate(-9deg) translate(-20px, 25px);
    }
}

@keyframes axtFloat2 {
    0%, 100% {
        transform: rotate(-40deg) translate(0, 0);
    }
    33% {
        transform: rotate(-35deg) translate(-25px, 30px);
    }
    66% {
        transform: rotate(-45deg) translate(20px, 15px);
    }
}

@keyframes axtFloat3 {
    0%, 100% {
        transform: rotate(-40deg) translate(0, 0);
    }
    25% {
        transform: rotate(-38deg) translate(20px, -15px);
    }
    50% {
        transform: rotate(-42deg) translate(35px, 20px);
    }
    75% {
        transform: rotate(-36deg) translate(10px, 35px);
    }
}

@keyframes axtFloat4 {
    0%, 100% {
        transform: rotate(-40deg) translate(0, 0);
    }
    50% {
        transform: rotate(-35deg) translate(-30px, -25px);
    }
}

@keyframes axtFloat5 {
    0%, 100% {
        transform: rotate(-11deg) translate(0, 0);
    }
    33% {
        transform: rotate(-15deg) translate(25px, -20px);
    }
    66% {
        transform: rotate(-8deg) translate(-15px, 30px);
    }
}

@keyframes axtFloat6 {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(-40deg) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) rotate(-35deg) scale(1.05);
    }
}

/* ----------------------------------------
   Noise Texture Overlay
   ---------------------------------------- */
.axt-noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.02;
    background-image: url('../brand/noise.png');
    background-repeat: repeat;
    background-size: 200px 200px;
    mix-blend-mode: soft-light;
}

/* For section-level noise */
.axt-section-noise {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    opacity: 0.04;
    background-image: url('../brand/noise.png');
    background-repeat: repeat;
}

/* ----------------------------------------
   Icon Animations
   ---------------------------------------- */

/* Subtle glow pulse for icons */
.axt-icon-glow {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.axt-icon-glow:hover {
    filter: drop-shadow(0 0 8px var(--axt-cyan-bright));
    transform: translateY(-2px);
}

/* Gentle float animation for feature icons */
.axt-icon-float {
    animation: axtIconFloat 4s ease-in-out infinite;
}

@keyframes axtIconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

/* Subtle rotate on hover */
.axt-icon-rotate:hover {
    animation: axtIconRotate 0.6s ease-out;
}

@keyframes axtIconRotate {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-5deg);
    }
    75% {
        transform: rotate(5deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

/* Scale pulse for interactive icons */
.axt-icon-pulse {
    transition: transform 0.3s ease;
}

.axt-icon-pulse:hover {
    animation: axtIconPulse 0.6s ease-in-out;
}

@keyframes axtIconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Gradient shimmer effect for icons */
.axt-icon-shimmer {
    position: relative;
    overflow: hidden;
}

.axt-icon-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 212, 255, 0.2),
        transparent
    );
    transition: left 0.6s ease;
}

.axt-icon-shimmer:hover::after {
    left: 100%;
}

/* ----------------------------------------
   Feature/Service Card Hover Effects
   ---------------------------------------- */

/* Service cards, feature cards, and info boxes */
.service-card,
.feature-card,
.benefit-card,
.info-box,
.timeline-card,
[class*="service-box"],
[class*="feature-box"] {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card:hover,
.feature-card:hover,
.benefit-card:hover,
.info-box:hover,
.timeline-card:hover,
[class*="service-box"]:hover,
[class*="feature-box"]:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.1);
}

/* Icon containers within cards */
.service-card .icon,
.feature-card .icon,
.benefit-card .icon,
[class*="icon-wrapper"],
[class*="icon-box"] {
    transition: transform 0.4s ease, filter 0.4s ease;
}

.service-card:hover .icon,
.feature-card:hover .icon,
.benefit-card:hover .icon,
.service-card:hover [class*="icon-wrapper"],
.feature-card:hover [class*="icon-wrapper"],
.service-card:hover [class*="icon-box"],
.feature-card:hover [class*="icon-box"] {
    transform: scale(1.1) rotate(3deg);
    filter: drop-shadow(0 0 10px var(--axt-cyan-bright));
}

/* CTA Buttons Enhancement */
.cta-button,
.cta-btn,
.btn-primary,
[class*="cta-box"] .btn,
.elementor-button {
    position: relative;
    overflow: hidden;
}

.cta-button::before,
.cta-btn::before,
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.cta-button:hover::before,
.cta-btn:hover::before,
.btn-primary:hover::before {
    left: 100%;
}

/* ----------------------------------------
   Sidebar Navigation Enhancements
   ---------------------------------------- */

/* Auto-apply glow to sidebar nav icons */
.sidebar-nav a svg,
.sidebar .nav-icon svg,
.nav-icons a svg {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-nav a:hover svg,
.sidebar .nav-icon:hover svg,
.nav-icons a:hover svg {
    filter: drop-shadow(0 0 8px var(--axt-cyan-bright));
    transform: scale(1.1);
}

.sidebar-nav a.active svg,
.sidebar .nav-icon.active svg,
.nav-icons a.active svg {
    filter: drop-shadow(0 0 6px var(--axt-cyan-bright));
}

/* Subtle breathing animation for active nav items */
.sidebar-nav a.active,
.sidebar .nav-icon.active,
.nav-icons a.active {
    animation: axtNavBreathing 3s ease-in-out infinite;
}

@keyframes axtNavBreathing {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 212, 255, 0);
    }
    50% {
        box-shadow: 0 0 15px 2px rgba(0, 212, 255, 0.15);
    }
}

/* ----------------------------------------
   Card & Element Animations
   ---------------------------------------- */

/* Elegant fade-in on scroll */
.axt-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.axt-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered fade-in for lists */
.axt-stagger-in > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

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

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

/* Card hover lift effect */
.axt-card-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.axt-card-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Subtle border glow on hover */
.axt-border-glow {
    position: relative;
    transition: all 0.3s ease;
}

.axt-border-glow::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--axt-cyan-bright), var(--axt-purple));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.axt-border-glow:hover::before {
    opacity: 0.5;
}

/* ----------------------------------------
   Button Animations
   ---------------------------------------- */

/* Gradient shift on hover */
.axt-btn-gradient {
    background: linear-gradient(135deg, var(--axt-cyan-bright), var(--axt-purple));
    background-size: 200% 200%;
    transition: all 0.4s ease;
}

.axt-btn-gradient:hover {
    background-position: 100% 100%;
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

/* Ripple effect */
.axt-btn-ripple {
    position: relative;
    overflow: hidden;
}

.axt-btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
    opacity: 0;
}

.axt-btn-ripple:active::after {
    width: 300px;
    height: 300px;
    opacity: 1;
    transition: 0s;
}

/* ----------------------------------------
   Parallax Helper Classes
   ---------------------------------------- */
.axt-parallax-slow {
    transition: transform 0.1s ease-out;
}

.axt-parallax-medium {
    transition: transform 0.05s ease-out;
}

/* ----------------------------------------
   Reduced Motion Support
   ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .axt-shape,
    .axt-icon-float,
    .axt-fade-in,
    .axt-stagger-in > * {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .axt-shape {
        opacity: 0.2 !important;
    }
}

/* ----------------------------------------
   Mobile Optimizations
   ---------------------------------------- */
@media (max-width: 768px) {
    .axt-shape {
        filter: blur(60px);
    }

    .axt-shape-1,
    .axt-shape-2 {
        width: 400px;
        height: 300px;
    }

    .axt-shape-3,
    .axt-shape-4 {
        width: 350px;
        height: 400px;
    }

    .axt-shape-5,
    .axt-shape-6 {
        display: none;
    }

    /* Simpler animations on mobile */
    @keyframes axtFloat1 {
        0%, 100% { transform: rotate(-11deg) translate(0, 0); }
        50% { transform: rotate(-11deg) translate(15px, 20px); }
    }

    @keyframes axtFloat2 {
        0%, 100% { transform: rotate(-40deg) translate(0, 0); }
        50% { transform: rotate(-40deg) translate(-15px, 15px); }
    }

    @keyframes axtFloat3 {
        0%, 100% { transform: rotate(-40deg) translate(0, 0); }
        50% { transform: rotate(-40deg) translate(20px, 10px); }
    }

    @keyframes axtFloat4 {
        0%, 100% { transform: rotate(-40deg) translate(0, 0); }
        50% { transform: rotate(-40deg) translate(-20px, -15px); }
    }
}

/* ----------------------------------------
   Performance Optimizations
   ---------------------------------------- */
.axt-animated-bg,
.axt-section-bg {
    contain: strict;
}

.axt-shape {
    backface-visibility: hidden;
    perspective: 1000px;
}

/* ----------------------------------------
   Brand Typography Application
   ---------------------------------------- */
body,
html {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

h1, h2, h3, h4, h5, h6,
.heading,
.title,
[class*="heading"],
[class*="title"] {
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
}

.text-light,
.subtitle,
[class*="subtitle"] {
    font-weight: 300;
}

.text-medium {
    font-weight: 500;
}

.text-semibold {
    font-weight: 600;
}

.text-bold {
    font-weight: 700;
}

.text-extrabold {
    font-weight: 800;
}

/* ----------------------------------------
   Hero Background Classes
   ---------------------------------------- */
.axt-hero-bg {
    background-image: url('../brand/backgrounds/home-hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.axt-testimonial-bg {
    background-image: url('../brand/backgrounds/home-testimonial-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.axt-dark-bg {
    background-image: url('../brand/backgrounds/bg-dark.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Hero section with overlay for better text readability */
.axt-hero-overlay {
    position: relative;
}

.axt-hero-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(3, 7, 28, 0.7) 0%,
        rgba(3, 7, 28, 0.5) 50%,
        rgba(3, 7, 28, 0.8) 100%
    );
    z-index: 1;
}

.axt-hero-overlay > * {
    position: relative;
    z-index: 2;
}
