/* ==================== DESIGN POLISH (reversible) ====================
   Para deshacer: borrar la línea <link ... design-polish.css> de index.html
   (o restaurar _backup-diseno/index.html.bak). */

html { scroll-behavior: smooth; }

body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection { background: #0093D6; color: #fff; }

h1, h2, h3 { text-wrap: balance; letter-spacing: -0.015em; }
p { text-wrap: pretty; }

/* Accesibilidad: foco visible por teclado */
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 3px solid #0093D6;
    outline-offset: 3px;
    border-radius: 0.5rem;
}

/* Tarjetas: sombras en capas, elevación más sutil */
.matrix-card {
    border-color: #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 26, 58, 0.04), 0 8px 24px -12px rgba(0, 26, 58, 0.10);
    transition: transform 0.35s cubic-bezier(.2,.7,.2,1), box-shadow 0.35s ease, border-color 0.2s ease;
}
.matrix-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 2px 4px rgba(0, 26, 58, 0.04), 0 24px 48px -16px rgba(0, 147, 214, 0.28);
}
.matrix-card img {
    display: block;
    width: 100%;
    height: 180px;
    padding: 0.75rem 1rem 0;
    background: #fff;
    object-fit: contain;
    object-position: center;
    transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}
@media (max-width: 767px) {
    .matrix-card img { height: 150px; }
}

.stat-card {
    border-color: rgba(255, 255, 255, 0.22);
    transition: background 0.3s ease, transform 0.35s cubic-bezier(.2,.7,.2,1);
}

/* FAQ */
.faq-item {
    border-color: #e2e8f0;
    transition: border-color 0.2s ease, box-shadow 0.3s ease;
}
.faq-item:hover, .faq-item[open] {
    border-color: #0093D6;
    box-shadow: 0 8px 24px -12px rgba(0, 147, 214, 0.25);
}
.faq-item summary { min-height: 56px; cursor: pointer; }
.faq-item summary:hover { background-color: #f7f9fb; }

/* Botones: objetivo táctil mínimo y feedback de pulsación */
button, .btn-primary, .btn-secondary { min-height: 44px; }
.btn-primary, .btn-secondary, button {
    transition: transform 0.2s ease, box-shadow 0.25s ease, background-color 0.2s ease;
}
.btn-primary:active, .btn-secondary:active { transform: scale(0.97); }

/* Navegación con más presencia al hacer scroll */
#navbar { box-shadow: 0 1px 0 rgba(0, 26, 58, 0.06), 0 8px 24px -16px rgba(0, 26, 58, 0.15); }

/* Respeta usuarios con movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .section-reveal { opacity: 1; transform: none; }
}

/* Hero: identidad corporativa TLR (Brand Guide v1, jul 2018)
   Tipografía primaria Avenir (fallback: Hanken Grotesk, incluida en el sitio)
   Dark Blue #001A3A · TLR Blue #004DA2 · Light Blue #0093D6 · Sub heading #00ADEB · Texto #141414 */
#inicio {
    --tlr-dark-blue: #001a3a;
    --tlr-blue: #004da2;
    --tlr-light-blue: #0093d6;
    --tlr-text: #141414;
    font-family: "Avenir Next", Avenir, "Hanken Grotesk", sans-serif;
}
#inicio h1 {
    color: var(--tlr-dark-blue);
    font-weight: 900;
    text-transform: uppercase;
    text-wrap: balance;
    letter-spacing: -0.01em;
    line-height: 1.1;
    text-shadow: 0 1px 24px rgba(247, 249, 251, 0.9);
}
#inicio h1 + p {
    text-wrap: pretty;
    color: var(--tlr-text);
    font-weight: 300;
    font-size: clamp(1.0625rem, 1.2vw + 0.8rem, 1.25rem);
    line-height: 1.65;
    max-width: 34rem;
}
/* Texto en mayúsculas con subrayado grueso, en el Light Blue de los botones */
#inicio .hero-tag {
    display: inline-block;
    margin-top: 0;
    padding: 0 0 0.4rem;
    color: var(--tlr-light-blue);
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1.2;
    text-transform: uppercase;
    background: linear-gradient(var(--tlr-light-blue), var(--tlr-light-blue)) left bottom / 100% 4px no-repeat;
}

/* Botones: Light Blue sólido, TLR Blue al pasar el mouse */
#inicio a.btn-primary { margin: 0; width: auto; background: var(--tlr-light-blue); }
#inicio a.btn-primary:hover { background: var(--tlr-blue); }

/* Estadísticas */
#inicio .stat-card {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(0, 77, 162, 0.14);
    box-shadow: 0 8px 24px -12px rgba(0, 26, 58, 0.18);
    backdrop-filter: blur(8px);
}
#inicio .stat-card:hover { background: rgba(255, 255, 255, 0.9); }
#inicio .stat-card p:first-child { color: var(--tlr-light-blue); font-weight: 900; line-height: 1.1; }
#inicio .stat-card p:last-child {
    color: var(--tlr-dark-blue);
    font-size: 0.75rem;
    line-height: 1.35;
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
}

/* Sistema de color uniforme (Brand Guide TLR)
   Dark Blue #001A3A: texto, navegación e insignias · Light Blue #0093D6: acciones (botones) · TLR Blue #004DA2: hover · Light Blue #0093D6: acentos */
#navbar { --tlr-dark-blue: #001a3a; --tlr-blue: #004da2; --tlr-light-blue: #0093d6; font-family: "Avenir Next", Avenir, "Hanken Grotesk", sans-serif; }
#navbar .nav-link { color: var(--tlr-dark-blue); font-weight: 600; }
#navbar .nav-link:hover { color: var(--tlr-blue); }
#navbar a.bg-brand-blue { background: var(--tlr-light-blue); font-weight: 700; }
#navbar a.bg-brand-blue:hover { background: var(--tlr-blue); }
#navbar button[onclick="toggleLang()"] { background: var(--tlr-light-blue); }
#navbar button[onclick="toggleLang()"]:hover { background: var(--tlr-blue); }
