/* ==========================================================================
   Marz Labs — Hoja de estilos del sitio corporativo
   Plain CSS, sin frameworks ni dependencias en runtime.
   Diseño minimalista: columna centrada, mucho espacio en blanco, mobile-first.
   ========================================================================== */

/* ---- Tipografía: Inter auto-alojada (subconjunto latin, peso variable) ---- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;          /* eje variable */
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
}

/* ---- Tokens de diseño ---- */
:root {
  /* Color — paleta minimalista, un único acento (azul medianoche). */
  --bg:           #fafafa;       /* fondo off-white */
  --surface:      #ffffff;       /* tarjetas y superficies elevadas */
  --ink:          #0a0a0a;       /* texto principal (casi negro) */
  --ink-soft:     #404040;       /* texto secundario */
  --ink-muted:    #525252;       /* texto terciario / metadatos (AA sobre --bg) */
  --line:         #e5e5e5;       /* bordes sutiles */
  --line-strong:  #d4d4d4;       /* bordes con más presencia */
  --accent:        #db7851;      /* terracota de marca (logo); solo gráficos/decorativo */
  --accent-ink:    #b5532f;      /* terracota accesible para texto y enlaces (AA sobre --bg) */
  --accent-strong: #8f3f22;      /* acento en hover / estados activos */

  /* Tipografía */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas,
               monospace;

  /* Medidas */
  --measure: 46rem;              /* ancho máx. de la columna de contenido (~736px) */
  --pad-x: 1.5rem;               /* padding horizontal en mobile */
}

/* ---- Reset moderno y mínimo ---- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body,
h1, h2, h3, p, ul, ol, figure, table, blockquote { margin: 0; }

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;          /* 17px base */
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---- Enlaces ---- */
a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}
a:hover { color: var(--accent-strong); }

/* Foco visible y coherente para accesibilidad por teclado. */
:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---- Utilidades ---- */
.container {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* Enlace para saltar al contenido (visible solo al enfocar con teclado). */
.skip-link {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -3rem;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 6px 6px;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; color: #fff; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Encabezado
   ========================================================================== */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand img {
  display: block;
  height: 3rem;            /* 48px */
  width: auto;
}

/* Navegación */
.site-nav { display: flex; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-list a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 450;
}
.nav-list a:hover,
.nav-list a[aria-current="page"] { color: var(--ink); }
.nav-list a[aria-current="page"] { font-weight: 550; }

/* Botón de menú (hamburguesa) — oculto en desktop, visible en mobile vía JS. */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}
.nav-toggle .bars {
  position: relative;
  width: 18px; height: 2px;
  background: currentColor;
  display: inline-block;
}
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: "";
  position: absolute;
  left: 0; width: 18px; height: 2px;
  background: currentColor;
}
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after  { top: 6px; }

/* ==========================================================================
   Contenido principal
   ========================================================================== */
main { display: block; }

.section { padding-block: 3.5rem; }
.section + .section { border-top: 1px solid var(--line); }

/* La primera sección (hero / encabezado de página) respira más arriba. */
.section-lead { padding-top: 4.5rem; padding-bottom: 3.5rem; }

/* Tipografía de contenido */
h1 {
  font-size: clamp(2rem, 5vw + 1rem, 3rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}
h2 {
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 1.25rem;
}
h3 {
  font-size: 1.1875rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p { margin-bottom: 1.1rem; }
p:last-child { margin-bottom: 0; }

/* Párrafo introductorio bajo un h1. */
.lead {
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 38rem;
  margin-top: 1.5rem;
}

/* Etiqueta pequeña sobre los títulos de sección (eyebrow). */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.875rem;
}

/* Bloque de prosa (páginas legales y de texto largo). */
.prose p,
.prose ul,
.prose ol { color: var(--ink-soft); }
.prose h2 { margin-top: 2.5rem; color: var(--ink); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.75rem; margin-bottom: 0.5rem; color: var(--ink); }
.prose ul,
.prose ol { padding-left: 1.25rem; margin-bottom: 1.1rem; }
.prose li { margin-bottom: 0.4rem; }
.prose a { font-weight: 500; }

/* ---- Enlace de llamada a la acción con flecha ---- */
.cta-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--accent-ink);
}
.cta-link::after {
  content: "\2192";              /* → */
  transition: transform 0.15s ease;
}
.cta-link:hover { color: var(--accent-strong); }
.cta-link:hover::after { transform: translateX(3px); }

/* ==========================================================================
   Tarjetas de producto
   ========================================================================== */
.card-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.25rem;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.75rem;
}
.product-card h3 { margin-bottom: 0.625rem; }
.product-card p { color: var(--ink-soft); }
.product-card .card-cta { margin-top: 1.25rem; }

/* Lista de stack técnico (etiquetas monoespaciadas discretas). */
.tech-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 1.25rem 0 0;
}
.tech-list li {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.2rem 0.55rem;
}

/* Grupos de características del producto (lista detallada). */
.feature-groups {
  display: grid;
  gap: 1.75rem;
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.feature-group h3 { margin-bottom: 0.5rem; }
.feature-group > p { color: var(--ink-soft); margin-bottom: 0.625rem; }

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}
.feature-list li {
  position: relative;
  padding-left: 1.15rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.55;
}
/* Viñeta de acento terracota (decorativa). */
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ==========================================================================
   Tabla de datos corporativos
   ========================================================================== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  margin-top: 0.5rem;
}
.data-table th,
.data-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.data-table th {
  font-weight: 500;
  color: var(--ink-muted);
  width: 12rem;
  padding-right: 1.5rem;
}
.data-table td { color: var(--ink); }
.data-table tr:last-child th,
.data-table tr:last-child td { border-bottom: none; }

/* ==========================================================================
   Bloques de contacto / direcciones
   ========================================================================== */
.contact-group { margin-bottom: 2rem; }
.contact-group:last-child { margin-bottom: 0; }
.contact-group h2 { font-size: 1.125rem; margin-bottom: 0.5rem; }
.contact-group address {
  font-style: normal;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* ==========================================================================
   Pie de página
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 1rem;
  padding-block: 3rem 2.5rem;
  font-size: 0.9375rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
}
.footer-col h2 {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.875rem;
}
.footer-col .brand { display: inline-flex; margin-bottom: 0.875rem; }
.footer-col .brand img { height: 2rem; }   /* 32px */
.footer-col p { color: var(--ink-soft); margin-bottom: 0.25rem; }
.footer-links {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  gap: 0.5rem;
}
.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
}
.footer-links a:hover { color: var(--ink); }
.footer-col address {
  font-style: normal;
  color: var(--ink-soft);
}
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 0.875rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 40rem) {
  /* Con JS activo, la navegación se colapsa tras el botón hamburguesa. */
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 4.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--pad-x) 1rem;
    z-index: 50;
  }
  .js .site-header { position: relative; }
  .js .site-nav.is-open { display: block; }
  .js .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .js .nav-list li { width: 100%; }
  .js .nav-list a {
    display: block;
    width: 100%;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }
  .js .nav-list li:last-child a { border-bottom: none; }

  .site-header .brand img { height: 2.5rem; }   /* 40px */
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .data-table th { width: 9rem; padding-right: 1rem; }
  .section { padding-block: 2.75rem; }
  .section-lead { padding-top: 3rem; padding-bottom: 2.5rem; }
}

/* Sin JS: la navegación siempre es visible (sin hamburguesa). */
@media (max-width: 26rem) {
  :root { --pad-x: 1.25rem; }
}

/* Respeta la preferencia de movimiento reducido. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
