/*
 * icons.css — Sistema unificado de iconos Lucide (SVG inline)
 *
 * Reemplaza los emojis Unicode de la landing por SVGs vectoriales.
 * Los SVG se insertan inline en el HTML (no usamos el script runtime
 * de Lucide). Este CSS solo define tamaños, colores via currentColor,
 * y animaciones de entrada.
 *
 * Patrón de uso:
 *   <span class="ig-icon ig-icon-lg" aria-hidden="true">
 *     <svg viewBox="0 0 24 24"> ... paths Lucide ... </svg>
 *   </span>
 */

/* ── Base ─────────────────────────────────────────────────────── */
.ig-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    color: currentColor;
    flex-shrink: 0;
    line-height: 1;
}

.ig-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Variante para iconos rellenos (ej. circle del status indicator) */
.ig-icon--filled svg,
.ig-icon svg.is-filled,
.ig-icon--filled svg * {
    fill: currentColor;
}

/* ── Tamaños unificados ──────────────────────────────────────── */
.ig-icon-xs  { width: 16px; height: 16px; }
.ig-icon-sm  { width: 20px; height: 20px; }
.ig-icon-md  { width: 24px; height: 24px; }
.ig-icon-lg  { width: 32px; height: 32px; }
.ig-icon-xl  { width: 48px; height: 48px; }
.ig-icon-2xl { width: 64px; height: 64px; }

/* ── Hover states sutiles ────────────────────────────────────── */
a:hover .ig-icon,
button:hover .ig-icon {
    transition: transform .15s ease, color .15s ease;
}
a:hover .ig-icon--hover-grow,
button:hover .ig-icon--hover-grow {
    transform: scale(1.08);
}
a:hover .ig-icon--hover-shift,
button:hover .ig-icon--hover-shift {
    transform: translateX(2px);
}

/* ── Efecto "draw" (stroke-dasharray animation) ──────────────── */
/* Aplicado a iconos del hero / sección principal que deben
 * "dibujarse" al entrar en viewport. JS añade .is-drawn cuando
 * IntersectionObserver/ScrollTrigger detecta entrada. */
.ig-icon--draw svg path,
.ig-icon--draw svg circle,
.ig-icon--draw svg line,
.ig-icon--draw svg rect,
.ig-icon--draw svg polyline,
.ig-icon--draw svg polygon {
    stroke-dasharray: 240;
    stroke-dashoffset: 240;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.ig-icon--draw.is-drawn svg path,
.ig-icon--draw.is-drawn svg circle,
.ig-icon--draw.is-drawn svg line,
.ig-icon--draw.is-drawn svg rect,
.ig-icon--draw.is-drawn svg polyline,
.ig-icon--draw.is-drawn svg polygon {
    stroke-dashoffset: 0;
}

/* ── Feature icons (fade + slide-up on viewport enter) ───────── */
/* JS añade .is-revealed cuando entran en viewport. */
.ig-icon--feature {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .6s ease-out, transform .6s ease-out;
}
.ig-icon--feature.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ── prefers-reduced-motion: desactivar animaciones ─────────── */
@media (prefers-reduced-motion: reduce) {
    .ig-icon--draw svg path,
    .ig-icon--draw svg circle,
    .ig-icon--draw svg line,
    .ig-icon--draw svg rect,
    .ig-icon--draw svg polyline,
    .ig-icon--draw svg polygon {
        stroke-dasharray: 0;
        stroke-dashoffset: 0;
        transition: none;
    }
    .ig-icon--feature {
        opacity: 1;
        transform: none;
        transition: none;
    }
    a:hover .ig-icon,
    button:hover .ig-icon {
        transition: none;
    }
}
