/* ==========================================================================
   hc-taste.css — evolución "Preserve" de la home de Distribuidora HC
   Cargar DESPUÉS de styles.css. No toca HTML, textos, IDs, rutas ni el logo.
   Palancas aplicadas: 1) tipografía  3) color (neutros)  4) motion + estados
   Para desactivar todo: quitar el <link> a este archivo.
   ========================================================================== */

/* ---------- 1. Tipografía: Geist autoalojada (reemplaza a Inter) ---------- */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/geist-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/geist-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font-sans: 'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* Curvas: ease-out fuerte para entradas, nunca ease-in en UI */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

body, button, input, select, textarea { font-family: var(--font-sans); }

.hero h1 {
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}
.section-head h2 {
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.1;
  text-wrap: balance;
}
.hero p.lead, .section-head p, .about p { text-wrap: pretty; }

/* Cifras alineadas: los números del hero no "bailan" */
.hero-meta-item .num {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.eyebrow, .section-head .kicker { font-weight: 600; letter-spacing: 0.14em; }

/* ---------- 3. Color: un solo gris frío, contraste AA garantizado ---------- */
:root {
  --gray-500: #5a6474;   /* antes #6b7280 (4.8:1) → 5.9:1 sobre blanco */
}

/* ---------- 4. Motion + estados (prioridad: rapidez percibida) ---------- */
.btn {
  transition:
    transform 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out),
    background-color 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}
.btn:active { transform: scale(0.97); }

.cat-card, .value-card, .product-card {
  transition:
    transform 200ms var(--ease-out),
    box-shadow 200ms var(--ease-out),
    border-color 200ms ease;
}
/* Solo se eleva en dispositivos con hover real (evita hover "pegado" en celular) */
@media (hover: none) {
  .cat-card:hover, .value-card:hover, .product-card:hover { transform: none; box-shadow: var(--shadow-sm); }
}
.cat-card:active, .product-card:active { transform: scale(0.985); }

/* Foco visible y consistente (teclado) */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--amber-500);
  outline-offset: 3px;
  border-radius: 6px;
}
.hero :where(a, button):focus-visible { outline-color: var(--amber-400); }

/* Entrada al hacer scroll: solo navegadores con scroll-driven animations
   y solo si el usuario no pidió reducir movimiento. Sin JS. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    @keyframes hc-rise {
      from { opacity: 0; transform: translateY(14px); }
      to   { opacity: 1; transform: none; }
    }
    .categories .cat-card,
    .values .value-card {
      animation: hc-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .cat-card, .value-card, .product-card { transition-duration: 0.01ms; }
  html { scroll-behavior: auto; }
}
