/* Vértice Reformas: sitio de ejemplo «producido» de Eje. Idea visual: el plano de obra (cianotipo, cotas, papel cuadriculado). */
:root { --plano: #10356b; --plano-hondo: #0a2550; --tinta: #0f2440; --linea: #c9d6ea; --papel: #f7f9fc; --blanco: #fff; --obra: #ff7a1a; --suave: #55657d; --cuadricula: rgb(255 255 255 / 0.07); }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--blanco); color: var(--tinta); font: 400 1.0625rem/1.6 "Familjen Grotesk", system-ui, sans-serif; overflow-x: hidden; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--obra); outline-offset: 3px; }
h1, h2, h3 { font-weight: 700; line-height: 1.03; letter-spacing: -0.03em; text-wrap: balance; }
.cota { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 0.85rem; letter-spacing: 0; }
.ancho { width: min(100% - 2.5rem, 72rem); margin-inline: auto; }

.aviso { background: #0a1f44; color: #fff; font-size: 0.875rem; text-align: center; padding: 0.55rem 1rem; }
.aviso a { font-weight: 700; text-underline-offset: 3px; }

/* Encabezado y menú */
.cabeza { position: sticky; top: 0; z-index: 20; background: rgb(255 255 255 / 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--linea); }
.cabeza .ancho { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.marca { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; font-weight: 700; font-size: 1.45rem; letter-spacing: -0.04em; }
.marca svg { width: 1.7rem; height: 1.7rem; color: var(--obra); }
.menu-boton { background: none; border: 1px solid var(--tinta); padding: 0.45rem 0.85rem; font-weight: 600; cursor: pointer; }
.menu { display: none; position: absolute; inset: 100% 0 auto 0; background: var(--blanco); border-bottom: 1px solid var(--linea); padding: 0.5rem 1.25rem 1.25rem; }
.menu.abierto { display: block; }
.menu a { display: block; padding: 0.85rem 0; text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--linea); }
.menu a[aria-current="page"] { color: var(--plano); }
.menu .boton { margin-top: 1rem; border-bottom: 0; text-align: center; }

.boton { display: inline-flex; align-items: center; justify-content: center; background: var(--obra); color: #2b1200; text-decoration: none; font-weight: 700; padding: 0.9rem 1.4rem; border: 0; cursor: pointer; transition: translate 0.15s, box-shadow 0.15s; box-shadow: 4px 4px 0 var(--tinta); }
.boton:hover { translate: -1px -1px; box-shadow: 6px 6px 0 var(--tinta); }
.boton--claro { background: var(--blanco); color: var(--tinta); }
.enlace { font-weight: 700; text-underline-offset: 5px; }

/* Portadas en cianotipo */
.plano { background: var(--plano) linear-gradient(var(--cuadricula) 1px, transparent 1px) 0 0 / 2rem 2rem, linear-gradient(90deg, var(--cuadricula) 1px, transparent 1px) 0 0 / 2rem 2rem; background-color: var(--plano); background-image: linear-gradient(var(--cuadricula) 1px, transparent 1px), linear-gradient(90deg, var(--cuadricula) 1px, transparent 1px); background-size: 2rem 2rem; color: var(--blanco); }
.portada { padding: 3rem 0 0; overflow: hidden; }
.portada h1 { font-size: clamp(2.9rem, 11.500vw, 6rem); max-width: 12ch; }
.portada p { font-size: 1.2rem; max-width: 36ch; margin-top: 1.2rem; opacity: 0.9; }
.portada .acciones { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; margin-top: 1.9rem; }
.portada .boton { box-shadow: 4px 4px 0 var(--plano-hondo); }
.dibujo { margin-top: 2.5rem; color: var(--blanco); }
.dibujo svg { width: 100%; height: auto; }
.dibujo .muro { fill: none; stroke: currentColor; stroke-width: 3; stroke-linejoin: round; }
.dibujo .fino { fill: none; stroke: currentColor; stroke-width: 1.200; opacity: 0.75; }
.dibujo .acento { fill: none; stroke: var(--obra); stroke-width: 1.500; }
.dibujo text { fill: currentColor; font: 500 11px "IBM Plex Mono", monospace; }
.dibujo text.acento-texto { fill: var(--obra); }
.portadilla { padding: 3rem 0 3.25rem; }
.portadilla h1 { font-size: clamp(2.6rem, 10vw, 4.75rem); max-width: 14ch; }
.portadilla p { font-size: 1.15rem; max-width: 40ch; margin-top: 1rem; opacity: 0.9; }
.migas { opacity: 0.8; margin-bottom: 1rem; }

/* Bloques */
.bloque { padding: 4rem 0 0; }
.bloque > h2, .bloque > .ancho > h2 { font-size: clamp(2.1rem, 8vw, 3.5rem); max-width: 16ch; margin-bottom: 1.75rem; }
.bajada { color: var(--suave); max-width: 46ch; margin: -1rem 0 1.75rem; font-size: 1.1rem; }

.cifras { display: grid; grid-template-columns: 1fr 1fr; border-block: 1px solid var(--linea); }
.cifras li { padding: 1.4rem 0.5rem 1.4rem 0; }
.cifras li:nth-child(odd) { border-right: 1px solid var(--linea); margin-right: 1.25rem; }
.cifras li:nth-child(n+3) { border-top: 1px solid var(--linea); }
.cifras strong { display: block; font-size: 2.6rem; line-height: 1; letter-spacing: -0.04em; color: var(--plano); }
.cifras span { color: var(--suave); font-size: 0.95rem; }

.servicios { display: grid; gap: 0; border-top: 1px solid var(--tinta); }
.servicios a { display: grid; grid-template-columns: 3.25rem 1fr auto; gap: 0.25rem 1rem; align-items: center; padding: 1.2rem 0; border-bottom: 1px solid var(--tinta); text-decoration: none; transition: background 0.15s, padding 0.15s; }
.servicios a:hover { background: var(--papel); padding-inline: 0.75rem; }
.servicios svg { width: 3.25rem; height: 3.25rem; color: var(--plano); grid-row: 1 / 3; }
.servicios h3 { font-size: 1.45rem; }
.servicios p { color: var(--suave); grid-column: 2; font-size: 0.98rem; }
.servicios i { grid-row: 1 / 3; grid-column: 3; font-style: normal; font-weight: 700; color: var(--obra); }

.pasos { counter-reset: paso; display: grid; gap: 1rem; }
.pasos li { counter-increment: paso; border: 1px solid var(--linea); background: var(--papel); padding: 1.4rem; position: relative; }
.pasos li::before { content: "0" counter(paso); font: 500 0.9rem "IBM Plex Mono", monospace; color: var(--obra); }
.pasos h3 { font-size: 1.35rem; margin: 0.5rem 0 0.4rem; }
.pasos p { color: var(--suave); }

.obras { display: grid; gap: 1.25rem; }
.obra { border: 1px solid var(--tinta); display: grid; background: var(--blanco); }
.obra[hidden] { display: none; }
.obra figure { background-color: var(--plano); background-image: linear-gradient(var(--cuadricula) 1px, transparent 1px), linear-gradient(90deg, var(--cuadricula) 1px, transparent 1px); background-size: 1.25rem 1.25rem; padding: 1.25rem; color: #fff; }
.obra figure svg { width: 100%; height: auto; }
.obra figure rect, .obra figure path { fill: none; stroke: currentColor; stroke-width: 2.500; stroke-linejoin: round; }
.obra figure .fino { stroke-width: 1; opacity: 0.7; }
.obra figure .nuevo { stroke: var(--obra); }
.obra figure text { fill: currentColor; font: 500 10px "IBM Plex Mono", monospace; }
.obra__texto { padding: 1.25rem; }
.obra__texto small { color: var(--obra); font-weight: 700; }
.obra h3 { font-size: 1.5rem; margin: 0.25rem 0 0.5rem; }
.obra p { color: var(--suave); }
.obra dl { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0 1.5rem; margin-top: 1rem; padding-top: 0.9rem; border-top: 1px dashed var(--linea); }
.obra dt { color: var(--suave); font-size: 0.8rem; }
.obra dd { font-weight: 700; grid-row: 2; }

.filtros { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.filtros button { background: none; border: 1px solid var(--tinta); padding: 0.5rem 1rem; font-weight: 600; cursor: pointer; }
.filtros button[aria-pressed="true"] { background: var(--tinta); color: #fff; }

.opiniones { display: grid; gap: 1rem; }
.opiniones blockquote { background: var(--papel); border-left: 4px solid var(--obra); padding: 1.4rem 1.4rem 1.3rem; }
.opiniones p { font-size: 1.15rem; line-height: 1.45; }
.opiniones footer { margin-top: 0.9rem; color: var(--suave); font-size: 0.95rem; }
.opiniones footer strong { color: var(--tinta); }

.llamado { margin-top: 4.5rem; padding: 3.5rem 0; }
.llamado h2 { font-size: clamp(2.3rem, 9vw, 4.25rem); max-width: 14ch; }
.llamado p { max-width: 38ch; margin-top: 1rem; opacity: 0.9; font-size: 1.15rem; }
.llamado .boton { margin-top: 1.75rem; box-shadow: 4px 4px 0 var(--plano-hondo); }

/* Detalle de servicios */
.detalle { display: grid; gap: 1.25rem; padding: 2.25rem 0; border-top: 1px solid var(--tinta); scroll-margin-top: 5rem; }
.detalle h2 { font-size: 2.2rem; }
.detalle p { color: var(--suave); margin-top: 0.6rem; max-width: 44ch; }
.detalle ul { display: grid; gap: 0.5rem; }
.detalle li { padding-left: 1.5rem; position: relative; }
.detalle li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.8rem; height: 2px; background: var(--obra); }
.detalle .dato { display: inline-block; margin-top: 1rem; background: var(--papel); border: 1px solid var(--linea); padding: 0.35rem 0.7rem; }

/* Equipo */
.equipo { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.equipo li { border: 1px solid var(--linea); padding: 1.1rem; }
.equipo i { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; background: var(--plano); color: #fff; font-style: normal; font-weight: 700; font-size: 1.2rem; margin-bottom: 0.8rem; }
.equipo h3 { font-size: 1.15rem; letter-spacing: -0.02em; }
.equipo p { color: var(--suave); font-size: 0.95rem; }
.valores { display: grid; gap: 1.5rem; }
.valores h3 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.valores p { color: var(--suave); }

/* Cotizador */
.cotizador { display: grid; gap: 2rem; padding: 2.5rem 0 0; align-items: start; }
.cotizador fieldset { border: 0; padding: 0; margin: 0 0 2rem; min-width: 0; }
.cotizador legend { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; padding: 0; margin-bottom: 0.9rem; }
.cotizador legend b { color: var(--obra); font: 500 0.95rem "IBM Plex Mono", monospace; margin-right: 0.5rem; }
.tarjetas { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.tarjetas label { position: relative; cursor: pointer; }
.tarjetas input { position: absolute; inset: 0; opacity: 0; }
.tarjetas span { display: block; border: 1px solid var(--tinta); padding: 0.9rem 1rem; font-weight: 600; background: var(--blanco); transition: background 0.12s, color 0.12s; height: 100%; }
.tarjetas small { display: block; font-weight: 400; color: var(--suave); font-size: 0.85rem; }
.tarjetas input:checked + span { background: var(--plano); color: #fff; border-color: var(--plano); }
.tarjetas input:checked + span small { color: rgb(255 255 255 / 0.8); }
.tarjetas input:focus-visible + span { outline: 3px solid var(--obra); outline-offset: 3px; }
.metros { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 0.5rem; }
.metros output { font-size: 2.4rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
input[type="range"] { width: 100%; accent-color: var(--obra); height: 2rem; }
.regla { display: flex; justify-content: space-between; color: var(--suave); }
.casillas { display: grid; gap: 0.5rem; }
.casillas label { display: flex; gap: 0.75rem; align-items: center; border: 1px solid var(--linea); padding: 0.8rem 1rem; cursor: pointer; }
.casillas input { width: 1.2rem; height: 1.2rem; accent-color: var(--plano); flex: none; }
.casillas label:has(input:checked) { border-color: var(--plano); background: var(--papel); }
.campos { display: grid; gap: 0.9rem; }
.campos label { display: grid; gap: 0.3rem; font-weight: 600; }
.campos input, .campos textarea { border: 1px solid var(--tinta); padding: 0.75rem 0.9rem; background: var(--blanco); width: 100%; border-radius: 0; }
.campos .error { color: #b3261e; font-weight: 400; font-size: 0.9rem; }

.resultado { border: 1px solid var(--tinta); position: sticky; top: 5rem; }
.resultado__cabeza { padding: 1.4rem 1.4rem 1.6rem; }
.resultado__cabeza p:first-child { opacity: 0.85; }
.resultado__monto { font-size: clamp(1.9rem, 8vw, 2.6rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1.05; margin-top: 0.4rem; }
.resultado__plazo { margin-top: 0.6rem; }
.resultado__cuerpo { padding: 1.4rem; }
.barras { display: grid; gap: 0.9rem; }
.barras div { display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 1rem; }
.barras i { grid-column: 1 / -1; height: 0.55rem; background: var(--linea); position: relative; }
.barras i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: var(--plano); transition: width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
.barras div:nth-child(2) i::after { background: var(--obra); }
.barras div:nth-child(3) i::after { background: var(--tinta); }
.resultado small { display: block; color: var(--suave); margin-top: 1.2rem; line-height: 1.45; }
.gracias { border: 1px solid var(--plano); background: var(--papel); padding: 1.5rem; }
.gracias h3 { font-size: 1.6rem; margin-bottom: 0.5rem; }

/* Contacto */
.contacto { display: grid; gap: 2.5rem; padding-top: 3rem; }
.contacto h2 { font-size: 1.9rem; margin-bottom: 0.8rem; }
.contacto dl { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem 1.5rem; }
.contacto dt { font-weight: 600; }
.vias { display: grid; gap: 0.7rem; }
.vias a { display: flex; justify-content: space-between; border: 1px solid var(--tinta); padding: 1rem 1.1rem; text-decoration: none; font-weight: 700; }
.vias span { color: var(--suave); font-weight: 400; }
.mapa iframe { width: 100%; height: 17rem; border: 1px solid var(--tinta); display: block; }

/* Pie */
.pie { margin-top: 4.5rem; background: var(--plano-hondo); color: rgb(255 255 255 / 0.82); padding: 3rem 0 2rem; }
.pie .ancho { display: grid; gap: 2rem; }
.pie .marca { color: #fff; }
.pie h3 { color: #fff; font-size: 1rem; letter-spacing: 0; margin-bottom: 0.6rem; }
.pie a { text-decoration: none; display: block; padding: 0.2rem 0; }
.pie a:hover { text-decoration: underline; }
.pie small { display: block; border-top: 1px solid rgb(255 255 255 / 0.18); padding-top: 1.25rem; grid-column: 1 / -1; }

@media (min-width: 56rem) {
  .menu-boton { display: none; }
  .menu { display: flex; position: static; align-items: center; gap: 1.75rem; padding: 0; border: 0; background: none; }
  .menu a { border: 0; padding: 0; font-weight: 500; }
  .menu a:hover { text-decoration: underline; text-underline-offset: 6px; }
  .menu .boton { margin: 0; padding: 0.65rem 1.1rem; font-weight: 700; text-decoration: none; }
  .portada .ancho { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; padding-bottom: 3.5rem; }
  .dibujo { margin-top: 0; }
  .cifras { grid-template-columns: repeat(4, 1fr); }
  .cifras li { border-top: 0 !important; border-right: 1px solid var(--linea); margin-right: 1.25rem; }
  .cifras li:last-child { border-right: 0; }
  .pasos { grid-template-columns: repeat(4, 1fr); }
  .obras { grid-template-columns: repeat(3, 1fr); }
  .opiniones { grid-template-columns: repeat(3, 1fr); }
  .detalle { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .equipo { grid-template-columns: repeat(4, 1fr); }
  .valores { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .cotizador { grid-template-columns: 1.25fr 1fr; gap: 3.5rem; }
  .tarjetas--tres { grid-template-columns: repeat(3, 1fr); }
  .contacto { grid-template-columns: 1fr 1fr; }
  .pie .ancho { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  .dibujo .muro, .dibujo .fino, .dibujo .acento { stroke-dasharray: 1; stroke-dashoffset: 1; animation: trazar 2.2s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
  .dibujo .fino { animation-delay: 0.9s; animation-duration: 1.4s; }
  .dibujo .acento { animation-delay: 1.5s; animation-duration: 1.2s; }
  .dibujo text { opacity: 0; animation: aparecer 0.6s 2s forwards; }
  @keyframes trazar { to { stroke-dashoffset: 0; } }
  @keyframes aparecer { to { opacity: 1; } }
}

/* Antes y después */
.cambio { position: relative; border: 1px solid var(--tinta); overflow: hidden; color: #fff; touch-action: pan-y; }
.cambio svg { width: 100%; height: auto; }
.cambio .muro { fill: none; stroke: currentColor; stroke-width: 3; stroke-linejoin: round; }
.cambio .nuevo { fill: rgb(255 122 26 / 0.18); stroke: var(--obra); stroke-width: 2; }
.cambio text { fill: currentColor; font: 500 11px "IBM Plex Mono", monospace; }
.cambio__despues { position: absolute; inset: 0; background: var(--plano-hondo); clip-path: inset(0 0 0 var(--corte)); }
.cambio__despues text { fill: var(--obra); }
.cambio__linea { position: absolute; top: 0; bottom: 0; left: var(--corte); width: 3px; translate: -50% 0; background: var(--obra); }
.cambio__linea::after { content: "‹ ›"; position: absolute; top: 50%; left: 50%; translate: -50% -50%; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--obra); color: #2b1200; display: grid; place-items: center; font-weight: 700; letter-spacing: 0.1em; }
.cambio__rotulo { position: absolute; top: 0.6rem; background: var(--blanco); color: var(--tinta); padding: 0.15rem 0.5rem; }
.cambio__rotulo--antes { left: 0.6rem; }
.cambio__rotulo--despues { right: 0.6rem; background: var(--obra); color: #2b1200; }
.cambio input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.cambio:has(input:focus-visible) { outline: 3px solid var(--obra); outline-offset: 3px; }

/* Preguntas */
.preguntas details { border-top: 1px solid var(--tinta); }
.preguntas details:last-child { border-bottom: 1px solid var(--tinta); }
.preguntas summary { list-style: none; cursor: pointer; padding: 1.2rem 0; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; display: flex; justify-content: space-between; gap: 1rem; }
.preguntas summary::-webkit-details-marker { display: none; }
.preguntas summary::after { content: "+"; color: var(--obra); font-size: 1.6rem; line-height: 0.9; transition: rotate 0.25s; }
.preguntas details[open] summary::after { rotate: 45deg; }
.preguntas details p { color: var(--suave); padding-bottom: 1.3rem; max-width: 60ch; }

/* Botón flotante */
.flotante { position: fixed; right: 1rem; bottom: 1rem; z-index: 30; display: inline-flex; align-items: center; gap: 0.5rem; background: #1faa59; color: #fff; text-decoration: none; font-weight: 700; padding: 0.8rem 1.1rem; border-radius: 99px; box-shadow: 0 10px 24px -10px rgb(0 0 0 / 0.5); }
.flotante svg { width: 1.3rem; height: 1.3rem; }
.pie { padding-bottom: 5rem; }
