/* ==========================================================================
   ALASER — sistema visual
   Base industrial: grafito, papel cálido y un acento de láser.
   Sin radios generosos ni sombras difusas: bordes secos, tipografía técnica.
   ========================================================================== */

:root {
  /* Paleta oficial — Manual de Identidad Visual Alaser
     Azul     Pantone 2746 C  #14259c
     Amarillo Pantone 107 C   #f9e31b  */
  --brand-blue: #14259c;
  --brand-yellow: #f9e31b;

  --ink: var(--brand-blue);
  --ink-2: #0f1c78;
  --steel: #1b2a7a;
  --paper: #f5f6f9;
  --paper-2: #eaecf3;
  --line: #d7dae6;
  --line-dark: rgba(255, 255, 255, 0.18);
  --text: #14161c;
  --text-2: #5b6070;
  --text-inv: #ffffff;
  --text-inv-2: rgba(255, 255, 255, 0.72);

  /* Acento contextual: azul sobre fondo claro, amarillo sobre azul.
     El amarillo sobre blanco solo alcanza 1,3:1 de contraste: nunca como texto. */
  --laser: var(--brand-blue);
  --laser-soft: rgba(20, 37, 156, 0.1);
  --ok: #1f7a54;
  --r: 2px;
  --wrap: 1180px;
  --pad: clamp(20px, 5vw, 56px);

  /* Tipografia del manual: Gotham es la primaria (licencia comercial) y se
     sustituye por Montserrat, que el propio manual ya usa. Michroma es la
     secundaria declarada y asume las etiquetas tecnicas. */
  --font-display: "Montserrat", "Helvetica Neue", sans-serif;
  --font-body: "Montserrat", "Helvetica Neue", sans-serif;
  --font-brand: "Michroma", "Montserrat", sans-serif;
  --font-mono: "Montserrat", sans-serif;
}

/* Sobre azul, el acento pasa a amarillo. */
.dark,
.on-dark,
.cta-band,
.site-footer {
  --laser: var(--brand-yellow);
  --laser-soft: rgba(249, 227, 27, 0.14);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

.wrap {
  width: min(var(--wrap), 100% - var(--pad) * 2);
  margin-inline: auto;
}

/* --------------------------------------------------------------- tipografía */

.eyebrow {
  font-family: var(--font-brand);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--laser);
  flex: none;
}

.on-dark .eyebrow {
  color: var(--text-inv-2);
}

.display {
  font-size: clamp(2.6rem, 7vw, 5.4rem);
}

.h2 {
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
}

.h3 {
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.15;
}

.lede {
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  color: var(--text-2);
  max-width: 58ch;
}

.on-dark .lede {
  color: var(--text-inv-2);
}

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Cifras alineadas en columna: tablas, precios y resultados. */
.strip b,
.card .power,
.card .price b,
.specs td,
.calc-result b,
.calc-result small,
.field input {
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(247, 245, 241, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  height: 30px;
  width: auto;
  display: block;
}

.brand--footer img {
  height: 34px;
}

.nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  align-items: center;
}

.nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--laser);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--brand-blue);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: var(--r);
  border: 1px solid var(--brand-blue);
  transition: background 0.15s, border-color 0.15s;
}

.header-cta:hover {
  background: var(--ink-2);
  border-color: var(--ink-2);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle i {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
}

/* --------------------------------------------------------------------- hero */

.hero {
  background: var(--ink);
  color: var(--text-inv);
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 11vw, 132px) 0 0;
}

.hero::after {
  content: "";
  position: absolute;
  width: 900px;
  height: 900px;
  right: -220px;
  top: -320px;
  background: radial-gradient(circle, rgba(249, 227, 27, 0.18), transparent 62%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 22px 0 26px;
  max-width: 16ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--laser);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--r);
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brand-blue);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--ink-2);
}

/* Sobre azul, el boton primario invierte a amarillo con texto azul: 9:1 de
   contraste y la combinacion mas identificable de la marca. */
.on-dark .btn-primary,
.cta-band .btn-primary,
.section.dark .btn-primary {
  background: var(--brand-yellow);
  color: var(--brand-blue);
}

.on-dark .btn-primary:hover,
.cta-band .btn-primary:hover,
.section.dark .btn-primary:hover {
  background: #ffec52;
}

.btn-ghost {
  border-color: var(--line-dark);
  color: var(--text-inv);
}

.btn-ghost:hover {
  border-color: var(--text-inv);
}

.btn-dark {
  background: var(--ink);
  color: var(--text-inv);
}

.btn-outline {
  border-color: var(--line);
  color: var(--text);
}

/* franja de datos bajo el hero */

.strip {
  margin-top: clamp(48px, 7vw, 84px);
  border-top: 1px solid var(--line-dark);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.strip div {
  padding: 22px 24px 26px 0;
  border-right: 1px solid var(--line-dark);
}

.strip div:last-child {
  border-right: 0;
}

.strip b {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--text-inv);
  letter-spacing: -0.01em;
}

.strip small {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-inv-2);
}

/* ------------------------------------------------------------------ seccion */

.section {
  padding: clamp(64px, 9vw, 112px) 0;
}

.section.dark {
  background: var(--ink);
  color: var(--text-inv);
}

.section.paper-2 {
  background: var(--paper-2);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head .h2 {
  margin-top: 16px;
}

.section-head p {
  max-width: 44ch;
}

/* ------------------------------------------------------------------ familias */

.families {
  border-top: 1px solid var(--line);
}

.family {
  display: grid;
  grid-template-columns: 64px 1.4fr 2fr auto;
  gap: 24px;
  align-items: center;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.18s;
}

.family:hover {
  background: var(--paper-2);
}

.family .idx {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
}

.family h3 {
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
}

.family p {
  color: var(--text-2);
  font-size: 15px;
  max-width: 46ch;
}

.family .count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
}

/* -------------------------------------------------------------------- tarjetas */

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card {
  background: var(--paper);
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: background 0.18s;
  position: relative;
}

.card:hover {
  background: #fff;
}

.card-media {
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.card-media .placeholder {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a9a29a;
  text-align: center;
  padding: 0 16px;
}

.card-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: var(--laser);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.card:hover .card-media::after {
  transform: scaleX(1);
}

.card-body {
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--laser);
}

.card h3 {
  font-size: 1.24rem;
}

.card .power {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-2);
}

.card .price {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--text-2);
}

.card .price b {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}

/* ---------------------------------------------------------------------- tabs */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.filters button {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 16px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
  color: var(--text-2);
  transition: all 0.15s;
}

.filters button:hover {
  border-color: var(--text);
  color: var(--text);
}

.filters button[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--text-inv);
}

/* --------------------------------------------------------------------- tabla */

.specs {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.specs th,
.specs td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.specs th {
  font-weight: 500;
  color: var(--text-2);
  width: 42%;
  font-size: 13.5px;
}

.specs thead th {
  width: auto;
}

.specs td {
  font-family: var(--font-mono);
  font-size: 13.5px;
}

.specs tr:last-child th,
.specs tr:last-child td {
  border-bottom: 0;
}

/* ------------------------------------------------------------------ bloque cta */

.cta-band {
  background: var(--ink);
  color: var(--text-inv);
  padding: clamp(56px, 8vw, 96px) 0;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(249, 227, 27, 0.14), transparent 55%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
}

/* ------------------------------------------------------------------ recursos */

.tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.tool {
  background: var(--paper);
  padding: 28px 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool h3 {
  font-size: 1.15rem;
}

.tool p {
  font-size: 14.5px;
  color: var(--text-2);
}

.tool .link {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--laser);
}

/* calculadora */

.calc {
  background: #fff;
  border: 1px solid var(--line);
  padding: clamp(22px, 3vw, 34px);
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
}

.field input,
.field select {
  font-family: var(--font-mono);
  font-size: 15px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
  color: var(--text);
  width: 100%;
}

.field input:focus,
.field select:focus {
  outline: 2px solid var(--laser);
  outline-offset: -1px;
}

.calc-result {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}

.calc-result div b {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.7rem;
  letter-spacing: -0.02em;
}

.calc-result div small {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
}

.calc-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-2);
}

/* -------------------------------------------------------------------- footer */

.site-footer {
  background: var(--ink);
  color: var(--text-inv-2);
  padding: 64px 0 32px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line-dark);
}

.footer-grid h4 {
  color: var(--text-inv);
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 16px;
}

.footer-grid a {
  display: block;
  padding: 5px 0;
}

.footer-grid a:hover {
  color: var(--text-inv);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  padding-top: 26px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------- reveal */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ------------------------------------------------------------------ responsive */

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .family {
    grid-template-columns: 40px 1fr;
    gap: 8px 16px;
  }

  .family p {
    grid-column: 2;
  }

  .family .count {
    grid-column: 2;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .nav {
    position: fixed;
    inset: 68px 0 auto 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--pad) 20px;
    display: none;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
  }

  .nav a:hover,
  .nav a[aria-current="page"] {
    border-bottom-color: var(--line);
  }

  .header-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .strip {
    grid-template-columns: 1fr 1fr;
  }

  .strip div {
    padding: 18px 16px 20px 0;
  }

  .strip div:nth-child(2) {
    border-right: 0;
  }

  .strip div:nth-child(3),
  .strip div:nth-child(4) {
    border-top: 1px solid var(--line-dark);
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Las tablas son el unico elemento que desbordaba en 375 px: con ancho fijo
     y relleno reducido caben sin recortar contenido. */
  .specs {
    table-layout: fixed;
    width: 100%;
  }

  .specs th,
  .specs td {
    padding: 12px 10px;
    font-size: 13px;
    overflow-wrap: anywhere;
  }

  .specs th {
    width: 40%;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   Secciones nuevas: parametros, disenos, academia, herramientas
   Mismo sistema: bordes secos, etiquetas en Michroma, acento azul sobre claro
   y amarillo sobre azul.
   ========================================================================== */

/* ------------------------------------------------------- nomenclatura */

.nomenclatura {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.nomenclatura-pieza {
  background: #ffffff;
  padding: 26px 24px;
}

.nomenclatura-pieza b {
  display: block;
  font-family: var(--font-brand);
  font-size: 24px;
  color: var(--brand-blue);
  letter-spacing: 0.02em;
}

.nomenclatura-pieza span {
  display: block;
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.55;
}

/* ------------------------------------------------------- bloques y pasos */

.grid-tres {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.bloque {
  background: #ffffff;
  padding: 28px 26px 30px;
}

.bloque .num {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-brand);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--brand-blue);
}

.bloque h3 {
  font-size: 17px;
  line-height: 1.3;
  margin-bottom: 10px;
}

.bloque p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}

.bloque .mini {
  margin-top: 14px;
  padding-left: 12px;
  border-left: 2px solid var(--brand-yellow);
  font-size: 12.5px;
  color: var(--text);
}

.pasos {
  counter-reset: paso;
  list-style: none;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.pasos li {
  position: relative;
  counter-increment: paso;
  background: #ffffff;
  padding: 22px 26px 22px 68px;
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.6;
}

.pasos li::before {
  content: counter(paso, decimal-leading-zero);
  position: absolute;
  left: 24px;
  top: 23px;
  font-family: var(--font-brand);
  font-size: 12px;
  color: var(--brand-blue);
}

.pasos li b {
  color: var(--text);
}

/* ------------------------------------------------------- tablas técnicas */

.tabla-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.capacity td {
  font-family: var(--font-brand);
  font-size: 14px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.capacity td b {
  color: var(--brand-blue);
  font-size: 16px;
}

.diagnostico th[scope="row"] {
  width: 30%;
  font-weight: 600;
  color: var(--text);
}

.diagnostico td {
  font-size: 14px;
  vertical-align: top;
}

.nota-tecnica {
  margin-top: 30px;
  padding: 24px 26px;
  background: var(--paper);
  border-left: 3px solid var(--brand-blue);
}

.nota-tecnica p {
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.65;
}

.nota-tecnica p + p {
  margin-top: 12px;
}

.descarga-inline {
  margin-top: 36px;
  padding: 26px;
  background: #ffffff;
  border: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.descarga-inline h3 {
  font-size: 16px;
}

.descarga-inline p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-2);
}

/* ------------------------------------------------------- biblioteca */

.grid-disenos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.diseno {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--line);
}

.diseno-preview {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  color: var(--brand-blue);
}

.diseno-preview img {
  width: 100%;
  height: 100%;
  max-height: 150px;
  object-fit: contain;
}

.diseno-cuerpo {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  flex: 1;
}

.diseno-cuerpo h3 {
  font-size: 16px;
  line-height: 1.3;
}

.diseno-cuerpo p {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.55;
}

.diseno-datos {
  display: grid;
  gap: 7px;
  margin-top: auto;
}

.diseno-datos div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.diseno-datos dt {
  font-family: var(--font-brand);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}

.diseno-datos dd {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
}

.diseno-acciones {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.btn-sm {
  padding: 9px 14px;
  font-size: 12.5px;
}

.licencia-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.licencia-bloque {
  padding: 28px 26px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.licencia-bloque h3 {
  margin-bottom: 16px;
  font-family: var(--font-brand);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-blue);
}

.licencia-bloque ul {
  list-style: none;
  display: grid;
  gap: 11px;
}

.licencia-bloque li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

.licencia-bloque li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--brand-blue);
}

/* ------------------------------------------------------- academia */

.rutas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.ruta {
  background: #ffffff;
  padding: 30px 28px;
}

.ruta-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.ruta-head .num {
  font-family: var(--font-brand);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--brand-blue);
}

.ruta h3 {
  font-size: 18px;
  line-height: 1.25;
}

.ruta-meta {
  margin: 9px 0 18px;
  font-family: var(--font-brand);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
}

.ruta ul {
  list-style: none;
  display: grid;
  gap: 9px;
}

.ruta li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.45;
}

.ruta li::before {
  content: "·";
  position: absolute;
  left: 2px;
  color: var(--brand-blue);
  font-weight: 700;
}

.leccion {
  margin-bottom: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.leccion summary {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 20px 24px;
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.leccion summary::-webkit-details-marker {
  display: none;
}

.leccion summary span {
  font-family: var(--font-brand);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-blue);
  white-space: nowrap;
}

.leccion summary::after {
  content: "+";
  margin-left: auto;
  font-family: var(--font-brand);
  color: var(--text-2);
}

.leccion[open] summary::after {
  content: "–";
}

.leccion-cuerpo {
  padding: 20px 24px 26px;
  border-top: 1px solid var(--line);
}

.leccion-cuerpo p {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.65;
}

.leccion-cuerpo p + p {
  margin-top: 12px;
}

.leccion-cuerpo ul {
  display: grid;
  gap: 7px;
  margin: 12px 0 0 18px;
  font-size: 14.5px;
  color: var(--text-2);
}

.leccion-cuerpo a {
  color: var(--brand-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ------------------------------------------------------- herramientas */

.tool {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.tool-campos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  padding: 28px;
  background: #ffffff;
}

.tool-campos label {
  display: grid;
  gap: 8px;
  font-family: var(--font-brand);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-2);
  line-height: 1.4;
}

.tool-campos input,
.tool-campos select {
  width: 100%;
  padding: 11px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.tool-campos input:focus,
.tool-campos select:focus {
  outline: 2px solid var(--brand-blue);
  outline-offset: 1px;
}

.tool-salida {
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
  padding: 28px;
  background: var(--ink);
  color: var(--text-inv);
}

.tool-vacio {
  font-size: 14px;
  color: var(--text-inv-2);
  line-height: 1.6;
}

.resultado {
  display: grid;
  gap: 10px;
}

.resultado div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line-dark);
  font-size: 14px;
}

.resultado dt {
  color: var(--text-inv-2);
}

.resultado dd {
  margin: 0;
  font-weight: 600;
  color: var(--text-inv);
  text-align: right;
}

.resultado .total dd,
.resultado .precio dd {
  font-family: var(--font-brand);
  font-size: 19px;
  letter-spacing: 0.01em;
  color: var(--brand-yellow);
}

.tool-numero {
  font-family: var(--font-brand);
  font-size: clamp(1.8rem, 4vw, 2.3rem);
  line-height: 1;
  color: var(--brand-yellow);
}

.tool-titulo {
  font-size: 14.5px;
  color: var(--text-inv);
  line-height: 1.5;
}

.tool-nota {
  font-size: 12.5px;
  color: var(--text-inv-2);
  line-height: 1.6;
}

.tool-salida .btn-primary {
  align-self: flex-start;
  margin-top: 4px;
}

/* ------------------------------------------------------- responsive */

@media (max-width: 1024px) {
  .grid-disenos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-tres {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .grid-tres,
  .rutas,
  .licencia-grid,
  .nomenclatura,
  .grid-disenos {
    grid-template-columns: 1fr;
  }

  .tool-campos {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .tool-salida {
    padding: 22px;
  }

  .descarga-inline {
    flex-direction: column;
    align-items: flex-start;
  }

  .pasos li {
    padding: 20px 20px 20px 56px;
  }

  .pasos li::before {
    left: 20px;
  }

  .diagnostico th[scope="row"] {
    width: auto;
  }
}


/* -------------------------------------------------- biblioteca de vectores */
/* La rejilla y la tarjeta son las mismas del catalogo de maquinas (.grid-cards
   y .card): mismo mosaico de 1 px, misma altura de imagen, mismo pie. Aqui solo
   se ajusta lo propio de una previsualizacion vectorial. */

.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;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  padding: 0;
  display: block;
}

.biblio-barra {
  display: flex;
  gap: 16px;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.buscador {
  flex: 1 1 auto;
}

.buscador input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: var(--r);
}

.buscador input:focus {
  outline: 2px solid var(--brand-blue);
  outline-offset: 1px;
}

.biblio-orden select {
  font-family: var(--font-body);
  font-size: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: var(--r);
  min-width: 230px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 18px;
}

.chip {
  font-family: var(--font-body);
  font-size: 13.5px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--r);
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chip b {
  font-family: var(--font-brand);
  font-size: 10.5px;
  color: var(--text-2);
}

.chip:hover {
  border-color: var(--brand-blue);
}

.chip.activo {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
}

.chip.activo b {
  color: rgba(255, 255, 255, 0.72);
}

.biblio-meta {
  font-family: var(--font-brand);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 22px;
}

/* El mosaico no necesita reglas propias: .grid-cards ya reparte las columnas
   con auto-fill y pinta las separaciones con el fondo. Solo hay que ocultar
   las tarjetas filtradas sin romper el gap. */
#v-grid .card[hidden] {
  display: none;
}

.biblio-vacio {
  font-size: 14.5px;
  color: var(--text-2);
  padding: 28px 0;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

.biblio-mas {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}

@media (max-width: 820px) {
  .biblio-barra {
    flex-direction: column;
  }
  .biblio-orden select {
    width: 100%;
    min-width: 0;
  }
}

/* Marco cuadrado para los vectores: el SVG de previsualizacion es cuadrado, asi
   que en un marco 4:3 el dibujo encajaba por altura y dejaba dos franjas vacias
   a los lados. Con 1:1 la pieza ocupa el recuadro completo y queda centrada. */
.card.vector .card-media {
  aspect-ratio: 1 / 1;
}

/* Caja absoluta: con altura porcentual el SVG podia desbordar el recuadro y
   recortarse por abajo. Con inset la caja es definida y object-fit centra
   siempre, sin depender del alto calculado del contenedor. */
.card.vector .card-media img {
  position: absolute;
  inset: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  object-fit: contain;
  object-position: center;
}

/* ------------------------------------------- biblioteca de parametros (venta) */

.paquete {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}

.paquete-texto {
  background: var(--ink);
  color: var(--text-inv);
  padding: 34px 32px;
}

.paquete-desc {
  color: var(--text-inv-2);
  font-size: 15px;
  margin-top: 12px;
  max-width: 46ch;
}

.paquete-lista {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.paquete-lista li {
  font-size: 14px;
  color: var(--text-inv);
  padding-left: 20px;
  position: relative;
}

.paquete-lista li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 2px;
  background: var(--brand-yellow);
}

.paquete-precio {
  background: #0b1230;
  padding: 34px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.paquete-etiqueta {
  font-family: var(--font-brand);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-inv-2);
}

.paquete-tachado {
  color: var(--text-inv-2);
  font-size: 15px;
  text-decoration: line-through;
  margin-top: 4px;
}

.paquete-cifra {
  font-family: var(--font-brand);
  font-size: clamp(2.2rem, 5vw, 3rem);
  line-height: 1;
  color: var(--brand-yellow);
  margin: 6px 0 4px;
}

.paquete-ahorro {
  font-size: 13px;
  color: var(--text-inv);
  margin-bottom: 20px;
}

.paquete-nota {
  font-size: 11.5px;
  color: var(--text-inv-2);
  margin-top: 12px;
  line-height: 1.5;
}

/* Sello de estado en la tarjeta: reserva o disponible */
.conjunto-estado {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--font-brand);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-blue);
  border: 1px solid currentColor;
  padding: 3px 7px;
  align-self: flex-start;
}

.conjunto .card-media .placeholder {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: 0.02em;
}

@media (max-width: 900px) {
  .paquete {
    grid-template-columns: 1fr;
  }
}

/* .card es flex, y eso anula el atributo hidden: hay que reponerlo para que los
   filtros puedan ocultar conjuntos. */
#p-grid .conjunto[hidden] {
  display: none;
}

/* Los conjuntos no tienen foto: el hueco del espesor se reduce a una banda para
   que la rejilla no se convierta en doce cuadrados vacios. */
.conjunto .card-media {
  aspect-ratio: 16 / 9;
}

.conjunto .card-media .placeholder {
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
}

/* La cabecera es fija: sin esto, al saltar a #paquete o #biblioteca el titulo
   queda tapado. */
section[id],
[id^="paquete"],
[id^="biblioteca"] {
  scroll-margin-top: 84px;
}

/* Imagen de ficha: contenedor claro sobre el hero oscuro. */
.ficha-media {
  margin: 32px 0 0;
  max-width: 820px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.ficha-media img {
  display: block;
  width: 100%;
  height: auto;
}

.ficha-media figcaption {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a8a8a;
  padding: 11px 18px;
  border-top: 1px solid var(--line);
}
