/* ============================================================================
   MARBLE — HOJA DE ESTILOS
   Plan completo en DISENO.md. Los textos se editan en contenido.js, no acá.
   ========================================================================== */

/* --- 1. Tipografía autoalojada -------------------------------------------- */
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("fuentes/schibsted-grotesk-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
                 U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("fuentes/schibsted-grotesk-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal; font-weight: 600; font-display: swap;
  src: url("fuentes/schibsted-grotesk-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
                 U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal; font-weight: 600; font-display: swap;
  src: url("fuentes/schibsted-grotesk-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal; font-weight: 700; font-display: swap;
  src: url("fuentes/schibsted-grotesk-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
                 U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal; font-weight: 700; font-display: swap;
  src: url("fuentes/schibsted-grotesk-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal; font-weight: 800; font-display: swap;
  src: url("fuentes/schibsted-grotesk-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
                 U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal; font-weight: 800; font-display: swap;
  src: url("fuentes/schibsted-grotesk-latin-ext-800-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- 2. Fichas ------------------------------------------------------------ */
:root {
  --papel:  #f6f7f8;
  --blanco: #ffffff;
  --tinta:  #22303c;
  --suave:  #56636f;
  --linea:  #d9dee3;
  --azul:   #2e5c8a;
  --claro:  #e4edf6;
  --error:  #a03028;

  --f: "Schibsted Grotesk", system-ui, sans-serif;

  --caja: 1180px;
  --gut: 20px;
  --sep: clamp(4.5rem, 9vw, 8rem);
  --e: cubic-bezier(.22, 1, .36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  scrollbar-color: #b9c1c9 var(--papel);
}

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--f);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--azul);
}

::selection { background: var(--claro); color: var(--tinta); }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--papel); }
::-webkit-scrollbar-thumb { background: #b9c1c9; border: 3px solid var(--papel); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--suave); }

:focus-visible { outline: 2px solid var(--azul); outline-offset: 3px; border-radius: 2px; }
:focus:not(:focus-visible) { outline: none; }

a { color: var(--azul); text-underline-offset: .18em; text-decoration-thickness: 1px; }
svg { display: block; }

.caja { width: 100%; max-width: var(--caja); margin: 0 auto; padding: 0 var(--gut); }

.solo-lector {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* --- 3. Escala tipográfica ------------------------------------------------ */
h1, h2, h3 { margin: 0; }

.h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.375rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.025em;
  max-width: 14ch;
  text-wrap: balance;
}

.sec__p {
  margin: .875rem 0 0;
  max-width: 34ch;
  color: var(--suave);
  font-size: .9375rem;
  line-height: 1.55;
}

.fina {
  margin: 1rem 0 0;
  max-width: 58ch;
  color: var(--suave);
  font-size: .875rem;
  line-height: 1.55;
}

/* --- 4. Saltar al contenido ---------------------------------------------- */
.saltar {
  position: fixed; top: .625rem; left: .625rem; z-index: 90;
  transform: translateY(-180%);
  padding: .6875rem 1.125rem;
  background: var(--tinta); color: #fff;
  font-size: .9375rem; font-weight: 600;
  text-decoration: none; border-radius: 6px;
}
.saltar:focus { transform: translateY(0); }

/* --- 5. Barra ------------------------------------------------------------- */
.barra {
  position: sticky; top: 0; z-index: 60;
  background: rgba(246, 247, 248, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--e);
}
.barra--fija { border-bottom-color: var(--linea); }

.barra__in {
  display: flex; align-items: center; gap: 1rem;
  max-width: var(--caja); margin: 0 auto;
  padding: .625rem var(--gut);
  min-height: 3.5rem;
}

.logo {
  margin-right: auto;
  color: var(--tinta); text-decoration: none;
  font-size: 1.3125rem; font-weight: 700; letter-spacing: -.03em;
}

.barra__nav { display: none; }
.barra__nav a {
  color: var(--suave); text-decoration: none;
  font-size: .9375rem; font-weight: 400; white-space: nowrap;
  transition: color .18s var(--e);
}
.barra__nav a:hover { color: var(--tinta); }
.barra__nav a[aria-current="true"] { color: var(--tinta); font-weight: 600; }

.barra .barra__cta { display: none; }

.menu {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.625rem; height: 2.625rem; flex: none;
  background: transparent; border: 1px solid var(--linea);
  border-radius: 6px; cursor: pointer; color: var(--tinta);
}
.menu:hover { border-color: var(--suave); }
.menu__b { display: block; width: 17px; }
.menu__b i {
  display: block; height: 1.5px; background: currentColor;
  transition: transform .28s var(--e), opacity .18s var(--e);
}
.menu__b i + i { margin-top: 4px; }
.menu[aria-expanded="true"] .menu__b i:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menu[aria-expanded="true"] .menu__b i:nth-child(2) { opacity: 0; }
.menu[aria-expanded="true"] .menu__b i:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 899px) {
  .barra__nav {
    position: absolute; left: 0; right: 0; top: 100%;
    display: grid; grid-template-rows: 0fr;
    background: var(--papel);
    border-bottom: 1px solid var(--linea);
    overflow: hidden; visibility: hidden; pointer-events: none;
    transition: grid-template-rows .3s var(--e), visibility .3s;
  }
  .barra__nav.abierto { grid-template-rows: 1fr; visibility: visible; pointer-events: auto; }
  .barra__nav > div { min-height: 0; padding: .25rem var(--gut) 1.125rem; }
  .barra__nav a {
    display: block; padding: .8125rem 0; font-size: 1.0625rem;
    border-bottom: 1px solid var(--linea);
  }
  .barra__nav a:last-child { border-bottom: 0; }
}

@media (min-width: 900px) {
  .barra__nav { display: flex; align-items: center; gap: 1.75rem; margin-right: 1.25rem; }
  .barra__nav > div { display: contents; }
  .barra .barra__cta { display: inline-flex; }
  .menu { display: none; }
}

/* --- 6. Botones ----------------------------------------------------------- */
.bt {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.125rem;
  border: 1px solid transparent; border-radius: 6px;
  font-family: inherit; font-size: .9688rem; font-weight: 600;
  line-height: 1.2; text-align: center; text-decoration: none;
  cursor: pointer;
  transition: background .2s var(--e), color .2s var(--e), border-color .2s var(--e);
}
.bt--chico  { padding: .5rem .875rem; font-size: .9063rem; }
.bt--grande { padding: .9375rem 1.5rem; font-size: 1.0313rem; }
.bt--bloque { display: flex; width: 100%; }

.bt--ppal { background: var(--tinta); color: #fff; }
.bt--ppal:hover { background: #0f1a23; }

.bt--liso { background: transparent; color: var(--tinta); border-color: var(--linea); }
.bt--liso:hover { border-color: var(--tinta); }

.bt--texto {
  padding: .5rem 0; background: none; border: 0;
  color: var(--azul); font-size: .9375rem; font-weight: 600;
  text-decoration: underline; text-underline-offset: .2em;
  text-decoration-color: color-mix(in srgb, var(--azul) 35%, transparent);
}
.bt--texto:hover { text-decoration-color: currentColor; }

.bt__wa { width: 1.125rem; height: 1.125rem; fill: currentColor; flex: none; }

/* --- 7. Portada ----------------------------------------------------------- */
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero__in { display: grid; gap: clamp(2.5rem, 5vw, 3.5rem); }

.hero__h {
  font-size: clamp(2.25rem, 6.2vw, 4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.035em;
  max-width: 13ch;
}
.hero__sub {
  margin: 1.25rem 0 0;
  max-width: 46ch;
  font-size: clamp(1.0625rem, 2.2vw, 1.1875rem);
  line-height: 1.55;
  color: var(--suave);
}
.hero__bts { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero__bts .bt { flex: 1 1 14rem; }

/* El esquema: la veta fina que define la marca. */
.esq { width: 100%; height: auto; max-width: 21rem; }
.esq__hoja { fill: var(--blanco); stroke: var(--linea); stroke-width: 1.5; }
.esq__pl { stroke: var(--linea); stroke-width: 2; stroke-linecap: round; fill: none; }
.esq__cja { fill: var(--claro); stroke: var(--azul); stroke-width: 1.5; }
.esq__mk { font-family: var(--f); font-size: 15px; font-weight: 700; letter-spacing: -.03em; fill: var(--azul); }
.esq__ln { stroke: var(--azul); stroke-width: 1.25; fill: none; }
.esq__nd { fill: var(--blanco); stroke: var(--azul); stroke-width: 1.5; }
.esq__et { font-family: var(--f); font-size: 11.5px; font-weight: 400; fill: var(--suave); }

@media (min-width: 900px) {
  .hero__in { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: clamp(2rem, 4vw, 4rem); }
  .hero__fig { justify-self: end; width: 100%; }
  .esq { margin-left: auto; max-width: 30rem; }
}

/* --- 8. Franja de herramientas ------------------------------------------- */
.franja {
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 clamp(1.5rem, 3vw, 2.25rem);
  background: var(--blanco);
}

.cinta {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 5rem, #000 calc(100% - 5rem), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5rem, #000 calc(100% - 5rem), transparent);
}
.cinta__p { display: flex; width: max-content; animation: correr 70s linear infinite; }
.cinta--quieta .cinta__p { animation-play-state: paused; }
@keyframes correr { to { transform: translateX(-50%); } }

.cinta__i {
  display: flex; align-items: center; justify-content: center;
  flex: none; width: 9.5rem; height: 3.25rem;
  padding: 0; background: none; border: 0;
  font-family: inherit; color: inherit; cursor: pointer;
}
.cinta__i svg {
  width: auto; height: 28px; max-width: 6.75rem;
  fill: var(--tinta); opacity: .6;
  transition: opacity .2s var(--e), fill .2s var(--e);
}
.cinta__i--ancho svg { height: 19px; }
.cinta__i:hover svg, .cinta__i:focus-visible svg, .cinta__i[data-activo] svg {
  opacity: 1; fill: var(--marca, var(--tinta));
}
.cinta__t {
  color: var(--tinta); opacity: .55;
  font-size: .9375rem; font-weight: 600; letter-spacing: -.015em;
  white-space: nowrap; transition: opacity .2s var(--e);
}
.cinta__i:hover .cinta__t, .cinta__i:focus-visible .cinta__t, .cinta__i[data-activo] .cinta__t { opacity: 1; }

/* Renglón reservado para el nombre. La altura está siempre, así nada salta
   y el nombre nunca queda cortado por el recorte del carrusel. */
.rotulo {
  position: relative;
  height: 1.375rem;
  margin: .75rem auto 0;
  max-width: var(--caja);
  padding: 0 var(--gut);
}
.rotulo span {
  position: absolute; left: 50%; top: 0;
  transform: translateX(-50%);
  color: var(--tinta);
  font-size: .875rem; line-height: 1.375rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .2s var(--e);
}
.rotulo--visible span { opacity: 1; }

/* --- 9. Rejilla de secciones --------------------------------------------- */
.sec { padding: var(--sep) 0; }
.sec--papel  { background: var(--papel); }
.sec--blanco { background: var(--blanco); }
.sec__in { display: grid; gap: 2rem; }

@media (min-width: 900px) {
  .sec__in { grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: 0 clamp(2.5rem, 6vw, 6rem); }
  .sec__t { position: sticky; top: 6rem; align-self: start; }
}

/* --- 10. Por qué automatizar --------------------------------------------- */
.prosa p {
  margin: 0;
  max-width: 64ch;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--suave);
}
.prosa p + p { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--linea); }
.prosa b { color: var(--tinta); font-weight: 700; }

/* --- 11. Catálogo de servicios ------------------------------------------- */
.cat { border-top: 1px solid var(--linea); }
.cat__g { border-bottom: 1px solid var(--linea); }

.cat__b {
  display: grid; gap: .1875rem 1.5rem;
  width: 100%; padding: 1.125rem 2.25rem 1.125rem 0;
  position: relative;
  background: none; border: 0;
  color: var(--tinta); font-family: inherit;
  text-align: left; cursor: pointer;
  transition: color .18s var(--e);
}
.cat__b:hover { color: var(--azul); }
.cat__n { font-size: 1.1875rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.cat__l {
  color: var(--suave); font-size: .9063rem; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

.cat__s { position: absolute; right: .25rem; top: 1.5rem; width: 14px; height: 14px; }
.cat__s::before, .cat__s::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  background: var(--suave);
  transition: transform .28s var(--e), background .18s var(--e);
}
.cat__s::before { width: 14px; height: 1.5px; transform: translate(-50%, -50%); }
.cat__s::after  { width: 1.5px; height: 14px; transform: translate(-50%, -50%); }
.cat__b[aria-expanded="true"] .cat__s::after { transform: translate(-50%, -50%) scaleY(0); }
.cat__b[aria-expanded="true"] .cat__s::before { background: var(--azul); }
.cat__b[aria-expanded="true"] .cat__n { color: var(--azul); }

.cat__p { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .34s var(--e); }
.cat__p.abierto { grid-template-rows: 1fr; }
.cat__p > div { min-height: 0; overflow: hidden; }

.cat__ul { margin: 0; padding: 0 0 1.5rem; list-style: none; }
.cat__ul li { padding: .625rem 0; }
.cat__ul li + li { border-top: 1px solid var(--linea); }
.cat__ul b { display: block; font-size: .9688rem; font-weight: 600; }
.cat__ul span { display: block; color: var(--suave); font-size: .9063rem; line-height: 1.5; max-width: 62ch; }

@media (min-width: 720px) {
  .cat__b { grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); align-items: baseline; }
  .cat__ul li { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: .125rem 1.5rem; align-items: baseline; }
}

/* --- 12. Proyectos -------------------------------------------------------- */
.proy__i { padding: 1.75rem 0; border-top: 1px solid var(--linea); }
.proy__i:last-child { border-bottom: 1px solid var(--linea); }
.proy__h { font-size: 1.1875rem; font-weight: 700; letter-spacing: -.02em; }
.proy__d { width: 92px; height: 56px; flex: none; margin-bottom: .875rem; }
.proy__f { display: grid; gap: 1.125rem; margin-top: 1rem; }
.proy__f dl { margin: 0; }
.proy__f dt { color: var(--suave); font-size: .8125rem; font-weight: 600; }
.proy__f dd { margin: .1875rem 0 0; font-size: .9375rem; line-height: 1.55; color: var(--suave); }
.proy__f .sal dd { color: var(--tinta); font-weight: 600; }

@media (min-width: 860px) {
  .proy__i { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 0 1.75rem; align-items: start; }
  .proy__d { margin-bottom: 0; }
  .proy__f { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
}

/* --- 13. Cómo funciona ---------------------------------------------------- */
.pasos { margin: 0; padding: 0; list-style: none; counter-reset: paso; }
.pasos li {
  position: relative;
  padding: 1.5rem 0 1.5rem 3.25rem;
  border-top: 1px solid var(--linea);
  counter-increment: paso;
}
.pasos li:last-child { border-bottom: 1px solid var(--linea); }
.pasos li::before {
  content: counter(paso);
  position: absolute; left: 0; top: 1.125rem;
  font-size: 1.75rem; font-weight: 800; line-height: 1;
  letter-spacing: -.04em;
  color: var(--linea);
}
.pasos b { display: block; font-size: 1.125rem; font-weight: 700; letter-spacing: -.02em; }
.pasos p { margin: .25rem 0 0; color: var(--suave); font-size: .9688rem; max-width: 58ch; }

@media (min-width: 720px) {
  .pasos li { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: 1.5rem; }
  .pasos li::before { top: 1.375rem; }
}

/* --- 14. Calculadora ------------------------------------------------------ */
.calc { display: grid; gap: 2rem; }

.campo + .campo { margin-top: 1.5rem; }
.campo__l { display: block; font-size: .9688rem; font-weight: 600; }
.campo__l--fila { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.campo__v { color: var(--azul); font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.campo__a { margin: .1875rem 0 .5625rem; color: var(--suave); font-size: .8438rem; line-height: 1.45; }

.campo__i {
  width: 100%; padding: .6875rem .75rem;
  background: var(--blanco);
  border: 1px solid var(--linea); border-radius: 6px;
  color: var(--tinta);
  font-family: inherit; font-size: 1rem;
  font-variant-numeric: tabular-nums;
  transition: border-color .18s var(--e);
}
.campo__i:hover { border-color: var(--suave); }
.campo__i:focus { border-color: var(--azul); }

.campo__t { resize: vertical; min-height: 5.5rem; line-height: 1.5; font-size: .9688rem; }

/* Desplegable: misma ficha que los demás campos, con su propia flecha
   dibujada, porque la del sistema no se puede combinar con la paleta. */
.campo__s {
  -webkit-appearance: none; appearance: none;
  padding-right: 2.5rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2356636f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .875rem center;
  background-size: 12px 8px;
}

.campo__pl { display: flex; }
.campo__pr {
  display: grid; place-items: center;
  padding: 0 .75rem;
  background: var(--papel);
  border: 1px solid var(--linea); border-right: 0;
  border-radius: 6px 0 0 6px;
  color: var(--suave); font-size: .9375rem; font-weight: 600;
}
.campo__pl .campo__i { border-radius: 0 6px 6px 0; }

.campo__e { display: none; margin: .4375rem 0 0; color: var(--error); font-size: .8438rem; font-weight: 600; }
.campo--mal .campo__e { display: block; }
.campo--mal .campo__i, .campo--mal .campo__pr { border-color: var(--error); }

.rango {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 1.5rem; margin: 0;
  background: transparent; cursor: pointer;
}
.rango::-webkit-slider-runnable-track {
  height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--azul) var(--pos, 70%), var(--linea) var(--pos, 70%));
}
.rango::-moz-range-track { height: 3px; border-radius: 2px; background: var(--linea); }
.rango::-moz-range-progress { height: 3px; border-radius: 2px; background: var(--azul); }
.rango::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; margin-top: -8.5px;
  background: var(--blanco); border: 2px solid var(--azul); border-radius: 50%;
}
.rango::-moz-range-thumb {
  width: 20px; height: 20px;
  background: var(--blanco); border: 2px solid var(--azul); border-radius: 50%;
}
.rango__e { display: flex; justify-content: space-between; color: var(--suave); font-size: .8125rem; }

.res {
  margin: 0;
  padding: 1.5rem 1.375rem;
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: 10px;
}
.res__f { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .5rem 0; }
.res__f + .res__f { border-top: 1px solid var(--linea); }
.res dt { color: var(--suave); font-size: .9063rem; }
.res dd { margin: 0; font-size: 1.0625rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.res__ppal { padding: 0 0 1rem; margin-bottom: .25rem; border-bottom: 1px solid var(--linea); }
.res__ppal dt { color: var(--tinta); font-weight: 600; font-size: .9688rem; }
.res__ppal dd {
  margin: .25rem 0 0;
  font-size: clamp(1.625rem, 5vw, 2.125rem);
  font-weight: 800; letter-spacing: -.035em; line-height: 1.1;
  color: var(--azul);
}
.res--vacio dd { color: var(--suave); font-weight: 600; }

.calc__res .bt { margin-top: 1.25rem; }

@media (min-width: 880px) {
  .calc { grid-template-columns: minmax(0, 1fr) minmax(0, 21rem); gap: 3rem; align-items: start; }
}

/* --- 14.b Llamados a la acción intermedios ------------------------------- */
.cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .875rem 1.5rem;
  margin-top: 1.75rem;
}
.cta__t { margin: 0; flex: 1 1 18rem; color: var(--suave); font-size: .9688rem; max-width: 46ch; }
.cta .bt { flex: none; }

/* --- 15. Preguntas -------------------------------------------------------- */
.faq { border-top: 1px solid var(--linea); }
.faq__i { border-bottom: 1px solid var(--linea); }
.faq__b {
  display: flex; align-items: flex-start; gap: 1.25rem;
  width: 100%; padding: 1.125rem 0;
  background: none; border: 0;
  color: var(--tinta); font-family: inherit;
  font-size: 1.0313rem; font-weight: 600; line-height: 1.4;
  text-align: left; cursor: pointer;
  transition: color .18s var(--e);
}
.faq__b:hover { color: var(--azul); }
.faq__b > span:first-child { flex: 1 1 auto; }
.faq__s { position: relative; flex: none; width: 14px; height: 14px; margin-top: .3125rem; }
.faq__s::before, .faq__s::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  background: var(--suave);
  transition: transform .28s var(--e), background .18s var(--e);
}
.faq__s::before { width: 14px; height: 1.5px; transform: translate(-50%, -50%); }
.faq__s::after  { width: 1.5px; height: 14px; transform: translate(-50%, -50%); }
.faq__b[aria-expanded="true"] .faq__s::after { transform: translate(-50%, -50%) scaleY(0); }
.faq__b[aria-expanded="true"] .faq__s::before { background: var(--azul); }
.faq__b[aria-expanded="true"] { color: var(--azul); }

.faq__p { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s var(--e); }
.faq__p.abierto { grid-template-rows: 1fr; }
.faq__p > div { min-height: 0; overflow: hidden; }
.faq__p p { margin: 0; padding: 0 2.5rem 1.375rem 0; color: var(--suave); font-size: .9688rem; line-height: 1.65; max-width: 66ch; }

/* --- 16. Cierre y formulario ---------------------------------------------- */
.fin { padding: clamp(3.5rem, 8vw, 6rem) 0; background: var(--claro); }
.fin__in { display: grid; gap: 2.5rem; align-items: start; }
.fin__h {
  font-size: clamp(1.75rem, 4.4vw, 2.625rem);
  font-weight: 800; line-height: 1.08; letter-spacing: -.03em;
  max-width: 20ch; text-wrap: balance;
}
.fin__p { margin: 1rem 0 0; max-width: 42ch; color: var(--suave); font-size: 1.0625rem; }
.fin__tx .bt { margin-top: 2rem; }
/* Segunda via de contacto, debajo del boton. */
.fin__mail { margin: 1rem 0 0; color: var(--suave); font-size: .9688rem; }
.fin__mail a { color: var(--azul); }
.fin__mail a:hover { color: var(--tinta); }

.form {
  padding: 1.5rem 1.375rem;
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: 10px;
}
.form__h {
  margin: 0 0 1.25rem;
  font-size: 1.0625rem; font-weight: 700; letter-spacing: -.02em;
}
.form .campo + .campo { margin-top: 1.125rem; }
.form .bt { margin-top: 1.5rem; }
.form .bt[disabled] { opacity: .6; cursor: default; }

/* Campo trampa para robots: no lo ve nadie y no recibe foco. */
.form__trampa { position: absolute; left: -9999px; }

.form__estado { margin: .875rem 0 0; font-size: .9063rem; line-height: 1.5; }
.form__estado:empty { margin: 0; }
.form__estado--mal { color: var(--error); font-weight: 600; }
.form__estado--bien { color: var(--azul); font-weight: 600; }

@media (min-width: 900px) {
  /* El texto se centra contra el alto del formulario. */
  .fin__in { grid-template-columns: minmax(0, 1fr) minmax(0, 25rem); gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
  .form { padding: 1.875rem 1.75rem; }
}

/* --- 17. Pie: una sola fila ---------------------------------------------- */
.pie { padding: 2rem 0 5.5rem; background: var(--papel); border-top: 1px solid var(--linea); }
.pie__in { display: flex; flex-direction: column; align-items: flex-start; gap: .625rem; }
.pie__c { margin: 0; color: var(--suave); font-size: .9063rem; }
.pie__l { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.pie__l a { color: var(--tinta); font-size: .9063rem; text-decoration-color: var(--linea); }
.pie__l a:hover { text-decoration-color: currentColor; }

@media (min-width: 640px) {
  .pie { padding-bottom: 2rem; }
  .pie__in { flex-direction: row; align-items: center; justify-content: space-between; gap: 1.5rem; }
}
/* El botón flotante se apoya abajo a la derecha: el pie le deja el lugar
   para que nunca tape el link. */
@media (min-width: 760px) {
  .pie__in { padding-right: 4.25rem; }
}

/* --- 18. Botón flotante --------------------------------------------------- */
.flota {
  position: fixed; z-index: 70;
  right: 1rem; bottom: 1rem;
  display: grid; place-items: center;
  width: 3.375rem; height: 3.375rem;
  background: #1f9d58; color: #fff;
  border-radius: 50%;
  box-shadow: 0 3px 14px rgba(34, 48, 60, .28);
  transition: background .2s var(--e), transform .2s var(--e);
}
.flota svg { width: 1.75rem; height: 1.75rem; fill: currentColor; }
.flota:hover { background: #17824a; transform: translateY(-2px); }

@supports (padding: env(safe-area-inset-bottom)) {
  .flota { bottom: calc(1rem + env(safe-area-inset-bottom)); }
}
@media (min-width: 760px) { .flota { right: 1.75rem; bottom: 1.75rem; } }

/* --- 19. Dibujo del esquema (única animación de carga) ------------------- */
.esq__ln { stroke-dasharray: var(--l, 400); stroke-dashoffset: var(--l, 400); }
.esq__ent, .esq__caja, .esq__sal { opacity: 0; }

.esq.listo .esq__ent  { animation: ap .4s var(--e) 0s both; }
.esq.listo .esq__ln--in { animation: dib .45s ease-out .35s both; }
.esq.listo .esq__caja { animation: ap .4s var(--e) .75s both; }
.esq.listo .esq__ln--o1 { animation: dib .5s ease-out 1.1s both; }
.esq.listo .esq__ln--o2 { animation: dib .5s ease-out 1.2s both; }
.esq.listo .esq__ln--o3 { animation: dib .5s ease-out 1.3s both; }
.esq.listo .esq__sal--1 { animation: ap .35s var(--e) 1.55s both; }
.esq.listo .esq__sal--2 { animation: ap .35s var(--e) 1.65s both; }
.esq.listo .esq__sal--3 { animation: ap .35s var(--e) 1.75s both; }

@keyframes ap  { from { opacity: 0; } to { opacity: 1; } }
@keyframes dib { to { stroke-dashoffset: 0; } }

/* --- 20. Sin movimiento --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .esq__ln { stroke-dashoffset: 0; }
  .esq__ent, .esq__caja, .esq__sal { opacity: 1; }
  .cinta { mask-image: none; -webkit-mask-image: none; }
  .cinta__p { flex-wrap: wrap; width: auto; animation: none; justify-content: center; }
}

/* --- 21. Sin JavaScript --------------------------------------------------- */
.sinjs {
  max-width: 34rem; margin: 3rem auto; padding: 1.5rem;
  background: var(--blanco); border: 1px solid var(--linea); border-radius: 10px;
}
.sinjs p { margin: 0 0 .75rem; color: var(--suave); }
.sinjs p:last-child { margin-bottom: 0; }
.sinjs strong { color: var(--tinta); }
