/* Ayudante BIM — estilos de la página.
   Paleta y medidas del diseño «Tienda de productos digitales»: lavanda e índigo. */

:root {
  --bg: #F4F4F5;
  --ink: #090A0D;
  --muted: #4A5571;
  --accent: #2C2743;
  --accent-hover: #534984;
  --panel: #DDDFF0;
  --line: #CCD0EC;
  --line-strong: #778AA9;
  --chip-line: #8F9EBC;
  --soft: #EEEFF7;
  --mauve: #A388A8;
  --rose: #D5C0CE;
  --white: #FFFFFF;

  --font-display: "Manrope", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --section-gap: clamp(64px, 9vw, 96px);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button { font-family: inherit; cursor: pointer; }
[hidden] { display: none !important; }

a { color: var(--ink); }
a:hover { color: var(--accent-hover); }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

section[id] { scroll-margin-top: 24px; }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section { padding-top: var(--section-gap); }

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; color: var(--white); }

/* ---------- piezas comunes ---------- */

.dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 32px;
}
.section-head > p:not(.eyebrow) {
  max-width: 640px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--white); }
.btn svg { flex: none; }

.btn--outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }

.btn--light { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn--light:hover { background: var(--line); border-color: var(--line); color: var(--ink); }

.btn--sm { min-height: 44px; padding: 0 18px; font-size: 14px; }
.btn--block { width: 100%; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
}
.status--live::before { border-color: var(--accent); background: var(--accent); }
.status--dev::before { border-color: var(--mauve); background: var(--mauve); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  padding: 3px 10px;
  border: 1px solid var(--chip-line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

/* ---------- cabecera ---------- */

.site-header { position: relative; z-index: 10; }

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark { width: 24px; height: 29px; color: var(--accent); }

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 28px;
  font-size: 14px;
  font-weight: 500;
}
.nav a { padding: 10px 0; text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
}
.menu-btn .icon-close { display: none; }
.menu-btn[aria-expanded="true"] .icon-open { display: none; }
.menu-btn[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 1023px) {
  .js .header-row { flex-wrap: nowrap; gap: 12px; padding-block: 10px; }
  .js .brand { font-size: 20px; white-space: nowrap; }
  .js .menu-btn { display: inline-flex; flex: none; }
  .js .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px var(--gutter) 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(44, 39, 67, 0.12);
  }
  .js .site-header.is-open .nav { display: flex; }
  .js .nav a {
    padding: 16px 0;
    border-bottom: 1px solid var(--panel);
    font-size: 18px;
  }
}

/* ---------- portada ---------- */

.hero { padding-top: 8px; }

.hero-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  padding: clamp(40px, 5vw, 64px) clamp(20px, 4vw, 56px);
  border-radius: 24px;
  background: var(--panel);
}

.hero-copy {
  flex: 1 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

h1 {
  max-width: 620px;
  font-family: var(--font-display);
  font-size: clamp(32px, 3.2vw, 44px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.lede {
  max-width: 560px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}
.lede strong { color: var(--ink); font-weight: 600; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.works-with {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}
.works-with > span { margin-right: 4px; font-size: 13px; color: var(--muted); }
.works-with .tags li { padding: 4px 12px; font-size: 13px; }

.hero-figure { flex: 1 1 420px; min-width: 0; }

/* El edificio: la hoja assets/obra.css dibuja la figura; aquí va su encaje en la portada. */
.obra {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  color: var(--muted);
  font-family: var(--font-mono);
}
.obra .iso-stage { aspect-ratio: 760 / 560; }
.obra .iso-stage img { width: 100%; height: 100%; object-fit: contain; }
/* La leyenda va siempre en dos filas: su texto cambia cada semana y, si saltara
   de una a dos líneas, movería el resto de la página. */
.obra-caption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.04em;
}
.obra-hint { text-transform: uppercase; }
.obra:not([data-live]) .obra-hint { visibility: hidden; }
.obra [data-readout] { color: var(--accent); font-variant-numeric: tabular-nums; text-wrap: balance; }

@media (max-width: 480px) {
  .obra-caption { font-size: 11px; letter-spacing: 0.02em; }
  .obra [data-readout] { min-height: 2.8em; }
}

/* ---------- tres áreas ---------- */

.areas {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 1099px) {
  .areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
  .areas { grid-template-columns: minmax(0, 1fr); }
}

.area {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}
.area-num {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.area h3 { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.area > p { font-size: 14px; line-height: 1.6; color: var(--muted); }
.area-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
}
.area-list li { display: flex; align-items: baseline; gap: 10px; }
.area-list li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mauve);
  transform: translateY(-2px);
}
.area .text-link { margin-top: auto; }

/* Cada tarjeta lleva el color de su sección: blanco (productos), índigo (cursos),
   celeste (servicios) y lavanda (impresión 3D). */
.area--productos { background: var(--white); }
.area--servicios { background: #E3EAF4; border-color: #CFDAEA; }
.area--servicios .area-list { border-top-color: #CFDAEA; }
.area--impresion { background: var(--panel); border-color: var(--line); }
.area--impresion .area-list { border-top-color: var(--line); }
.area--impresion .area-mini { box-shadow: inset 0 0 0 1px var(--line); }
.area--cursos { background: var(--accent); border-color: var(--accent); color: var(--white); }
.area--cursos .area-num,
.area--cursos .text-link,
.area--cursos .text-link:hover { color: var(--white); }
.area--cursos > p { color: var(--line); }
.area--cursos .area-list { border-top-color: #4D4679; }
.area--cursos .area-list li::before { background: var(--rose); }
.area--cursos .area-mini { box-shadow: inset 0 0 0 1px #4D4679; }
.area--cursos :focus-visible { outline-color: var(--white); }

/* Miniaturas de las áreas: cada una con el fondo de su sección.
 * 01 recorre las cuatro tarjetas de productos con sus colores; 02 el panel índigo de cursos;
 * 03 y 04 el lavanda de servicios e impresión. */
/* Cada miniatura es un enlace a su sección; el «Ver …» de la tarjeta lleva al mismo lugar con el teclado. */
.area-mini {
  display: block;
  cursor: pointer;
  position: relative;
  height: 152px;
  margin-bottom: 4px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--panel);
}
.area-mini img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
}
.area:hover .area-mini img { transform: scale(1.05); }
.area-mini--cursos { background: var(--accent); }
.area-mini--cursos img,
.area-mini--servicios img,
.area-mini--impresion img { padding: 6px; }
/* Con JavaScript, las miniaturas 02 a 04 son la figura viva (data-mini): recorre sola su secuencia, no sigue
   el scroll y vuelve a empezar al pasar por la tarjeta. Por su tamaño, los trazos van más finos. */
.area-mini[data-live] { --anatomy-weight: 0.4px; }
.area-mini .iso-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 6px;
  transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
}
.area:hover .area-mini .iso-svg { transform: scale(1.05); }

.area-mini--productos { background: var(--line); animation: area-mini-paper 16s infinite; }
.area-mini--productos img { opacity: 0; animation: area-mini-fade 16s infinite; }
.area-mini--productos img:nth-child(1) { animation-delay: -16s; }
.area-mini--productos img:nth-child(2) { animation-delay: -12s; }
.area-mini--productos img:nth-child(3) { animation-delay: -8s; }
.area-mini--productos img:nth-child(4) { animation-delay: -4s; }
@keyframes area-mini-fade {
  0%, 22% { opacity: 1; }
  25%, 97% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes area-mini-paper {
  0%, 22% { background: var(--line); }
  25%, 47% { background: var(--chip-line); }
  50%, 72% { background: var(--rose); }
  75%, 97% { background: var(--mauve); }
  100% { background: var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  .area-mini--productos, .area-mini--productos img { animation: none; }
  .area-mini--productos img:first-child { opacity: 1; }
  .area-mini img { transition: none; }
  .area:hover .area-mini img { transform: none; }
}

/* ---------- productos ---------- */


.catalog-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}
.catalog-head .section-head { margin-bottom: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--white); }

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 20px;
}

.product {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 12px 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
}

.product-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 224px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--line);
}
.product-media--blue { background: var(--chip-line); }
.product-media--rose { background: var(--rose); }
.product-media--mauve { background: var(--mauve); }

.product-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--white);
  font-size: 12px;
  font-weight: 600;
}

/* La ilustración isométrica de cada producto: una imagen SVG que assets/productos.js cambia por
   el mismo dibujo en piezas, para armarlo al pasar por la tarjeta. El margen deja libre la etiqueta de la esquina. */
.product-media .product-iso { display: block; flex: none; width: auto; height: 100%; max-width: 100%; padding: 22px 4px 2px; overflow: hidden; object-fit: contain; }

.product-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 0 4px; }
.product-kind { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.product h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; line-height: 1.3; }
.product-body > p:last-child { font-size: 14px; line-height: 1.55; color: var(--muted); }

.product-foot { display: flex; flex-direction: column; gap: 10px; }
.product-note { padding: 0 4px; font-size: 12px; color: var(--muted); }
.product-foot .btn { min-height: 44px; font-size: 14px; }
.product-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 8px;
  padding: 0 4px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
}
.product-price span { font-family: var(--font-body); font-size: 12px; font-weight: 400; color: var(--muted); }
.product-note a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.product-note a:hover { color: var(--accent-hover); }

/* ---------- cursos ---------- */

.courses-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px 48px;
  padding: clamp(32px, 5vw, 64px);
  border-radius: 24px;
  background: var(--accent);
  color: var(--white);
}
.courses-panel :focus-visible { outline-color: var(--white); }

.courses-copy {
  flex: 1 1 380px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.courses-copy h2 { color: var(--white); }
.courses-copy > p { max-width: 480px; font-size: 16px; line-height: 1.6; color: var(--line); }

.badge {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--line);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.checks { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.checks li { display: flex; align-items: flex-start; gap: 10px; }
.checks svg { flex: none; margin-top: 2px; }

/* El salón de clases: la figura va sobre el panel índigo, con su paleta oscura (assets/obra.css). */
.courses-figure { flex: 1.2 1 420px; min-width: 0; }
.aula .iso-stage { aspect-ratio: 760 / 600; }
.courses-figure .obra { color: var(--line); }
.courses-figure .obra [data-readout] { color: var(--white); }
.courses-panel .obra .iso-stage:focus-visible { outline-color: var(--white); }

/* Los cursos van debajo, a todo el ancho del panel. */
.courses-list {
  flex: 1 1 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 767px) {
  .courses-list { grid-template-columns: minmax(0, 1fr); }
}

.course {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border-radius: 16px;
  background: var(--white);
  color: var(--ink);
}
/* Al pasar por un curso, el salón de arriba va a su momento de la clase (data-mueve). */
.course[data-mueve] { box-shadow: inset 0 0 0 2px transparent; transition: box-shadow 0.25s ease; }
.course[data-mueve]:hover { box-shadow: inset 0 0 0 2px var(--mauve); }
.course-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.course h3 { font-family: var(--font-display); font-size: 20px; font-weight: 600; line-height: 1.25; }
.course p { font-size: 14px; line-height: 1.6; color: var(--muted); }

/* ---------- impresión 3D ---------- */

/* En escritorio la figura va a la izquierda; al apilarse, el texto queda arriba. */
.print-panel {
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  padding: clamp(32px, 5vw, 64px) clamp(20px, 4vw, 56px);
  border-radius: 24px;
  background: var(--panel);
}
.print-copy {
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.print-copy > p:not(.pill) { max-width: 480px; font-size: 16px; line-height: 1.6; color: var(--muted); }
.print-figure { flex: 1.15 1 420px; min-width: 0; }
.print3d .iso-stage { aspect-ratio: 640 / 600; }

/* ---------- bloques a dos columnas: servicios, BIM, preguntas ---------- */

.split { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px; }

.split-intro {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.split-intro > p:not(.eyebrow) { max-width: 420px; font-size: 16px; line-height: 1.6; color: var(--muted); }

.split-body { flex: 1.3 1 420px; min-width: 0; }

/* El escritorio de la sección de servicios: cada objeto es uno de los servicios de la lista. */
.split-figure {
  align-self: stretch;
  margin-top: 8px;
  padding: 20px 20px 16px;
  border-radius: 20px;
  background: var(--panel);
}
.escritorio .iso-stage { aspect-ratio: 660 / 580; }

.rows { display: flex; flex-direction: column; gap: 12px; }
.row-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 14px;
  background: var(--panel);
}
/* La tarjeta del servicio que el escritorio está mostrando. */
.row-card { box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow 0.25s ease; }
.row-card[data-active] { box-shadow: inset 0 0 0 1.5px var(--accent-hover); }
.row-card > div { display: flex; flex-direction: column; gap: 6px; }
.row-card h3 { font-size: 16px; font-weight: 600; }
.row-card p { max-width: 480px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.row-card svg { flex: none; }


/* ---------- software ---------- */

/* Un listado simple: nombre y descripción a la izquierda; tipo, estado y enlace a la derecha. */
.tools { border-top: 1px solid var(--line); }
.tool {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 32px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
}
.tool-main { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tool h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; line-height: 1.3; }
.tool p { font-size: 14px; line-height: 1.55; color: var(--muted); }
.tool-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13px; }
.tool-kind { color: var(--muted); }
.tool-link { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
/* En pantallas anchas, tipo, estado y enlace van en columnas, alineados de una fila a otra. */
@media (min-width: 900px) {
  .tool { display: grid; grid-template-columns: minmax(0, 1fr) 13rem 8.5rem 8rem; align-items: center; gap: 0 20px; }
  .tool-meta { display: contents; }
  .tool-kind { justify-self: end; text-align: right; font-size: 13px; }
  .tool .status { justify-self: start; }
  .tool-link { justify-self: start; font-size: 13px; }
}

/* ---------- cómo trabaja ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 32px;
  counter-reset: paso;
}
.steps li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
  border-top: 1.5px solid var(--ink);
  counter-increment: paso;
}
.steps li::before {
  content: "Paso " counter(paso);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.steps h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; line-height: 1.3; }
.steps p { font-size: 14px; line-height: 1.6; color: var(--muted); }

/* ---------- sobre Nestor ---------- */

.about { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px; }

.profile {
  flex: 1 1 300px;
  max-width: 380px;
  padding: 24px;
  border-radius: 18px;
  background: var(--panel);
}
.profile-head { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; }
.profile-head img { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; }
.profile-head small { display: block; font-size: 12px; color: var(--muted); }
.profile-head strong { font-family: var(--font-display); font-size: 18px; font-weight: 600; line-height: 1.25; }
.profile dl > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--chip-line);
  font-size: 14px;
}
.profile dt { flex: none; color: var(--muted); }
.profile dd { text-align: right; font-weight: 500; }

.about-text { flex: 1.4 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.about-text > p { max-width: 640px; font-size: 16px; line-height: 1.65; color: var(--muted); }
.about-text > p strong { color: var(--ink); font-weight: 600; }

.profile .text-link { margin-top: 16px; }

/* Experiencia y certificaciones: una fila por cargo o curso, con su fecha a la derecha. */
.cv { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.cv h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.cv-list { border-top: 1px solid var(--line); }
.cv-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.cv-list div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cv-list b { font-weight: 600; }
.cv-list span, .cv-list time { color: var(--muted); }
.cv-list time { font-size: 13px; white-space: nowrap; }

/* ---------- BIM, en simple ---------- */

.edu-text { display: flex; flex-direction: column; gap: 14px; }
.edu-text p { max-width: 460px; font-size: 15px; line-height: 1.65; color: var(--muted); }
.edu-text strong { color: var(--ink); font-weight: 600; }

.glossary { border-top: 1px solid var(--line); }
.glossary > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.glossary dt { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.glossary dd { font-size: 14px; line-height: 1.55; color: var(--muted); }
.glossary dd b { color: var(--ink); font-weight: 600; }

@media (max-width: 480px) {
  .glossary > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* ---------- preguntas ---------- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 16px 0;
  font-size: 17px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; transition: transform 0.2s; }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { padding: 0 40px 20px 0; font-size: 15px; line-height: 1.6; color: var(--muted); }

/* ---------- contacto ---------- */

.contact { padding-block: var(--section-gap); }
/* El contacto va primero y las preguntas frecuentes justo debajo, como un solo bloque al final de la página. */
.contact--con-faq { padding-bottom: 0; }
.faq-section { padding-top: 56px; padding-bottom: var(--section-gap); }

.contact-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px 48px;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 24px;
  background: var(--panel);
}
.contact-copy { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.contact-copy h2 { font-size: clamp(26px, 2.8vw, 34px); line-height: 1.2; }
.contact-copy p { max-width: 460px; font-size: 15px; line-height: 1.6; color: var(--muted); }

.contact-links { flex: 1 1 380px; min-width: 0; border-top: 1px solid var(--chip-line); }
.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  min-height: 52px;
  padding: 10px 0;
  border-bottom: 1px solid var(--chip-line);
}
.contact-row > span:first-child { font-size: 13px; color: var(--muted); }
.contact-row a { display: inline-flex; align-items: center; min-height: 32px; font-size: 15px; font-weight: 600; text-underline-offset: 4px; overflow-wrap: anywhere; }
.contact-value { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }

.copy-btn {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}
.copy-btn:hover { border-color: var(--accent); }

/* ---------- pie ---------- */

.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-direction: column; gap: 40px; padding-block: 56px 32px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.footer-brand { flex: 1 1 260px; max-width: 340px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer-brand p { font-size: 14px; line-height: 1.6; color: var(--muted); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 32px 64px; }
.footer-nav div { display: flex; flex-direction: column; gap: 2px; }
.footer-nav span { margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 32px; font-size: 14px; color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .chip, .faq summary svg, .row-card, .course[data-mueve] { transition: none; }
}
