/* ============================================================
   CLAVE.PE — Tema Azul Celeste Degradado Premium
   ============================================================
   Paleta: Azul cielo → Blanco con acentos azul vibrante
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* --- Variables del Tema Azul --- */
:root {
    /* Fondos principales — degradados azul celeste */
    --bg-primary: linear-gradient(180deg, #e0f2fe 0%, #bae6fd 30%, #7dd3fc 70%, #38bdf8 100%);
    --bg-primary-solid: #dbeafe;
    --bg-secondary: rgba(255, 255, 255, 0.6);
    --bg-tertiary: rgba(255, 255, 255, 0.4);
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-glass: rgba(255, 255, 255, 0.5);
    --border-glass: rgba(255, 255, 255, 0.6);
    --border-subtle: rgba(14, 165, 233, 0.15);

    /* Textos — oscuros para contraste */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    /* Acentos — azules vibrantes */
    --accent-cyan: #0ea5e9;
    --accent-cyan-dim: rgba(14, 165, 233, 0.15);
    --accent-violet: #6366f1;
    --accent-violet-dim: rgba(99, 102, 241, 0.12);
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    --accent-amber: #f59e0b;
    --accent-blue: #2563eb;

    /* Degradados */
    --gradient-hero: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 25%, #93c5fd 50%, #60a5fa 75%, #3b82f6 100%);
    --gradient-accent: linear-gradient(135deg, #0ea5e9, #6366f1);
    --gradient-card: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(99, 102, 241, 0.08));
    --gradient-section-alt: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, rgba(224,242,254,0.6) 100%);

    /* Sombras — suaves y elegantes */
    --shadow-glow-cyan: 0 0 30px rgba(14, 165, 233, 0.2);
    --shadow-glow-violet: 0 0 30px rgba(99, 102, 241, 0.15);
    --shadow-card: 0 8px 32px rgba(14, 165, 233, 0.1);
    --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.06);

    /* Espaciado */
    --section-padding: 100px 0;
    --container-max: 1200px;

    /* Tipografía */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Transiciones */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-med: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

    /* Bordes redondeados */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

/* --- Reset y Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

::selection {
    background: var(--accent-cyan);
    color: white;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    display: block;
}

/* Seguridad SVG global — evita que se expandan */
svg {
    max-width: 100%;
    height: auto;
}
svg:not(:root) {
    overflow: hidden;
}

/* --- Contenedor --- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Secciones comunes --- */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 16px;
}

.section-label::before {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--gradient-accent);
    border-radius: 1px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.section-title .gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.8;
}

.section-header {
    margin-bottom: 64px;
}

/* ============================================================
   CABECERA / NAVEGACIÓN
   ============================================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0;
    transition: all var(--transition-med);
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(14, 165, 233, 0.1);
    z-index: -1;
    transition: all var(--transition-med);
}

.header.scrolled::before {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 20px rgba(14, 165, 233, 0.08);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    padding-bottom: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1001;
}

.logo img {
    height: 42px;
    filter: drop-shadow(0 2px 8px rgba(14, 165, 233, 0.25));
    transition: filter var(--transition-fast);
}

.logo:hover img {
    filter: drop-shadow(0 4px 16px rgba(14, 165, 233, 0.4));
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.logo-text span {
    color: var(--accent-cyan);
}

/* Navegación escritorio */
.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    position: relative;
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--accent-cyan);
    background: var(--accent-cyan-dim);
}

.nav-link.active {
    color: var(--accent-cyan);
    font-weight: 600;
}

.nav-cta {
    margin-left: 8px;
    padding: 10px 24px;
    background: var(--gradient-accent);
    color: white !important;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
}

/* Botón hamburguesa */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 8px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Menú móvil */
.mobile-nav {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(30px);
    z-index: 999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-med);
}

.mobile-nav.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 12px 32px;
    transition: color var(--transition-fast);
}

.mobile-nav a:hover {
    color: var(--accent-cyan);
}

/* ============================================================
   POPUP DE COOKIES — Pantalla Completa Obligatoria
   ============================================================ */
.cookie-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    transition: opacity 0.4s ease;
}

.cookie-overlay.oculto {
    opacity: 0;
    pointer-events: none;
}

.cookie-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    animation: cookieEntrada 0.5s ease;
}

@keyframes cookieEntrada {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.cookie-box .cookie-icono {
    font-size: 3rem;
    margin-bottom: 16px;
}

.cookie-box h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.cookie-box p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}

.cookie-aceptar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 40px;
    background: var(--gradient-accent);
    color: white;
    font-family: var(--font-primary);
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.35);
}

.cookie-aceptar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(14, 165, 233, 0.5);
}

.cookie-nota {
    font-size: 0.75rem !important;
    color: var(--text-muted) !important;
    margin-top: 16px !important;
    margin-bottom: 0 !important;
}

/* ============================================================
   SECCIÓN HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    overflow: hidden;
    padding-top: 80px;
}

/* Fondo de grilla animada */
.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(14, 165, 233, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, black 20%, transparent 70%);
}

/* Orbes flotantes decorativos */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float-orb 8s infinite ease-in-out alternate;
}

.hero-orb--cyan {
    width: 500px;
    height: 500px;
    background: rgba(14, 165, 233, 0.2);
    top: -10%;
    right: -5%;
}

.hero-orb--violet {
    width: 400px;
    height: 400px;
    background: rgba(99, 102, 241, 0.15);
    bottom: -15%;
    left: -5%;
    animation-delay: -4s;
}

.hero-orb--emerald {
    width: 300px;
    height: 300px;
    background: rgba(16, 185, 129, 0.1);
    top: 40%;
    left: 50%;
    animation-delay: -2s;
}

@keyframes float-orb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -30px) scale(1.1); }
}

.hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.25);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-blue);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 28px;
}

.hero-badge .pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.hero h1 .gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 480px;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* --- Botones --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    overflow: hidden;
}

/* Seguridad SVG en botones */
.btn svg,
.btn-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    max-width: 20px;
    min-height: 20px;
    max-height: 20px;
    flex-shrink: 0;
    flex-grow: 0;
    display: inline-block;
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(14, 165, 233, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-primary);
    border: 1px solid rgba(14, 165, 233, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: white;
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

/* Tarjeta de código del hero */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-code-card {
    width: 100%;
    max-width: 480px;
    background: white;
    border: 1px solid rgba(14, 165, 233, 0.15);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card), var(--shadow-glow-cyan);
    transform: perspective(1000px) rotateY(-5deg) rotateX(3deg);
    transition: transform var(--transition-slow);
}

.hero-code-card:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0);
}

.code-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: rgba(241, 245, 249, 0.8);
    border-bottom: 1px solid rgba(14, 165, 233, 0.1);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.code-dot--red { background: #ff5f57; }
.code-dot--yellow { background: #ffbd2e; }
.code-dot--green { background: #28c840; }

.code-card-title {
    flex: 1;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.code-card-body {
    padding: 24px 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 2;
    background: white;
}

.code-line {
    display: flex;
    gap: 12px;
}

.code-line-number {
    color: var(--text-muted);
    user-select: none;
    min-width: 24px;
    text-align: right;
}

.code-keyword { color: var(--accent-violet); }
.code-function { color: var(--accent-cyan); }
.code-string { color: var(--accent-emerald); }
.code-comment { color: var(--text-muted); font-style: italic; }
.code-variable { color: var(--accent-amber); }
.code-operator { color: var(--text-secondary); }

/* Estadísticas del hero */
.hero-stats {
    display: flex;
    gap: 48px;
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid rgba(14, 165, 233, 0.15);
}

.hero-stat {
    text-align: left;
}

.hero-stat-number {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* ============================================================
   SECCIÓN SERVICIOS
   ============================================================ */
.services {
    padding: var(--section-padding);
    background: var(--gradient-section-alt);
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-violet), transparent);
    opacity: 0.3;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    position: relative;
    padding: 40px 32px;
    background: var(--bg-card);
    border: 1px solid rgba(14, 165, 233, 0.1);
    border-radius: var(--radius-lg);
    transition: all var(--transition-med);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: 3px 3px 0 0;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.service-card:hover {
    background: white;
    border-color: rgba(14, 165, 233, 0.2);
    transform: translateY(-6px);
    box-shadow: var(--shadow-card), var(--shadow-glow-cyan);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    overflow: hidden;
}

.service-icon svg {
    width: 28px;
    height: 28px;
    min-width: 28px;
    max-width: 28px;
    min-height: 28px;
    max-height: 28px;
    flex-shrink: 0;
}

.service-icon--web { background: var(--accent-cyan-dim); color: var(--accent-cyan); }
.service-icon--mobile { background: var(--accent-violet-dim); color: var(--accent-violet); }
.service-icon--enterprise { background: rgba(16, 185, 129, 0.12); color: var(--accent-emerald); }
.service-icon--cloud { background: rgba(37, 99, 235, 0.1); color: var(--accent-blue); }
.service-icon--security { background: rgba(244, 63, 94, 0.1); color: var(--accent-rose); }
.service-icon--ai { background: rgba(245, 158, 11, 0.1); color: var(--accent-amber); }

.service-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
}

.service-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.service-tag {
    padding: 4px 12px;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    background: var(--accent-cyan-dim);
    border: 1px solid rgba(14, 165, 233, 0.15);
    border-radius: 100px;
    letter-spacing: 0.5px;
}

/* ============================================================
   SECCIÓN VALOR / NOSOTROS
   ============================================================ */
.value-section {
    padding: var(--section-padding);
    position: relative;
    background: rgba(255, 255, 255, 0.3);
}

.value-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.value-content {
    max-width: 500px;
}

.value-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 40px;
}

.value-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.value-item-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--accent-cyan-dim);
    color: var(--accent-cyan);
    overflow: hidden;
}

.value-item-icon svg {
    width: 22px; height: 22px;
    min-width: 22px; max-width: 22px;
    min-height: 22px; max-height: 22px;
    flex-shrink: 0;
}

.value-item h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.value-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Panel de estadísticas */
.value-stats-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-block {
    padding: 32px 28px;
    background: var(--bg-card);
    border: 1px solid rgba(14, 165, 233, 0.1);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-med);
    backdrop-filter: blur(10px);
}

.stat-block:hover {
    border-color: rgba(14, 165, 233, 0.25);
    box-shadow: var(--shadow-glow-cyan);
    transform: translateY(-4px);
    background: white;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.4;
}

/* ============================================================
   SECCIÓN TECNOLOGÍAS
   ============================================================ */
.tech-section {
    padding: var(--section-padding);
    background: var(--gradient-section-alt);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tech-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-violet), var(--accent-cyan), transparent);
    opacity: 0.3;
}

.tech-section .section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tech-section .section-subtitle {
    margin: 0 auto;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 28px 16px;
    background: var(--bg-card);
    border: 1px solid rgba(14, 165, 233, 0.1);
    border-radius: var(--radius-md);
    transition: all var(--transition-med);
    cursor: default;
    backdrop-filter: blur(10px);
}

.tech-item:hover {
    border-color: rgba(14, 165, 233, 0.25);
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow-cyan);
    background: white;
}

.tech-item svg {
    width: 40px;
    height: 40px;
    opacity: 0.85;
    transition: opacity var(--transition-fast);
}

.tech-item:hover svg {
    opacity: 1;
}

.tech-item-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

/* ============================================================
   SECCIÓN PROYECTOS
   ============================================================ */
.cases-section {
    padding: var(--section-padding);
    position: relative;
    background: rgba(255, 255, 255, 0.3);
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.case-card {
    position: relative;
    padding: 36px 32px;
    background: var(--bg-card);
    border: 1px solid rgba(14, 165, 233, 0.1);
    border-radius: var(--radius-lg);
    transition: all var(--transition-med);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.case-card:hover {
    border-color: rgba(99, 102, 241, 0.25);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card), var(--shadow-glow-violet);
    background: white;
}

.case-card-category {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-violet);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.case-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--text-primary);
}

.case-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.case-card-tech {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.case-tech-tag {
    padding: 4px 10px;
    font-size: 0.68rem;
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    background: var(--accent-cyan-dim);
    border-radius: 100px;
}

/* ============================================================
   SECCIÓN CONTACTO
   ============================================================ */
.contact {
    padding: var(--section-padding);
    background: var(--gradient-section-alt);
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-violet), transparent);
    opacity: 0.3;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    background: white;
    border: 1px solid rgba(14, 165, 233, 0.15);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px var(--accent-cyan-dim);
}

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

.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

.contact-info-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-info-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid rgba(14, 165, 233, 0.1);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
}

.contact-info-card:hover {
    border-color: rgba(14, 165, 233, 0.25);
    background: white;
    box-shadow: var(--shadow-soft);
}

.contact-info-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--accent-cyan-dim);
    color: var(--accent-cyan);
    overflow: hidden;
}

.contact-info-icon svg {
    width: 22px; height: 22px;
    min-width: 22px; max-width: 22px;
    min-height: 22px; max-height: 22px;
    flex-shrink: 0;
}

.contact-info-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.contact-info-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: #25d366;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    margin-top: 8px;
    overflow: hidden;
}

.whatsapp-btn:hover {
    background: #22c55e;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.45);
}

.whatsapp-btn svg {
    width: 22px; height: 22px;
    min-width: 22px; max-width: 22px;
    min-height: 22px; max-height: 22px;
    flex-shrink: 0;
}

/* ============================================================
   PIE DE PÁGINA
   ============================================================ */
.footer {
    padding: 64px 0 32px;
    background: linear-gradient(180deg, #1e3a5f 0%, #0f172a 100%);
    color: #e2e8f0;
    border-top: 1px solid rgba(14, 165, 233, 0.2);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer .logo-text {
    color: #e2e8f0;
}

.footer .logo-text span {
    color: var(--accent-cyan);
}

.footer-brand p {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-top: 16px;
    line-height: 1.7;
    max-width: 320px;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #e2e8f0;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col a {
    font-size: 0.88rem;
    color: #94a3b8;
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--accent-cyan);
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 0.82rem;
    color: #64748b;
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-socials a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    transition: all var(--transition-fast);
}

.footer-socials a:hover {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-glow-cyan);
}

/* ============================================================
   BOTÓN FLOTANTE WHATSAPP
   ============================================================ */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 900;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    animation: wa-pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.12);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.55);
    animation: none;
}

.whatsapp-float svg {
    width: 32px; height: 32px;
    min-width: 32px; max-width: 32px;
    min-height: 32px; max-height: 32px;
    fill: white;
    flex-shrink: 0;
}

.whatsapp-float-tooltip {
    position: absolute;
    right: 72px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid rgba(14, 165, 233, 0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    box-shadow: var(--shadow-soft);
}

.whatsapp-float:hover .whatsapp-float-tooltip {
    opacity: 1;
}

@keyframes wa-pulse {
    0% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4), 0 0 0 12px rgba(37, 211, 102, 0.12); }
    100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
}

/* ============================================================
   ANIMACIONES DE SCROLL
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ============================================================
   PANEL DE ADMINISTRACIÓN (Oculto)
   ============================================================ */
.admin-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.admin-overlay.active {
    display: flex;
}

.admin-login-box {
    background: white;
    border: 1px solid rgba(14, 165, 233, 0.15);
    border-radius: var(--radius-lg);
    padding: 48px;
    max-width: 420px;
    width: 90%;
    text-align: center;
}

.admin-login-box h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.admin-login-box > p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

.admin-login-box input {
    width: 100%;
    padding: 14px 20px;
    background: #f1f5f9;
    border: 1px solid rgba(14, 165, 233, 0.15);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1rem;
    text-align: center;
    letter-spacing: 4px;
    outline: none;
    margin-bottom: 20px;
    transition: border-color var(--transition-fast);
}

.admin-login-box input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px var(--accent-cyan-dim);
}

.admin-login-box .btn {
    width: 100%;
    justify-content: center;
}

.admin-login-error {
    color: var(--accent-rose);
    font-size: 0.85rem;
    margin-top: 12px;
    display: none;
}

.admin-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    transition: color var(--transition-fast);
}

.admin-close:hover {
    color: white;
}

/* Panel del dashboard admin */
.admin-dashboard {
    display: none;
    position: fixed;
    inset: 0;
    background: #f8fafc;
    z-index: 10000;
    overflow-y: auto;
}

.admin-dashboard.active {
    display: block;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: var(--shadow-soft);
}

.admin-header h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.admin-body {
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0;
}

.admin-tab {
    padding: 10px 24px;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 500;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition-fast);
}

.admin-tab.active {
    color: var(--accent-cyan);
    border-bottom-color: var(--accent-cyan);
    font-weight: 600;
}

.admin-tab:hover {
    color: var(--accent-cyan);
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.admin-stat-card {
    padding: 28px 24px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.admin-stat-card .stat-number {
    font-size: 2.2rem;
}

.admin-stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.admin-visits-list,
.admin-messages-list {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.admin-visits-list h3,
.admin-messages-list h3 {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1rem;
    color: var(--text-primary);
}

.visit-entry,
.message-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
    gap: 12px;
    flex-wrap: wrap;
}

.visit-entry:last-child,
.message-entry:last-child { border: none; }

.visit-page { color: var(--accent-cyan); font-family: var(--font-mono); font-size: 0.8rem; }
.visit-time { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.75rem; }
.visit-device { color: var(--text-secondary); font-size: 0.78rem; }
.visit-ip { color: var(--accent-violet); font-family: var(--font-mono); font-size: 0.75rem; }

.message-nombre { font-weight: 600; color: var(--text-primary); }
.message-email { color: var(--accent-cyan); font-size: 0.8rem; }
.message-texto { color: var(--text-secondary); font-size: 0.85rem; flex-basis: 100%; margin-top: 4px; }
.message-fecha { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.75rem; }

/* ============================================================
   DISEÑO RESPONSIVO
   ============================================================ */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }
    .hero-content { max-width: 100%; }
    .hero-description { max-width: 100%; margin-left: auto; margin-right: auto; }
    .hero-ctas { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-visual { display: none; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .value-grid { grid-template-columns: 1fr; gap: 48px; }
    .cases-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
    :root { --section-padding: 80px 0; }
    .nav { display: none; }
    .hamburger { display: flex; }
    .mobile-nav { display: flex; }

    .hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 60px;
    }
    .hero h1 { font-size: clamp(1.8rem, 7vw, 2.8rem); }
    .hero-description { font-size: 1rem; }
    .hero-badge { font-size: 0.7rem; margin-bottom: 20px; }
    .hero-ctas .btn { padding: 12px 24px; font-size: 0.9rem; }
    .hero-stats { flex-direction: column; gap: 20px; align-items: center; margin-top: 40px; }
    .hero-stat { text-align: center; }
    .hero-stat-number { font-size: 1.6rem; }
    .services-grid, .cases-grid { grid-template-columns: 1fr; }
    .service-card { padding: 28px 24px; }
    .value-stats-panel { grid-template-columns: 1fr 1fr; }
    .tech-grid { grid-template-columns: repeat(3, 1fr); }
    .section-title { font-size: clamp(1.6rem, 5vw, 2.4rem); }
    .section-header { margin-bottom: 40px; }
    .contact-form { gap: 16px; }
    .contact-info-card { padding: 18px; }
    .whatsapp-btn { padding: 14px 24px; font-size: 0.9rem; width: 100%; justify-content: center; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
    .stat-block { padding: 24px 20px; }
    .stat-number { font-size: 2rem; }

    .cookie-box { padding: 32px 24px; }
    .cookie-box h2 { font-size: 1.3rem; }
}

@media (max-width: 480px) {
    :root { --section-padding: 60px 0; }
    .container { padding: 0 16px; }
    .hero { padding-top: 90px; padding-bottom: 48px; }
    .hero h1 { font-size: clamp(1.5rem, 8vw, 2.2rem); }
    .hero-description { font-size: 0.92rem; margin-bottom: 28px; }
    .hero-ctas { flex-direction: column; align-items: stretch; }
    .hero-ctas .btn { padding: 12px 20px; font-size: 0.88rem; }
    .btn { justify-content: center; padding: 12px 20px; font-size: 0.88rem; }
    .value-stats-panel { grid-template-columns: 1fr; }
    .value-item { gap: 14px; }
    .value-item-icon { width: 42px; height: 42px; min-width: 42px; min-height: 42px; }
    .tech-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .tech-item { padding: 20px 12px; }
    .case-card { padding: 24px 20px; }
    .contact-grid { gap: 32px; }
    .section-subtitle { font-size: 0.95rem; }
    .mobile-nav a { font-size: 1.2rem; padding: 10px 24px; }
    .footer { padding: 40px 0 24px; }
    .admin-login-box { padding: 32px 24px; }
    .admin-header { padding: 16px; flex-direction: column; gap: 12px; }
    .admin-header h2 { font-size: 1rem; }
    .admin-body { padding: 16px; }
    .whatsapp-float { width: 54px; height: 54px; bottom: 20px; right: 16px; }
    .whatsapp-float svg { width: 26px; height: 26px; min-width: 26px; max-width: 26px; min-height: 26px; max-height: 26px; }
    .whatsapp-float-tooltip { display: none; }

    .cookie-box { padding: 28px 20px; }
    .cookie-box h2 { font-size: 1.1rem; }
    .cookie-box p { font-size: 0.85rem; }
    .cookie-aceptar { padding: 14px 32px; font-size: 0.95rem; }
}

/* Cursor de escritura animado */
.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--accent-cyan);
    margin-left: 4px;
    animation: blink-cursor 1s step-end infinite;
    vertical-align: text-bottom;
}

@keyframes blink-cursor {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

/* Animación de contadores */
@keyframes count-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}