/* ==========================================================================
   Página de conversión — trámites y regularización
   Layout: hero dividido imagen/texto → tarjetas de servicio → beneficios →
   pasos → banner de reseñas → galería horizontal con scroll → CTA final.
   Barra fija inferior + hoja de formulario que sube desde abajo.
   ========================================================================== */
:root {
  --papel: #f5f4f0;
  --blanco: #ffffff;
  --tinta: #141413;
  --gris: #6b6a64;
  --linea: rgba(20, 20, 19, 0.14);
  --oscuro: #1e1e1d;
  --claro: #ecebe6;
  --acento: #c9a227;       /* ocre de la marca */
  --acento-tinta: #1e1e1d;

  --sans: "Jost", "Century Gothic", "Futura", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body.cv {
  margin: 0;
  font-family: var(--sans);
  color: var(--tinta);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--barra-alto) + env(safe-area-inset-bottom, 0px));
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 3px; }

/* --------------------------------------------------------------- botones */
.cv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 15px 28px;
  background: var(--tinta);
  color: var(--blanco);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 0.35s var(--ease), background 0.3s;
}
.cv-btn:hover { transform: translateY(-2px); background: #000; }
.cv-btn--claro { background: var(--acento); color: var(--acento-tinta); }
.cv-btn--claro:hover { background: #ddb534; }
.cv-btn--chico { padding: 9px 18px; font-size: 14px; }
.cv-btn--ancho { width: 100%; }
.cv-link {
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

/* --------------------------------------------------------------- header */
.cv-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(12px + env(safe-area-inset-top, 0px)) var(--gutter) 12px;
  transition: background 0.4s, box-shadow 0.4s;
}
.cv-header.is-solido { background: rgba(245, 244, 240, 0.92); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--linea); }
.cv-marca { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.cv-marca img { width: 40px; height: 40px; border-radius: 50%; }
.cv-marca b { font-weight: 600; }
.cv-nav { display: flex; align-items: center; gap: 20px; font-family: var(--mono); font-size: 12px; }
.cv-nav a { text-decoration: none; }
.cv-nav a:hover { text-decoration: underline; }

/* --------------------------------------------------------------- hero */
.cv-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
  min-height: calc(100svh - var(--barra-alto, 0px) - env(safe-area-inset-bottom, 0px));
}
.cv-hero__img { position: relative; overflow: hidden; background: var(--claro); }
.cv-hero__img img {
  position: absolute;
  inset: -8% 0 0 0;
  width: 100%;
  height: 116%;
  object-fit: cover;
  animation: hero-entrada 1.6s var(--ease) both;
  will-change: transform;
}
@keyframes hero-entrada {
  from { transform: scale(1.18); filter: grayscale(1); }
  to { transform: scale(1); filter: grayscale(0); }
}
.cv-hero__texto {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: 110px var(--gutter) 60px;
  min-width: 0;
}
.cv-eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gris); margin: 0; }
.cv-hero__titulo {
  font-weight: 500;
  font-size: clamp(40px, 5.6vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
.cv-hero__sub { font-size: clamp(18px, 1.6vw, 22px); font-weight: 300; margin: 0; }
.cv-hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.cv-chips { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cv-chips li {
  font-family: var(--mono);
  font-size: 11px;
  border: 1px solid var(--linea);
  border-radius: 999px;
  padding: 6px 12px;
}

/* --------------------------------------------------------------- secciones */
.cv-seccion { padding: clamp(80px, 14vh, 150px) var(--gutter); }
.cv-h2 {
  font-weight: 400;
  font-size: clamp(34px, 4.4vw, 64px);
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0 0 clamp(32px, 6vh, 60px);
  text-wrap: balance;
}

/* Servicios */
.cv-servicios { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.cv-servicio { display: flex; flex-direction: column; gap: 8px; }
.cv-servicio__img { aspect-ratio: 4 / 5; overflow: hidden; background: var(--claro); margin-bottom: 10px; max-width: 100%; }
.cv-servicio__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.cv-servicio__img--plano img { object-position: center 30%; }
.cv-servicio:hover .cv-servicio__img img { transform: scale(1.06); }
.cv-servicio h3 { font-size: 22px; font-weight: 500; margin: 0; }
.cv-servicio p { margin: 0 0 6px; color: var(--gris); font-size: 15px; }
.cv-servicio .cv-link { align-self: flex-start; }

/* Por qué */
.cv-porque {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--oscuro);
  color: var(--claro);
  min-height: 80vh;
}
.cv-porque__img { position: relative; overflow: hidden; min-height: 340px; }
.cv-porque__img img { position: absolute; inset: -12% 0; width: 100%; height: 124%; object-fit: cover; will-change: transform; }
.cv-porque__texto { display: flex; flex-direction: column; justify-content: center; padding: clamp(60px, 10vh, 120px) var(--gutter); min-width: 0; }
.cv-beneficios { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 22px; }
.cv-beneficios li { display: flex; gap: 16px; align-items: baseline; font-size: clamp(20px, 2vw, 28px); font-weight: 300; }
.cv-beneficios span { color: #8d8c85; }

/* Pasos */
.cv-pasos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.cv-pasos li { display: flex; flex-direction: column; gap: 6px; }
.cv-pasos svg { width: 52px; height: 52px; fill: none; stroke: var(--tinta); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; margin-bottom: 12px; }
.cv-pasos b { font-family: var(--mono); font-size: 12px; color: var(--acento); font-weight: 600; }
.cv-pasos h3 { font-size: 26px; font-weight: 500; margin: 0; }
.cv-pasos p { margin: 0; color: var(--gris); }
.cv-pasos__linea { height: 2px; background: var(--linea); margin-top: 48px; position: relative; overflow: hidden; }
.cv-pasos__linea span { position: absolute; inset: 0; background: var(--acento); transform-origin: left; transform: scaleX(0); }

/* Quién te atiende */
.cv-arquitecto {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  padding: clamp(70px, 12vh, 130px) var(--gutter);
}
.cv-arquitecto__foto { margin: 0; aspect-ratio: 4 / 5; max-width: 100%; overflow: hidden; background: var(--claro); }
.cv-arquitecto__foto img { width: 100%; height: 100%; object-fit: cover; }
.cv-arquitecto__foto.sin-foto { display: grid; place-items: center; border: 1px dashed #b9b8b1; }
.cv-arquitecto__foto.sin-foto img { display: none; }
.cv-arquitecto__foto.sin-foto::before { content: "Foto de Ignacio\A img/ignacio.jpg"; white-space: pre; text-align: center; font-family: var(--mono); font-size: 12px; color: var(--gris); }
.cv-arquitecto__texto { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; min-width: 0; }
.cv-arquitecto__texto .cv-h2 { margin: 0; }
.cv-arquitecto__bio { font-size: clamp(18px, 1.6vw, 22px); font-weight: 300; margin: 0; max-width: 34ch; }
/* la presentación puede traer formato desde la intranet: párrafos, listas y enlaces */
.cv-arquitecto__bio p, .cv-arquitecto__bio ul, .cv-arquitecto__bio ol { margin: 0 0 0.7em; }
.cv-arquitecto__bio > :last-child { margin-bottom: 0; }
.cv-arquitecto__bio ul, .cv-arquitecto__bio ol { padding-left: 1.2em; }
.cv-arquitecto__bio strong, .cv-arquitecto__bio b { font-weight: 500; }
.cv-arquitecto__bio a { text-underline-offset: 3px; }
/* la biografía completa de «Estudio y logo» es más larga: letra más chica y renglones más anchos */
.cv-arquitecto__bio--larga { font-size: clamp(15px, 1.1vw, 17px); line-height: 1.6; max-width: 62ch; }

/* Reseñas: banner en movimiento */
.cv-resenas { padding: clamp(70px, 12vh, 120px) 0; background: var(--blanco); overflow: hidden; }
.cv-resenas__cab { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 0 var(--gutter); }
.cv-etiqueta-ejemplo { font-family: var(--mono); font-size: 11px; color: var(--gris); border: 1px dashed var(--gris); padding: 4px 10px; border-radius: 999px; }
.cv-marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.cv-marquee__pista { list-style: none; padding: 0; margin: 0; display: flex; gap: 20px; width: max-content; animation: marquee 40s linear infinite; }
.cv-marquee:hover .cv-marquee__pista { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.cv-resena {
  width: min(340px, 78vw);
  flex: 0 0 auto;
  background: var(--papel);
  border-radius: 4px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cv-estrellas { color: var(--acento); letter-spacing: 0.15em; }
.cv-resena p { margin: 0; font-size: 19px; font-weight: 300; line-height: 1.35; }
.cv-resena small { font-family: var(--mono); font-size: 11px; color: var(--gris); }

/* Galería horizontal ligada al scroll */
.cv-galeria { position: relative; height: 260vh; background: var(--oscuro); color: var(--claro); }
.cv-galeria__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: calc(100svh - var(--barra-alto, 0px) - env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  padding: 80px 0 24px;
}
.cv-galeria__titulo { padding: 0 var(--gutter); margin: 0; }
.cv-galeria__pista { display: flex; gap: 20px; padding: 0 var(--gutter); width: max-content; will-change: transform; }
.cv-galeria__pista a { flex: 0 0 auto; display: block; }
.cv-galeria__pista a img { transition: transform .6s var(--ease); }
.cv-galeria__pista a:hover img { transform: scale(1.03); }
.cv-galeria__pista img { height: min(52vh, 480px); width: auto; aspect-ratio: 4 / 5; object-fit: cover; max-width: none; }
.cv-galeria__ver { margin: 0 var(--gutter); align-self: flex-start; color: var(--claro); }

/* CTA final */
.cv-final {
  background: var(--tinta);
  color: var(--claro);
  text-align: center;
  padding: clamp(90px, 18vh, 180px) var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.cv-final__titulo { font-weight: 400; font-size: clamp(36px, 5vw, 76px); line-height: 1; margin: 0; text-wrap: balance; max-width: 14ch; }
.cv-final p { margin: 0 0 10px; font-size: 18px; font-weight: 300; color: #b9b8b1; }

.cv-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 36px var(--gutter);
  background: var(--tinta);
  color: #9a9992;
  font-family: var(--mono);
  font-size: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.cv-footer a { color: inherit; text-underline-offset: 3px; }
.cv-footer .enlaces-seo { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 18px 48px; padding-bottom: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.cv-footer .enlaces-seo div { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.cv-footer .enlaces-seo b { flex-basis: 100%; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; font-size: 10px; color: #6f6e68; }
.cv-footer .enlaces-seo a { text-decoration: none; font-size: 12px; }
.cv-footer .enlaces-seo a:hover { text-decoration: underline; }
.cv-servicio .cv-servicio__acciones { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; color: var(--tinta); font-size: inherit; }
.cv-link--suave { color: var(--gris); border-bottom-color: transparent; }
.cv-link--suave:hover { color: var(--tinta); border-bottom-color: currentColor; }
.cv-resenas__google { text-align: center; margin: 22px 0 0; }
.cv-footer a:hover { color: #fff; }
.cv-footer img { width: 56px; border-radius: 50%; filter: invert(1); mix-blend-mode: screen; }

/* --------------------------------------------------------------- animaciones de scroll
   Solo se ocultan si JS está activo (clase .js en <html>). */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease) var(--d, 0s), transform 0.9s var(--ease) var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

.js [data-reveal-img] { clip-path: inset(100% 0 0 0); transition: clip-path 1.2s var(--ease); }
.js [data-reveal-img] img { transform: scale(1.2); transition: transform 1.6s var(--ease); }
.js [data-reveal-img].is-in { clip-path: inset(0 0 0 0); }
.js [data-reveal-img].is-in img { transform: scale(1); }
.js .cv-servicio:hover [data-reveal-img].is-in img { transform: scale(1.06); }

/* Títulos: cada palabra sube desde una máscara */
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.08em; }
[data-split] .w > span { display: inline-block; }
.js [data-split] .w > span { transform: translateY(105%); transition: transform 0.9s var(--ease); transition-delay: calc(var(--i) * 70ms); }
.js [data-split].is-in .w > span { transform: none; }

/* --------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .cv-hero { grid-template-columns: 1fr; min-height: 0; }
  .cv-hero__img { height: 52vh; min-height: 300px; }
  .cv-hero__texto { padding: 36px var(--gutter) 56px; gap: 18px; }
  .cv-servicios { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .cv-porque { grid-template-columns: 1fr; min-height: 0; }
  .cv-porque__img { height: 46vh; }
  .cv-pasos { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .cv-arquitecto { grid-template-columns: 1fr; }
  .cv-arquitecto__foto { width: min(320px, 80%); }
  .cv-nav a:not([data-menu-proyectos]) { display: none; }
}
@media (max-width: 520px) {
  .cv-marca span { display: none; }
  .cv-servicio h3 { font-size: 18px; }
  .cv-servicio p { font-size: 13px; }
  .cv-pasos h3 { font-size: 21px; }
  .cv-galeria__pista img { height: 46vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal], .js [data-reveal-img], .js [data-split] .w > span { opacity: 1; transform: none; clip-path: none; }
  .cv-marquee__pista { flex-wrap: wrap; width: auto; padding: 0 var(--gutter); }
}

/* --------------------------------------------------------------- galería: nombre y lugar bajo cada foto */
.cv-galeria__pista a.cv-obra { display: grid; gap: 12px; text-decoration: none; color: inherit; }
.cv-obra__pie { display: grid; gap: 3px; }
.cv-obra__pie b { font-weight: 400; font-size: 19px; line-height: 1.2; }
.cv-obra__pie small { font: 12px var(--mono); letter-spacing: .04em; color: #9a9992; }

/* --------------------------------------------------------------- bloques que se agregan desde el editor */
.cv-bloque-texto { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 90px); align-items: center; padding: clamp(70px, 12vh, 140px) var(--gutter); }
.cv-bloque-texto--solo { grid-template-columns: minmax(0, 1fr); max-width: 860px; margin: 0 auto; text-align: center; justify-items: center; }
.cv-bloque-texto--izquierda .cv-bloque-texto__img { order: -1; }
.cv-bloque-texto--derecha .cv-bloque-texto__img { order: 2; }
.cv-bloque-texto__img { overflow: hidden; border-radius: 4px; aspect-ratio: 4 / 3; max-width: 100%; }
.cv-bloque-texto__img img { width: 100%; height: 100%; object-fit: cover; }
.cv-bloque-texto__cuerpo { display: grid; gap: 18px; justify-items: start; }
.cv-bloque-texto--solo .cv-bloque-texto__cuerpo { justify-items: center; }
.cv-bloque-texto__parrafos p { margin: 0 0 14px; font-size: 18px; font-weight: 300; line-height: 1.6; max-width: 60ch; }
.cv-bloque--oscuro { background: var(--oscuro); color: var(--claro); }
.cv-bloque--oscuro .cv-eyebrow { color: #9a9992; }
.cv-preguntas__lista { display: grid; max-width: 860px; }
.cv-preguntas details { border-bottom: 1px solid var(--linea); }
.cv-preguntas summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font-size: clamp(18px, 1.6vw, 22px); }
.cv-preguntas summary::-webkit-details-marker { display: none; }
.cv-preguntas summary::after { content: "+"; position: absolute; right: 6px; top: 18px; font: 22px var(--mono); color: var(--gris); transition: transform .3s var(--ease); }
.cv-preguntas details[open] summary::after { transform: rotate(45deg); }
.cv-preguntas details p { margin: 0 0 18px; font-size: 17px; font-weight: 300; line-height: 1.6; color: var(--gris); max-width: 70ch; }
.cv-imagen-ancha { margin: 0; overflow: hidden; }
.cv-imagen-ancha img { width: 100%; max-height: 82vh; object-fit: cover; }
.cv-imagen-ancha figcaption { padding: 12px var(--gutter); font: 12px var(--mono); color: var(--gris); }
@media (max-width: 860px) {
  .cv-bloque-texto { grid-template-columns: minmax(0, 1fr); }
  .cv-bloque-texto--derecha .cv-bloque-texto__img, .cv-bloque-texto--izquierda .cv-bloque-texto__img { order: -1; }
}

/* --------------------------------------------------------------- vista previa del editor en vivo (intranet) */
.editando [data-reveal], .editando [data-reveal-img], .editando [data-reveal-img] img, .editando [data-split] .w > span { transition: none !important; }
.editando [data-bloque] { cursor: pointer; position: relative; }
.editando [data-bloque]:hover { outline: 2px dashed rgba(201, 162, 39, .7); outline-offset: -2px; }
.editando .bloque-elegido { outline: 3px solid var(--acento) !important; outline-offset: -3px; }
.cv-resena--vacia p { font-size: 15px !important; color: var(--gris); }
