/* ============================================================
   BASE - Variables, reset y tipografía
   Portafolio José Aurelio Carrera Melchor
   ============================================================ */

:root {
    /* Paleta principal */
    --tono-fondo-1: #0f172a;
    --tono-fondo-2: #1e293b;
    --tono-fondo-3: #020617;
    --tono-superficie: rgba(30, 41, 59, 0.5);
    --tono-superficie-solido: #1e293b;
    --tono-borde: rgba(51, 65, 85, 0.5);
    --tono-borde-claro: #334155;

    /* Acento esmeralda */
    --acento: #10b981;
    --acento-fuerte: #059669;
    --acento-suave: #34d399;
    --acento-tenue: rgba(16, 185, 129, 0.2);
    --acento-glow: rgba(16, 185, 129, 0.3);

    /* Acentos secundarios */
    --violeta: #7c3aed;
    --fucsia: #c026d3;
    --ambar: #d97706;
    --rosa: #e11d48;
    --indigo: #4f46e5;
    --cian: #0891b2;
    --teal: #0d9488;

    /* Texto */
    --texto-principal: #ffffff;
    --texto-secundario: #cbd5e1;
    --texto-terciario: #94a3b8;
    --texto-suave: #64748b;

    /* Tipografía */
    --fuente-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Espaciado */
    --radio-pequeno: 8px;
    --radio-medio: 12px;
    --radio-grande: 16px;
    --radio-extra: 24px;
    --radio-circular: 9999px;

    /* Sombras */
    --sombra-suave: 0 4px 6px rgba(0, 0, 0, 0.1);
    --sombra-media: 0 10px 25px rgba(0, 0, 0, 0.2);
    --sombra-fuerte: 0 20px 40px rgba(0, 0, 0, 0.3);
    --sombra-acento: 0 10px 30px rgba(16, 185, 129, 0.2);

    /* Transiciones */
    --transicion-rapida: 0.2s ease;
    --transicion-base: 0.3s ease;
    --transicion-lenta: 0.6s ease;

    /* Anchos */
    --ancho-contenedor: 1500px;
    --ancho-amplio: 1600px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--fuente-base);
    font-size: 16px;
    line-height: 1.6;
    color: var(--texto-secundario);
    background: linear-gradient(135deg, var(--tono-fondo-1) 0%, var(--tono-fondo-2) 50%, var(--tono-fondo-3) 100%);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, picture, svg, video {
    display: block;
    max-width: 100%;
    height: auto;
}

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

button {
    font: inherit;
    border: none;
    background: none;
    color: inherit;
    cursor: pointer;
}

input, textarea {
    font: inherit;
    color: inherit;
}

ul {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--texto-principal);
    line-height: 1.2;
    font-weight: 700;
}

h1 { font-size: clamp(2.25rem, 5vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

p {
    line-height: 1.7;
}

::selection {
    background: var(--acento);
    color: var(--texto-principal);
}

/* Contenedores */
.contenedor {
    max-width: var(--ancho-contenedor);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.contenedor-amplio {
    max-width: var(--ancho-amplio);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Utilidades de texto */
.texto-degradado {
    background: linear-gradient(90deg, var(--acento-suave), var(--acento), var(--acento-fuerte));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.texto-centrado {
    text-align: center;
}

.solo-lectores {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.sector__cliente{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sector__cliente > .sector__cliente{
    position: relative;
    display: inline-block;
    width: 100px;
    height: 100px;
    overflow: hidden;
    border-radius: 8px;
    isolation: isolate;
    background-color: transparent;
    transition: background-color .35s ease .35s;
}

.sector__cliente:hover > .sector__cliente{
    background-color: #ffffff;
}

.sector__cliente img{
    width: 100px;
    height: 100px;
}

.sector__cliente > .sector__cliente img{
    position: absolute;
    inset: 0;
    transition: opacity .45s ease, transform .45s ease;
}

.sector__cliente > .sector__cliente img:nth-child(1){
    opacity: 1;
}
.sector__cliente > .sector__cliente img:nth-child(2){
    opacity: 0;
}

.sector__cliente:hover > .sector__cliente img:nth-child(1){
    opacity: 0;
}
.sector__cliente:hover > .sector__cliente img:nth-child(2){
    opacity: 1;
}

.sector__cliente > .sector__cliente::after{
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 55%;
    height: 100%;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.75) 50%, transparent 100%);
    transform: skewX(-20deg);
    pointer-events: none;
    z-index: 2;
}

.sector__cliente:hover > .sector__cliente::after{
    animation: sectorBrillo .9s ease-out;
}

@keyframes sectorBrillo{
    0%   { left: -120%; }
    100% { left: 220%; }
}

@media (prefers-reduced-motion: reduce){
    .sector__cliente > .sector__cliente{ transition: none; }
    .sector__cliente > .sector__cliente img{ transition: none; }
    .sector__cliente:hover > .sector__cliente::after{ animation: none; }
}

