/* Estilos personalizados Artiflex - Awwwards Level */
:root {
    /* Palette 2.0 - Deep Void & Neon */
    --bg-color: #020408;
    /* Ultra Dark Blue/Black */
    --surface-color: #0B101B;
    /* Dark Blue Slate */

    --text-primary: #F1F5F9;
    /* Slate 100 */
    --text-secondary: #94A3B8;
    /* Slate 400 */
    --text-muted: #64748B;
    /* Slate 500 */

    --neon-sky: #00F0FF;
    /* Electric Cyan */
    --neon-purple: #BC13FE;
    /* Electric Purple */
    --neon-pink: #FF0055;
    /* Electric Pink */

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.15);

    --glow-sky: 0 0 20px rgba(0, 240, 255, 0.5);
    --glow-purple: 0 0 20px rgba(188, 19, 254, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--neon-sky) var(--bg-color);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(188, 19, 254, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 240, 255, 0.08), transparent 25%);
    background-attachment: fixed;
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.font-orbitron {
    font-family: 'Orbitron', sans-serif;
}

.font-rajdhani {
    font-family: 'Rajdhani', sans-serif;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--neon-sky);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-purple);
}

/* Utilities */
.text-neon-sky {
    color: var(--neon-sky);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.text-neon-purple {
    color: var(--neon-purple);
    text-shadow: 0 0 10px rgba(188, 19, 254, 0.5);
}

.text-neon-pink {
    color: var(--neon-pink);
    text-shadow: 0 0 10px rgba(255, 0, 85, 0.5);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.gradient-text {
    background: linear-gradient(135deg, var(--neon-sky), var(--text-primary), var(--neon-purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% auto;
    animation: gradientTextAnim 4s linear infinite;
}

@keyframes gradientTextAnim {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Core Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Button Reset */
.btn-premium {
    position: relative;
    padding: 1rem 2.5rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    color: var(--bg-color);
    background: var(--neon-sky);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--neon-purple);
    z-index: -1;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-premium:hover {
    color: white;
    box-shadow: 0 0 25px rgba(188, 19, 254, 0.6);
    transform: translateY(-2px);
}

.btn-premium:hover::before {
    width: 100%;
}

.btn-premium-outline {
    background: transparent;
    border: 1px solid var(--neon-sky);
    color: var(--neon-sky);
    box-shadow: none;
}

.btn-premium-outline:hover {
    background: var(--neon-sky);
    color: var(--bg-color);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.6);
}

/* Particle Canvas Wrapper */
#canvas-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Marquee Animation */
.animate-marquee {
    animation: marquee 25s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* 3D Tilt Utilities */
.tilt-card {
    will-change: transform;
    transform-style: preserve-3d;
}

/* Glitch Animation */
.glitch-wrapper h1::before,
.glitch-wrapper h1::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.glitch-wrapper h1::before {
    left: 2px;
    text-shadow: -1px 0 var(--neon-sky);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch-wrapper h1::after {
    left: -2px;
    text-shadow: -1px 0 var(--neon-purple);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(70px, 9999px, 86px, 0);
    }

    20% {
        clip: rect(28px, 9999px, 86px, 0);
    }

    40% {
        clip: rect(24px, 9999px, 60px, 0);
    }

    60% {
        clip: rect(61px, 9999px, 5px, 0);
    }

    80% {
        clip: rect(104px, 9999px, 68px, 0);
    }

    100% {
        clip: rect(35px, 9999px, 20px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(117px, 9999px, 137px, 0);
    }

    20% {
        clip: rect(77px, 9999px, 11px, 0);
    }

    40% {
        clip: rect(65px, 9999px, 45px, 0);
    }

    60% {
        clip: rect(116px, 9999px, 102px, 0);
    }

    80% {
        clip: rect(109px, 9999px, 112px, 0);
    }

    100% {
        clip: rect(4px, 9999px, 94px, 0);
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spin-slow 8s linear infinite;
}

#preloader {
    transition: opacity 0.8s cubic-bezier(0.86, 0, 0.07, 1);
}

/* Scanline Animation */
.scanline {
    position: absolute;
    width: 100%;
    height: 4px;
    background: linear-gradient(to bottom, transparent, rgba(0, 240, 255, 0.3), transparent);
    animation: scanline-move 3s linear infinite;
}

@keyframes scanline-move {
    0% {
        top: -10%;
    }

    100% {
        top: 110%;
    }
}

/* Terminal Cursor Blink */
#terminal-cursor {
    animation: cursor-blink 0.8s infinite;
}

@keyframes cursor-blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.glitch-wrapper,
.relative {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Access Granted Pulse */
@keyframes text-flicker {
    0% {
        opacity: 0.1;
    }

    2% {
        opacity: 1;
    }

    8% {
        opacity: 0.1;
    }

    9% {
        opacity: 1;
    }

    12% {
        opacity: 0.1;
    }

    20% {
        opacity: 1;
    }

    25% {
        opacity: 0.3;
    }

    30% {
        opacity: 1;
    }

    70% {
        opacity: 0.7;
    }

    72% {
        opacity: 0.2;
    }

    77% {
        opacity: 0.9;
    }

    100% {
        opacity: 0.9;
    }
}

.animate-pulse {
    animation: text-flicker 2s infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Gradient Animation for CTA */
@keyframes gradient-x {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient-x {
    background-size: 200% 200%;
    animation: gradient-x 3s ease infinite;
}

/* Hero Glitch Effect */
.hero-glitch {
    position: relative;
}

.hero-glitch::before,
.hero-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.hero-glitch:hover::before {
    animation: glitch-1 0.3s linear;
    color: var(--neon-sky);
    z-index: -1;
}

.hero-glitch:hover::after {
    animation: glitch-2 0.3s linear;
    color: var(--neon-purple);
    z-index: -2;
}

@keyframes glitch-1 {
    0% {
        opacity: 1;
        transform: translate(0);
    }

    20% {
        opacity: 1;
        transform: translate(-3px, 3px);
    }

    40% {
        opacity: 1;
        transform: translate(-3px, -3px);
    }

    60% {
        opacity: 1;
        transform: translate(3px, 3px);
    }

    80% {
        opacity: 1;
        transform: translate(3px, -3px);
    }

    100% {
        opacity: 0;
        transform: translate(0);
    }
}

@keyframes glitch-2 {
    0% {
        opacity: 1;
        transform: translate(0);
    }

    20% {
        opacity: 1;
        transform: translate(3px, -3px);
    }

    40% {
        opacity: 1;
        transform: translate(3px, 3px);
    }

    60% {
        opacity: 1;
        transform: translate(-3px, -3px);
    }

    80% {
        opacity: 1;
        transform: translate(-3px, 3px);
    }

    100% {
        opacity: 0;
        transform: translate(0);
    }
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Small screens (phones) */
@media (max-width: 640px) {

    /* Hero adjustments */
    #hero h2 {
        font-size: 2.5rem !important;
        line-height: 1.1;
    }

    #hero .counter {
        font-size: 1.5rem !important;
    }

    /* Stats grid */
    #hero .grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* ========================================
       SERVICES SECTION - MOBILE FIX
       ======================================== */

    /* Force single column */
    #services .grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    /* All cards full width */
    #services .grid>div {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Card styling */
    #services .rounded-3xl {
        padding: 1.25rem !important;
        min-height: auto !important;
    }

    /* Title sizes */
    #services h3 {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
    }

    /* Description */
    #services p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }

    /* Tags */
    #services .flex-wrap span {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.625rem !important;
    }

    /* Icons */
    #services svg {
        width: 2rem !important;
        height: 2rem !important;
    }

    #services .w-12,
    #services .h-12,
    #services .w-14,
    #services .h-14,
    #services .w-16,
    #services .h-16 {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }

    /* Section header */
    #services>div:first-child h2 {
        font-size: 1.75rem !important;
    }

    /* CTA section */
    #contact h2 {
        font-size: 2.5rem !important;
    }

    #contact .px-10 {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    /* Trust badges stack */
    #contact .flex-wrap {
        flex-direction: column;
        align-items: center;
    }

    /* Footer grid */
    footer .grid {
        grid-template-columns: 1fr !important;
        text-align: center;
    }

    footer .flex.gap-4 {
        justify-content: center;
    }

    /* Team section - single column */
    #team .grid {
        grid-template-columns: 1fr !important;
    }

    #team .max-w-sm {
        max-width: 100%;
    }

    /* Hide neural canvas on mobile for performance */
    #neural-canvas {
        opacity: 0.3;
    }

    /* Hide cursor blob on mobile */
    #cursor-blob {
        display: none;
    }

    /* Preloader text */
    #preloader h1 {
        font-size: 2.5rem !important;
    }

    /* Terminal smaller on mobile */
    #preloader .font-mono {
        font-size: 0.75rem;
    }

    /* Corner decorations hidden on mobile */
    #hero [class*="border-l-2"],
    #hero [class*="border-r-2"] {
        display: none;
    }

    /* Innovation section text */
    #innovation h3 {
        font-size: 2rem !important;
    }

    #innovation p {
        font-size: 1rem !important;
    }

    /* Button adjustments */
    .btn-premium {
        padding: 0.875rem 1.5rem;
        font-size: 0.8rem;
    }

    /* Section padding */
    section {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }

    /* Container padding */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Extra small screens (very small phones) */
@media (max-width: 380px) {
    #hero h2 {
        font-size: 2rem !important;
    }

    #hero .counter {
        font-size: 1.25rem !important;
    }

    #contact h2 {
        font-size: 2rem !important;
    }

    .font-orbitron {
        letter-spacing: 0.05em;
    }
}

/* Medium screens (tablets) */
@media (max-width: 768px) {

    /* Header padding */
    header .container {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    /* Navigation hidden (already handled by md:flex) */

    /* Innovation section */
    #innovation .flex-col-reverse {
        gap: 2rem;
    }

    /* Reduce blob size for performance */
    #cursor-blob {
        width: 400px !important;
        height: 400px !important;
    }

    /* Services grid 2 columns on tablet */
    #services .grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Team section 2 columns on tablet */
    #team .grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Large tablets and small laptops */
@media (max-width: 1024px) {

    /* Reduce animated background effects */
    body::before {
        opacity: 0.5;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    #neural-canvas,
    #matrix-canvas {
        display: none;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {

    /* Increase tap targets */
    .nav-link,
    .mobile-nav-link {
        padding: 0.75rem 1rem !important;
        min-height: 44px;
    }

    /* Remove hover effects that don't work on touch */
    .tilt-card {
        transform: none !important;
    }

    /* Disable cursor follower */
    #cursor-follower {
        display: none !important;
    }
}