/* Hialsa — estilos (mobile-first), paleta derivada del logo: docs/paleta.md */

:root {
  --color-primary: #0c4b86;
  --color-secondary: #0e79b6;
  --color-navy: #22274c;
  --color-accent: #0e79b6;

  --color-bg: #ffffff;
  --color-bg-soft: #eaf6fa;
  --color-text: #161211;
  --color-text-muted: #6e6c6d;
  --color-border: #d7e3ec;

  --color-whatsapp: #25d366;
  --color-whatsapp-dark: #128c7e;

  --gradient-brand: linear-gradient(135deg, #0c4b86, #0e79b6);

  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --container: 1120px;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(12, 75, 134, 0.1);
  --header-h: 64px;
}

/* reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--color-primary); }
a:hover { color: var(--color-secondary); }
ul { list-style: none; padding: 0; }
button, input, textarea { font: inherit; color: inherit; }

h1, h2, h3 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 3.5vw, 2rem); }
h3 { font-size: 1.1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--color-primary); color: #fff; padding: 0.6rem 1rem;
}
.skip-link:focus { left: 0; }

.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }

/* botones */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.2rem; border-radius: 999px; border: 2px solid transparent;
  font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--color-secondary); outline-offset: 2px;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-secondary); color: #fff; }
.btn-ghost { background: transparent; color: var(--color-primary); border-color: var(--color-border); }
.btn-ghost:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-wa { background: var(--color-whatsapp); color: var(--color-text); }
.btn-wa:hover { background: #1eb955; color: var(--color-text); }
.btn-lg { padding: 0.9rem 1.6rem; font-size: 1.05rem; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.9rem; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: var(--header-h);
}
.brand img { width: auto; height: 44px; border-radius: 6px; background: var(--color-text); }
.nav-toggle {
  background: none; border: 0; padding: 0.4rem; cursor: pointer;
  color: var(--color-primary);
}
.site-nav ul { display: none; }
.site-nav.is-open ul {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem;
  position: absolute; left: 0; right: 0; top: var(--header-h);
  background: var(--color-bg); border-bottom: 1px solid var(--color-border);
  padding: 1rem; box-shadow: var(--shadow);
}
.site-nav a { text-decoration: none; color: var(--color-text); font-weight: 600; }
.site-nav a:hover { color: var(--color-primary); }
.site-nav .nav-cta a { color: var(--color-text); }

/* hero */
.hero {
  background: var(--gradient-brand);
  color: #fff;
  padding: clamp(3rem, 8vw, 6rem) 0;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; inset: auto -10% -60% auto;
  width: 420px; height: 420px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.hero-inner { position: relative; z-index: 1; max-width: 720px; }
.hero .eyebrow {
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem;
  font-weight: 700; opacity: 0.9; margin-bottom: 0.75rem;
}
.hero h1 { margin-bottom: 1rem; }
.hero p { font-size: clamp(1rem, 2.5vw, 1.2rem); opacity: 0.95; margin-bottom: 1.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.hero .btn-ghost:hover { border-color: #fff; color: #fff; }

/* secciones */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-soft { background: var(--color-bg-soft); }
.section-head { margin-bottom: 2rem; }
.section-title { margin-bottom: 0.4rem; }
.section-sub { color: var(--color-text-muted); }
.page-head {
  background: var(--gradient-brand); color: #fff; padding: clamp(2rem, 5vw, 3.5rem) 0;
}
.page-head .lead { opacity: 0.95; max-width: 60ch; margin: 0.75rem 0 1.5rem; }
.page-head a { color: #fff; }
.breadcrumbs { font-size: 0.9rem; margin-bottom: 1rem; opacity: 0.9; }
.breadcrumbs span[aria-hidden] { margin: 0 0.35rem; opacity: 0.7; }
.breadcrumbs a { color: #fff; text-decoration: underline; }

.lead { color: inherit; }
.empty { color: var(--color-text-muted); padding: 2rem 0; }

/* grids y tarjetas */
.grid { display: grid; gap: 1.25rem; }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid-cats { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.card {
  display: flex; flex-direction: column;
  background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: var(--radius); overflow: hidden; text-decoration: none;
  color: var(--color-text);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--color-text); }
.card-media {
  aspect-ratio: 4 / 3; display: grid; place-items: center;
  background: var(--gradient-brand); overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.ph {
  font-size: clamp(2rem, 6vw, 3rem); font-weight: 800; color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.05em;
}
.card-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.35rem; }
.card-title { color: var(--color-primary); }
.card-link { font-size: 0.9rem; font-weight: 600; color: var(--color-secondary); }
.cat-card { border-top: 4px solid var(--color-secondary); }

/* producto */
.prod-section { padding-top: clamp(1.5rem, 4vw, 2.5rem); }
.prod-layout { display: grid; gap: 1.75rem; margin-top: 1rem; }
.prod-media { border-radius: var(--radius); border: 1px solid var(--color-border); }
.prod-info h1 { margin-bottom: 0.5rem; }
.prod-info .lead { color: var(--color-text-muted); margin-bottom: 1.25rem; }
.specs { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.specs th, .specs td { text-align: left; padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--color-border); }
.specs th { color: var(--color-text-muted); font-weight: 600; width: 40%; }
.specs tr:nth-child(even) { background: var(--color-bg-soft); }
.prod-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* contacto */
.contact-layout { display: grid; gap: 2rem; }
.contact-info .footer-contact { margin-top: 1rem; }
.card-pad { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem; }
.mapa iframe { width: 100%; height: 320px; border: 0; border-radius: var(--radius); }

.form-grid { display: grid; gap: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.field input, .field textarea {
  width: 100%; padding: 0.7rem 0.85rem; border: 1px solid var(--color-border);
  border-radius: 8px; background: var(--color-bg);
}
.field input:focus, .field textarea:focus { border-color: var(--color-secondary); }
.form-note { font-size: 0.85rem; color: var(--color-text-muted); }

/* footer */
.site-footer { background: var(--color-navy); color: #eaf6fa; margin-top: auto; }
.site-footer a { color: #eaf6fa; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 2rem; padding: clamp(2.5rem, 6vw, 4rem) 0 2rem; }
.footer-brand { font-size: 1.35rem; font-weight: 800; margin-bottom: 0.5rem; }
.footer-desc { color: #b9c6d6; font-size: 0.95rem; }
.footer-title { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.85rem; }
.footer-list { display: grid; gap: 0.55rem; font-size: 0.95rem; }
.footer-contact li { display: flex; gap: 0.6rem; align-items: flex-start; }
.footer-contact svg { flex: none; margin-top: 0.2rem; color: var(--color-secondary); }
.socials { display: flex; gap: 0.6rem; margin-top: 1rem; }
.socials a {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 50%;
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
}
.socials a:hover { background: var(--color-secondary); border-color: var(--color-secondary); text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.15); padding: 1rem 0; font-size: 0.85rem; color: #b9c6d6; }

/* whatsapp flotante */
.float-wa {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 60;
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--color-whatsapp); color: var(--color-text);
  padding: 0.75rem 1rem; border-radius: 999px; text-decoration: none;
  font-weight: 700; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.float-wa:hover { background: #1eb955; color: var(--color-text); }

/* utilidades */
main { min-height: 60vh; }
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }

/* ---------- desktop ---------- */
@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .site-nav { display: flex; align-items: center; }
  .site-nav ul {
    display: flex; align-items: center; gap: 1.25rem;
    position: static; padding: 0; background: none; border: 0; box-shadow: none;
  }
  .site-nav .nav-cta a { padding: 0.45rem 0.9rem; font-size: 0.9rem; }
  .grid-cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .prod-layout { grid-template-columns: 1fr 1.1fr; align-items: start; gap: 2.5rem; }
  .contact-layout { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1.4fr; }
}
