/* OPTIMIZED BUILD */

/* ══════════════════════════════════════════════
   HELIX SOLUTIONS — main.css (MOBILE FIRST)
   ══════════════════════════════════════════════ */

/* ── VARIABLES (Mobile First Base) ── */
:root {
    --color-primary: #1E84C6;
    --color-primary-dark: #155a8a;
    --color-accent: #FF6600;
    --helix-gradient: linear-gradient(135deg, #FF6600, #1E84C6);
    --color-border: #e2e8f0;
    --color-bg: #eef2f5;
    --color-glass: rgba(255,255,255,0.2);
    --color-glass-border: rgba(255,255,255,0.4);
    --color-text: #ffffff;
    --color-text-secondary: #a0b4cc;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-400: #94a3b8;
    --font-primary: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition-default: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-blur: 16px; /* Reducido para mobile */
    --rotate: 0deg;
    
    /* Mobile First Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    
    /* Mobile First Typography */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
}

/* ── RESET (Mobile First) ── */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

html {
    background: transparent;
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* MOBILE FIRST BODY */
body {
    font-family: var(--font-primary);
    background: transparent;
    color: var(--color-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    /* Mobile: auto height, scrollable */
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Desktop adjustments */
@media (min-width: 1025px) {
    body {
        height: 100vh;
        overflow: hidden;
    }
    
    :root {
        --glass-blur: 24px;
    }
}

/* ── ACCESIBILIDAD ── */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; top: -40px; left: 0;
    background: var(--color-primary); color: white;
    padding: 0.5rem 1rem; text-decoration: none;
    font-weight: 600; font-size: 0.875rem; z-index: 9999;
    border-radius: 0 0 var(--radius-md) 0;
    transition: top 0.2s ease;
}
.skip-link:focus { top: 0; outline: 2px solid white; outline-offset: 2px; }

:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: 2px; }
button:focus-visible, a:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--color-primary); outline-offset: 2px;
}

.hidden { display: none !important; }

/* Canvas full-screen fondo HELIX - Mobile First */
#helix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    z-index: 1;
    pointer-events: none;
    display: block;
    background: transparent;
}

/* Destello en spans .text-gradient inline */
.text-gradient {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

/* ── LAYOUT PRINCIPAL (Mobile First) ── */
.glassscape {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Mobile: start */
    align-items: center;
    z-index: 2;
    padding: 0;
    position: relative;
    overflow-x: hidden;
    overflow-y: visible;
    
    /* Mobile spacing */
    padding-bottom: calc(env(safe-area-inset-bottom) + 4rem);
}

/* Desktop adjustments */
@media (min-width: 1025px) {
    .glassscape {
        height: 100vh;
        overflow: hidden;
        justify-content: space-evenly;
        padding: 1.5vh 1rem;
        padding-bottom: 1.5vh;
    }
}

/* ── NAV ── */
.top-nav { position: absolute; top: 1.5rem; left: 2rem; z-index: 30; }

.nav-brand { display: flex; align-items: center; gap: 0.8rem; }

.nav-logo {
    width: 95px; height: auto;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
    transition: filter var(--transition-default);
}
.nav-logo:hover { filter: drop-shadow(0 6px 12px rgba(0,216,255,0.3)); }

.nav-text-container {
    font-family: var(--font-mono); text-transform: uppercase;
    line-height: 1; display: flex; flex-direction: column;
}

.brand-helix {
    font-weight: 800; font-size: 3.5rem; letter-spacing: 0.05em;
    background: linear-gradient(135deg, #FF6600, #1E84C6, #FF6600, #1E84C6);
    background-size: 300% 300%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; display: inline-block;
    animation: gradientShift 4s ease infinite;
}
.brand-helix:hover { filter: brightness(1.2); }

.brand-solutions { font-weight: 700; font-size: 0.9rem; color: rgba(255,255,255,0.75); letter-spacing: 0.1em; }

/* ── HERO SECTION (Mobile First) ── */
.hero-structure {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    padding-top: 80px; /* Space for fixed nav */
    flex-shrink: 1;
}

.hero-title-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    margin-bottom: 0.25rem;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15));
    pointer-events: none;
}

.hero-title-container * {
    pointer-events: auto;
}

.hero-main-heading {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Mobile First Typography */
.hero-title-top {
    display: block;
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: clamp(1.6rem, 9vw, 3rem);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    background: linear-gradient(135deg, #FF6600, #1E84C6, #FF6600, #1E84C6);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    animation: gradientShift 4s ease infinite;
}

.hero-title-bottom {
    display: block;
    font-family: var(--font-mono);
    font-weight: 900;
    font-size: clamp(2.2rem, 12vw, 3.5rem);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin: -0.4rem 0 0;
    background: linear-gradient(135deg, #FF6600, #1E84C6, #FF6600, #1E84C6);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    animation: gradientShift 4s ease infinite;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 600px;
    margin: 0.75rem auto 0;
    padding: 0 0.25rem;
}

.hero-subtitle {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 0.75rem auto !important;
    line-height: 1.3;
}

.hero-subtitle.primary-bold {
    font-size: clamp(0.85rem, 3.8vw, 1rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem !important;
    letter-spacing: -0.01em;
    max-width: 100%;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

.hero-subtitle.secondary {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
    color: #ffffff;
}

/* Desktop Hero */
@media (min-width: 1025px) {
    .hero-structure {
        padding-top: 0;
        padding: 0 1rem;
    }
    
    .hero-title-container {
        margin-bottom: 0.5rem;
    }
    
    .hero-title-top {
        font-size: clamp(3rem, 8vw, 6rem);
    }
    
    .hero-title-bottom {
        font-size: clamp(4rem, 12vw, 9.5rem);
        margin: -1.5rem 0 0;
        letter-spacing: -0.04em;
    }
    
    .hero-copy {
        margin: 1.5rem auto 0;
    }
    
    .hero-subtitle.primary-bold {
        font-size: 1.4rem;
        margin-bottom: 0.5rem !important;
        max-width: 90%;
    }
    
    .hero-subtitle.secondary {
        font-size: 1.2rem;
    }
    
    .hero-title-container:hover .hero-title-top,
    .hero-title-container:hover .hero-title-bottom {
        filter: brightness(1.15) contrast(1.05);
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .hero-structure {
        padding-top: 72px;
    }
}

/* ── GRADIENTE / UTILIDADES ── */
.text-gradient {
    background: linear-gradient(135deg, #FF6600, #1E84C6, #FF6600, #1E84C6);
    background-size: 300% 300%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; font-weight: 800; display: inline;
    animation: gradientShift 4s ease infinite;
}

/* ── DECK / CARDS ── */
.deck-container {
    display: flex; gap: 2rem; padding: 1rem 3rem;
    perspective: 1200px; z-index: 20;
    align-items: center; justify-content: center;
    flex-wrap: wrap; max-width: 1400px;
    margin: 0 auto; flex-shrink: 1; max-height: 45vh;
}

.card {
    width: min(260px, 18vw); height: min(380px, 40vh);
    position: relative; z-index: 1; cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: visible; border-radius: var(--radius-lg);
    background: transparent; border: none;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1); will-change: transform;
}

.card-inner {
    position: absolute; inset: 0; border-radius: inherit; overflow: hidden;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid rgba(255,255,255,0.3);
    z-index: 2; transform: translateZ(0);
}

.card-bg {
    position: absolute; inset: 0; z-index: 0;
    transition: transform 0.1s ease-out;
    overflow: hidden; background-color: #000;
}

.card-content {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    z-index: 1; color: white; transform: translateZ(30px);
}
.card-content h3 {
    font-size: 1.2rem; font-weight: 800; margin-bottom: 0.4rem;
    letter-spacing: 0.05em; text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.card-content p {
    font-size: 0.85rem; opacity: 0.9;
    font-family: var(--font-mono); text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ── MODAL BACKDROP ── */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* ── MODALES (Global Dark Theme) ── */
.modal-glass {
 width: 90%; max-width: 550px; max-height: 90vh;
 background: linear-gradient(135deg, #155A8A -33%, #000000 50%, #FF6600 166%);
 border-radius: var(--radius-lg);
 padding: 1.5rem 2rem;
 box-shadow: 0 30px 60px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(255,255,255,0.1);
 position: relative;
 transform: translateY(30px) scale(0.95);
 transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
 overflow-y: auto; 
 border: 1px solid rgba(255,255,255,0.15);
 display: flex; flex-direction: column;
 /* Scrollbar oculta — navegación via botones HELIX */
 scrollbar-width: none;
 color: #ffffff;
}
.modal-glass::-webkit-scrollbar { display: none; }
.modal-backdrop.active .modal-glass { transform: translateY(0) scale(1); }

/* Ocultar scrollbars en contenedores internos de modales */
.modal-glass::-webkit-scrollbar-track,
.trinity-content-box::-webkit-scrollbar-track,
.terms-body::-webkit-scrollbar-track { display: none; }

.trinity-content-box { scrollbar-width: none; }
.trinity-content-box::-webkit-scrollbar { display: none; }

.terms-body { scrollbar-width: none; }
.terms-body::-webkit-scrollbar { display: none; }

/* ── BOTONES DE SCROLL HELIX ── */
.helix-scroll-btn {
    position: absolute;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    /* Gradiente animado HELIX */
    background: linear-gradient(135deg, #FF6600, #1E84C6, #FF6600, #1E84C6);
    background-size: 300% 300%;
    animation: gradientShift 4s ease infinite;
    box-shadow: 0 4px 16px rgba(255,102,0,0.35), 0 0 0 1px rgba(255,255,255,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}
.helix-scroll-btn.visible {
    opacity: 1;
    pointer-events: auto;
}
.helix-scroll-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 24px rgba(255,102,0,0.55), 0 0 0 2px rgba(255,255,255,0.2);
}
.helix-scroll-btn:active { transform: scale(0.95); }

.helix-scroll-btn svg {
    width: 16px;
    height: 16px;
    stroke: #ffffff;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}

.helix-scroll-btn--top { top: 3.5rem; }
.helix-scroll-btn--bottom { bottom: 1rem; }

/* En mobile, botones más chicos */
@media (max-width: 768px) {
    .helix-scroll-btn {
        width: 30px;
        height: 30px;
        right: 0.6rem;
    }
    .helix-scroll-btn svg { width: 13px; height: 13px; }
    .helix-scroll-btn--top { top: 3rem; }
}

.modal-header h2 { font-family: var(--font-mono); font-size: 1.3rem; margin-bottom: 0.3rem; font-weight: 800; color: #ffffff; }
.modal-header p { color: rgba(255,255,255,0.7); font-size: 0.8rem; margin-bottom: 1rem; }

.close-modal {
    position: absolute; top: 1.2rem; right: 1.2rem;
    background: none; border: none; padding: 7px;
    width: 38px; height: 38px;
    cursor: pointer; z-index: 10;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: transform 0.25s cubic-bezier(0.23,1,0.32,1), background 0.2s;
    filter: drop-shadow(0 0 5px rgba(255,102,0,0.3));
}
.close-modal:hover {
    transform: rotate(90deg) scale(1.15);
    background: rgba(255,102,0,0.12);
    filter: drop-shadow(0 0 12px rgba(255,102,0,0.65));
}
.close-modal:active { transform: rotate(90deg) scale(0.9); }
.close-modal svg { display: block; }

/* ── FORMULARIO (Mobile First) ── */
.form-group {
    margin-bottom: 0.6rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.6rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 0.85rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all 0.2s;
    background: transparent !important;
    color: #ffffff !important;
    color-scheme: dark;
    -webkit-appearance: none;
    appearance: none;
}

textarea {
    background: transparent !important;
    min-height: 100px;
}

input[type="color"] {
    width: 100%;
    height: 50px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    background: none;
    padding: 0.25rem;
}

.file-input {
    width: 100%;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    padding: 0.4rem;
    color-scheme: dark;
}

.file-input::file-selector-button {
    margin-right: 15px;
    border: 1px solid rgba(255,255,255,0.2);
    background: transparent;
    padding: 8px 14px;
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    transition: background 0.2s;
}

.btn-primary {
    background: var(--helix-gradient);
    color: white;
    width: 100%;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: none;
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.05em;
    box-shadow: 0 10px 20px -5px rgba(0,216,255,0.4);
    -webkit-tap-highlight-color: transparent;
}

/* Desktop Forms */
@media (min-width: 768px) {
    .form-row {
        flex-direction: row;
        gap: 1rem;
    }
    
    input[type="text"],
    input[type="email"],
    textarea {
        padding: 0.65rem;
        font-size: 0.9rem;
    }
    
    input[type="color"] {
        height: 45px;
    }
    
    .btn-primary {
        padding: 1.2rem;
        font-size: 1rem;
    }
}

/* Focus states */
input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255,255,255,0.05) !important;
    box-shadow: 0 0 0 4px rgba(0,216,255,0.1);
}

.file-input::file-selector-button:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(255,102,0,0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Pricing display remains the same */
.pricing-display {
    background: transparent;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
    border: 1px dashed rgba(255,255,255,0.15);
}

.price-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
    color: #ffffff;
    font-weight: 600;
}

.price-row.highlight {
    color: var(--color-accent);
    font-weight: 800;
    font-size: 1.1rem;
}

.terms-note {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    margin-top: 0.8rem;
}
.btn-primary[disabled] { opacity: 0.7; pointer-events: none; filter: grayscale(0.5); }
.btn-disabled { opacity: 0.5; pointer-events: none; filter: grayscale(0.3); }

/* ── CHECKBOX DE TÉRMINOS ── */
.terms-checkbox-container { margin: 1rem 0 0.5rem; padding: 0.75rem; background: rgba(255,102,0,0.05); border-radius: var(--radius-md); border: 1px solid rgba(0,216,255,0.15); display: flex; flex-direction: column; gap: 0.6rem; }
.checkbox-label { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; font-size: 0.85rem; }
.terms-checkbox { width: 18px; height: 18px; cursor: pointer; accent-color: var(--color-primary); flex-shrink: 0; }
.checkbox-text { color: rgba(255,255,255,0.85); line-height: 1.4; }

.terms-link { background: none; border: none; padding: 0; font-family: var(--font-primary); font-size: 0.85rem; font-weight: 700; display: inline-block; cursor: pointer; text-decoration: none; position: relative; background: linear-gradient(135deg, #FF6600, #1E84C6, #FF6600); background-size: 200% 200%; background-position: 0% 50%; -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; transition: background-position 0.3s ease; align-self: flex-start; }
.terms-link:hover { background-position: 100% 50%; text-decoration: underline; text-decoration-color: var(--color-primary); text-underline-offset: 4px; }

/* ── TRINITY MODAL ── */
.trinity-content-box { max-width: 700px !important; width: 90% !important; max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column; margin: 0 auto; }

.trinity-body { line-height: 1.4; color: #ffffff; font-size: 0.85rem; overflow: visible; flex: 1; padding-right: 0.5rem; }
.trinity-body p { margin-bottom: 0.6rem; font-size: 0.85rem; color: rgba(255,255,255,0.85); }
.trinity-body strong { font-weight: 800; color: #ffffff; }

.trinity-subtitle { font-family: var(--font-mono); font-weight: 800; font-size: 0.95rem; margin: 1rem 0 0.5rem; color: #00D8FF; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 0.3rem; }

.trinity-list { list-style: none; padding-left: 0.75rem; margin-bottom: 0.6rem; }
.trinity-list li { margin-bottom: 0.5rem; position: relative; font-size: 0.85rem; }
.main-list li { font-size: 0.9rem; }
.sub-list { padding-left: 2.5rem; }
.sub-list li::before { content: '•'; color: var(--color-primary); position: absolute; left: -1.5rem; font-weight: bold; }

.trinity-comparison { list-style: none; padding: 0; margin-top: 1.5rem; }
.trinity-comparison li { padding: 0.75rem; border-radius: var(--radius-md); margin-bottom: 0.6rem; font-size: 0.85rem; border: 1px solid transparent; }
.trinity-comparison li.bad { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.3); color: #fca5a5; }
.trinity-comparison li.good { background: rgba(22, 101, 52, 0.2); border-color: rgba(22, 101, 52, 0.4); color: #86efac; font-weight: 600; }

/* ── PREMIUM BLOCKS (Trinity modal) ── */
.premium-container { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; overflow: hidden; }
.helix-premium-block { position: relative; padding: 0.75rem; border-radius: var(--radius-md); background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); background-clip: padding-box; overflow: hidden; cursor: pointer; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); opacity: 0; transform: translateY(20px); animation: slideInUp 0.6s ease forwards; }
.helix-premium-block[data-delay="0"] { animation-delay: 0.1s; }
.helix-premium-block[data-delay="1"] { animation-delay: 0.2s; }
.helix-premium-block[data-delay="2"] { animation-delay: 0.3s; }
.helix-premium-block[data-delay="3"] { animation-delay: 0.4s; }
.helix-premium-block[data-delay="4"] { animation-delay: 0.5s; }

.helix-premium-block::before { content: ''; position: absolute; inset: -2px; border-radius: inherit; background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 50%, var(--color-accent) 100%); background-size: 200% 200%; z-index: -1; opacity: 0; transition: opacity 0.4s ease; animation: gradientShift 3s ease infinite; }
.helix-premium-block:hover::before { opacity: 1; }
.helix-premium-block:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 20px 40px rgba(255,102,0,0.15), 0 10px 20px rgba(0,216,255,0.15); }

.premium-glow { position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(255,102,0,0.3) 0%, transparent 70%); opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
.helix-premium-block:hover .premium-glow { opacity: 1; animation: glowPulse 2s ease-in-out infinite; }

.premium-content { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 1rem; }
.premium-icon { font-size: 1.2rem; flex-shrink: 0; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); transition: transform 0.3s ease; }
.helix-premium-block:hover .premium-icon { transform: scale(1.2) rotate(5deg); }
.premium-content p { margin: 0; font-size: 0.85rem; line-height: 1.4; color: rgba(255,255,255,0.9); font-weight: 500; }
.premium-content strong { font-weight: 800; background: var(--helix-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: inline-block; }

/* ── PAGO ── */
.payment-modal-content { max-width: 550px; text-align: center; padding: 2rem; }
.payment-body { padding: 1rem 0; }
.payment-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 300px; }

.spinner-large { width: 48px; height: 48px; border: 4px solid rgba(0,216,255,0.2); border-top-color: var(--color-primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 1.5rem; }
.spinner { width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.8s cubic-bezier(0.4,0,0.2,1) infinite; display: inline-block; vertical-align: middle; margin-right: 10px; }

.qr-wrapper { background: rgba(0,0,0,0.3); padding: 2rem; border-radius: var(--radius-lg); margin-bottom: 1.5rem; border: 1px solid rgba(255,255,255,0.15); }
.qr-code { width: 200px; height: 200px; margin: 0 auto; display: flex; align-items: center; justify-content: center; background: white; padding: 10px; border-radius: 8px; }
.qr-code svg, .qr-code img, .qr-code canvas { width: 100%; height: 100%; display: block; }
.qr-fallback { margin-top: 1rem; color: #ffffff; }

.amount-box { background: rgba(0,0,0,0.4); padding: 1rem; border-radius: var(--radius-md); margin-bottom: 1rem; border: 1px solid rgba(255,255,255,0.15); }
.amount-label { font-size: 0.9rem; color: rgba(255,255,255,0.7); margin-right: 0.5rem; }
.amount-value { font-size: 1.5rem; font-weight: 800; background: linear-gradient(135deg, #FF6600, #1E84C6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.payment-timer { background: rgba(0,0,0,0.4); color: #ffffff; padding: 0.75rem; border-radius: var(--radius-md); font-family: var(--font-mono); font-size: 0.9rem; font-weight: 600; margin-bottom: 1rem; }
.payment-instructions { text-align: left; background: rgba(0,0,0,0.2); padding: 1rem; border-radius: var(--radius-md); color: #ffffff; border: 1px solid rgba(255,255,255,0.1); }
.payment-instructions p { margin-bottom: 0.5rem; font-size: 0.9rem; }
.payment-instructions p:last-child { margin-bottom: 0; }
.payment-instructions .small { font-size: 0.75rem; color: rgba(255,255,255,0.6); margin-top: 0.5rem; }

.success-icon, .error-icon { font-size: 4rem; margin-bottom: 1rem; animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.payment-footer { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.1); }

/* ── TÉRMINOS MODAL ── */
.terms-content-box { max-width: 700px !important; width: 90% !important; }

.terms-body { padding: 0.5rem 0; max-height: 60vh; overflow-y: auto; font-size: 0.85rem; line-height: 1.5; color: rgba(255,255,255,0.85); scrollbar-width: thin; scrollbar-color: var(--color-primary) rgba(0,0,0,0.3); }
.terms-body::-webkit-scrollbar { width: 10px; }
.terms-body::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); border-radius: 10px; }
.terms-body::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #FF6600, #1E84C6, #FF6600); border-radius: 10px; border: 2px solid rgba(0,0,0,0.3); }
.terms-body::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #FF8A00, #00D8FF, #FF8A00); }

.terms-body h3 { font-family: var(--font-mono); font-size: 0.95rem; font-weight: 700; margin: 1.2rem 0 0.3rem; color: #ffffff; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 0.25rem; }
.terms-body h3:first-of-type { margin-top: 0; }
.terms-body h4 { font-family: var(--font-mono); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.05em; margin-top: 1.1rem; margin-bottom: 0.4rem; color: #ffffff; opacity: 0.85; }
.terms-body p { margin-bottom: 0.8rem; }
.terms-body ul { margin: 0.5rem 0 1rem 1.5rem; }
.terms-body li { margin-bottom: 0.3rem; }
.terms-body code { font-family: var(--font-mono); font-size: 0.8rem; background: rgba(255,255,255,0.1); padding: 0.2rem 0.4rem; border-radius: 4px; color: #00D8FF; }

.terms-highlight-block { position: relative; border: 1px solid rgba(255,255,255,0.15); border-radius: 12px; padding: 1.25rem 1.5rem; margin: 1.25rem 0; overflow: hidden; background: rgba(0,0,0,0.3); }
.terms-highlight-glow { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(30,132,198,0.08) 0%, rgba(255,102,0,0.06) 100%); pointer-events: none; }
.terms-highlight-inner { position: relative; z-index: 1; }
.terms-highlight-inner p { margin: 0.25rem 0 0; color: #ffffff; }
.terms-highlight-label { display: inline-block; font-family: var(--font-mono); font-weight: 800; font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 0.6rem; }

.terms-warning-block { border-color: rgba(255,102,0,0.3); background: rgba(255,102,0,0.1); }
.terms-warning-glow { background: linear-gradient(135deg, rgba(255,102,0,0.1) 0%, rgba(255,153,0,0.06) 100%) !important; }

.terms-deliverables { position: relative; border-left: 3px solid transparent; border-image: linear-gradient(180deg, #1E84C6, #FF6600) 1; padding: 1rem 1.25rem; margin: 1.25rem 0; background: rgba(0,0,0,0.3); border-radius: 0 8px 8px 0; border: 1px solid rgba(255,255,255,0.1); border-left: none; }
.terms-deliverables-glow { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(30,132,198,0.06), transparent); pointer-events: none; border-radius: 0 8px 8px 0; }
.terms-deliverables-title { font-family: var(--font-mono); font-weight: 800; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.75rem; color: #ffffff; }
.terms-deliverables ul { list-style: none; padding: 0; margin: 0; position: relative; z-index: 1; }
.terms-deliverables li { padding: 0.3rem 0; font-size: 0.9rem; color: #ffffff; }

.terms-badge { display: inline-block; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.2em 0.6em; border-radius: 20px; background: linear-gradient(135deg, #1E84C6, #FF6600); color: #fff; vertical-align: middle; margin-left: 0.5rem; font-family: var(--font-mono); }

.terms-footer-block { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; }

/* ── TOASTS ── */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9000; }
.toast {
    padding: 16px 24px; border-radius: 12px; color: white; margin-bottom: 10px;
    font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px -5px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px); animation: slideIn 0.3s ease;
}
.toast.success { background: rgba(16,185,129,0.9); border-left: 4px solid #059669; }
.toast.error { background: rgba(239,68,68,0.9); border-left: 4px solid #b91c1c; }

/* ── SKELETON ── */
.skeleton { background: rgba(255,255,255,0.3); animation: pulse 1.5s infinite; }

/* ── FOOTER ── */
.helix-powered { position: fixed; bottom: 0; width: 100%; text-align: center; padding: 15px; z-index: 50; pointer-events: none; mix-blend-mode: overlay; }
.helix-powered a { pointer-events: auto; font-size: 11px; color: #1a1a1a; opacity: 0.6; text-decoration: none; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 800; transition: opacity 0.2s; }
.helix-powered a:hover { opacity: 1; color: var(--color-primary); }

/* ── HELICES (Portfolio) ── */
.helices-modal-content { max-width: 1200px !important; width: 95% !important; max-height: 90vh !important; padding: 2rem !important; }

.helices-search-container { margin-bottom: 2rem; position: sticky; top: 0; z-index: 10; background: rgba(0,0,0,0.5); backdrop-filter: blur(10px); padding: 1rem; border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,0.15); }
.helices-search-input { width: 100%; padding: 1rem 1.5rem; border: 1px solid rgba(255,255,255,0.2); border-radius: 50px; font-family: var(--font-primary); font-size: 1rem; transition: all 0.3s ease; background: rgba(0,0,0,0.4); color: #ffffff; }
.helices-search-input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(0,216,255,0.1); }

.helices-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px,1fr)); gap: 1.5rem; max-height: 65vh; overflow-y: auto; overflow-x: visible; padding: 1rem 1rem 2rem; scrollbar-width: none; }
.helices-grid::-webkit-scrollbar { display: none; }

.helices-card { width: 100%; height: 220px; position: relative; z-index: 1; cursor: pointer; transform-style: preserve-3d; transition: transform 0.4s cubic-bezier(0.23,1,0.32,1); overflow: visible; border-radius: var(--radius-md); background: transparent; border: none; box-shadow: 0 10px 25px rgba(0,0,0,0.1); will-change: transform; }
.helices-card-inner { 
    position: absolute; 
    inset: 0; 
    border-radius: inherit; 
    overflow: hidden; 
    background: rgba(255,255,255,0.1); 
    backdrop-filter: blur(var(--glass-blur)); 
    -webkit-backdrop-filter: blur(var(--glass-blur)); 
    border: 1px solid rgba(255,255,255,0.3); 
    z-index: 2; 
    transform: translateZ(0); }
.helices-card-tags-wrapper {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 20;
    border-radius: inherit;
}
.helices-card-tags-wrapper > * { pointer-events: auto; }
.helices-card-bg { position: absolute; top: -10%; left: -10%; width: 120%; height: 120%; background-size: cover; background-position: center; opacity: 0.7; transition: transform 0.15s ease-out; z-index: 0; filter: saturate(1.2); }
.helices-card-content { position: absolute; bottom: 0; left: 0; width: 100%; padding: 1rem; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); z-index: 1; color: white; transform: translateZ(30px); }
.helices-card-title { font-size: 1rem; font-weight: 800; margin-bottom: 0.3rem; letter-spacing: 0.05em; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }

.helices-card:hover { }

.helices-card.skeleton { background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; height: 220px; border-radius: var(--radius-md); }

.helices-footer { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--color-border); text-align: center; font-size: 0.9rem; color: var(--color-text-secondary); font-family: var(--font-mono); }

/* ── PLACEHOLDER / TEXTAREA ── */
input::placeholder, textarea::placeholder { color: rgba(255,255,255,0.5); font-style: italic; font-size: 0.85rem; transition: color 0.2s; }
input:focus::placeholder, textarea:focus::placeholder { opacity: 0.5; }
.placeholder-updated { animation: placeholderPulse 0.3s ease; border-color: var(--color-primary) !important; }

/* ── ANIMACIONES ── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideInUp { to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes glowPulse { 0%, 100% { transform: scale(1); opacity: 0.3; } 50% { transform: scale(1.2); opacity: 0.6; } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes gradientShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes placeholderPulse { 0% { background-color: #fff; } 50% { background-color: rgba(0,216,255,0.05); } 100% { background-color: #fff; } }
@keyframes ripple { 0% { transform: scale(0); opacity: 1; } 100% { transform: scale(4); opacity: 0; } }
@keyframes heroPulse { 0%, 100% { transform: scale(1); filter: brightness(1) contrast(1); } 25% { transform: scale(1.02) rotate(-1deg); filter: brightness(1.3) contrast(1.2); } 75% { transform: scale(1.02) rotate(1deg); filter: brightness(1.3) contrast(1.2); } }
@keyframes gradientPulse { 0% { filter: brightness(1) saturate(1); transform: scale(1); } 50% { filter: brightness(1.5) saturate(1.5); transform: scale(1.05); } 100% { filter: brightness(1) saturate(1); transform: scale(1); } }

.ripple-effect { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(255,102,0,0.6), rgba(30,132,198,0.6)); width: 20px; height: 20px; pointer-events: none; animation: ripple 0.8s ease-out; }

/* Clases de animación JS */
.hero-title-top, .hero-title-bottom, .brand-helix { transition: all 0.3s ease; }
.hero-title-top.pulse, .hero-title-bottom.pulse, .brand-helix.pulse { animation: heroPulse 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); }
.text-gradient.pulse { animation: gradientPulse 0.6s ease-out; }

/* ── MEDIA QUERIES ── */
@media (max-width: 768px) {
    body {
        position: relative;
        overflow-y: auto;
        overflow-x: hidden;
        height: auto;
        min-height: 100dvh;
    }

    .glassscape {
        overflow: visible;
        justify-content: flex-start;
        padding-top: 0 !important;
        gap: 0;
        padding-bottom: 6rem;
    }

    .top-nav {
        position: fixed !important;
        top: 0; left: 0; right: 0;
        width: 100%;
        padding: 0.5rem 1rem !important;
        background: rgba(0,0,0,0.65);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 100;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .nav-brand { gap: 0.4rem; }
    .nav-logo { width: 42px; }
    .brand-helix { font-size: 1.7rem; }
    .brand-solutions { font-size: 0.6rem; }

    /* Espaciado correcto debajo de la nav fija */
    .hero-structure {
        margin: 0 auto;
        padding: 0 1rem;
        padding-top: 80px; /* altura de la nav + holgura */
        width: 100%;
    }

    .hero-title-container {
        margin-bottom: 0.25rem;
    }

    /* Eliminar el margin negativo que causa solapamiento */
    .hero-title-bottom {
        margin-top: -0.5rem !important;
        font-size: clamp(2.8rem, 13vw, 5rem) !important;
    }

    .hero-title-top {
        font-size: clamp(1.8rem, 8vw, 3rem) !important;
    }

    .hero-copy {
        max-width: 100%;
        margin-top: 0.75rem;
        padding: 0 0.25rem;
    }

    .hero-subtitle.primary-bold {
        font-size: clamp(0.95rem, 3.5vw, 1.15rem);
        max-width: 100%;
        margin-bottom: 0.75rem !important;
    }

    .hero-subtitle.secondary { font-size: 1rem; }

    .trinity-btn-container {
        margin-top: 0.5rem;
    }

    /* Portal card mobile */
    .portal-master-container {
        margin-top: 1.5rem;
        padding: 0 1rem;
        width: 100%;
    }

    .hero-portal-card {
        width: min(280px, 78vw);
        height: min(280px, 78vw);
    }

    .portal-title {
        font-size: 1.5rem;
    }

    .deck-container {
        padding: 0 1rem 1rem !important;
        max-height: none;
        gap: 0;
    }

    .card {
        width: 80vw !important;
        height: 56vw !important;
        max-width: 340px !important;
        max-height: 240px !important;
        margin: 0 auto;
    }

    /* Modales */
    .form-row { flex-direction: column; gap: 0; }
    input[type="text"], input[type="email"], textarea { padding: 0.85rem; font-size: 1rem; }
    input[type="color"] { height: 50px; }
    .btn-primary { padding: 1rem; font-size: 0.95rem; }
    .modal-glass {
        padding: 1.5rem 1rem;
        width: 95% !important;
        max-width: 100% !important;
        max-height: 88vh;
    }
    .trinity-content-box { max-width: 100% !important; }
    .modal-header h2 { font-size: 1.05rem; }
    .modal-header p { font-size: 0.75rem; margin-bottom: 0.75rem; }
    .close-modal { top: 0.9rem; right: 0.9rem; }
    .trinity-body { font-size: 0.9rem; line-height: 1.5; }
    .trinity-body p { font-size: 0.9rem; margin-bottom: 0.75rem; }
    .premium-content p { font-size: 0.9rem; line-height: 1.5; }
    .helix-premium-block { padding: 0.9rem; }
    .terms-body { font-size: 0.8rem; max-height: 50vh; }
    .terms-body h3 { font-size: 0.9rem; }
    .checkbox-label { font-size: 0.8rem; }

    /* Botones flotantes */
    #helices-toggle { transform: scale(0.85); transform-origin: bottom right; }
    #helices-toggle img { width: 50px !important; height: 50px !important; }
    .helices-minimal-text { font-size: 1rem !important; }
}

@media (max-width: 1024px) {
    body { height: auto; min-height: 100dvh; overflow-y: auto; overflow-x: hidden; }
    .glassscape {
        height: auto;
        min-height: 100svh;
        overflow: visible;
        padding: 0;
        padding-bottom: 5rem;
        justify-content: flex-start;
        gap: 0;
    }
    .card { width: 260px; height: 380px; }
    .deck-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
        gap: 1.5rem;
        max-height: none;
    }
}

@media (max-width: 480px) {
    .glassscape { padding: 0; padding-bottom: 5rem; }
    .top-nav { padding: 0.5rem 0.75rem !important; }
    .nav-logo { width: 38px; }
    .brand-helix { font-size: 1.4rem; }
    .brand-solutions { font-size: 0.55rem; }

    .hero-structure { padding-top: 72px; }

    .hero-subtitle.primary-bold { font-size: clamp(0.85rem, 3.8vw, 1rem); }
    .hero-title-top { font-size: clamp(1.6rem, 9vw, 2.5rem) !important; }
    .hero-title-bottom { font-size: clamp(2.2rem, 12vw, 3.5rem) !important; margin-top: -0.4rem !important; }

    .hero-portal-card {
        width: min(250px, 75vw);
        height: min(250px, 75vw);
    }
    .portal-title { font-size: 1.3rem; }
    .portal-subtitle { font-size: 0.7rem; }

    .deck-container { padding: 1rem 0.25rem 2rem; }
    .card { max-width: 100%; height: 350px; }
    .qr-code { width: 150px; height: 150px; }
    #helices-toggle { transform: scale(0.75); }
    #helices-toggle img { width: 45px !important; height: 45px !important; }
    .helices-minimal-text { font-size: 0.9rem !important; }
}

@media (max-height: 800px) and (min-width: 1025px) {
    .card { width: 220px; height: 320px; }
    .deck-container { gap: 1.5rem; padding: 0.5rem 2rem; max-height: 38vh; }
    .hero-title-top { font-size: clamp(2.5rem, 6vw, 4.5rem); }
    .hero-title-bottom { font-size: clamp(3rem, 8vw, 6rem); }
}

/* ── COLOR PICKER HEX ── */
.color-input-group {
    display: flex; align-items: center; gap: 0.5rem;
    border: 1px solid rgba(255,255,255,0.2); border-radius: var(--radius-md);
    padding: 0.3rem 0.6rem; background: transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.color-input-group:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(0,216,255,0.1);
}
.color-input-group input[type="color"] {
    width: 32px; height: 32px; border: none;
    border-radius: 6px; padding: 0; cursor: pointer;
    background: none; flex-shrink: 0;
}
.color-hex-input {
    border: none !important; background: transparent !important;
    padding: 0 !important; width: 100%;
    font-family: var(--font-mono) !important;
    font-size: 0.9rem !important; font-weight: 700;
    color: #ffffff !important; text-transform: uppercase;
    box-shadow: none !important;
}
.color-hex-input:focus { outline: none !important; box-shadow: none !important; }

/* ── TAGS (HELIXES Portfolio) ── */
.helices-card-tags {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
}

.tags-trigger {
    background: linear-gradient(135deg, #FF6600, #1E84C6);
    border: none;
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #ffffff;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}
.tags-trigger:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 18px rgba(255,102,0,0.5);
}

.tags-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(4, 8, 18, 0.97);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 0.65rem;
    display: none;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 190px;
    max-width: 250px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.7);
    backdrop-filter: blur(16px);
    z-index: 200;
    animation: fadeInDown 0.15s ease;
}
.tags-dropdown.open { display: flex; }

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tag-pill {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 20px;
    padding: 0.22rem 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 700;
    color: rgba(255,255,255,0.8);
    letter-spacing: 0.04em;
    text-transform: lowercase;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    user-select: none;
}
.tag-pill:hover {
    background: linear-gradient(135deg, rgba(255,102,0,0.35), rgba(30,132,198,0.35));
    border-color: rgba(255,102,0,0.5);
    color: #ffffff;
    transform: scale(1.06);
}
.tag-pill.active {
    background: linear-gradient(135deg, #FF6600, #1E84C6);
    border-color: transparent;
    color: #ffffff;
}

/* ── HELIXES STRIP EN EL HERO ── */
.helixes-hero-strip {
    width: 100%;
    max-width: 560px;
    margin: 0.75rem auto 0;
    padding: 0 1rem;
    /* Espacio explícito hacia abajo para no pisar el portal */
    margin-bottom: 0.5rem;
}

.helixes-strip-inner {
    all: unset;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    cursor: pointer;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.2s ease;
    box-sizing: border-box;
}

.helixes-strip-inner:hover {
    border-color: rgba(255,102,0,0.4);
    background: rgba(0,0,0,0.5);
    transform: translateY(-1px);
}

.helixes-strip-inner:active { transform: translateY(0); }

.helixes-strip-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(0,216,255,0.3));
}

.helixes-strip-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    text-align: left;
}

.helixes-strip-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    background: linear-gradient(135deg, #FF6600, #1E84C6, #FF6600, #1E84C6);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
}

.helixes-strip-desc {
    font-family: var(--font-primary);
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
    line-height: 1.35;
    /* En desktop cortamos con ellipsis; en mobile dejamos que wrappee */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.helixes-strip-arrow {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 800;
    background: linear-gradient(135deg, #FF6600, #1E84C6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.helixes-strip-inner:hover .helixes-strip-arrow {
    transform: translateX(4px);
}

@media (max-width: 768px) {
    .helixes-strip-desc {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        font-size: 0.65rem;
    }
    .helixes-strip-title {
        font-size: 0.68rem;
    }
}

@media (max-width: 480px) {
    .helixes-strip-logo { width: 26px; height: 26px; }
    .helixes-strip-desc { font-size: 0.62rem; }
    .helixes-strip-title { font-size: 0.65rem; }
}

/* ── SCROLLBARS HELIX GLOBAL (solo body/page, modales usan botones propios) ── */
html, body {
    scrollbar-width: thin;
    scrollbar-color: #FF6600 rgba(0,0,0,0.2);
}
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 6px; height: 6px; }
html::-webkit-scrollbar-track, body::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 10px; }
html::-webkit-scrollbar-thumb, body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #FF6600, #1E84C6, #FF6600);
    border-radius: 10px;
}

/* ── MASTER PORTAL CTA (Mobile First) ── */
.portal-master-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 1.5rem auto 0;
    z-index: 20;
    perspective: 1200px;
}

.hero-portal-card {
    width: min(280px, 78vw);
    height: min(280px, 78vw);
    border: none;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-portal-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: transparent;
    border: none;
    box-shadow: none;
}

.hero-portal-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    pointer-events: none;
    padding: 1.5rem;
}

.portal-title {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 900;
    margin: 0;
    letter-spacing: 0.05em;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

.portal-subtitle {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #ffffff;
    opacity: 0.85;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

/* Desktop Portal */
@media (min-width: 768px) {
    .portal-master-container {
        margin: 2rem auto 0;
    }
    
    .hero-portal-card {
        width: min(340px, 85vw);
        height: min(340px, 85vw);
    }
    
    .portal-title {
        font-size: 2rem;
    }
    
    .portal-subtitle {
        font-size: 0.85rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .hero-portal-card {
        width: min(250px, 75vw);
        height: min(250px, 75vw);
    }
    
    .portal-title {
        font-size: 1.3rem;
    }
    
    .portal-subtitle {
        font-size: 0.65rem;
    }
}

/* Animación de Geometría Viva (Morphing Más Aleatorio y Caótico) */
@keyframes portalMorph {
    0%, 100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    20% { border-radius: 55% 45% 35% 65% / 50% 60% 40% 50%; }
    40% { border-radius: 70% 30% 60% 40% / 40% 40% 60% 60%; }
    60% { border-radius: 35% 65% 40% 60% / 60% 30% 70% 40%; }
    80% { border-radius: 60% 40% 50% 50% / 30% 60% 40% 70%; }
}

/* ============================================
   BOTÓN TRINITY (Mobile First)
   ============================================ */

.trinity-fluid-btn {
    position: relative;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.7rem 1.8rem;
    border-radius: 60px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    z-index: 5;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.6);
    -webkit-tap-highlight-color: transparent;
}

.trinity-fluid-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 10;
    position: relative;
}

.trinity-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 65px;
    background: transparent;
    border: 5px solid transparent;
    background-image: linear-gradient(135deg, #FF6600, #1E84C6, #FF6600, #1E84C6);
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.7;
    animation: ringFlow 6s ease infinite;
    pointer-events: none;
    z-index: 2;
    box-shadow: 0 0 15px rgba(255, 102, 0, 0.3);
}

.trinity-glow {
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 68px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 102, 0, 0.3), rgba(30, 132, 198, 0.3), transparent 70%);
    filter: blur(8px);
    opacity: 0.4;
    animation: glowPulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

/* Desktop Trinity Button */
@media (min-width: 768px) {
    .trinity-fluid-btn {
        padding: 0.9rem 2.8rem;
    }
    
    .trinity-fluid-text {
        font-size: 0.95rem;
        letter-spacing: 0.2em;
    }
    
    .trinity-ring {
        top: -6px;
        left: -6px;
        right: -6px;
        bottom: -6px;
        border-radius: 66px;
    }
    
    .trinity-glow {
        top: -12px;
        left: -12px;
        right: -12px;
        bottom: -12px;
        border-radius: 72px;
    }
}

/* Hover/Active states */
.trinity-fluid-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px -5px rgba(255, 102, 0, 0.4);
    background-color: rgba(0, 0, 0, 0.7);
}

.trinity-fluid-btn:hover .trinity-ring {
    opacity: 1;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 68px;
    animation: ringFlow 4s ease infinite;
    box-shadow: 0 0 25px rgba(255, 102, 0, 0.5);
}

.trinity-fluid-btn:hover .trinity-glow {
    opacity: 0.6;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    filter: blur(12px);
}

.trinity-fluid-btn:hover .trinity-fluid-text {
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.trinity-fluid-btn:active {
    transform: scale(0.98);
}

.trinity-fluid-btn:active .trinity-ring {
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
}

/* Small mobile */
@media (max-width: 480px) {
    .trinity-fluid-btn {
        padding: 0.7rem 1.8rem;
    }
    
    .trinity-fluid-text {
        font-size: 0.75rem;
    }
    
    .trinity-ring {
        top: -4px;
        left: -4px;
        right: -4px;
        bottom: -4px;
    }
    
    .trinity-glow {
        top: -8px;
        left: -8px;
        right: -8px;
        bottom: -8px;
    }
}

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

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* ANILLO ONDULADO */
.trinity-ring {
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 66px;
    background: transparent;
    border: 5px solid transparent;
    background-image: linear-gradient(135deg, #FF6600, #1E84C6, #FF6600, #1E84C6);
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.7;
    animation: ringFlow 6s ease infinite;
    pointer-events: none;
    z-index: 2;
    box-shadow: 0 0 15px rgba(255, 102, 0, 0.3);
}

/* CAPA DE RESPLANDOR EXTERIOR */
.trinity-glow {
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border-radius: 72px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 102, 0, 0.3), rgba(30, 132, 198, 0.3), transparent 70%);
    filter: blur(8px);
    opacity: 0.4;
    animation: glowPulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

/* HOVER */
.trinity-fluid-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px -5px rgba(255, 102, 0, 0.4);
    background-color: rgba(0, 0, 0, 0.7);
}

.trinity-fluid-btn:hover .trinity-ring {
    opacity: 1;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 68px;
    animation: ringFlow 4s ease infinite;
    box-shadow: 0 0 25px rgba(255, 102, 0, 0.5);
}

.trinity-fluid-btn:hover .trinity-glow {
    opacity: 0.6;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    filter: blur(12px);
}

.trinity-fluid-btn:hover .trinity-fluid-text {
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

/* ACTIVE STATE */
.trinity-fluid-btn:active {
    transform: scale(0.98);
}

.trinity-fluid-btn:active .trinity-ring {
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
}

/* ANIMACIONES */
@keyframes ringFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .trinity-fluid-btn {
        padding: 0.75rem 2.2rem;
    }
    
    .trinity-fluid-text {
        font-size: 0.8rem;
        letter-spacing: 0.15em;
    }
    
    .trinity-ring {
        top: -5px;
        left: -5px;
        right: -5px;
        bottom: -5px;
        border-radius: 65px;
    }
    
    .trinity-glow {
        top: -10px;
        left: -10px;
        right: -10px;
        bottom: -10px;
    }
}

@media (max-width: 480px) {
    .trinity-fluid-btn {
        padding: 0.7rem 1.8rem;
    }
    
    .trinity-fluid-text {
        font-size: 0.75rem;
    }
    
    .trinity-ring {
        top: -4px;
        left: -4px;
        right: -4px;
        bottom: -4px;
    }
    
    .trinity-glow {
        top: -8px;
        left: -8px;
        right: -8px;
        bottom: -8px;
    }
}

/* ── LANGUAGE SWITCHER ───────────────────────────────────────── */
.lang-switcher {
    position: fixed;
    top: 1.2rem;
    right: 1.5rem;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 0.3rem 0.7rem;
}

.lang-btn {
    background: none;
    border: none;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.lang-btn:hover { color: rgba(255,255,255,0.8); }

.lang-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(255,102,0,0.3), rgba(30,132,198,0.3));
}

.lang-sep {
    color: rgba(255,255,255,0.2);
    font-size: 0.65rem;
    pointer-events: none;
}

@media (max-width: 480px) {
    .lang-switcher {
        top: 0.6rem;
        right: 0.75rem;
        padding: 0.25rem 0.55rem;
    }
    .lang-btn { font-size: 0.65rem; }
}