/* MR Tech · sitio institucional. Colores y fuentes del kit de marca (marca-mr/kit-mrtech). */
:root {
  --naranja: #e8551f;
  --naranja-texto: #c2410c;
  --naranja-suave: #fde9df;
  --tinta: #152033;
  --tinta-2: #24324b;
  --tinta-texto: #4a556b;
  --arena: #fbf7f3;
  --arena-2: #f3ebe2;
  --linea: #e7ddd2;
  --gestion: #178a5c;
  --contable: #2b5fc7;
  --bots: #6d4ae0;

  --titulos: "Outfit", "Segoe UI", Arial, sans-serif;
  --texto: "Inter", "Segoe UI", Arial, sans-serif;

  --margen: clamp(20px, 6vw, 96px);
  --hilo-x: clamp(10px, 2.6vw, 40px);
  --ancho: 1240px;
  --sale: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--arena); color: var(--tinta);
  font: 400 17px/1.6 var(--texto); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--naranja); color: #fff; }
:focus-visible { outline: 3px solid var(--naranja); outline-offset: 3px; border-radius: 6px; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
img, svg { display: block; }
h1, h2, h3 { font-family: var(--titulos); font-weight: 600; letter-spacing: -.02em; text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--tinta); color: #fff; padding: 10px 16px; border-radius: 8px; }
.saltar:focus { top: 12px; }
html { scrollbar-color: #cdbfb1 var(--arena); }

/* ---------- Botones y enlaces ---------- */
.boton {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px;
  border-radius: 999px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--naranja-texto); color: #fff; font: 600 19px/1 var(--titulos); letter-spacing: .005em;
  box-shadow: 0 8px 16px -10px rgba(21, 32, 51, .5);
  transition: background .2s, transform .25s var(--sale), box-shadow .25s var(--sale);
}
.boton:hover { background: #a8380a; transform: translateY(-1px); box-shadow: 0 12px 20px -12px rgba(21, 32, 51, .55); }
.boton:active { transform: translateY(0); }
.boton[disabled] { opacity: .6; cursor: progress; transform: none; }
.boton-chico { min-height: 42px; padding: 0 18px; font-size: 16px; box-shadow: none; }
.enlace-flecha { font: 500 17px/1.3 var(--titulos); color: var(--tinta); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.enlace-flecha::after { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: width .3s var(--sale); }
.enlace-flecha:hover::after { width: 30px; }
.enlace-flecha:hover { color: var(--naranja-texto); }

/* ---------- Cabecera ---------- */
.cabecera {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 32px;
  padding: 14px var(--margen); background: rgba(251, 247, 243, .9); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.cabecera.con-borde { border-bottom-color: var(--linea); }
.marca img { height: 40px; width: auto; }
.cabecera nav { margin-left: auto; }
.cabecera ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.cabecera nav a { text-decoration: none; font: 500 16px/1 var(--titulos); color: var(--tinta-2); padding: 8px 0; }
.cabecera nav a:hover { color: var(--naranja-texto); }

/* ---------- Hilo: la línea que recorre la página ---------- */
.hilo { position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; z-index: 0; overflow: visible; }
.hilo path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.hilo line { stroke: var(--naranja); stroke-linecap: round; }
.hilo-fondo { stroke: var(--linea); stroke-width: 2; }
.hilo-trazo { stroke: var(--naranja); stroke-width: 4; }
main, .pie { position: relative; z-index: 1; }

section { position: relative; padding: clamp(80px, 11vw, 150px) var(--margen); max-width: calc(var(--ancho) + 2 * var(--margen)); margin: 0 auto; }
.nudo { position: absolute; left: calc(var(--hilo-x) - 9px); top: clamp(88px, 11.6vw, 160px); width: 18px; height: 18px; border-radius: 50%; background: var(--arena); border: 4px solid var(--naranja); }
.nudo.encendido { background: var(--naranja); }
h2 { font-size: clamp(36px, 5vw, 64px); line-height: 1.04; }
.intro { margin-top: 20px; max-width: 60ch; font-size: clamp(17px, 1.6vw, 20px); color: var(--tinta-texto); }

/* ---------- Portada ---------- */
.portada {
  min-height: calc(100svh - 70px); display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  grid-template-rows: 1fr auto; align-items: center; column-gap: 2vw; padding-top: clamp(40px, 6vw, 80px); padding-bottom: 40px;
}
.portada-texto { position: relative; z-index: 2; }
h1 { font-size: clamp(44px, 6.6vw, 96px); line-height: .98; letter-spacing: -.035em; max-width: 12ch; }
.acento { color: var(--naranja); }
.bajada { margin-top: 28px; max-width: 46ch; font-size: clamp(18px, 1.7vw, 22px); line-height: 1.5; color: var(--tinta-texto); }
.acciones { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 30px; }

.firma { margin: 0; justify-self: end; width: min(100%, 560px); aspect-ratio: 1; position: relative; }
.firma-svg { position: relative; width: 100%; height: 100%; overflow: visible; }
.firma-svg path { fill: none; stroke: var(--naranja); stroke-width: 30; stroke-linecap: round; stroke-linejoin: round; }
.firma-m { stroke-dasharray: 1000; stroke-dashoffset: 0; }
.firma-pata { stroke-dasharray: 90; stroke-dashoffset: 0; }
.js .firma-m { stroke-dashoffset: 1000; }
.js .firma-pata { stroke-dashoffset: 90; }
.js .firma.firmar .firma-m { animation: firmar 1.9s .25s var(--sale) forwards; }
.js .firma.firmar .firma-pata { animation: firmar .5s 1.85s var(--sale) forwards; }
@keyframes firmar { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .js .firma-m, .js .firma-pata { animation: none; stroke-dashoffset: 0; } }

.en-produccion {
  grid-column: 1 / -1; max-width: 78ch;
  padding-top: 26px; border-top: 1px solid var(--linea); font-size: 15.5px; color: var(--tinta-texto);
}

/* ---------- Servicios: índice tipográfico, no tarjetas ---------- */
.lista-servicios { list-style: none; margin: 56px 0 0; padding: 0; border-top: 2px solid var(--tinta); }
.lista-servicios li {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px 48px; align-items: baseline;
  padding: 30px 0; border-bottom: 1px solid var(--linea); position: relative;
}
.lista-servicios h3 { font-size: clamp(26px, 3vw, 38px); line-height: 1.1; display: flex; align-items: center; gap: 16px; }
.lista-servicios h3::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--c); transform: translateY(1px); }
.lista-servicios p { color: var(--tinta-texto); max-width: 54ch; }
.lista-servicios li::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--c); transition: width .6s var(--sale); }
.lista-servicios li:hover::after { width: 100%; }

/* ---------- Casos ---------- */
.caso { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; margin-top: clamp(64px, 8vw, 110px); }
.caso h3 { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.08; }
.caso-cliente { margin-top: 12px; font: 500 17px/1.3 var(--titulos); color: var(--naranja-texto); }
.caso-texto > p:not(.caso-cliente) { margin-top: 20px; color: var(--tinta-texto); max-width: 52ch; }
.caso-cliente-logo { display: flex; align-items: center; gap: 12px; }
.caso-cliente-logo img { height: 40px; width: auto; }
.datos { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 10px; }
.datos li { display: flex; gap: 12px; align-items: baseline; font-weight: 500; }
.datos li::before { content: ""; flex: none; width: 16px; height: 2px; background: var(--naranja); transform: translateY(-4px); border-radius: 2px; }

/* Lector */
.lector { background: var(--tinta); color: #e9edf4; border-radius: 26px; padding: clamp(22px, 3vw, 34px); box-shadow: 0 30px 60px -30px rgba(21, 32, 51, .55); }
.lector-cabeza { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.lector-titulo { font: 600 22px/1.2 var(--titulos); color: #fff; }
.lector-nota { font-size: 13px; color: #9fabbf; }
.lector-entrada { margin-top: 18px; display: flex; align-items: center; gap: 12px; background: #0e1626; border: 1px solid #33425e; border-radius: 14px; padding: 0 16px; transition: border-color .2s, box-shadow .2s; }
.lector-entrada:focus-within { border-color: var(--naranja); box-shadow: 0 0 0 4px rgba(232, 85, 31, .22); }
.lector-entrada svg { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--naranja); stroke-width: 1.8; stroke-linecap: round; }
.lector-entrada input { flex: 1; min-width: 0; height: 56px; background: none; border: 0; outline: none; color: #fff; font: 500 16px/1 ui-monospace, "Cascadia Mono", Consolas, monospace; caret-color: var(--naranja); }
.lector-entrada input::placeholder { color: #7f8ba1; font-family: var(--texto); }
.muestras { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.muestras button { font: 500 14px/1 var(--texto); color: #dfe5ee; background: #22304a; border: 1px solid #33425e; border-radius: 999px; padding: 9px 13px; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.muestras button:hover, .muestras button[aria-pressed="true"] { background: rgba(232, 85, 31, .16); border-color: var(--naranja); color: #fff; }
.lectura { margin: 22px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #2c3a55; border-radius: 14px; overflow: hidden; }
.lectura div { background: #1b2840; padding: 14px 16px; }
.lectura dt { font-size: 12.5px; letter-spacing: .04em; color: #9fabbf; }
.lectura dd { margin: 6px 0 0; font: 600 19px/1.25 var(--titulos); color: #fff; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lectura dd.nuevo { animation: aparece .6s var(--sale); }
@keyframes aparece { from { color: var(--naranja); transform: translateY(4px); } }
.lectura-estado { margin: 14px 0 4px; font-size: 14.5px; color: #b6c0d0; min-height: 1.6em; display: flex; gap: 8px; align-items: center; }
.lectura-estado.ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #34c38f; flex: none; }
.lectura-estado.error { color: #ffb59a; }

/* Pantalla real del sistema */
.pantalla { grid-column: 1 / -1; margin: clamp(8px, 2vw, 24px) 0 0; }
.pantalla video { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--linea); background: #fff; box-shadow: 0 30px 50px -36px rgba(21, 32, 51, .45); }
.pantalla figcaption { margin-top: 14px; font-size: 15px; color: var(--tinta-texto); }

/* Chat */
.chat { background: #e9e1d7; border-radius: 26px; padding: 0 0 18px; overflow: hidden; box-shadow: 0 30px 60px -34px rgba(21, 32, 51, .35); max-width: 520px; justify-self: center; width: 100%; }
.chat-cabeza { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--tinta); color: #fff; }
.chat-cabeza b { display: block; font: 600 16px/1.2 var(--titulos); }
.chat-cabeza small { font-size: 12.5px; color: #a9b4c6; }
.chat-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--bots); display: grid; place-items: center; }
.chat-avatar svg { width: 24px; height: 24px; }
.chat-avatar path { fill: none; stroke: #fff; stroke-width: 26; stroke-linecap: round; stroke-linejoin: round; }
.chat-mensajes { list-style: none; margin: 0; padding: 18px 16px 0; display: flex; flex-direction: column; gap: 10px; }
.chat-mensajes li { max-width: 84%; padding: 10px 14px; border-radius: 16px; font-size: 15.5px; line-height: 1.45; box-shadow: 0 1px 1px rgba(21, 32, 51, .08); }
.de-familia { align-self: flex-end; background: #fff; border-bottom-right-radius: 4px; }
.del-bot { align-self: flex-start; background: #f2edff; border-bottom-left-radius: 4px; }
.adjunto { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.archivo { width: 32px; height: 32px; border-radius: 8px; background: var(--naranja-suave); display: grid; place-items: center; flex: none; }
.archivo svg { width: 18px; height: 18px; fill: none; stroke: var(--naranja-texto); stroke-width: 1.8; stroke-linejoin: round; }
.js .chat-mensajes li { opacity: 0; transform: translateY(8px); }
.js .chat.visto .chat-mensajes li { animation: mensaje .5s var(--sale) forwards; animation-delay: calc(var(--i) * 520ms); }
@keyframes mensaje { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .js .chat-mensajes li { opacity: 1; transform: none; animation: none !important; } }

/* Contingencia */
.caso-contingencia { grid-template-columns: 1fr; }
.caso-contingencia .caso-texto { max-width: 820px; }
.linea-tiempo { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; }
.linea-tiempo::before { content: ""; position: absolute; left: 11px; right: 0; top: 11px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #9aa3b2 0 20%, var(--naranja) 20% 100%); }
.linea-tiempo li { position: relative; padding: 46px 28px 0 0; }
.linea-tiempo li::before { content: ""; position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--arena); border: 4px solid var(--naranja); box-sizing: border-box; }
.linea-tiempo li.gris::before { border-color: #9aa3b2; }
.linea-tiempo li.lleno::before { background: var(--naranja); }
.linea-tiempo b { display: block; font: 700 clamp(30px, 3.4vw, 46px)/1 var(--titulos); color: var(--naranja); letter-spacing: -.02em; }
.linea-tiempo li.gris b { color: #667085; }
.linea-tiempo span { display: block; margin-top: 12px; color: var(--tinta-texto); font-size: 16px; max-width: 30ch; }

/* ---------- En desarrollo ---------- */
.proximo-grilla { margin-top: 56px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 96px); border-top: 2px solid var(--tinta); padding-top: 36px; }
.proximo h3 { font-size: clamp(26px, 2.8vw, 36px); line-height: 1.1; }
.proximo article > p:not(.estado) { margin-top: 18px; color: var(--tinta-texto); max-width: 52ch; }
/* El aro vacío es el mismo de la línea de tiempo: todavía no está lleno. */
.estado { margin-top: 12px; display: flex; align-items: center; gap: 10px; font: 500 16px/1.2 var(--titulos); color: var(--c); }
.estado::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--c); box-sizing: border-box; flex: none; }
.consulta { margin-top: 26px; padding: 22px 24px; border-radius: 14px; background: var(--arena-2); max-width: 520px; }
.consulta-pregunta { font: 600 21px/1.3 var(--titulos); color: var(--tinta); }
.consulta-respuesta { margin-top: 10px; color: var(--tinta-2); }
.consulta-nota { margin-top: 14px; font-size: 13.5px; color: var(--tinta-texto); }
.despues { margin-top: clamp(40px, 5vw, 64px); max-width: 70ch; color: var(--tinta-texto); }
.invitacion { margin-top: 14px; max-width: 70ch; font: 500 clamp(18px, 1.7vw, 21px)/1.45 var(--titulos); }
.invitacion a { color: var(--naranja-texto); }

/* ---------- Cómo trabajamos ---------- */
.forma { background: var(--tinta); color: #e8edf4; max-width: none; border-radius: 0; }
.forma > * { max-width: var(--ancho); margin-left: auto; margin-right: auto; }
.forma h2 { color: #fff; }
.forma .nudo { background: var(--tinta); margin: 0; }
.pasos { margin-top: 56px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid #33425e; }
.pasos > div { padding: 32px 36px 8px 0; position: relative; }
.pasos > div + div { padding-left: 36px; border-left: 1px solid #33425e; }
.pasos h3 { font-size: clamp(26px, 2.6vw, 34px); color: #fff; }
.pasos h3::after { content: ""; display: block; width: 36px; height: 3px; border-radius: 2px; background: var(--naranja); margin-top: 16px; }
.pasos p { margin-top: 18px; color: #b9c3d3; max-width: 38ch; }
.origen { margin: clamp(64px, 8vw, 110px) auto 0; display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; padding: 32px 0 0; border-top: 1px solid #33425e; }
.origen svg { width: 84px; height: 84px; }
.origen path { fill: none; stroke: var(--naranja); stroke-width: 30; stroke-linecap: round; stroke-linejoin: round; }
.origen p { font: 500 clamp(20px, 2.1vw, 27px)/1.4 var(--titulos); color: #fff; max-width: 52ch; }
.origen b { color: var(--naranja); }

/* ---------- Contacto ---------- */
.contacto { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.contacto-texto p { margin-top: 22px; color: var(--tinta-texto); max-width: 44ch; font-size: 18px; }
.contacto-texto .mail { font-weight: 500; color: var(--tinta); }
.mail a { color: var(--naranja-texto); }
.formulario { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; padding-top: 8px; }
.campo { display: grid; gap: 8px; }
.campo-ancho, .enviar { grid-column: 1 / -1; }
.campo label { font: 600 15px/1.2 var(--texto); }
.opcional { font-weight: 400; color: var(--tinta-texto); }
.campo input, .campo textarea {
  width: 100%; font: 400 16px/1.4 var(--texto); color: var(--tinta); background: #fff; border: 1.5px solid #d6c9bb; border-radius: 12px;
  padding: 13px 14px; transition: border-color .2s, box-shadow .2s, background .2s; caret-color: var(--naranja);
}
.campo textarea { resize: vertical; min-height: 130px; }
.campo input:hover, .campo textarea:hover { border-color: #c9b9a9; }
.campo input:focus, .campo textarea:focus { outline: none; border-color: var(--naranja); background: #fff; box-shadow: 0 0 0 4px rgba(232, 85, 31, .16); }
.campo.con-error input, .campo.con-error textarea { border-color: #b42318; }
.campo .error { font-size: 14px; color: #b42318; }
.trampa { position: absolute; left: -9999px; }
.enviar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 6px; }
.form-estado { font-size: 15px; color: var(--tinta-texto); }
.form-estado.ok { color: var(--gestion); font-weight: 600; }
.form-estado.error { color: #b42318; }

/* ---------- Pie ---------- */
.pie { background: var(--tinta); color: #b9c3d3; padding: 48px var(--margen); display: grid; grid-template-columns: auto 1fr auto; gap: 14px 40px; align-items: center; border-top: 1px solid #2a3a57; }
.pie img { height: 36px; width: auto; }
.pie p { font: 500 16px/1.3 var(--titulos); }
.pie ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; flex-wrap: wrap; }
.pie a { color: #fff; text-decoration: none; }
.pie a:hover { color: var(--naranja); }
.pie small { grid-column: 1 / -1; color: #7f8ba1; font-size: 13px; }

/* ---------- Pantallas chicas ---------- */
@media (max-width: 960px) {
  .portada { grid-template-columns: 1fr; grid-template-rows: auto; min-height: auto; row-gap: 8px; }
  .firma { width: min(52vw, 300px); justify-self: start; margin: 12px 0 8px -4px; }
  .caso, .contacto, .proximo-grilla { grid-template-columns: 1fr; }
  .lista-servicios li { grid-template-columns: 1fr; }
  .linea-tiempo { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .linea-tiempo::before { display: none; }
  .pasos { grid-template-columns: 1fr; }
  .pasos > div + div { padding-left: 0; border-left: 0; border-top: 1px solid #33425e; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .cabecera { gap: 16px; padding-top: 10px; padding-bottom: 10px; }
  .cabecera nav { display: none; }
  .cabecera .boton-chico { margin-left: auto; }
  .marca img { height: 34px; }
  .acciones { flex-direction: column; align-items: flex-start; }
  .lectura { grid-template-columns: 1fr; }
  .linea-tiempo { grid-template-columns: 1fr; }
  .formulario { grid-template-columns: 1fr; }
  .origen { grid-template-columns: 1fr; }
  .origen svg { width: 64px; height: 64px; }
  .pie { grid-template-columns: 1fr; }
  /* En el celular no hay margen para la línea: queda solo la firma de la portada. */
  .hilo, .nudo { display: none; }
}
