/**
 * ElaraTeq Brand Styles
 * Orchestrating Innovation, Engineering Excellence
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Violet Palette */
    --violet-deep: #442E6E;
    --violet-core: #684BA6;
    --violet-light: #876AC6;
    --violet-electric: #7C2AE8;

    /* Gold/Amber Accents */
    --gold-earth: #947F57;
    --gold-bright: #FFCC00;
    --amber-warm: #FF914D;

    /* XECHO Color */
    --xecho-blue: #AED2FE;

    /* Dark Backgrounds */
    --bg-dark: #0F0B14;
    --bg-surface: #1A1520;
    --bg-card: #231C2B;

    /* Text */
    --text-primary: #F9F7FC;
    --text-secondary: #E8E0F4;
    --text-muted: rgba(232, 224, 244, 0.5);

    /* Gradients */
    --gradient-violet: linear-gradient(135deg, var(--violet-deep) 0%, var(--violet-electric) 100%);
    --gradient-gold: linear-gradient(135deg, var(--gold-earth) 0%, var(--gold-bright) 100%);
    --gradient-dark: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-surface) 100%);
}

/* ============================================
   BASE STYLES
   ============================================ */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
}

::selection {
    background-color: var(--violet-electric);
    color: white;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.heading-xl {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.1;
}

.heading-lg {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.2;
}

.heading-md {
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.3;
}

.body-text {
    font-family: 'Lora', serif;
    font-weight: 400;
    line-height: 1.7;
}

.mono-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875em;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--violet-electric);
    color: white;
}

.btn-primary:hover {
    background: var(--violet-core);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(124, 42, 232, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--violet-light);
}

.btn-secondary:hover {
    background: var(--violet-deep);
    border-color: var(--violet-electric);
}

.btn-gold {
    background: var(--gold-bright);
    color: var(--bg-dark);
}

.btn-gold:hover {
    background: var(--gold-earth);
    color: white;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid rgba(104, 75, 166, 0.2);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--violet-light);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-gradient {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-surface) 100%);
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--violet-electric);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ============================================
   HERO SECTIONS
   ============================================ */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center top, rgba(124, 42, 232, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.hero-gradient {
    background: linear-gradient(180deg,
        var(--bg-dark) 0%,
        rgba(68, 46, 110, 0.2) 50%,
        var(--bg-dark) 100%
    );
}

/* Hero Background Image Animation */
.hero .bg-cover {
    opacity: 0;
    transform: scale(1.1);
    animation: heroImageIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s forwards;
}

@keyframes heroImageIn {
    0% {
        opacity: 0;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hero Text Blur Animation */
.hero .animate-fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(8px);
    animation: fadeInUpBlur 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes fadeInUpBlur {
    0% {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Stagger delays con blur effect */
.hero .stagger-1 {
    animation-delay: 0.3s;
}

.hero .stagger-2 {
    animation-delay: 0.5s;
}

.hero .stagger-3 {
    animation-delay: 0.7s;
}

.hero .stagger-4 {
    animation-delay: 0.9s;
}

.hero .stagger-5 {
    animation-delay: 1.1s;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 5rem 0;
}

.section-lg {
    padding: 8rem 0;
}

.section-dark {
    background: var(--bg-surface);
}

.section-gradient {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-surface) 100%);
}

/* ============================================
   SERVICE ICONS - Professional SVG Outline Style
   ============================================ */
.service-icon {
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 42, 232, 0.1);
    border-radius: 0.75rem;
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
}

.service-icon svg {
    width: 1.75rem;
    height: 1.75rem;
    stroke: var(--violet-electric);
    stroke-width: 1.5;
    fill: none;
    transition: all 0.3s ease;
}

.card:hover .service-icon {
    background: rgba(124, 42, 232, 0.2);
    transform: scale(1.05);
}

.card:hover .service-icon svg {
    stroke: var(--violet-light);
}

/* ============================================
   SOLUTION BADGES
   ============================================ */
.badge-midgard {
    background: linear-gradient(135deg, var(--gold-earth) 0%, var(--gold-bright) 100%);
    color: var(--bg-dark);
}

.badge-blockchain {
    background: linear-gradient(135deg, var(--violet-deep) 0%, var(--violet-electric) 100%);
    color: white;
}

.badge-xecho {
    background: linear-gradient(135deg, var(--xecho-blue) 0%, #8BB3F0 100%);
    color: white;
}

/* ============================================
   FORMS
   ============================================ */
.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-card);
    border: 1px solid rgba(104, 75, 166, 0.3);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-family: 'Lora', serif;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--violet-electric);
    box-shadow: 0 0 0 3px rgba(124, 42, 232, 0.2);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-label {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-error {
    color: #EF4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(124, 42, 232, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(124, 42, 232, 0.6);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Stagger animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Scroll-triggered animations */
.animate-in {
    animation: fadeInUpBlur 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards !important;
}

/* Card scroll animation */
.card-visible {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

/* Smooth image load animation */
.hero-bg-loaded {
    animation: heroImageIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* ============================================
   DECORATIVE ELEMENTS
   ============================================ */
.glow-violet {
    box-shadow: 0 0 60px rgba(124, 42, 232, 0.3);
}

.glow-gold {
    box-shadow: 0 0 60px rgba(255, 204, 0, 0.3);
}

.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
                linear-gradient(135deg, var(--violet-deep), var(--violet-electric)) border-box;
}

.text-gradient {
    background: linear-gradient(135deg, var(--violet-light), var(--violet-electric));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-gold {
    background: linear-gradient(135deg, var(--gold-earth), var(--gold-bright));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   GRID PATTERNS
   ============================================ */
.grid-pattern {
    background-image:
        linear-gradient(rgba(104, 75, 166, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(104, 75, 166, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--violet-deep);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--violet-core);
}

/* ============================================
   UTILITIES
   ============================================ */
.container-narrow {
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

.aspect-square {
    aspect-ratio: 1 / 1;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero {
        min-height: 60vh;
    }

    .section {
        padding: 3rem 0;
    }

    .section-lg {
        padding: 5rem 0;
    }

    .heading-xl {
        font-size: 2.5rem;
    }

    .heading-lg {
        font-size: 2rem;
    }
}

/* ============================================
   HTMX LOADING STATES
   ============================================ */
.htmx-request {
    opacity: 0.5;
    pointer-events: none;
}

.htmx-request .loading-indicator {
    display: block;
}

.loading-indicator {
    display: none;
}

/* ============================================
   XECHO COLOR UTILITIES
   ============================================ */

.bg-xecho-blue { background-color: var(--xecho-blue); }
.text-xecho-blue { color: var(--xecho-blue); }
.border-xecho-blue { border-color: var(--xecho-blue); }
.hover\:bg-xecho-blue:hover { background-color: var(--xecho-blue); }
.hover\:text-xecho-blue:hover { color: var(--xecho-blue); }

.bg-xecho-blue\/10 { background-color: rgba(174, 210, 254, 0.1); }
.bg-xecho-blue\/20 { background-color: rgba(174, 210, 254, 0.2); }
.border-xecho-blue\/20 { border-color: rgba(174, 210, 254, 0.2); }
.border-xecho-blue\/30 { border-color: rgba(174, 210, 254, 0.3); }
.border-xecho-blue\/50 { border-color: rgba(174, 210, 254, 0.5); }

/* ============================================
   CAPTCHA SLIDER
   ============================================ */

.captcha-container {
    position: relative;
}

.captcha-slider {
    position: relative;
    width: 100%;
    height: 60px;
    background: var(--dark-surface);
    border: 2px solid var(--violet-deep);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.captcha-slider:hover {
    border-color: var(--violet-electric);
}

.captcha-slider.verified {
    border-color: #10B981;
    background: rgba(16, 185, 129, 0.1);
}

.captcha-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.captcha-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--violet-electric) 0%, var(--violet-light) 100%);
    transition: width 0.1s ease;
    border-radius: 8px;
}

.captcha-slider.verified .captcha-progress {
    background: linear-gradient(90deg, #10B981 0%, #34D399 100%);
}

.captcha-handle {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    cursor: grab;
    z-index: 10;
}

.captcha-handle:active {
    cursor: grabbing;
    transform: translateY(-50%) scale(0.95);
}

.captcha-slider.verified .captcha-handle {
    background: #10B981;
}

.captcha-text {
    position: absolute;
    left: 70px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    pointer-events: none;
    transition: color 0.3s ease;
}

.captcha-slider.verified .captcha-text {
    color: var(--text-primary);
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    header, footer, .no-print {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}
