/* ============================================================
   CICCAMAX · Dirección B — "Catálogo de Herencia"
   Editorial técnica tipo manual de taller. 100% angulosa, cero radius.
   Tipografía: IBM Plex Sans Condensed (titulares) + IBM Plex Sans (cuerpo)
   ============================================================ */

:root {
  /* Paleta */
  --navy: #001E4B;        /* azul marino profundo — fondos oscuros */
  --navy-deep: #00153A;   /* variante más profunda para capas */
  --blue: #00337F;        /* azul marca */
  --red: #ED3237;         /* rojo — SOLO CTA */
  --paper: #F4F1EA;       /* fondo papel/hueso */
  --paper-dim: #ECE8DE;   /* papel sombreado para paneles */
  --ink: #0E1526;         /* tinta */
  --steel: #6B7A8C;       /* acero — líneas y texto grande */
  --steel-deep: #566377;  /* acero oscuro — texto pequeño AA sobre papel */
  --steel-lt: #93A2B5;    /* acero claro — texto AA sobre navy */
  --line: rgba(14, 21, 38, 0.18);       /* filete técnico sobre claro */
  --line-dark: rgba(244, 241, 234, 0.22); /* filete técnico sobre oscuro */
  --white: #FFFFFF;

  /* Tipografía */
  --f-cond: "IBM Plex Sans Condensed", "Arial Narrow", Arial, sans-serif;
  --f-body: "IBM Plex Sans", Helvetica, Arial, sans-serif;
  --f-mono: "IBM Plex Mono", "Courier New", monospace;

  /* Ritmo */
  --container: 1180px;
  --gap: clamp(1rem, 2.5vw, 1.75rem);
  --section-pad: clamp(3.5rem, 8vw, 6.5rem);
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
/* El header es sticky: los anclas no deben quedar tapadas detrás de él */
html { scroll-padding-top: 108px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--f-cond);
  font-weight: 700;
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0;
}

p { margin: 0; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }

/* Foco dedicado por contexto: azul sobre papel, paper sobre navy,
   doble anillo (paper + navy) en botones rojos para que se vea en ambos fondos */
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.hero :focus-visible,
.section-dark :focus-visible,
.site-footer :focus-visible,
.topbar :focus-visible,
.mobile-nav :focus-visible,
.wa-float:focus-visible {
  outline-color: var(--paper);
}
.btn-cta:focus-visible {
  outline: 3px solid var(--paper);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--navy);
}

[hidden] { display: none !important; }

::selection { background: var(--navy); color: var(--white); }

.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: 200;
  background: var(--red); color: var(--white);
  font-family: var(--f-cond); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 0.8rem 1.2rem; text-decoration: none;
}
.skip-link:focus { left: 0; color: var(--white); }

.container {
  width: min(var(--container), 100% - 2.5rem);
  margin-inline: auto;
}

/* ============ Utilidades de la dirección ============ */

/* Ficha: panel con filete fino doble tipo ficha técnica */
.ficha {
  position: relative;
  background: var(--white);
  border: 1px solid var(--ink);
}
.ficha::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--line);
  pointer-events: none;
}
.ficha-dark {
  background: var(--navy-deep);
  border-color: var(--paper);
}
.ficha-dark::after { border-color: var(--line-dark); }

/* Placa metálica: etiqueta con borde 2px y tornillos simulados */
.plate {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  border: 2px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  font-family: var(--f-cond);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  padding: 0.42rem 1.6rem 0.42rem 2rem;
  background-image:
    radial-gradient(circle 3px at 9px 50%, var(--ink) 0 2.2px, transparent 2.7px),
    radial-gradient(circle 3px at calc(100% - 9px) 50%, var(--ink) 0 2.2px, transparent 2.7px);
  background-repeat: no-repeat;
}
.plate-light { border-color: var(--white); color: var(--white); background-color: transparent;
  background-image:
    radial-gradient(circle 3px at 9px 50%, var(--white) 0 2.2px, transparent 2.7px),
    radial-gradient(circle 3px at calc(100% - 9px) 50%, var(--white) 0 2.2px, transparent 2.7px);
}
/* Variante de placa "papel": borde y tornillos color paper sobre fondo oscuro */
.plate-paper { border-color: var(--paper); color: var(--paper); background-color: transparent;
  background-image:
    radial-gradient(circle 3px at 9px 50%, var(--paper) 0 2.2px, transparent 2.7px),
    radial-gradient(circle 3px at calc(100% - 9px) 50%, var(--paper) 0 2.2px, transparent 2.7px);
}

/* Botones — todos rectos, duros, con sombra corta */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border: 2px solid transparent;
  padding: 0.9rem 1.5rem;
  font-family: var(--f-cond);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(14, 21, 38, 0.9);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 rgba(14, 21, 38, 0.9); }
.btn-cta { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-cta:hover { background: #d41e23; border-color: #d41e23; color: var(--white); }
.btn-ghost { background: transparent; color: var(--white); border-color: var(--white); box-shadow: 4px 4px 0 rgba(244, 241, 234, 0.28); }
.btn-ghost:hover { background: var(--white); color: var(--navy); }
.btn-navy { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-navy:hover { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn-ghost-dark { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost-dark:hover { background: var(--ink); color: var(--paper); }
.btn-sm { font-size: 1rem; padding: 0.6rem 1rem; box-shadow: 3px 3px 0 rgba(14, 21, 38, 0.9); }

/* Kicker de sección */
.kicker {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--steel-deep);
  margin: 0 0 1.1rem;
}
.kicker::before { content: "// "; }
.kicker-dark { color: var(--steel-lt); }

/* Encabezados de sección */
.section { padding-block: var(--section-pad); }
.section-dark { background: var(--navy); color: var(--paper); }
.section-head { max-width: 720px; margin-bottom: clamp(2.2rem, 5vw, 3.5rem); }
.section-head h2 {
  font-size: clamp(2.4rem, 5.6vw, 4.2rem);
  color: var(--ink);
}
/* Segunda escala menor para secciones utilitarias (folleto, contacto) */
.section-head--util h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.section-dark .section-head h2 { color: var(--paper); }
.section-intro { margin-top: 1.1rem; font-size: 1.1rem; max-width: 62ch; }
.section-intro strong { font-weight: 600; }
.section-dark .section-intro { color: var(--steel-lt); }
.section-dark .section-intro strong { color: var(--paper); font-weight: 600; }

/* Caja de media con fallback de color y placa informativa */
.media-box {
  position: relative;
  background-color: var(--navy);
  overflow: hidden;
}
.media-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-box.is-missing img { display: none; }
.media-box.is-missing::after {
  content: attr(data-plate);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-family: var(--f-cond);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-align: center;
  color: var(--steel-lt);
  border: 1px solid var(--line-dark);
  background-image:
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(244, 241, 234, 0.05) 14px 15px);
}

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  box-shadow: 0 1px 0 var(--paper), 0 2px 0 var(--ink);
}
.topbar {
  margin: 0;
  background: var(--navy);
  color: var(--steel-lt);
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  padding: 0.4rem 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  white-space: nowrap;
  overflow: hidden;
}
.topbar a { color: var(--white); text-decoration: none; flex: none; }
.topbar a:hover { text-decoration: underline; }
/* El primer span cede ancho con elipsis: el teléfono nunca queda cortado */
.topbar > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 760px) {
  /* En mobile se oculta solo el horario; el teléfono queda visible y clickeable */
  .topbar { justify-content: space-between; gap: 0.75rem; }
  .topbar-right { display: none; }
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.7rem 1.25rem;
}
.brand { flex: none; }
.brand img { width: clamp(150px, 18vw, 200px); height: auto; }

.main-nav { display: none; }
.main-nav a {
  font-family: var(--f-cond);
  font-weight: 600;
  font-size: 0.98rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-decoration: none;
  padding: 0.4rem 0.5rem;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--blue); border-bottom-color: var(--blue); }

.header-cta { display: none; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 52px;
  height: 52px;
  background: var(--navy);
  border: 2px solid var(--navy);
  cursor: pointer;
  padding: 0;
}
.nav-toggle-box {
  position: relative;
  width: 24px; height: 14px;
  border-top: 3px solid var(--white);
  border-bottom: 3px solid var(--white);
}
.nav-toggle-box::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  border-top: 3px solid var(--white);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-box { border-color: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-box::before {
  border-top: none;
  border-bottom: 3px solid var(--white);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  background: var(--navy);
  border-top: 1px solid var(--line-dark);
  padding: 0.75rem 1.25rem 1.5rem;
}
.mobile-nav a {
  font-family: var(--f-cond);
  font-weight: 600;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--paper);
  text-decoration: none;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--line-dark);
}
.mobile-nav a:hover { color: var(--white); background: rgba(244, 241, 234, 0.06); }
.mobile-nav .btn { margin-top: 1.1rem; box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45); border-bottom-width: 2px; }

/* ============ 1 · Hero ============ */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--paper);
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
}
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: grayscale(1) contrast(1.12) brightness(1);
  mix-blend-mode: luminosity;
  opacity: 0.9;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(0, 21, 58, 0.96) 0%, rgba(0, 21, 58, 0.72) 45%, rgba(0, 21, 58, 0.15) 100%),
    radial-gradient(120% 90% at 85% 20%, rgba(0, 51, 127, 0.35) 0%, transparent 60%);
  z-index: 1;
}
.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 2.5rem;
  padding-block: clamp(4rem, 10vw, 8rem);
}

.hero-copy { max-width: 720px; }
.hero-copy h1 {
  font-size: clamp(3.6rem, 12vw, 9rem);
  color: var(--white);
  margin-top: 1.4rem;
  text-wrap: balance;
}
.hero-red { color: var(--red); }
.hero-lede {
  margin-top: 1.6rem;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--steel-lt);
  max-width: 56ch;
}
.hero-lede strong { color: var(--white); font-weight: 600; }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; }

.hero-data {
  list-style: none;
  margin: 2.6rem 0 0;
  padding: 1.2rem 0 0;
  border-top: 1px solid var(--line-dark);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.5rem;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--steel-lt);
}
.hero-data strong { color: var(--white); font-weight: 500; }

/* Sello rotativo + medida gigante */
.hero-side {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  color: var(--paper);
}
.stamp { width: clamp(150px, 13vw, 190px); height: auto; animation: stamp-spin 22s linear infinite; }
.stamp-text { fill: currentColor; font-family: var(--f-cond); font-weight: 600; }
.stamp-mark polygon { fill: none; stroke: currentColor; stroke-width: 2.5; }
.stamp-mark polygon:first-child { stroke: var(--steel-lt); }
@keyframes stamp-spin { to { transform: rotate(360deg); } }

.hero-measure {
  font-family: var(--f-cond);
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 6.5rem);
  color: var(--white);
  letter-spacing: 0.02em;
}
.hero-measure-note {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  color: var(--steel-lt);
}

/* ============ 2 · Capítulos ============ */
.chapters { border-bottom: 1px solid var(--line); }

.chapter-grid {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: var(--gap);
}
.chapter-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--ink);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.chapter-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 rgba(14, 21, 38, 0.9);
}
.chapter-media { aspect-ratio: 16 / 7; border-bottom: 1px solid var(--ink); background-color: var(--ink); }
.chapter-media img { object-position: center; }
.chapter-body {
  position: relative;
  padding: 1.4rem 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1;
}
.chapter-num {
  position: absolute;
  top: 0.6rem; right: 1rem;
  font-family: var(--f-cond);
  font-weight: 700;
  font-size: clamp(3.4rem, 6vw, 5rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--steel);
}
.chapter-title {
  font-size: 1.7rem;
  letter-spacing: 0.02em;
  padding-right: clamp(2.6rem, 8vw, 4.2rem);
}
.chapter-title a { color: inherit; text-decoration: none; }
.chapter-title a:hover { color: var(--blue); }
.chapter-desc { color: var(--steel-deep); font-size: 0.98rem; max-width: 46ch; }
.chapter-desc strong { color: var(--ink); font-weight: 600; }
.chapter-spec {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--blue);
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
  margin-top: auto;
}
.chapter-link {
  font-family: var(--f-cond);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
}
.chapter-link:hover { color: var(--blue); }

/* ============ 3 · Consultor por medida ============ */
.consultor { position: relative; overflow: hidden; border-bottom: 1px solid var(--ink); }
.consultor-watermark {
  position: absolute;
  right: -0.04em;
  bottom: -0.28em;
  font-family: var(--f-cond);
  font-weight: 700;
  font-size: clamp(7rem, 22vw, 20rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 241, 234, 0.12);
  pointer-events: none;
  user-select: none;
}
.consultor-panel {
  position: relative;
  padding: clamp(1.5rem, 4vw, 3rem);
  max-width: 900px;
}
.consultor-form {
  display: grid;
  gap: 1.4rem;
}
.field { display: grid; gap: 0.5rem; }
.field-label {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--steel-lt);
}
.consultor select {
  appearance: none;
  width: 100%;
  background: var(--navy);
  color: var(--paper);
  border: 2px solid var(--paper);
  font-family: var(--f-cond);
  font-weight: 600;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 2.6rem 0.85rem 1rem;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--paper) 50%),
    linear-gradient(135deg, var(--paper) 50%, transparent 50%);
  background-position: calc(100% - 19px) calc(1.35em - 2px), calc(100% - 13px) calc(1.35em - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.consultor select:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }

.consultor-readout {
  font-family: var(--f-cond);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  text-transform: uppercase;
  color: var(--white);
  border-left: 4px solid var(--paper);
  padding: 0.35rem 0 0.35rem 1rem;
  min-height: 1.2em;
}
.consultor-cta { justify-self: start; box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.55); }
.consultor-note {
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-dark);
  color: var(--steel-lt);
  font-size: 0.95rem;
  max-width: 70ch;
}
.consultor-note strong { color: var(--paper); font-weight: 600; }

/* ============ 3b · Tabla de elásticos ============ */
.elasticos { border-bottom: 1px solid var(--line); }

.tabla-wrap { padding: clamp(1.2rem, 3vw, 2.2rem); }
.tabla-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.filtro { display: flex; flex-direction: column; gap: 0.6rem; }
.filtro-label {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--steel-deep);
}
.filtro-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  font-family: var(--f-cond);
  font-weight: 600;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 0.42rem 0.9rem;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.chip:hover { background: var(--paper-dim); }
.chip.is-active, .chip[aria-pressed="true"] { background: var(--navy); color: var(--white); }

.tabla-count {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--steel-deep);
}

.table-scroll { overflow-x: auto; }
.table-scroll:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}
thead th {
  font-family: var(--f-cond);
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-align: left;
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  border-top: 1px solid var(--ink);
  padding: 0.7rem 0.9rem;
}
tbody td {
  padding: 0.68rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tbody tr:hover td { background: rgba(0, 30, 75, 0.05); }
.td-medida {
  font-family: var(--f-cond);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0.03em;
  color: var(--navy);
  white-space: nowrap;
}
.td-carga, .td-perno { font-family: var(--f-mono); font-size: 0.95rem; color: var(--ink); white-space: nowrap; }
.td-carga strong { font-weight: 500; }
.td-consulta { text-align: right; }
.link-consulta {
  font-family: var(--f-cond);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--navy);
  text-decoration: none;
  border: 2px solid var(--navy);
  padding: 0.35rem 0.8rem;
  white-space: nowrap;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
/* El rojo se reserva para el hover/acción: 16 bordes rojos planos saturaban la tabla */
.link-consulta:hover { background: var(--red); border-color: var(--red); color: var(--white); }

.tabla-vacia { padding: 1.4rem 0.9rem; font-family: var(--f-cond); font-weight: 600; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--steel-deep); }
.tabla-foot {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--steel-deep);
}

/* ============ 4 · Modelos de eje en placas ============ */
.ejes { border-bottom: 1px solid var(--ink); }
.placas-grid {
  display: grid;
  gap: var(--gap);
}
.placa { padding: 1.5rem 1.5rem 1.7rem; }
.placa-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-bottom: 0.9rem;
  border-bottom: 2px solid var(--paper);
}
.placa-head h3 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); color: var(--white); }
.placa-badge {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--navy);
  background: var(--paper);
  padding: 0.3rem 0.7rem;
}
.placa-list { list-style: none; margin: 0; padding: 0; }
.placa-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line-dark);
  font-family: var(--f-mono);
  font-size: 0.92rem;
}
.placa-list li:first-child { padding-top: 0.9rem; }
.placa-list span:first-child { color: var(--steel-lt); }
.placa-list span:last-child { color: var(--paper); font-weight: 500; }
.placa-range {
  margin-top: 1.1rem;
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--steel-lt);
}

.ejes-extra {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  display: grid;
  gap: var(--gap);
  align-items: stretch;
}
.ejes-extra-copy {
  align-self: center;
  max-width: 52ch;
}
.ejes-extra-copy h3 { font-size: 1.8rem; color: var(--white); margin-bottom: 0.9rem; }
.ejes-extra-copy p { color: var(--steel-lt); }
.ejes-extra-copy strong { color: var(--paper); font-weight: 600; }
.ejes-extra-media { min-height: 280px; border: 1px solid var(--line-dark); }

/* ============ 4b · Accesorios y llantas ============ */
.accesorios { border-bottom: 1px solid var(--line); }
.accesorios-grid {
  display: grid;
  gap: var(--gap);
}
.ficha-title { font-size: 1.45rem; margin-bottom: 1.1rem; }
.accesorios .ficha { padding: clamp(1.2rem, 2.6vw, 1.9rem); }
.accesorios .table-scroll table { min-width: 380px; }
.ficha-note {
  margin-top: 1rem;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--steel-deep);
}
.pernos-list, .manotas-list { list-style: none; margin: 0; padding: 0; }
.pernos-list li, .manotas-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.pernos-list li:last-child, .manotas-list li:last-child { border-bottom: 0; }
.perno-medida { font-family: var(--f-cond); font-weight: 700; font-size: 1.35rem; color: var(--navy); white-space: nowrap; }
.pernos-list span:last-child, .manotas-list span:last-child { font-size: 0.92rem; color: var(--steel-deep); text-align: right; }
.manotas-list span:first-child { font-family: var(--f-cond); font-weight: 700; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.05em; }

.ficha-llantas .media-box-llantas { aspect-ratio: 16 / 8; border: 1px solid var(--line); margin-bottom: 1.1rem; background-color: var(--ink); }
.ficha-llantas p { margin-bottom: 1.3rem; color: var(--steel-deep); }
.ficha-llantas strong { color: var(--ink); font-weight: 600; }

/* ============ 5 · Historia ============ */
.fabrica { border-bottom: 1px solid var(--ink); }
.fabrica-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  top: 8px; bottom: 8px; left: 7px;
  border-left: 2px solid var(--line-dark);
}
.timeline-item { position: relative; padding: 0 0 2.1rem 2.2rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 16px; height: 16px;
  background: var(--navy);
  border: 2px solid var(--paper);
}
.timeline-item:last-child::before { background: var(--paper); border-color: var(--paper); }
.timeline .plate { font-size: 0.72rem; padding: 0.32rem 1.2rem 0.32rem 1.6rem; }
/* Hito sin año: etiqueta mono en lugar de placa, para no fingir un dato */
.timeline-tag {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--steel-lt);
  text-transform: uppercase;
}
.timeline-title { font-size: 1.35rem; color: var(--white); margin: 0.9rem 0 0.5rem; }
.timeline-text { color: var(--steel-lt); font-size: 0.98rem; max-width: 48ch; }

.fabrica-fotos { display: grid; gap: var(--gap); }
.media-box-fabrica {
  min-height: 240px;
  border: 1px solid var(--line-dark);
  background-color: var(--navy-deep);
}

/* ============ 6 · Folleto ============ */
/* Papel sombreado: separa esta sección de la de contacto (misma paleta) */
.folleto { border-bottom: 1px solid var(--line); background: var(--paper-dim); }
.folleto-panel {
  padding: clamp(1.6rem, 4vw, 3rem);
  display: grid;
  gap: clamp(1.4rem, 3vw, 2.5rem);
  align-items: center;
}
.folleto-icon { color: var(--navy); justify-self: start; }
.folleto-icon svg { width: clamp(64px, 8vw, 96px); height: auto; }
.folleto-copy h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-top: 0.6rem; }
.folleto-copy p { margin-top: 1rem; color: var(--steel-deep); max-width: 68ch; }
.folleto-copy strong { color: var(--ink); font-weight: 600; }
.folleto-meta {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--blue);
  margin-top: 1.2rem;
}
.folleto-ctas { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ============ 7 · Contacto ============ */
.contacto { border-bottom: 1px solid var(--ink); }
.contacto-grid { display: grid; gap: var(--gap); }
.contacto-datos { padding: clamp(1.4rem, 3vw, 2.4rem); }
.contacto-list { list-style: none; margin: 0 0 1.6rem; padding: 0; }
.contacto-list li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 0.3rem 1.2rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.contacto-list li:last-child { border-bottom: 0; }
.contacto-label {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--steel-deep);
  padding-top: 0.25rem;
}
.contacto-value { font-family: var(--f-cond); font-weight: 600; font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink); overflow-wrap: anywhere; }
.contacto-sub { font-size: 0.88rem; grid-column: 2; }
/* En pantallas angostas la etiqueta mono pasa arriba del valor */
@media (max-width: 559.98px) {
  .contacto-list li { grid-template-columns: 1fr; }
  .contacto-sub { grid-column: auto; }
}
.horario {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.2rem;
  font-size: 0.78rem;
  padding: 0.9rem 1.6rem 0.9rem 2rem;
}
.horario-label { letter-spacing: 0.2em; color: var(--steel-deep); font-family: var(--f-mono); font-weight: 500; font-size: 0.72rem; }
.horario-value { letter-spacing: 0.1em; font-size: 0.95rem; }

.contacto-fotos { display: grid; gap: var(--gap); }
.media-box-frente { aspect-ratio: 4 / 3; border: 1px solid var(--ink); min-height: 240px; }

/* ============ 8 · Footer ============ */
.site-footer {
  background: var(--navy);
  color: var(--steel-lt);
  border-top: 1px solid var(--ink);
}
.footer-grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  padding-block: clamp(2.8rem, 6vw, 4.5rem);
}
.footer-logo { width: clamp(170px, 20vw, 230px); height: auto; }
.footer-claim { margin-top: 1.3rem; max-width: 34ch; font-size: 0.95rem; }
.footer-col { display: flex; flex-direction: column; gap: 0.55rem; }
.footer-title {
  font-size: 1.05rem;
  color: var(--paper);
  letter-spacing: 0.14em;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  align-self: start;
}
.footer-title::before {
  content: "// ";
  font-family: var(--f-mono);
  font-weight: 500;
  color: var(--steel-lt);
}
.footer-col a { color: var(--steel-lt); text-decoration: none; font-size: 0.95rem; }
.footer-col a:hover { color: var(--white); text-decoration: underline; }
.footer-col address { font-style: normal; font-size: 0.95rem; line-height: 1.8; }
.footer-col address a { color: var(--paper); }
.footer-horario { margin-top: 0.7rem; font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.16em; }

.footer-bottom { border-top: 1px solid var(--line-dark); }
.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 1.1rem;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}

/* ============ WhatsApp flotante (azul marino, no verde) ============ */
.wa-float {
  position: fixed;
  right: 1.1rem;
  bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
  z-index: 150;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  background: var(--navy);
  color: var(--white);
  border: 2px solid var(--white);
  box-shadow: 4px 4px 0 rgba(14, 21, 38, 0.85);
  transition: transform 0.12s ease, background-color 0.12s ease;
}
.wa-float:hover { background: var(--blue); color: var(--white); transform: translate(-2px, -2px); }
.wa-float svg { width: 30px; height: 30px; }
/* Oculto vía JS cuando contacto/footer están en pantalla (no tapa los CTAs) */
.wa-float.is-hidden { display: none; }

/* Sello + medida en fila compacta en mobile/tablet */
@media (max-width: 991.98px) {
  .hero-side {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
  }
  .stamp { width: 64px; flex: none; }
  .hero-measure { font-size: clamp(1.9rem, 8vw, 2.8rem); }
  .hero-measure-note { width: 100%; }
}

/* ============ Responsive ============ */
@media (min-width: 560px) {
  .hero-data { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .consultor-form { grid-template-columns: 1fr 1fr; }
  .consultor-result { grid-column: 1 / -1; }
  .consultor-cta { grid-column: 1 / -1; justify-self: start; }
}

@media (min-width: 700px) {
  .placas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .accesorios-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fabrica-fotos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ejes-extra { grid-template-columns: 1fr 1.1fr; }
  .folleto-panel { grid-template-columns: auto 1fr; }
  .folleto-ctas { grid-column: 1 / -1; }
  .chapter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 992px) {
  .hero-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: center; }
  .hero-side { display: flex; }
  .placas-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .accesorios-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ficha-llantas { grid-column: span 1; }
  .fabrica-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
  .contacto-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); }
  .timeline-item { padding-bottom: 2.6rem; }
}

/* Nav horizontal recién cuando entran los 8 ítems + CTA sin overflow */
@media (min-width: 1100px) {
  .main-nav { display: flex; gap: 0.25rem; }
  .header-cta { display: inline-flex; }
  .nav-toggle, .mobile-nav { display: none; }
}

/* ============ Movimiento reducido ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stamp { animation: none; }
  *, *::before, *::after { transition: none !important; }
}
