/* 
 * ==========================================
 * SecuraTICS Global Stylesheet
 * Author: Luis Fernando Guerrero Henao
 * Version: Abril 2026 — Mobile-First + WCAG 2.2 AAA
 * ==========================================
 */

/* ══════════════════════════════════════════
   1. BRAND VARIABLES & FLUID TYPOGRAPHY
   ══════════════════════════════════════════ */
:root {
    --brand-purple: #a24cc3;
    --brand-purple-dark: #8c36ad;
    --brand-cyan: #5ADACE;
    --brand-navy: #0a192f;
    --brand-navy-dark: #050c16;

    /* Fluid Typography Scale: clamp(min, preferred, max) */
    --text-xs: clamp(0.625rem, 1.5vw, 0.75rem);
    /* 10px → 12px */
    --text-sm: clamp(0.75rem, 2vw, 0.875rem);
    /* 12px → 14px */
    --text-base: clamp(0.875rem, 2.5vw, 1rem);
    /* 14px → 16px */
    --text-lg: clamp(1rem, 3vw, 1.125rem);
    /* 16px → 18px */
    --text-xl: clamp(1.125rem, 3.5vw, 1.25rem);
    /* 18px → 20px */
}

/* ══════════════════════════════════════════
   2. GLASSMORPHISM (Cross-Browser)
   ══════════════════════════════════════════ */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    /* Safari support */
    -webkit-backdrop-filter: blur(12px);
    /* Standard */
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    /* Performance optimization */
    will-change: transform, backdrop-filter;
}

/* ══════════════════════════════════════════
   3. HERO GRADIENT (Cross-Browser)
   ══════════════════════════════════════════ */
.hero-gradient {
    /* Fallback */
    background: var(--brand-navy);
    /* Chrome 10-25, Safari 5.1-6 */
    background: -webkit-radial-gradient(center, circle cover, #320046 0%, var(--brand-navy) 100%);
    /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    background: radial-gradient(circle at center, #320046 0%, var(--brand-navy) 100%);
}

/* ══════════════════════════════════════════
   4. MATERIAL ICONS
   ══════════════════════════════════════════ */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* ══════════════════════════════════════════
   5. RESPONSIVE FIXES
   ══════════════════════════════════════════ */
img,
video,
iframe,
embed,
object {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* ══════════════════════════════════════════
   6. ACCESSIBILITY: FOCUS INDICATORS (WCAG 2.4.7)
   ══════════════════════════════════════════ */
:focus-visible {
    outline: 3px solid var(--brand-cyan);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(90, 218, 206, 0.4);
}

/* Fallback for older browsers */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 3px solid var(--brand-cyan);
    outline-offset: 2px;
}

/* ══════════════════════════════════════════
   7. NAVIGATION ACTIVE STATE
   ══════════════════════════════════════════ */
.nav-link-active {
    background-color: rgba(162, 76, 195, 0.1);
    border-radius: 9999px;
    padding: 0.5rem 1.25rem;
    color: #a24cc3;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(162, 76, 195, 0.5);
    /* WCAG 1.4.1: secondary indicator beyond color */
    border-bottom: 2px solid var(--brand-purple);
    transition: all 0.3s ease;
}

/* ══════════════════════════════════════════
   8. CTA NEON BUTTON
   ══════════════════════════════════════════ */
.btn-cta-securatics {
    background: linear-gradient(135deg, #a24cc3 0%, #711793 100%);
    color: #ffffff;
    font-weight: 800;
    border-radius: 9999px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(90, 218, 206, 0.2);
    box-shadow: 0 4px 15px rgba(162, 76, 195, 0.4), inset 0 0 8px rgba(255, 255, 255, 0.05);
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn-cta-securatics:hover {
    background: linear-gradient(135deg, #8c36ad 0%, #5a1275 100%);
    border: 1px solid var(--brand-cyan);
    box-shadow: 0 0 20px rgba(90, 218, 206, 0.6), inset 0 0 15px rgba(90, 218, 206, 0.3);
    transform: translateY(-2px);
    color: #fff;
}

/* ══════════════════════════════════════════
   9. OUTLINE GLOW BUTTON
   ══════════════════════════════════════════ */
.btn-outline-glow {
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.btn-outline-glow:hover {
    border: 2px solid var(--brand-cyan);
    box-shadow: 0 0 15px rgba(90, 218, 206, 0.6);
    transform: translateY(-2px);
    color: var(--brand-cyan);
}

/* ══════════════════════════════════════════
   10. FLOATING ANIMATION
   ══════════════════════════════════════════ */
@keyframes float {
    0% {
        transform: translateY(0px);
        filter: drop-shadow(0 0 15px rgba(162, 76, 195, 0.4));
    }

    50% {
        transform: translateY(-20px);
        filter: drop-shadow(0 15px 25px rgba(162, 76, 195, 0.6));
    }

    100% {
        transform: translateY(0px);
        filter: drop-shadow(0 0 15px rgba(162, 76, 195, 0.4));
    }
}

.floating-shield {
    animation: float 3s ease-in-out infinite;
}

/* ══════════════════════════════════════════
   11. BOTON INFINITE GLOW (Zero-Trust Fill)
   ══════════════════════════════════════════ */
.btn-infinite-glow {
    position: relative;
    border-radius: 9999px;
    z-index: 1;
    overflow: hidden;
    color: white;
}

.btn-infinite-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, #a24cc3, #5ADACE, #2b5876, #a24cc3);
    animation: rotate-conic 4s linear infinite;
    z-index: 0;
}

.btn-infinite-glow span {
    background: linear-gradient(45deg, #a24cc3, #6b21a8, #1e1b4b, #a24cc3);
    background-size: 400% 400%;
    animation: dynamicFill 8s linear infinite;
}

@keyframes rotate-conic {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

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

    100% {
        background-position: 400% 50%;
    }
}

/* ══════════════════════════════════════════
   12. BOTON STROBE NEON — SAFE VERSION
   ══════════════════════════════════════════
   WCAG 2.3.1: Max 3 flashes/second.
   Original strobe-flicker was 25Hz (DANGEROUS).
   Replaced with safe-glow transition.
   ══════════════════════════════════════════ */
.btn-strobe-neon {
    border: 2px solid var(--brand-cyan);
    color: var(--brand-cyan);
    background: transparent;
    border-radius: 9999px;
    transition: all 0.4s ease-out;
}

.btn-strobe-neon:hover {
    box-shadow: inset 0 0 20px var(--brand-cyan), 0 0 20px rgba(90, 218, 206, 0.6);
    background: rgba(90, 218, 206, 0.2);
    color: white;
    text-shadow: 0 0 8px var(--brand-cyan);
    border-color: var(--brand-cyan);
}

/* ══════════════════════════════════════════
   13. JINETES DEL APOCALIPSIS (VIDEO MODE)
   ══════════════════════════════════════════ */
.jinetes-video-container {
    position: relative;
    overflow: hidden;
    background-color: #000;
    border-radius: 0.75rem;
    height: 16rem;
}

.jinetes-video-container video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    aspect-ratio: 824 / 510;
    opacity: 1;
    pointer-events: none;
}

.mission-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ══════════════════════════════════════════
   14. EFECTO AURORA ANIMADA
   ══════════════════════════════════════════ */
@keyframes aurora-flow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.card-aurora {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(10, 25, 47, 0.98) 0%, rgba(20, 10, 35, 0.98) 100%);
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
}

.card-aurora::before {
    content: '';
    position: absolute;
    inset: -150%;
    z-index: -1;
    background: linear-gradient(135deg, rgba(162, 76, 195, 0.5) 0%, rgba(90, 218, 206, 0.6) 50%, rgba(162, 76, 195, 0.5) 100%);
    background-size: 200% 200%;
    animation: aurora-flow 12s ease-in-out infinite;
    filter: blur(60px);
    pointer-events: none;
    opacity: 0.8;
}

.card-aurora h3 {
    color: #ffffff;
    font-weight: 800;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 15px rgba(162, 76, 195, 0.8), 0 2px 4px rgba(0, 0, 0, 0.9);
}

.card-aurora p {
    color: #e2e8f0;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.card-aurora span {
    position: relative;
    z-index: 2;
}

/* ══════════════════════════════════════════
   15. TARJETAS DE DEFENSA (SOLO CIÁN)
   ══════════════════════════════════════════ */
.glass-card.bg-\[\#5ADACE\]\/5 {
    background: rgba(10, 25, 47, 0.9);
    border: 1px solid rgba(90, 218, 206, 0.2);
    border-top: 3px solid var(--brand-cyan);
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card.bg-\[\#5ADACE\]\/5:hover {
    transform: translateY(-5px);
    border-color: rgba(90, 218, 206, 0.5);
    background: rgba(10, 25, 47, 0.95);
}

.glass-card.bg-\[\#5ADACE\]\/5 h4 {
    color: var(--brand-cyan);
    text-shadow: 0 0 10px rgba(90, 218, 206, 0.3);
    font-weight: 700;
}

.glass-card.bg-\[\#5ADACE\]\/5 p {
    color: #cbd5e1;
    opacity: 1;
}

/* ══════════════════════════════════════════
   16. TRUST BAR
   ══════════════════════════════════════════ */
.abs-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.group:hover .abs-center.group-hover\:scale-100 {
    transform: translate(-50%, -50%) scale(1);
}

.group:hover .abs-center.group-hover\:scale-75 {
    transform: translate(-50%, -50%) scale(0.75);
}

/* ══════════════════════════════════════════
   17. THEME TRANSITIONS (replaces global !important)
   Only applies to elements that need smooth theme changes.
   ══════════════════════════════════════════ */
.theme-transition {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

/* ══════════════════════════════════════════
   18. ACCESSIBILITY: REDUCED MOTION
   WCAG 2.3.3 + 2.2.2
   ══════════════════════════════════════════ */

/* System preference: automatically disable animations */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .floating-shield,
    .btn-infinite-glow::before,
    .btn-infinite-glow span,
    .card-aurora::before {
        animation: none !important;
    }
}

/* Manual toggle: user clicks "Reducir Movimiento" in panel */
.reduced-motion *,
.reduced-motion *::before,
.reduced-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

.reduced-motion .floating-shield,
.reduced-motion .btn-infinite-glow::before,
.reduced-motion .btn-infinite-glow span,
.reduced-motion .card-aurora::before {
    animation: none !important;
}

/* ══════════════════════════════════════════
   19. ACCESSIBILITY: WIDE SPACING
   WCAG 1.4.12 — Text Spacing
   ══════════════════════════════════════════ */
.wide-spacing {
    line-height: 1.8 !important;
    letter-spacing: 0.12em !important;
    word-spacing: 0.16em !important;
}

.wide-spacing p,
.wide-spacing li,
.wide-spacing dd {
    margin-bottom: 2em !important;
}

/* ══════════════════════════════════════════
   20. ACCESSIBILITY: TTS ACTIVE STATE
   ══════════════════════════════════════════ */
.tts-active {
    outline: 3px dashed var(--brand-cyan);
    outline-offset: 4px;
}

/* ══════════════════════════════════════════
   21. MODO ALTO CONTRASTE (WCAG 1.4.6 AAA)
   Fixed: removed wildcard * selector that caused conflicts.
   Using specific selectors for predictable behavior.
   ══════════════════════════════════════════ */
.high-contrast,
.high-contrast body,
.high-contrast header,
.high-contrast footer,
.high-contrast section,
.high-contrast main,
.high-contrast div:not(#accessibility-wrapper):not(#accessibility-menu) {
    background-color: #000000 !important;
    background-image: none !important;
    color: #FFFF00 !important;
    border-color: #FFFF00 !important;
}

/* Text elements: white for readability variety */
.high-contrast h1,
.high-contrast h2,
.high-contrast h3,
.high-contrast h4,
.high-contrast h5,
.high-contrast h6,
.high-contrast p,
.high-contrast li,
.high-contrast span:not(.material-symbols-outlined),
.high-contrast label,
.high-contrast td,
.high-contrast th,
.high-contrast figcaption {
    color: #FFFFFF !important;
    background-color: transparent !important;
}

/* Links: cyan for visibility */
.high-contrast a {
    color: #00FFFF !important;
    text-decoration: underline !important;
    font-weight: 800 !important;
    text-underline-offset: 4px;
}

.high-contrast a:hover {
    background-color: #FFFF00 !important;
    color: #000000 !important;
}

/* Buttons */
.high-contrast button {
    border: 3px solid #FFFF00 !important;
    background-color: #000 !important;
    color: #FFFF00 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.high-contrast button:hover {
    background-color: #FFFF00 !important;
    color: #000000 !important;
}

/* Images */
.high-contrast img {
    filter: grayscale(1) contrast(1.5) brightness(0.8);
    border: 2px solid #FFFF00;
}

/* Form controls */
.high-contrast input,
.high-contrast textarea,
.high-contrast select {
    background-color: #000 !important;
    border: 2px solid #FFFF00 !important;
    color: #FFFF00 !important;
}

/* Accessibility menu stays usable */
.high-contrast #accessibility-menu {
    border: 3px solid #FFFF00 !important;
    background-color: #000 !important;
}

.high-contrast #accessibility-menu button {
    border: 1px solid #FFFF00 !important;
}

/* ══════════════════════════════════════════
   22. FORCED COLORS MODE (Windows High Contrast)
   WCAG 1.4.6 — Supports native OS accessibility
   ══════════════════════════════════════════ */
@media (forced-colors: active) {

    .btn-cta-securatics,
    .btn-strobe-neon,
    .btn-infinite-glow,
    .btn-outline-glow {
        border: 2px solid ButtonText;
        forced-color-adjust: none;
    }

    :focus-visible {
        outline: 3px solid Highlight;
    }
}

/* ══════════════════════════════════════════
   23. FORMULARIO CONTACTO - REFACTOR
   ══════════════════════════════════════════ */
input,
textarea,
#servicio-trigger {
    background-color: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(90, 218, 206, 0.2) !important;
}

input::selection,
textarea::selection {
    background-color: #5ADACE;
    color: #0a192f;
}

input[type="email"],
#email {
    cursor: text;
    caret-color: #5ADACE;
}

input:focus,
input:focus-within,
textarea:focus,
textarea:focus-within,
#servicio-trigger:focus,
#servicio-trigger:focus-within {
    border-color: #5ADACE !important;
    box-shadow: 0 0 15px rgba(90, 218, 206, 0.4) !important;
    transition: all 0.3s ease;
    transform: translateY(-1px);
}