/* EIYA Estrategia. Paleta mineral, serif editorial y Lato. */

@font-face { font-family: "Source Serif 4"; src: url("/fonts/source-serif-4-latin-opsz-normal.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/fonts/source-serif-4-latin-opsz-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: Lato; src: url("/fonts/lato-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Lato; src: url("/fonts/lato-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --papel: #ebe8e2;
  --tinta: #1f2522;
  --salvia: #5e6f63;
  --piedra: #a7ada7;
  --azul: #4a5e6b;
  --bruma: #d8dcd5;
  --sol: #e7d6a3;
  --foco: #8f7430;
  --margen: clamp(20px, 6.5vw, 128px);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: Lato, "Helvetica Neue", Arial, sans-serif;
  --suave: cubic-bezier(.2, .7, .2, 1);
  interpolate-size: allow-keywords;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papel); color: var(--tinta); font: 17px/1.6 var(--sans); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, summary, dt { font-family: var(--serif); font-weight: 340; line-height: 1.06; letter-spacing: -.022em; text-wrap: balance; }
h1 { font-size: clamp(46px, 6.6vw, 112px); letter-spacing: -.032em; line-height: 1; }
h2 { font-size: clamp(34px, 4.2vw, 68px); }
h3 { font-size: clamp(24px, 2.2vw, 32px); }
.entrada { font-size: clamp(18px, 1.35vw, 21px); line-height: 1.5; max-width: 46ch; }
.antetitulo { font-size: 15px; letter-spacing: .04em; color: var(--salvia); margin-bottom: 22px; }

.saltar { position: absolute; left: 12px; top: -60px; z-index: 20; background: var(--tinta); color: #fff; padding: 10px 16px; border-radius: 6px; }
.saltar:focus { top: 12px; }

/* Botones y enlaces */
.boton { display: inline-block; border: 0; border-radius: 40px; background: var(--tinta); color: #fff; padding: 13px 26px; text-decoration: none; line-height: 1.3; transition: background .25s, scale .2s var(--suave); }
.boton:hover { background: var(--salvia); }
.boton:active { scale: .97; }
.boton.claro { background: var(--papel); color: var(--tinta); }
.boton.claro:hover { background: var(--sol); }
.boton[disabled] { opacity: .6; cursor: progress; }
.enlace { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; text-align: left; transition: text-underline-offset .2s; }
.enlace:hover { text-underline-offset: 8px; }
.acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 30px; margin-top: 34px; }

/* Cabecera */
.cabecera { position: sticky; top: 0; z-index: 10; height: 72px; padding-inline: var(--margen); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--papel); border-bottom: 1px solid #a7ada766; view-transition-name: cabecera; }
.marca { display: grid; justify-items: center; text-decoration: none; flex: none; }
.marca img { width: 108px; height: auto; }
.marca span { font-size: 9px; letter-spacing: .34em; text-transform: uppercase; margin-top: -1px; padding-left: .34em; }
.cabecera nav { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 34px); }
.cabecera nav a:not(.boton) { text-decoration: none; padding-block: 4px; background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; transition: background-size .3s var(--suave); }
.cabecera nav a:not(.boton):hover, .cabecera nav a[aria-current] { background-size: 100% 1px; }
.cabecera .boton { padding: 9px 20px; }
.progreso { position: absolute; inset: auto 0 0 0; height: 2px; background: var(--salvia); transform-origin: left; scale: 0 1; }
@keyframes avanzar { to { scale: 1 1; } }
@supports (animation-timeline: scroll()) {
  .progreso { animation: avanzar linear both; animation-timeline: scroll(root); }
}

/* Textura mineral compartida */
.firma, .servicios, .contacto, .llamado { position: relative; isolation: isolate; }
.firma::before, .servicios::before, .contacto::before, .llamado::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: url("/assets/papel-mineral.webp") 0 0 / 192px; mix-blend-mode: soft-light; opacity: .42; }

main > section, main > article { padding: clamp(60px, 8vw, 128px) var(--margen); }

/* Portada */
main > .portada { padding-block: 0; padding-right: 0; display: grid; grid-template-columns: 1.06fr 1fr; align-items: center; min-height: min(720px, calc(100svh - 72px)); overflow: hidden; }
.portada-texto { padding: 48px 24px 48px 0; position: relative; z-index: 1; }
.linea { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.linea > span { display: block; }
.portada .entrada { margin-top: 30px; }
.cordillera { position: relative; height: clamp(520px, 48vw, 740px); overflow: hidden; background: #b3c0ba; clip-path: ellipse(103% 93% at 101% 50%); isolation: isolate; }
.sierra { max-width: none; position: absolute; inset: -5%; width: 110%; height: 110%; object-fit: cover; object-position: 50% 43%; user-select: none; pointer-events: none; --prof: 1;
  transform: translate3d(calc(var(--px, 0) * var(--prof) * 11px), calc((var(--py, 0) * 5px + var(--sy, 0) * 26px) * var(--prof)), 0); transition: transform .9s var(--suave); will-change: transform; }
.sierra:nth-child(1) { --prof: .2; }
.sierra:nth-child(2) { --prof: .45; }
.sierra:nth-child(3) { --prof: .7; }

/* La firma */
.firma { background: var(--tinta); color: var(--papel); --foco: var(--sol); display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(36px, 7vw, 120px); align-items: end; }
.firma h2 { font-size: clamp(34px, 4.2vw, 68px); max-width: 19ch; }
.firma p { max-width: 46ch; margin-top: 26px; color: #d5d6d0; }
.principios > div { border-top: 1px solid #ffffff38; padding: 22px 0 24px; display: grid; grid-template-columns: minmax(120px, .7fr) 1.3fr; gap: 20px; align-items: baseline; transition: opacity .35s; }
.principios dt { font-size: clamp(30px, 2.8vw, 44px); transition: translate .45s var(--suave), color .35s; }
.principios dd { color: #d5d6d0; }
.principios:hover > div:not(:hover) { opacity: .42; }
.principios > div:hover dt { translate: 10px 0; color: var(--sol); }

/* Servicios */
.servicios { background: var(--bruma); }
.servicios .entrada { margin-top: 20px; }
.servicios-lista { margin-top: clamp(34px, 4vw, 60px); }
.servicios-lista li { position: relative; }
.servicios-lista li::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: var(--salvia); transform-origin: left; }
.servicios-lista a { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(170px, .8fr) 1.7fr; gap: 12px 32px; align-items: baseline; padding: 26px 18px 28px 0; text-decoration: none; transition: opacity .3s, background .35s, padding .45s var(--suave); }
.servicios-lista .nombre { font-family: var(--serif); font-weight: 340; font-size: clamp(28px, 2.9vw, 44px); letter-spacing: -.022em; line-height: 1.05; }
.servicios-lista .lema { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--salvia); }

/* Servicios en el inicio: lista de líneas y mapa de relieve */
main > .territorio { padding-block: clamp(48px, 5.5vw, 88px); display: grid; grid-template-columns: .82fr 1.18fr; column-gap: clamp(32px, 5vw, 90px); align-items: start; }
.territorio h2, .territorio .entrada, .lineas { grid-column: 1; }
.territorio h2 { font-size: clamp(30px, 3.3vw, 50px); }
.lineas { margin-top: 26px; }
.lineas li { position: relative; }
.lineas li::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: var(--salvia); transform-origin: left; }
.lineas a { display: grid; grid-template-columns: 1fr auto; gap: 2px 20px; align-items: baseline; padding: 12px 0 13px; text-decoration: none; transition: opacity .3s, padding .45s var(--suave); }
.lineas .nombre { font-family: var(--serif); font-weight: 340; font-size: clamp(24px, 2.2vw, 32px); letter-spacing: -.02em; line-height: 1.1; }
.lineas .lema { font-family: var(--serif); font-style: italic; color: var(--salvia); }
.lineas .resumen { grid-column: 1 / -1; font-size: 15px; max-width: 52ch; }
.lineas a::after { content: ""; position: absolute; left: 0; top: 50%; width: 11px; height: 10px; margin-top: -5px; background: var(--tinta); clip-path: polygon(50% 0, 100% 100%, 0 100%); scale: 0; transition: scale .4s var(--suave); }
.interactivo .lineas .lema, .interactivo .lineas .resumen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.interactivo .lineas li:not(.activa) a { opacity: .55; }
.interactivo .lineas li:not(.activa) a:hover { opacity: 1; }
.interactivo .lineas .activa a { padding-left: 24px; }
.interactivo .lineas .activa a::after { scale: 1; }

.mapa { grid-column: 2; grid-row: 1 / 4; align-self: center; }
.relieve { display: block; width: 100%; height: auto; overflow: visible; }
.curvas { fill: none; stroke: var(--salvia); stroke-width: 1; opacity: .62; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.halo { fill: url(#brillo); opacity: 0; scale: .5; transform-box: fill-box; transform-origin: center; transition: opacity .5s, scale .8s var(--suave); }
.halo.activa { opacity: 1; scale: 1; }
.cima .zona { fill: transparent; }
.cima .pico { fill: var(--bruma); stroke: var(--tinta); stroke-width: 1.4; stroke-linejoin: round; transform-box: fill-box; transform-origin: center bottom; transition: fill .3s, scale .45s var(--suave); }
.cima text { font: 14px var(--sans); fill: var(--tinta); opacity: .72; transition: opacity .3s; pointer-events: none; }
.interactivo .cima { cursor: pointer; }
.cima.activa .pico { fill: var(--tinta); scale: 1.4; }
.cima.activa text { font-weight: 700; opacity: 1; }
.ficha { display: none; }
.interactivo .ficha { display: grid; grid-template-columns: .8fr 1.2fr; gap: 6px 28px; align-items: start; min-height: 104px; margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--salvia); }
.ficha-lema { font: italic clamp(22px, 2vw, 28px)/1.15 var(--serif); color: var(--salvia); }
.ficha .enlace { display: inline-block; margin-top: 8px; }
.ficha.cambia > * { animation: aparecer .4s var(--suave) both; }
.servicios-lista a:hover, .servicios-lista a:focus-visible { background: var(--papel); padding-left: 18px; }
.servicios-lista:has(a:hover) a:not(:hover) { opacity: .5; }
.servicios-lista.compacta a { grid-template-columns: 1fr 1fr; }
.servicios.otros h2 { font-size: clamp(28px, 3vw, 44px); }

/* Método */
.metodo { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 6vw, 100px); align-items: center; }
.metodo .entrada { margin-top: 20px; }
.etapas { margin-top: 36px; }
.etapa { border-top: 1px solid var(--piedra); }
.etapa:last-child { border-bottom: 1px solid var(--piedra); }
.etapa button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: baseline; gap: 18px; width: 100%; padding: 17px 0; transition: color .3s; }
.etapa button:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; }
.etapa .numero { font: 14px var(--sans); letter-spacing: .06em; color: var(--salvia); min-width: 2ch; }
.etapa-texto { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .5s var(--suave); }
.etapa-texto > div { overflow: hidden; padding-left: calc(2ch + 22px); }
.etapa-texto p { max-width: 44ch; }
.etapa-texto p:last-child { padding-bottom: 22px; }
.etapa .sub { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--salvia); margin-bottom: 6px; }
.interactivo .etapa:not(.activa) .etapa-texto { grid-template-rows: 0fr; }
.interactivo .etapa:not(.activa) button { color: #1f252299; }
.interactivo .etapa:not(.activa) button:hover { color: var(--tinta); }

.estratos { width: 100%; height: auto; overflow: visible; }
.estrato { transition: opacity .5s, translate .6s var(--suave); }
.estrato path { transition: fill .5s; }
.estrato[data-etapa="0"] path { fill: #2b3530; }
.estrato[data-etapa="1"] path { fill: var(--azul); }
.estrato[data-etapa="2"] path { fill: var(--salvia); }
.estrato[data-etapa="3"] path { fill: var(--piedra); }
.estrato text { font: 700 15px var(--sans); letter-spacing: .05em; fill: #fff; white-space: pre; pointer-events: none; }
.estrato[data-etapa="3"] text { fill: var(--tinta); }
.interactivo .estrato { cursor: pointer; }
.interactivo .estrato:not(.activa) { opacity: .5; }
.interactivo .estrato:not(.activa):hover { opacity: .75; }
.interactivo .estrato.activa { translate: 0 -5px; }

/* Llamado al autodiagnóstico */
.llamado { background: var(--azul); color: #fff; --foco: var(--sol); display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px clamp(32px, 6vw, 100px); align-items: end; }
.llamado h2 { grid-row: span 2; max-width: 16ch; }
.llamado p { max-width: 42ch; }
.llamado .boton { justify-self: start; }

/* Preguntas frecuentes */
.preguntas { display: grid; grid-template-columns: 1fr 1.5fr; gap: clamp(28px, 6vw, 100px); align-items: start; }
.preguntas h2 { position: sticky; top: 110px; }
details { border-top: 1px solid var(--piedra); }
details:last-child { border-bottom: 1px solid var(--piedra); }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; align-items: baseline; padding: 20px 0; font-size: clamp(21px, 1.9vw, 27px); line-height: 1.2; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 300 26px/1 var(--sans); color: var(--salvia); transition: rotate .4s var(--suave); flex: none; }
details[open] summary::after { rotate: 45deg; }
details p { max-width: 60ch; padding-bottom: 24px; }
details::details-content { block-size: 0; overflow: clip; transition: block-size .45s var(--suave), content-visibility .45s allow-discrete; }
details[open]::details-content { block-size: auto; }

/* Contacto y formularios */
.contacto { background: var(--bruma); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 7vw, 120px); align-items: start; }
.contacto h2, .contacto h1 { max-width: 12ch; }
.contacto h2 + p, .contacto h1 + p { margin-top: 24px; max-width: 42ch; }
.canales { margin: 22px 0; }
.canales li { padding: 5px 0; }
.nota { font-size: 15px; color: #1f2522cc; max-width: 46ch; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--piedra); }
code { font: .92em ui-monospace, Menlo, Consolas, monospace; background: #1f25220f; padding: 1px 5px; border-radius: 4px; }
.formulario { display: grid; gap: 6px; }
.formulario > label:not(.acepto) { font-size: 15px; margin-top: 12px; }
.formulario input:not([type=checkbox]), .formulario textarea, #chat-entrada { width: 100%; padding: 12px 14px; border: 1px solid var(--salvia); border-radius: 8px; background: #fbfaf7; transition: border-color .2s, box-shadow .2s; }
.formulario textarea { resize: vertical; min-height: 130px; }
.formulario input:focus, .formulario textarea:focus, #chat-entrada:focus { outline: 0; border-color: var(--tinta); box-shadow: 0 0 0 3px #e7d6a3; }
.acepto { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin: 14px 0 10px; }
.acepto input { margin-top: 5px; accent-color: var(--salvia); width: 16px; height: 16px; flex: none; }
.formulario .boton { justify-self: start; }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.estado { min-height: 1.6em; margin-top: 8px; }
.estado.error { color: #8a2f22; }
.estado.listo { font-family: var(--serif); font-size: 22px; line-height: 1.3; }

/* Pie */
.pie { padding: 54px var(--margen) 110px; border-top: 1px solid var(--piedra); display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; font-size: 15px; }
.pie-marca .marca { justify-items: start; display: inline-grid; }
.pie-marca p { margin-top: 18px; max-width: 34ch; }
.pie-marca em { font: italic 22px var(--serif); }
.pie nav { display: grid; gap: 8px; align-content: start; justify-items: start; }
.pie nav a { text-decoration: none; }
.pie nav a:hover { text-decoration: underline; }
.pie-legal { grid-column: 1 / -1; color: #1f2522b3; }

/* Página de servicio */
main > .servicio { padding-top: clamp(36px, 5vw, 70px); }
.servicio-cabeza { display: grid; grid-template-columns: 1.25fr .75fr; gap: 0 clamp(28px, 6vw, 90px); align-items: center; }
.servicio-cabeza > * { grid-column: 1; }
.servicio-cabeza .medallon { grid-column: 2; grid-row: 1 / span 5; }
.medallon { position: relative; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #b3c0ba; isolation: isolate; }
.migas { font-size: 15px; color: var(--salvia); margin-bottom: 30px; }
.migas a { text-decoration: none; }
.migas a:hover { text-decoration: underline; }
/* Ilustraciones de los servicios: un paisaje por línea */
.ilustrado svg { display: block; width: 100%; height: 100%; }
.i-cielo { fill: #c6cfc9; }
.i-sol { fill: var(--sol); }
.i-lejos { fill: var(--piedra); }
.i-bruma { fill: #b4beb6; }
.i-verde { fill: #84927f; }
.i-medio { fill: var(--salvia); }
.i-azul { fill: var(--azul); }
.i-cerca { fill: #2b3530; }
.i-sombra { fill: var(--tinta); }
.i-papel { fill: var(--papel); }
.i-linea { fill: none; stroke: var(--papel); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.i-linea.fina { stroke-width: 1.6; opacity: .8; }
.i-linea.rayada { stroke-width: 2.2; stroke-dasharray: 2 8; }
.i-punteada { fill: none; stroke: var(--papel); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: .1 8; opacity: .75; }
.plano { translate: calc(var(--px, 0) * var(--prof) * 9px) calc((var(--py, 0) * 5px + var(--sy, 0) * 16px) * var(--prof)); transition: translate .9s var(--suave); }
.p1 { --prof: .25; } .p2 { --prof: .6; } .p3 { --prof: 1; }

.advisory .ruta { stroke-dasharray: 1; }
.advisory .viajero { display: none; }
.advisory .bandera, .labs .escala, .framework .nodo, .index .cota { transform-box: fill-box; }
.advisory .bandera { transform-origin: left bottom; }
.labs .escala { fill: #ebe8e22e; stroke: var(--tinta); stroke-dasharray: 5 7; stroke-width: 2; transform-box: view-box; transform-origin: 200px 338px; }
.framework .nodo, .index .cota { transform-origin: center; }
.index .p3 .i-linea { stroke: var(--tinta); opacity: .7; }

@keyframes trazar-ruta { 0%, 6% { stroke-dashoffset: 1; opacity: 1; } 56%, 90% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes viajar { 0%, 6% { offset-distance: 0%; opacity: 1; } 56%, 90% { offset-distance: 100%; opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
@keyframes izar { 0%, 54% { scale: 0; } 62%, 92% { scale: 1; } 100% { scale: 0; } }
@keyframes asentar { from { translate: 0 -46px; opacity: 0; } }
@keyframes separar-1 { 50% { translate: 0 10px; } }
@keyframes separar-3 { 50% { translate: 0 -22px; } }
@keyframes pulsar { 0%, 100% { scale: .55; opacity: .55; } 50% { scale: 1.15; opacity: 1; } }
@keyframes escalar { 0% { scale: .5; opacity: 0; } 18% { opacity: .7; } 80% { opacity: .4; } 100% { scale: 1; opacity: 0; } }
@keyframes ascender { 0% { translate: 0 0; opacity: 0; } 15% { opacity: 1; } 100% { translate: var(--deriva, 0) -92px; opacity: 0; } }
@keyframes amanecer { from { translate: 0 30px; } to { translate: 0 -6px; } }
@keyframes aprender {
  0% { translate: 0 0; opacity: 0; } 4%, 8% { translate: 0 0; opacity: 1; animation-timing-function: ease-out; }
  12% { translate: 28px -52px; animation-timing-function: ease-in; } 16%, 26% { translate: 56px -28px; animation-timing-function: ease-out; }
  30% { translate: 84px -80px; animation-timing-function: ease-in; } 34%, 44% { translate: 112px -56px; animation-timing-function: ease-out; }
  48% { translate: 140px -108px; animation-timing-function: ease-in; } 52%, 62% { translate: 168px -84px; animation-timing-function: ease-out; }
  66% { translate: 196px -136px; animation-timing-function: ease-in; } 70%, 92% { translate: 224px -112px; opacity: 1; }
  100% { translate: 224px -112px; opacity: 0; }
}
@keyframes nivelar { from { translate: 0 0; } to { translate: 0 -190px; } }

.servicio-cabeza .lema, .servicio .lema { font: italic clamp(24px, 2.4vw, 34px)/1.2 var(--serif); color: var(--salvia); margin: 14px 0 28px; }
.servicio-bloques { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 64px); margin-top: clamp(50px, 7vw, 100px); }
.servicio-bloques h2 { font-size: clamp(24px, 2.2vw, 32px); padding-bottom: 16px; }
.servicio-bloques li { border-top: 1px solid var(--piedra); padding: 14px 0; }

/* Autodiagnóstico */
.diagnostico h1 { font-size: clamp(40px, 5vw, 80px); max-width: 16ch; }
.diagnostico header .entrada { margin-top: 24px; max-width: 56ch; }
#cuestionario { margin-top: clamp(36px, 5vw, 64px); max-width: 860px; }
.pregunta { padding: 26px 0; border-top: 1px solid var(--piedra); }
.pregunta legend { font: 340 clamp(23px, 2.5vw, 36px)/1.18 var(--serif); letter-spacing: -.018em; padding: 0; max-width: 28ch; float: left; width: 100%; margin-bottom: 20px; }
.dimension { display: block; font: 15px/1.4 var(--sans); letter-spacing: .04em; color: var(--salvia); margin-bottom: 10px; }
.opciones { clear: both; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.opciones label { position: relative; cursor: pointer; }
.opciones input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.opciones span { display: block; height: 100%; padding: 14px 16px; border: 1px solid var(--salvia); border-radius: 10px; line-height: 1.3; transition: background .2s, color .2s, translate .25s var(--suave); }
.opciones label:hover span { background: var(--bruma); translate: 0 -2px; }
.opciones input:checked + span { background: var(--salvia); color: #fff; }
.opciones input:focus-visible + span { outline: 3px solid var(--foco); outline-offset: 3px; }
.cuestionario-pie { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 28px; flex-wrap: wrap; }
.avance { display: flex; align-items: center; gap: 18px; font-size: 15px; color: var(--salvia); margin-bottom: 8px; }
.avance-barra { flex: 1; height: 2px; background: var(--piedra); }
.avance-barra span { display: block; height: 100%; width: 100%; background: var(--tinta); transform-origin: left; scale: 0 1; transition: scale .5s var(--suave); }
.pasos .pregunta { border-top: 0; min-height: 300px; }
.pasos .pregunta:not(.actual) { display: none; }
.pasos .opciones { grid-template-columns: repeat(2, 1fr); }
.pasos #calcular[hidden] { display: none; }

#resultado { margin-top: 20px; outline: 0; }
#resultado h2 { font-size: clamp(44px, 6vw, 96px); }
#resultado .entrada { margin-top: 22px; max-width: 54ch; }
.perfil { margin: clamp(30px, 5vw, 60px) 0 10px; }
#perfil-svg { width: 100%; height: auto; overflow: visible; }
#perfil-svg .cima { fill: var(--salvia); }
#perfil-svg .fondo { fill: var(--bruma); }
#perfil-svg .linea-base { stroke: var(--piedra); stroke-width: 1; }
#perfil-svg text { font: 14px var(--sans); fill: var(--tinta); text-anchor: middle; }
#perfil-svg .valor { font: 340 22px var(--serif); }
.perfil-lista { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; margin: 26px 0; }
.perfil-lista li { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--piedra); padding: 11px 0; }
.perfil-lista b { font-weight: 700; }
#resultado-brecha { font: italic 22px/1.35 var(--serif); color: var(--salvia); max-width: 46ch; }
.resultado-siguiente { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 100px); margin-top: clamp(40px, 6vw, 80px); padding-top: 40px; border-top: 1px solid var(--tinta); }
.resultado-siguiente h3 { margin-bottom: 14px; }
[hidden] { display: none !important; }

/* Páginas simples y legales */
.simple { min-height: 56vh; display: grid; align-content: center; gap: 22px; }
.legal { max-width: calc(68ch + 2 * var(--margen)); }
.legal h1 { font-size: clamp(40px, 5vw, 72px); margin-bottom: 20px; }
.legal h2 { font-size: 28px; margin: 42px 0 12px; }
.legal p, .legal ul { margin-bottom: 14px; }
.legal ul { list-style: disc; padding-left: 22px; }

/* Chat */
.lanzador { position: fixed; bottom: 20px; right: 22px; z-index: 8; display: flex; align-items: center; gap: 10px; border: 1px solid #ffffff30; border-radius: 40px; background: var(--tinta); color: #fff; padding: 12px 20px 12px 14px; box-shadow: 0 6px 22px #1f252240; transition: translate .3s var(--suave), background .25s; }
.lanzador:hover { translate: 0 -3px; background: #2b3530; }
.lanzador img { filter: brightness(0) invert(1); width: 26px; transition: rotate .6s var(--suave); }
.lanzador:hover img { rotate: 90deg; }
#chat { padding: 0; border: 1px solid var(--piedra); border-radius: 18px; background: var(--papel); color: var(--tinta); margin: auto 16px 16px auto; width: min(410px, calc(100% - 32px)); max-height: 90dvh; overflow: hidden; }
#chat::backdrop { background: #1f25224d; }
#chat[open] { animation: abrir-chat .34s var(--suave); }
#chat.cerrando { animation: cerrar-chat .16s ease-in forwards; }
@keyframes abrir-chat { from { opacity: 0; translate: 0 22px; scale: .96; } }
@keyframes cerrar-chat { to { opacity: 0; translate: 0 12px; scale: .97; } }
.chat-cabeza { background: var(--tinta); color: #fff; padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; --foco: var(--sol); }
.chat-cabeza strong { font: 340 26px var(--serif); }
.chat-cabeza small { display: block; font-size: 13px; opacity: .85; }
.chat-cabeza button { font-size: 26px; line-height: 1; color: inherit; background: none; border: 0; padding: 4px 8px; }
.chat-cuerpo { padding: 14px 16px 12px; }
#chat-historia { max-height: min(400px, 46dvh); min-height: 150px; overflow: auto; overscroll-behavior: contain; padding: 4px; }
#chat-historia p, .propuesta { padding: 11px 15px; max-width: 88%; width: fit-content; font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; margin: 8px 0; border-radius: 15px 15px 15px 3px; background: #fbfaf7; animation: decir .3s var(--suave); }
#chat-historia .visitante { margin-left: auto; background: var(--salvia); color: #fff; border-radius: 15px 15px 3px 15px; --desde: 14px; }
@keyframes decir { from { opacity: 0; translate: var(--desde, -14px) 4px; } }
.propuesta { max-width: 100%; width: auto; border: 1px solid var(--salvia); border-radius: 12px; white-space: normal; }
.propuesta dt { font: 13px var(--sans); letter-spacing: .04em; color: var(--salvia); margin-top: 6px; }
.propuesta dd { white-space: pre-wrap; }
.escribiendo { display: flex; gap: 5px; align-items: center; height: 44px; }
.escribiendo i { width: 6px; height: 6px; border-radius: 50%; background: var(--salvia); animation: latir 1s infinite ease-in-out; }
.escribiendo i:nth-child(2) { animation-delay: .15s; }
.escribiendo i:nth-child(3) { animation-delay: .3s; }
@keyframes latir { 0%, 60%, 100% { opacity: .25; translate: 0 0; } 30% { opacity: 1; translate: 0 -4px; } }
#chat-forma { display: flex; gap: 8px; margin-top: 12px; }
#chat-entrada { min-width: 0; padding: 10px 12px; }
#chat-forma .boton { padding: 10px 18px; font-size: 15px; }
#chat-accion { margin-top: 12px; }
.chat-nota { font-size: 13px; color: #1f2522b3; margin-top: 10px; }

/* Movimiento: carga de la portada y apariciones al desplazarse */
@keyframes subir { from { translate: 0 105%; } }
@keyframes aparecer { from { opacity: 0; translate: 0 14px; } }
@keyframes elevar { from { translate: 0 var(--alza, 5%); } }
@keyframes asomar { from { opacity: 0; translate: 0 .45em; clip-path: inset(0 0 55% 0); } to { opacity: 1; translate: 0 0; clip-path: inset(-10% 0 -15% 0); } }
@keyframes trazar { from { scale: 0 1; } }
@keyframes depositar { from { translate: 0 var(--hundido, 60px); opacity: 0; } }
@keyframes crecer { from { scale: 1 0; } }

@media (prefers-reduced-motion: no-preference) {
  .linea > span { animation: subir .95s var(--suave) both; }
  .linea:nth-child(2) > span { animation-delay: .12s; }
  .portada .antetitulo { animation: aparecer .7s var(--suave) both; }
  .portada .entrada { animation: aparecer .8s .42s var(--suave) both; }
  .portada .acciones { animation: aparecer .8s .56s var(--suave) both; }
  .servicio-cabeza h1, .diagnostico h1, .contacto.pagina h1 { animation: aparecer .8s var(--suave) both; }
  .sierra:nth-child(2) { animation: elevar 2.6s var(--suave) both; --alza: 3%; }
  .sierra:nth-child(3) { animation: elevar 2.8s .1s var(--suave) both; --alza: 5%; }
  .sierra:nth-child(4) { animation: elevar 3s .2s var(--suave) both; --alza: 7.5%; }
  .pasos .pregunta.actual { animation: aparecer .45s var(--suave) both; }
  #perfil-svg .cima { transform-box: fill-box; transform-origin: bottom; animation: crecer 1.1s var(--suave) both; }

  .advisory .ruta { animation: trazar-ruta 10s ease-in-out infinite; }
  .advisory .bandera { animation: izar 10s var(--suave) infinite; }
  @supports (offset-path: path("M0 0")) {
    .advisory .viajero { display: inline; offset-path: path("M40 374C92 362 128 342 165 318C202 294 236 262 256 226C270 200 280 176 290 152"); offset-rotate: 0deg; animation: viajar 10s ease-in-out infinite; }
  }
  .framework .losa { animation: asentar .9s var(--suave) both; }
  .framework .losa:nth-of-type(1) { animation: asentar .9s var(--suave) both, separar-1 7s 1.6s ease-in-out infinite; }
  .framework .losa:nth-of-type(2) { animation-delay: .18s; }
  .framework .losa:nth-of-type(3) { animation: asentar .9s .36s var(--suave) both, separar-3 7s 1.6s ease-in-out infinite; }
  .framework .nodo { animation: pulsar 2.8s ease-in-out infinite; }
  .framework .nodo:nth-of-type(2) { animation-delay: .7s; }
  .framework .nodo:nth-of-type(3) { animation-delay: 1.4s; }
  .framework .nodo:nth-of-type(4) { animation-delay: 2.1s; }
  .labs .escala { animation: escalar 6.4s ease-out infinite; }
  .labs .escala.tardia { animation-delay: 3.2s; }
  .labs .chispa { animation: ascender 3.6s ease-out infinite; }
  .labs .c1 { --deriva: -26px; }
  .labs .c2 { --deriva: 8px; animation-delay: 1.2s; }
  .labs .c3 { --deriva: 34px; animation-delay: 2.4s; }
  .academy .amanecer { animation: amanecer 9s ease-in-out infinite alternate; }
  .academy .aprendiz { animation: aprender 9s linear infinite; }
  .index .nivel { animation: nivelar 5.6s ease-in-out infinite alternate; }
  .index .cota { animation: pulsar 3.2s ease-in-out infinite; }
  .index .k2 { animation-delay: .5s; } .index .k3 { animation-delay: 1s; } .index .k4 { animation-delay: 1.5s; }
  .index .k5 { animation-delay: 2s; } .index .k6 { animation-delay: 2.5s; }

  @supports (animation-timeline: view()) {
    main h2 { animation: asomar linear both; animation-timeline: view(); animation-range: entry 5% entry 75%; }
    .servicios-lista li::before, .lineas li::before { animation: trazar linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; }
    .estrato { animation: depositar linear both; animation-timeline: view(); }
    .estrato[data-etapa="0"] { animation-range: entry 0% cover 28%; --hundido: 40px; }
    .estrato[data-etapa="1"] { animation-range: entry 10% cover 34%; --hundido: 70px; }
    .estrato[data-etapa="2"] { animation-range: entry 20% cover 40%; --hundido: 100px; }
    .estrato[data-etapa="3"] { animation-range: entry 30% cover 46%; --hundido: 130px; }
    #resultado h2 { animation: none; }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .ilustrado * { animation: none !important; }
}

/* Transición entre páginas */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: .22s ease-in both salir; }
  ::view-transition-new(root) { animation: .5s var(--suave) both entrar; }
}
@keyframes salir { to { opacity: 0; } }
@keyframes entrar { from { opacity: 0; translate: 0 18px; } }

/* Pantallas angostas */
@media (max-width: 900px) {
  .servicios-lista a { grid-template-columns: 1fr 1fr; }
  main > .territorio { grid-template-columns: 1fr 1.05fr; }
  .interactivo .ficha { grid-template-columns: 1fr; }
  .servicio-bloques { grid-template-columns: 1fr; }
  .perfil-lista { grid-template-columns: repeat(2, 1fr); }
  .pie { grid-template-columns: 1fr 1fr; }
  .pie-marca { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .cabecera { height: 64px; }
  html { scroll-padding-top: 76px; }
  .marca img { width: 92px; }
  .cabecera nav { font-size: 15px; gap: 14px; }
  .cabecera nav a[href="/#metodo"] { display: none; }
  .cabecera .boton { padding: 8px 15px; }
  main > .portada, .firma, .metodo, .llamado, .preguntas, .contacto, .resultado-siguiente, .servicio-cabeza { grid-template-columns: 1fr; }
  main > .portada { padding: 0; min-height: 0; }
  .portada-texto { padding: 44px var(--margen) 30px; }
  .cordillera { height: clamp(280px, 76vw, 440px); clip-path: ellipse(91% 100% at 64% 100%); }
  .principios > div { grid-template-columns: 1fr; gap: 6px; }
  main > .territorio { grid-template-columns: 1fr; }
  .territorio .mapa { grid-column: 1; grid-row: auto; order: 1; margin-top: 18px; }
  .lineas { order: 2; }
  .interactivo .lineas .lema { position: static; width: auto; height: auto; clip-path: none; font-size: 16px; }
  .interactivo .ficha { min-height: 0; }
  .interactivo .lineas li:not(.activa) a { opacity: 1; }
  .interactivo .lineas .activa a { padding-left: 0; }
  .lineas a::after { display: none; }
  .cima text { font-size: 21px; }
  .servicios-lista a { grid-template-columns: 1fr; gap: 6px; padding-right: 0; }
  .servicios-lista a:hover { padding-left: 0; background: none; }
  .llamado h2 { grid-row: auto; }
  .preguntas h2 { position: static; }
  .estratos { order: -1; max-width: 520px; }
  .estrato text { font-size: 24px; }
  .metodo { align-items: start; }
  .servicio-cabeza .medallon { grid-column: 1; grid-row: auto; width: min(62vw, 300px); margin-bottom: 30px; order: -1; }
  .opciones, .pasos .opciones { grid-template-columns: 1fr; }
  .pasos .pregunta { min-height: 0; }
  .perfil-lista { grid-template-columns: 1fr; }
  #perfil-svg text { font-size: 19px; }
  #perfil-svg .valor { font-size: 26px; }
  .pie { grid-template-columns: 1fr; padding-bottom: 100px; }
  .lanzador { right: 14px; bottom: 14px; }
}
@media (max-width: 410px) {
  .cabecera nav a[href="/#servicios"] { display: none; }
}
