/* ============================================================
   MAYQÁR Projects · landing de prueba con recorrido 3D
   Verde bosque + dorado (su identidad), crema para respirar.
   Fuentes locales (OFL): Newsreader (titulares) e Inter (texto).
   ============================================================ */
/* Recortadas (jury, 5-dic): latino + solo los pesos usados. Newsreader 300–400 con tamaño óptico; cursiva fija 300 (solo
   titulares); Inter 400–700. De 415 KB a 137 KB. Originales: *.woff2.antes-jury */
@font-face { font-family: 'Newsreader'; src: url('../fonts/newsreader.woff2') format('woff2'); font-weight: 300 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('../fonts/newsreader-italic.woff2') format('woff2'); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter.woff2') format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
  --verde: #1a2e1f;
  --verde-2: #24402c;
  --hondo: #0c1710;
  --oro: #d8a93b;
  --oro-claro: #ecd08a;
  --oro-texto: #85600f;           /* dorado legible sobre crema (5:1) */
  --crema: #f6f1e6;
  --crema-2: #ece4d2;
  --tinta: #15231a;
  --tinta-suave: #4a5a4f;
  --linea: rgba(216, 169, 59, .28);
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ancho: 1200px;
  --radio: 18px;
  --cab-alto: 76px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
/* Sin scroll-behavior: smooth (jury, 5-dic): con él, al tabular el foco tardaba en llegar a su sitio. Los enlaces internos
   bajan suaves desde app.js. */
html { -webkit-text-size-adjust: 100%; }
[tabindex="-1"]:focus { outline: none; }
body { margin: 0; background: var(--hondo); color: var(--crema); font: 400 1rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 340; line-height: 1.05; letter-spacing: -.01em; margin: 0; }
h1 em, h2 em { font-style: italic; color: var(--oro); font-weight: 300; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--oro); outline-offset: 3px; border-radius: 6px; }
/* foco que se ve en cualquier fondo: crema sobre el botón dorado, verde sobre crema */
.btn-oro:focus-visible, .saltar:focus-visible { outline: 3px solid var(--crema); outline-offset: 3px; box-shadow: 0 0 0 7px rgba(12, 23, 16, .55); }
.sec-crema :focus-visible { outline-color: var(--verde); }
.sec-crema .btn-oro:focus-visible { outline-color: var(--verde); box-shadow: none; }
.menu a:not(.btn):focus-visible, .pie-col a:focus-visible { outline-offset: 6px; }
main:focus { outline: none; }
.saltar { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--oro); color: var(--hondo); padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.saltar:focus { top: 12px; }

/* ── botones ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 46px; padding: .7em 1.35em; border-radius: 999px; font: 600 .92rem/1 var(--sans); letter-spacing: .02em; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease, color .2s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
/* «capa a capa» también en los botones: al pasar el puntero (o con el foco) sube una capa desde abajo */
.btn { position: relative; isolation: isolate; overflow: hidden; }
.btn::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; transform: scaleY(0); transform-origin: 50% 100%; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.btn:hover::before, .btn:focus-visible::before { transform: scaleY(1); }
.btn-oro { background: linear-gradient(180deg, #e4b850, #c99528); color: #10190f; box-shadow: 0 8px 24px -8px rgba(216, 169, 59, .7), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-oro::before { background: linear-gradient(180deg, #fbf4df, #f1e2b6); box-shadow: inset 0 2px 0 var(--oro); }   /* sube una capa crema */
.btn-oro:hover { box-shadow: 0 14px 30px -10px rgba(216, 169, 59, .85), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-linea { background: rgba(12, 23, 16, .35); color: var(--crema); border-color: rgba(246, 241, 230, .45); backdrop-filter: blur(4px); }
.btn-linea::before { background: var(--oro); }
.btn-linea:hover, .btn-linea:focus-visible { border-color: var(--oro); color: #10190f; }
.btn-verde { background: var(--verde); color: var(--crema); }
.btn-verde::before { background: var(--oro); }
.btn-verde:hover, .btn-verde:focus-visible { color: #10190f; }
.btn-grande { min-height: 54px; padding: .9em 1.7em; font-size: 1rem; }

.pendiente { display: inline-block; margin-top: 14px; padding: 6px 10px; border: 1px dashed #c27b12; border-radius: 8px; background: rgba(255, 196, 77, .14); color: #8a4f00; font: 600 .8rem/1.4 var(--sans); }
.sec-verde .pendiente, .sec-hondo .pendiente, .pie .pendiente { color: #ffd27a; border-color: #e0a63a; background: rgba(255, 196, 77, .1); }

/* ── cabecera ── */
.cab { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--cab-alto); display: flex; align-items: center; gap: 28px; padding: 0 clamp(16px, 4vw, 48px); padding-top: env(safe-area-inset-top); transition: transform .35s ease; }
.cab::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 15, 10, .72), rgba(8, 15, 10, 0)); transition: background .3s ease, backdrop-filter .3s ease; }
.cab.solida::before { background: rgba(12, 23, 16, .82); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 1px 0 var(--linea); }
.marca { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.marca img { width: 44px; height: 44px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .4)); transition: transform .55s cubic-bezier(.2, .7, .2, 1), filter .4s ease; }
.marca-txt { display: flex; flex-direction: column; line-height: 1; }
.marca-txt b { font: 400 1.32rem/1 var(--serif); letter-spacing: .14em; color: var(--oro-claro); transition: letter-spacing .45s cubic-bezier(.2, .7, .2, 1), color .3s ease; }
.marca-txt small { font: 500 .62rem/1 var(--sans); letter-spacing: .52em; text-transform: uppercase; color: rgba(246, 241, 230, .72); margin-top: 5px; transition: letter-spacing .45s cubic-bezier(.2, .7, .2, 1); }
.marca:hover img, .marca:focus-visible img { transform: rotate(-9deg) scale(1.08); filter: drop-shadow(0 0 10px rgba(216, 169, 59, .55)); }
.marca:hover .marca-txt b, .marca:focus-visible .marca-txt b { letter-spacing: .2em; color: var(--crema); }
.marca:hover .marca-txt small, .marca:focus-visible .marca-txt small { letter-spacing: .6em; }
.menu { display: flex; align-items: center; gap: 26px; }
.menu a:not(.btn) { text-decoration: none; font-size: .9rem; color: rgba(246, 241, 230, .82); position: relative; padding: 6px 0; }
.menu a:not(.btn)::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--oro); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.menu a:not(.btn):hover { color: var(--crema); }
.menu a:not(.btn):hover::after { transform: scaleX(1); }
.menu-cta { display: none; }
.menu-btn { display: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(246, 241, 230, .35); background: rgba(12, 23, 16, .4); cursor: pointer; position: relative; }
.menu-btn span:not(.sr) { position: absolute; left: 14px; right: 14px; height: 1.5px; background: var(--crema); transition: transform .25s ease, top .25s ease; }
.menu-btn span:nth-child(1) { top: 18px; }
.menu-btn span:nth-child(2) { top: 26px; }
.menu-btn[aria-expanded='true'] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.menu-btn[aria-expanded='true'] span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

/* ── el recorrido 3D ── */
.viaje { position: relative; background: var(--hondo); }
.lienzo-caja { position: sticky; top: 0; height: 100vh; height: 100lvh; margin-bottom: -100vh; margin-bottom: -100lvh; overflow: hidden; z-index: 0; }
.lienzo { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
.escena-lista .lienzo { opacity: 1; }
.poster { position: absolute; inset: 0; background: radial-gradient(120% 80% at 70% 60%, #2a4632 0%, #0f1d14 55%, #08110b 100%); transition: opacity 1.2s ease; }
@media (min-width: 761px) { .con-3d .poster { background: var(--hondo) url('../img/recorrido/paso-0.webp') 50% 50% / cover no-repeat; } }   /* mientras carga la escena: su primer fotograma */
.escena-lista .poster { opacity: 0; }
.sin-3d .lienzo { display: none; }
.sin-3d .poster { opacity: 1; background: var(--hondo) url('../img/recorrido/paso-0.webp') 68% 50% / cover no-repeat; }
.velo { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(7, 14, 9, .78) 0%, rgba(7, 14, 9, .42) 34%, rgba(7, 14, 9, 0) 58%), linear-gradient(180deg, rgba(7, 14, 9, .35) 0%, rgba(7, 14, 9, 0) 18%, rgba(7, 14, 9, 0) 78%, rgba(7, 14, 9, .55) 100%); }

.pasos { position: relative; z-index: 2; }
.paso { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--cab-alto) + 24px) clamp(20px, 6vw, 96px) 48px; }
.paso-portada { align-items: center; }
.portada { max-width: 640px; }
.antetitulo { font: 600 .74rem/1.2 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--oro); display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
/* tres capas, la de abajo la más ancha (cimentación): el «capa a capa» en pequeño */
.antetitulo::before { content: ''; flex: none; width: 28px; height: 7px; background: linear-gradient(currentColor, currentColor) 0 0 / 44% 1px no-repeat, linear-gradient(currentColor, currentColor) 0 3px / 72% 1px no-repeat, linear-gradient(currentColor, currentColor) 0 6px / 100% 1px no-repeat; }
.antetitulo span { color: rgba(246, 241, 230, .7); letter-spacing: .2em; }
.portada h1 { font-size: clamp(3.3rem, 7.4vw, 7rem); font-weight: 300; line-height: .95; letter-spacing: -.02em; text-shadow: 0 4px 40px rgba(0, 0, 0, .35); }
.portada h1 em { display: inline-block; background: linear-gradient(100deg, #f4dc9b 0%, #d8a93b 45%, #b9862a 70%, #f0d58e 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.entrada { margin-top: 26px; font-size: clamp(1.02rem, 1.3vw, 1.16rem); max-width: 28em; color: rgba(246, 241, 230, .88); }
.acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.baja { margin-top: 44px; display: flex; align-items: center; gap: 14px; font-size: .82rem; letter-spacing: .04em; color: rgba(246, 241, 230, .84); }
.raton { width: 22px; height: 34px; border: 1.5px solid rgba(246, 241, 230, .6); border-radius: 12px; position: relative; flex: none; }
.raton::after { content: ''; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--oro); animation: rueda 1.8s ease-in-out infinite; }
@keyframes rueda { 0% { opacity: 0; transform: translateY(-3px); } 30% { opacity: 1; } 80%, 100% { opacity: 0; transform: translateY(9px); } }

.tarjeta { max-width: 30rem; padding: 30px 32px 32px; border-radius: var(--radio); background: linear-gradient(160deg, rgba(26, 46, 31, .82), rgba(12, 23, 16, .78)); border: 1px solid var(--linea); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: .0; transform: translateY(34px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.paso.activo .tarjeta, .reducido .tarjeta, .sin-3d .tarjeta { opacity: 1; transform: none; }
/* Con la escena viva (jury, 5-dic): la tarjeta se queda quieta en su sitio mientras la obra avanza detrás; al cambiar de
   paso, la que se va sube y se desvanece como una capa y la nueva llega desde abajo. Así nunca tapa la casa ni pasa bajo
   la cabecera. Los .paso siguen marcando el ritmo del desplazamiento (app.js pone .activo y .pasado). */
.con-3d:not(.reducido) .tarjeta { position: fixed; left: clamp(20px, 6vw, 96px); top: calc(50% + 14px); width: min(30rem, calc(100vw - 2 * clamp(20px, 6vw, 96px))); transform: translateY(-50%) translateY(34px); pointer-events: none; transition: opacity .6s ease, transform .75s cubic-bezier(.2, .7, .2, 1), backdrop-filter .6s ease, -webkit-backdrop-filter .6s ease; }
.con-3d:not(.reducido) .paso:not(.activo) .tarjeta { backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); }
.con-3d:not(.reducido) .paso.pasado .tarjeta { transform: translateY(-50%) translateY(-30px); }
.con-3d:not(.reducido) .paso.activo .tarjeta { opacity: 1; transform: translateY(-50%); pointer-events: auto; }
.tarjeta .num { font: 500 .78rem/1 var(--sans); letter-spacing: .2em; color: var(--oro); margin-bottom: 14px; }
.tarjeta .num span { color: rgba(246, 241, 230, .7); }
.tarjeta h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); margin-bottom: 14px; }
.tarjeta p { color: rgba(246, 241, 230, .86); }
.tarjeta strong { color: var(--oro-claro); font-weight: 600; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 20px 0 0; }
.chips li { font-size: .76rem; letter-spacing: .04em; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--linea); color: var(--oro-claro); background: rgba(216, 169, 59, .06); }
.paso-final { justify-content: flex-start; }
@media (min-width: 761px) { .paso-final { align-items: flex-start; padding-top: calc(var(--cab-alto) + 9vh); } }   /* el cierre entra entero, arriba a la izquierda (la casa a la derecha) */
.final { max-width: 560px; }
.final h2 { font-size: clamp(2.6rem, 5.2vw, 4.6rem); font-weight: 300; }
.final > p { margin-top: 18px; font-size: 1.08rem; color: rgba(246, 241, 230, .88); max-width: 30em; }
.nota-3d { margin-top: 26px; font-size: .74rem; color: rgba(246, 241, 230, .72); }

.riel { position: fixed; right: clamp(16px, 2.4vw, 34px); top: 50%; transform: translateY(-50%); z-index: 3; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; opacity: 0; pointer-events: none; transition: opacity .5s ease; }
.en-proceso .riel { opacity: 1; }
.riel li { display: flex; align-items: center; justify-content: flex-end; gap: 12px; font: 500 .72rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: rgba(246, 241, 230, .45); transition: color .3s ease; }
.riel li span { order: -1; opacity: 0; transform: translateX(6px); transition: opacity .3s ease, transform .3s ease; padding: 5px 10px; border-radius: 999px; background: rgba(10, 19, 13, .72); }   /* píldora: legible sobre el plano */
.riel i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid rgba(246, 241, 230, .5); transition: background .3s ease, border-color .3s ease, transform .3s ease; }
.riel li.hecho i { background: rgba(216, 169, 59, .5); border-color: var(--oro); }
.riel li.activo { color: var(--oro-claro); }
.riel li.activo span { opacity: 1; transform: none; }
.riel li.activo i { background: var(--oro); border-color: var(--oro); transform: scale(1.35); box-shadow: 0 0 0 5px rgba(216, 169, 59, .18); }

/* versión sin 3D: cada paso con su fotograma del recorrido */
.sin-3d .lienzo-caja { position: absolute; inset: 0 0 auto; height: 100vh; margin: 0; }
.sin-3d .paso { background: var(--hondo) 68% 50% / cover no-repeat; position: relative; }
.sin-3d .paso::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 14, 9, .8) 0%, rgba(7, 14, 9, .35) 45%, rgba(7, 14, 9, .05) 70%); }
.sin-3d .paso > * { position: relative; }
.sin-3d .paso[data-paso='0'] { background-image: url('../img/recorrido/paso-0.webp'); }
.sin-3d .paso[data-paso='1'] { background-image: url('../img/recorrido/paso-1.webp'); }
.sin-3d .paso[data-paso='2'] { background-image: url('../img/recorrido/paso-2.webp'); }
.sin-3d .paso[data-paso='3'] { background-image: url('../img/recorrido/paso-3.webp'); }
.sin-3d .paso[data-paso='4'] { background-image: url('../img/recorrido/paso-4.webp'); }
.sin-3d .paso[data-paso='5'] { background-image: url('../img/recorrido/paso-5.webp'); }
.sin-3d .paso[data-paso='6'] { background-image: url('../img/recorrido/paso-6.webp'); }
.sin-3d .paso[data-paso='7'] { background-image: url('../img/recorrido/paso-7.webp'); }
.sin-3d .riel { display: none; }

/* ── secciones ── */
.sec { position: relative; padding: clamp(80px, 11vw, 150px) 0; }
.envoltura { width: min(var(--ancho), 100% - 2 * clamp(20px, 5vw, 48px)); margin: 0 auto; }
.sec-crema { background: var(--crema); color: var(--tinta); }
.sec-crema .antetitulo { color: var(--oro-texto); }
.sec-crema h2 em { color: var(--oro-texto); }
.sec-verde { background: radial-gradient(90% 70% at 80% 0%, #24402c 0%, var(--verde) 55%, #142519 100%); }
/* las curvas de nivel doradas del solar (paso 01 del recorrido) siguen debajo de Proyectos y del pie */
.sec-verde::before, .pie::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: url('../img/curvas.svg') 108% -40px / min(980px, 120vw) auto no-repeat; opacity: .16; }
.sec-verde > *, .pie > * { position: relative; }
.pie { position: relative; }
.pie::before { background-position: -18% 30%; opacity: .07; }
.sec-hondo { background: var(--hondo); }
.sec-cab { max-width: 760px; margin-bottom: clamp(40px, 6vw, 64px); }
.sec h2 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
.lead { margin-top: 20px; font-size: clamp(1.02rem, 1.4vw, 1.18rem); max-width: 40em; color: inherit; opacity: .86; }

/* Cada bloque se coloca capa a capa: sube un poco y sus piezas se descubren de abajo arriba, una tras otra.
   🪤 Chrome tiene en cuenta el clip-path del PROPIO elemento en el IntersectionObserver (un bloque recortado «no se ve» y
   nunca se revela): por eso el recorte va en los hijos (.rev > *) y el observador mira al .rev, que no lleva recorte.
   Al terminar, app.js pone .fin y se quita el recorte (para no aplanar el 3D del carrusel ni cortar sombras). */
.rev { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.rev > * { clip-path: inset(100% -80px -80px -80px); }
.rev:not(.fin) > * { transition: clip-path 1s cubic-bezier(.65, 0, .25, 1); }   /* luego, cada pieza recupera su transición */
.rev:not(.fin) > :nth-child(2) { transition-delay: .09s; }
.rev:not(.fin) > :nth-child(3) { transition-delay: .18s; }
.rev:not(.fin) > :nth-child(n+4) { transition-delay: .27s; }
.rev.vis, .no-js .rev, .reducido .rev, .rev:focus-within { opacity: 1; transform: none; }
.rev.vis > *, .no-js .rev > *, .rev:focus-within > * { clip-path: inset(-80px); }
.rev.fin > *, .reducido .rev > * { clip-path: none; }

/* servicios */
.servicios { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; perspective: 1100px; }
.servicio { position: relative; padding: 30px 26px 28px; border-radius: var(--radio); background: linear-gradient(170deg, #ffffff 0%, #faf6ec 100%); border: 1px solid rgba(133, 96, 15, .16); box-shadow: 0 24px 50px -34px rgba(21, 35, 26, .45); transform-style: preserve-3d; transition: transform .25s ease, box-shadow .25s ease, opacity .8s ease; }
.servicio:nth-child(2) { transition-delay: 0s, 0s, .1s; }
.servicio:nth-child(3) { transition-delay: 0s, 0s, .2s; }
.servicio:nth-child(4) { transition-delay: 0s, 0s, .3s; }
.servicio:hover { box-shadow: 0 34px 60px -30px rgba(21, 35, 26, .5); }
/* al pasar el puntero, una capa dorada sube por el borde inferior de la tarjeta */
.servicio::after { content: ''; position: absolute; left: 26px; right: 26px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--oro); transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.servicio:hover::after { transform: scaleX(1); }
.servicio .ico { width: 46px; height: 46px; fill: none; stroke: var(--oro-texto); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 22px; transform: translateZ(30px); }
.servicio h3 { font-size: 1.7rem; margin-bottom: 12px; color: var(--verde); transform: translateZ(20px); }
.servicio p { font-size: .95rem; color: var(--tinta-suave); }
.servicio ul { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.servicio li { font-size: .72rem; letter-spacing: .03em; padding: 4px 9px; border-radius: 999px; background: rgba(26, 46, 31, .06); color: var(--verde); }
.servicio .pendiente { font-size: .74rem; }
.valores { list-style: none; padding: 0; margin: clamp(36px, 5vw, 56px) 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; border-top: 1px solid rgba(26, 46, 31, .14); padding-top: 30px; }
.valores li { font-size: .95rem; color: var(--tinta-suave); }
.valores b { display: block; font: 400 1.25rem/1.2 var(--serif); color: var(--verde); margin-bottom: 6px; }

/* proyectos: carrusel con perspectiva */
.carrusel-caja { position: relative; }
.carrusel { display: flex; gap: 26px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 30px max(24px, calc(50vw - 210px)) 40px; perspective: 1300px; scrollbar-width: none; overscroll-behavior-x: contain; }
.carrusel::-webkit-scrollbar { display: none; }
.ficha { flex: 0 0 420px; margin: 0; scroll-snap-align: center; border-radius: var(--radio); overflow: hidden; position: relative; background: #0d1a11; box-shadow: 0 40px 70px -40px rgba(0, 0, 0, .9); transform-style: preserve-3d; will-change: transform; aspect-ratio: 4 / 5; }
.ficha img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.ficha:hover img { transform: scale(1.05); }
.ficha figcaption { position: absolute; inset: auto 0 0; padding: 60px 22px 20px; background: linear-gradient(180deg, rgba(8, 15, 10, 0), rgba(8, 15, 10, .88)); font: 400 1.2rem/1.25 var(--serif); }
.ficha figcaption span { display: block; font: 600 .68rem/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--oro); margin-bottom: 8px; }
.carrusel-botones { display: flex; justify-content: center; gap: 12px; }
.cb { width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--linea); background: rgba(12, 23, 16, .5); cursor: pointer; display: grid; place-items: center; transition: background .2s ease, border-color .2s ease; }
.cb { position: relative; overflow: hidden; isolation: isolate; }
.cb::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--oro); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.cb:hover::before, .cb:focus-visible::before { transform: scaleY(1); }
.cb:hover { border-color: var(--oro); }
.cb svg { transition: transform .3s cubic-bezier(.2, .7, .2, 1), stroke .2s ease; }
.cb:hover svg { stroke: #10190f; }
.cb[data-dir='-1']:hover svg { transform: translateX(-3px); }
.cb[data-dir='1']:hover svg { transform: translateX(3px); }
.cb svg { width: 20px; height: 20px; fill: none; stroke: var(--crema); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* zona */
.zona > *, .bertia > *, .servicios > *, .canales > * { min-width: 0; }
.zona { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.datos { margin: 28px 0 30px; display: grid; gap: 14px; }
.datos div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid rgba(26, 46, 31, .12); }
.datos dt { font: 600 .72rem/1.6 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--oro-texto); }
.datos dd { margin: 0; color: var(--tinta); }
.mapa { margin: 0; }
.mapa svg { width: 100%; height: auto; overflow: visible; }
.mapa pattern circle { fill: rgba(60, 86, 52, .5); }
.mapa .rutas path { fill: none; stroke: var(--oro); stroke-width: 2; stroke-dasharray: 6 7; stroke-dashoffset: 400; opacity: 0; transition: stroke-dashoffset 2.2s ease, opacity .6s ease; }
.mapa.vis .rutas path { stroke-dashoffset: 0; opacity: .9; }
.mapa .rutas path:nth-child(2) { transition-delay: .2s; }
.mapa .rutas path:nth-child(3) { transition-delay: .4s; }
.mapa .rutas path:nth-child(4) { transition-delay: .6s; }
.mapa .pueblos circle { fill: var(--verde); stroke: var(--crema); stroke-width: 2.5; }
.mapa .sede circle { fill: var(--oro); stroke: var(--verde); stroke-width: 3; }
.mapa .sede .halo { fill: rgba(216, 169, 59, .22); stroke: none; animation: latido 2.6s ease-in-out infinite; transform-origin: 226px 396px; }
@keyframes latido { 0%, 100% { transform: scale(.7); opacity: .9; } 60% { transform: scale(1.25); opacity: 0; } }
.mapa text { font: 600 18px/1 var(--sans); fill: var(--verde); paint-order: stroke; stroke: var(--crema); stroke-width: 5px; stroke-linejoin: round; }
.mapa .sede text { font-family: var(--serif); font-size: 24px; font-weight: 500; }
.mapa .escala path { stroke: var(--tinta-suave); stroke-width: 1.5; fill: none; }
.mapa .escala text { font-size: 13px; font-weight: 500; fill: var(--tinta-suave); text-anchor: middle; }
.mapa figcaption { margin-top: 10px; font-size: .75rem; color: var(--tinta-suave); text-align: right; }

/* BertIA */
.bertia { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(36px, 6vw, 90px); align-items: center; }
.sec-hondo::before { content: ''; position: absolute; inset: 0; background: url('../img/fotos/detalle-luz-madera-1600.webp') 30% 50% / cover no-repeat; opacity: .16; pointer-events: none; }
.sec-hondo > * { position: relative; }
.bertia-demo { position: relative; padding-top: 70px; }
.bertia-cara { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 132px; height: 132px; border-radius: 50%; overflow: hidden; border: 2px solid var(--oro); box-shadow: 0 0 0 8px rgba(216, 169, 59, .12), 0 20px 40px rgba(0, 0, 0, .5); background: #0e1a12; z-index: 2; }
.bertia-cara img { width: 100%; height: 100%; object-fit: cover; }
.chat { padding: 84px 26px 26px; border-radius: 22px; background: linear-gradient(170deg, rgba(36, 64, 44, .85), rgba(16, 29, 20, .92)); border: 1px solid var(--linea); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .8); display: flex; flex-direction: column; gap: 10px; }
.chat-cab { text-align: center; font-size: .9rem; color: var(--oro-claro); margin-bottom: 10px; }
.chat-cab small { display: block; margin-top: 4px; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(246, 241, 230, .68); }
.m { max-width: 84%; padding: 11px 15px; border-radius: 16px; font-size: .93rem; line-height: 1.45; }
.m.tu { align-self: flex-end; background: var(--oro); color: #14200f; border-bottom-right-radius: 5px; }
.m.bot { align-self: flex-start; background: rgba(246, 241, 230, .95); color: var(--tinta); border-bottom-left-radius: 5px; }
.rev.vis .m { animation: aparece .5s ease both; }
.rev.vis .m:nth-of-type(2) { animation-delay: .5s; }
.rev.vis .m:nth-of-type(3) { animation-delay: 1.1s; }
.rev.vis .m:nth-of-type(4) { animation-delay: 1.6s; }
.rev.vis .m:nth-of-type(5) { animation-delay: 2.2s; }
@keyframes aparece { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
.pasos-bertia { list-style: none; counter-reset: pb; padding: 0; margin: 28px 0 6px; display: grid; gap: 16px; }
.pasos-bertia li { counter-increment: pb; display: grid; grid-template-columns: 38px 1fr; gap: 14px; color: rgba(246, 241, 230, .82); font-size: .97rem; }
.pasos-bertia li::before { content: counter(pb); width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--oro); color: var(--oro); display: grid; place-items: center; font: 400 1.15rem/1 var(--serif); }
.pasos-bertia b { color: var(--crema); font-weight: 600; display: block; }

/* contacto */
.canales { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.canal { display: flex; flex-direction: column; gap: 6px; padding: 26px 24px; border-radius: var(--radio); text-decoration: none; background: #fff; border: 1px solid rgba(133, 96, 15, .16); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; min-width: 0; }
.canal:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -30px rgba(21, 35, 26, .5); border-color: var(--oro); }
.canal { position: relative; overflow: hidden; }
.canal::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--oro); transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.canal:hover::after, .canal:focus-visible::after { transform: scaleX(1); }
.canal svg { transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.canal:hover svg { transform: translateY(-3px); }
.canal svg { width: 30px; height: 30px; fill: none; stroke: var(--oro-texto); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 12px; }
.canal-t { font: 600 .72rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--oro-texto); }
.canal-d { font: 400 1.15rem/1.3 var(--serif); color: var(--verde); overflow-wrap: anywhere; }
.cta-final { margin-top: clamp(36px, 5vw, 56px); display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 28px 32px; border-radius: var(--radio); background: var(--verde); color: var(--crema); }
.cta-final p { font: 400 clamp(1.3rem, 2.2vw, 1.75rem)/1.2 var(--serif); }
.resalta { animation: resalta 1.6s ease 2; }
@keyframes resalta { 50% { box-shadow: 0 0 0 4px rgba(216, 169, 59, .6); } }

/* pie */
.pie { background: #08110b; color: rgba(246, 241, 230, .78); padding: 70px 0 calc(100px + env(safe-area-inset-bottom)); font-size: .9rem; border-top: 1px solid var(--linea); }
.pie-rejilla { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr 1fr; gap: 36px; }
.pie-marca img { width: 72px; height: 72px; margin-bottom: 14px; }
.pie-nombre { font: 400 1.3rem/1 var(--serif); letter-spacing: .1em; color: var(--oro-claro); }
.pie-nombre b { font-weight: 500; }
.pie-lema { margin-top: 8px; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: rgba(246, 241, 230, .55); }
.pie-col { display: flex; flex-direction: column; gap: 0; align-items: flex-start; }
.pie-col > a, .pie-col > span:not(.pendiente) { display: inline-flex; align-items: center; min-height: 40px; }   /* zonas táctiles cómodas */
.pie-col .pendiente + .pendiente { margin-top: 8px; }
.pie-col a { text-decoration: none; }
.pie-col a:hover { color: var(--oro-claro); }
.pie-t { font: 600 .7rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--oro); margin-bottom: 6px; }
.pie .pendiente { margin-top: 0; font-size: .76rem; }
.pie-base { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(246, 241, 230, .1); display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; font-size: .78rem; color: rgba(246, 241, 230, .64); }

/* WhatsApp: abajo a la IZQUIERDA (BertIA ocupa la derecha) */
.wa-flotante { position: fixed; left: calc(20px + env(safe-area-inset-left)); bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 40; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: #1f3a29; border: 1.5px solid var(--oro); box-shadow: 0 0 0 4px rgba(216, 169, 59, .14), 0 12px 28px rgba(0, 0, 0, .4); transition: transform .2s ease, background .2s ease, opacity .3s ease; }
/* En el móvil, los flotantes se apartan cuando la pantalla ya ofrece lo mismo (cierre del recorrido: presupuesto y
   WhatsApp; sección de BertIA: su burbuja). Nunca mientras el chat está abierto (app.js pone las clases). */
.flot-fuera .wa-flotante { opacity: 0; transform: translateY(14px) scale(.86); pointer-events: none; }
html.flot-fuera:not(.bertia-abierto), html.burbuja-fuera:not(.bertia-abierto) { --mq-burbuja-op: 0; --mq-burbuja-pe: none; }
.wa-flotante:hover { transform: scale(1.07); background: #25D366; }
.wa-flotante svg { width: 30px; height: 30px; fill: #fff; }

/* ── adaptaciones ── */
@media (max-width: 1100px) {
  .servicios { grid-template-columns: repeat(2, 1fr); }
  .canales { grid-template-columns: repeat(2, 1fr); }
  .pie-rejilla { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .menu { position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; gap: 22px; background: rgba(8, 15, 10, .97); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s; }
  .menu.abierto { opacity: 1; visibility: visible; }
  .menu a:not(.btn) { font: 400 1.9rem/1.1 var(--serif); color: var(--crema); }
  .menu-cta { display: inline-flex; margin-top: 14px; }
  .menu-btn { display: block; }
  .zona, .bertia { grid-template-columns: minmax(0, 1fr); }
  .bertia-demo { order: 2; max-width: 520px; }
}
@media (max-width: 760px) {
  :root { --cab-alto: 64px; }
  .btn-cab { display: none; }
  .marca img { width: 38px; height: 38px; }
  .velo { background: linear-gradient(180deg, rgba(7, 14, 9, .5) 0%, rgba(7, 14, 9, 0) 22%, rgba(7, 14, 9, 0) 42%, rgba(7, 14, 9, .82) 72%, rgba(7, 14, 9, .92) 100%); }
  .paso { align-items: flex-end; padding: calc(var(--cab-alto) + 16px) 16px calc(100px + env(safe-area-inset-bottom)); }
  .paso-portada { align-items: flex-end; }
  .portada h1 { font-size: clamp(2.9rem, 14vw, 4rem); }
  .entrada { margin-top: 16px; font-size: 1rem; }
  .acciones { margin-top: 22px; }
  .acciones .btn { flex: 1 1 auto; }
  .baja { margin-top: 22px; }
  .tarjeta { padding: 22px 22px 24px; backdrop-filter: none; -webkit-backdrop-filter: none; background: linear-gradient(160deg, rgba(26, 46, 31, .94), rgba(12, 23, 16, .94)); }
  .tarjeta h2 { font-size: 1.75rem; }
  /* tarjeta quieta abajo, la casa arriba */
  .con-3d:not(.reducido) .tarjeta { left: 16px; right: 16px; width: auto; top: auto; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateY(34px); }
  .con-3d:not(.reducido) .paso.pasado .tarjeta { transform: translateY(-30px); }
  .con-3d:not(.reducido) .paso.activo .tarjeta { transform: none; }
  /* el riel del proceso, en el móvil: cinco tramos bajo la cabecera */
  .riel { top: calc(var(--cab-alto) + 6px); left: 16px; right: 16px; transform: none; flex-direction: row; gap: 6px; }
  .riel li { flex: 1; gap: 0; }
  .riel li span { display: none; }
  .riel i { width: 100%; height: 3px; border: 0; border-radius: 2px; background: rgba(246, 241, 230, .22); }
  .riel li.hecho i { background: rgba(216, 169, 59, .6); }
  .riel li.activo i { transform: none; background: var(--oro); box-shadow: 0 0 10px rgba(216, 169, 59, .55); }
  .pie-col > a, .pie-col > span:not(.pendiente) { min-height: 44px; }
  .servicios, .canales, .valores { grid-template-columns: 1fr; }
  .ficha { flex-basis: 78vw; }
  .carrusel { gap: 16px; padding-left: 11vw; padding-right: 11vw; }
  .datos div { grid-template-columns: 1fr; gap: 2px; }
  .cta-final { padding: 24px; }
  .cta-final .btn { width: 100%; }
  .pie-rejilla { grid-template-columns: 1fr; }
  .sin-3d .paso { background-size: 235% auto; background-position: 64% calc(var(--cab-alto) - 10px); }
  .sin-3d .paso::before { background: linear-gradient(180deg, rgba(7, 14, 9, .1) 0%, rgba(7, 14, 9, .2) 40%, rgba(7, 14, 9, .9) 75%); }
  .wa-flotante { width: 50px; height: 50px; left: calc(14px + env(safe-area-inset-left)); bottom: calc(18px + env(safe-area-inset-bottom)); }
  .wa-flotante svg { width: 27px; height: 27px; }
  html { --mq-pildora: hidden; }            /* en el móvil basta la burbuja con la cara de BertIA */
  .baja { display: none; }
  .antetitulo { font-size: .66rem; letter-spacing: .2em; gap: 10px; margin-bottom: 12px; }
  .antetitulo span { display: none; }
}

/* entre páginas de la web (portada ↔ 404): la que se va sube y se apaga, la nueva se coloca como una capa */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-sale .36s cubic-bezier(.4, 0, .2, 1) both; }
::view-transition-new(root) { animation: vt-entra .62s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes vt-sale { to { opacity: 0; transform: translateY(-26px); } }
@keyframes vt-entra { from { opacity: 0; transform: translateY(34px); clip-path: inset(100% 0 0 0); } to { opacity: 1; transform: none; clip-path: inset(0); } }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* en la portada ya hay dos «Pide tu presupuesto» a la vista: el rótulo de la burbuja de BertIA espera a que se baje */
html.en-portada { --mq-pildora: hidden; }

/* reducir movimiento: nada se mueve solo */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.reducido *, .reducido *::before, .reducido *::after { animation: none !important; transition: none !important; }

/* ── web completa (5-dic): enlaces a las páginas interiores y pie común de cinco columnas (lo usan la landing y las
   páginas; el resto de estilos de las páginas está en paginas.css) ── */
.enlace { display: inline-flex; align-items: center; gap: 8px; color: var(--oro-texto); font-weight: 600; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .35s ease; min-height: 44px; }
.sec-verde .enlace, .sec-hondo .enlace { color: var(--oro-claro); }
.enlace:hover, .enlace:focus-visible { background-size: 100% 1px; }
.flecha { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; transition: transform .25s ease; }
a:hover > .flecha, a:focus-visible > .flecha, a:hover .mas .flecha { transform: translateX(4px); }
.ver-mas { margin-top: 30px; }
.ver-centro { text-align: center; margin-top: 18px; }
.marca { min-height: 44px; }   /* zona táctil del logo (también en la 404) */
.servicio .enlace { margin-top: 14px; font-size: .86rem; }
/* ── pie de cinco columnas ── */
.pie-5 { grid-template-columns: 1.3fr 1fr 1.1fr 1.4fr 1fr; }
.pie-col .pendiente { margin-top: 8px; }
@media (max-width: 1100px) { .pie-5 { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 760px) { .pie-5 { grid-template-columns: minmax(0, 1fr); } }
