/* ==========================================================================
   NOVAVI · capa de sistema (se carga la última en todas las páginas)
   Unifica cabecera, contenedores, ritmo vertical, tipografía y pie.
   ========================================================================== */

:root{
  --nv-max:1180px;
  --nv-gutter:48px;
  --nv-header:76px;
  --nv-space:88px;
}

/* --- contenedores: una sola anchura en todo el sitio ---------------------- */
.shell,
.wrap{
  width:min(var(--nv-max),calc(100% - var(--nv-gutter)));
  margin-inline:auto;
}
@media(max-width:800px){
  :root{--nv-gutter:32px;--nv-header:68px}
}

/* --- cabecera ------------------------------------------------------------- */
.header{
  position:sticky;
  top:0;
  z-index:30;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(14px);
  border-bottom:1px solid #e2e2e2;
  color:#000000;
}
.header .header-row{
  width:min(var(--nv-max),calc(100% - var(--nv-gutter)));
  height:var(--nv-header);
  margin-inline:auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.header .brand{
  display:flex;
  align-items:center;
  gap:10px;
  font:800 15px/1 Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
  letter-spacing:.16em;
  color:#000000;
  min-width:max-content;
}
.header .brand img{width:36px;height:36px}
.header .nav{
  display:flex;
  align-items:center;
  gap:26px;
  font:700 13px/1 Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
}
.header .nav a{
  padding:6px 0;
  border-bottom:2px solid transparent;
  color:#000000;
  transition:border-color .15s ease,color .15s ease;
}
.header .nav a:hover{border-color:#98451e;color:#823811}
.header .cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 18px;
  background:#000000;
  color:#fff;
  font:800 13px/1 Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
  letter-spacing:.02em;
}
.header .cta:hover{background:#98451e}
.header .menu{
  display:none;
  min-height:44px;
  padding:0 14px;
  border:1px solid #c6c6c6;
  background:#fff;
  color:#000000;
  font:700 13px/1 Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
  cursor:pointer;
}
@media(max-width:850px){
  .header .menu{display:block;margin-left:auto}
  .header .nav{display:none}
  .header .nav.open{
    display:flex;
    position:absolute;
    top:var(--nv-header);
    left:0;
    right:0;
    flex-direction:column;
    align-items:stretch;
    gap:0;
    padding:8px 16px;
    background:#fff;
    border-bottom:1px solid #c6c6c6;
    box-shadow:0 18px 30px rgba(37,37,37,.10);
  }
  .header .nav.open a{padding:14px 0;border-bottom:1px solid #ebebeb}
}

/* --- ritmo vertical: una sola escala ------------------------------------- */
.section,
section.section{padding:var(--nv-space) 0}
section:not(.hero-home):not(.trust-strip):not(.cta-section):not(.hero):not(.reading *){padding:var(--nv-space) 0}
section.hero{padding:0}
/* el hero interior lleva su propio aire en .wrap; anula el padding heredado */
section.hero:not(.hero-home){padding:0!important}

.hero:not(.hero-home) .wrap{padding-top:56px;padding-bottom:56px}
section.hero.hero-home{padding:72px 0 84px}

@media(max-width:800px){
  :root{--nv-space:56px}
  section.hero.hero-home{padding:48px 0 56px}
  .hero:not(.hero-home) .wrap{padding-top:40px;padding-bottom:40px}
}

/* --- tipografía: escala única -------------------------------------------- */
.hero h1,
.reading h1{
  font-size:clamp(2.4rem,4.6vw,4.2rem);
  line-height:1.04;
  letter-spacing:-.035em;
  margin:0 0 22px;
  max-width:18ch;
}
.section h2,
.split-intro h2,
.sec-head h2,
.heading h2,
.zones h2,
.contact h2,
.cta-box h2,
.hero h2{
  font-size:clamp(1.75rem,3vw,2.75rem);
  line-height:1.12;
  letter-spacing:-.03em;
  margin:0 0 18px;
}
.eyebrow{
  margin:0 0 14px;
  font-size:.68rem;
  font-weight:800;
  letter-spacing:.14em;
}
.lead,
.hero p{font-size:1.05rem;line-height:1.65}
/* h1 de páginas que no usan hero (zonas, 404, listados) */
main h1{font-size:clamp(2.4rem,4.6vw,4.2rem);line-height:1.04;letter-spacing:-.035em;margin:0 0 18px}
.heading{margin-bottom:36px;gap:44px;align-items:end}
.heading h2{margin:10px 0 0}

@media(max-width:800px){
  .hero h1,.reading h1{font-size:clamp(2rem,8vw,2.8rem);line-height:1.08}
  .section h2,.split-intro h2,.sec-head h2,.heading h2,.zones h2,.contact h2,.cta-box h2,.hero h2{font-size:clamp(1.6rem,6vw,2.1rem)}
  .heading{display:block}
  .heading p{margin-top:16px}
}

/* botón sobre fondo oscuro: el .cta base es del mismo color que la sección */
.contact .cta,
.dark .cta,
.proof .cta{
  background:#fff;
  color:#000000!important;
}
.contact .cta:hover,
.dark .cta:hover,
.proof .cta:hover{background:#e2e2e2}

/* --- piezas que faltaban en el CSS --------------------------------------- */
/* respuestas de FAQ y bloques de texto dentro de <details> */
.body{
  display:block;
  max-width:720px;
  margin:.55em 0 0;
  color:#444444;
  font-size:.97rem;
  line-height:1.65;
}
details[open] summary{margin-bottom:2px}
details .body:last-child{margin-bottom:.2em}

/* subtítulo bajo los botones de una tarjeta CTA */
.cta-sub{margin:.35em 0 .9em;color:#444444;font-size:.94rem;line-height:1.55}
.muted{color:#444444}

/* listado de servicios de portada: números y flecha que faltaban */
.service-list{counter-reset:svc}
.service{counter-increment:svc}
.service>span:empty::before{
  content:counter(svc,decimal-leading-zero);
  color:#98451e;
  font-size:.78rem;
  font-weight:900;
}
.service>b:empty::before{content:"→";color:#98451e;font-size:1.4rem;line-height:1}

/* --- páginas de lectura (guías, legales, fichas simples) ------------------ */
.reading{
  display:block;
  width:min(760px,calc(100% - var(--nv-gutter)));
  margin-inline:auto;
  padding:56px 0 88px;
}
.reading>a:first-child{
  display:inline-block;
  margin-bottom:22px;
  color:#555555;
  font-size:.82rem;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.reading>a:first-child:hover{color:#823811}
.reading h1{margin-bottom:18px;max-width:none}
.reading p,
.reading li{color:#3c3c3c;font-size:1.02rem;line-height:1.72;margin:0 0 1em}
.reading p a,.reading li a{color:#823811;text-decoration:underline;text-underline-offset:2px}
.reading h2{font-size:1.5rem;line-height:1.25;letter-spacing:-.02em;margin:2.2em 0 .6em}
.reading h3{font-size:1.15rem;margin:1.6em 0 .5em}
.reading ul,.reading ol{padding-left:1.3em;margin:0 0 1.2em}
.reading section{padding:0;margin:0}
.reading figure{margin:1.8em 0}
.reading img{border-radius:10px;border:1px solid #e2e2e2}
.reading figcaption{margin-top:.6em;color:#555555;font-size:.85rem}
.reading blockquote{margin:1.6em 0;padding:1em 1.2em;border-left:3px solid #98451e;background:#f6f6f6;color:#3c3c3c}
.reading table{width:100%;border-collapse:collapse;margin:1.4em 0;font-size:.94rem}
.reading th,.reading td{border-bottom:1px solid #e2e2e2;padding:.6em .5em;text-align:left}
.reading .ba,.reading .fig{margin-top:1.6em}
.reading>.cta,.reading>.btn{display:inline-flex;margin:14px 0 26px}
.reading>nav[aria-label]{display:block;margin-top:4px;font-size:.92rem;line-height:1.9;color:#555555}
.reading>nav[aria-label] a{color:#823811}

@media(max-width:800px){
  .reading{padding:36px 0 64px}
  .reading p,.reading li{font-size:1rem}
}

/* --- índice de guías ------------------------------------------------------ */
.guia-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:32px 0 8px}
.guia-card{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:24px 24px 20px;
  background:#fff;
  border:1px solid #e2e2e2;
  border-radius:4px;
  text-decoration:none!important;
  transition:border-color .15s ease,transform .15s ease,box-shadow .15s ease;
}
.guia-card:hover{border-color:#98451e;transform:translateY(-2px);box-shadow:0 12px 28px rgba(37,37,37,.08)}
.guia-kicker{font-size:.7rem;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:#98451e}
.guia-card h2{font-size:1.18rem!important;line-height:1.3!important;margin:0!important;color:#000000;letter-spacing:-.01em}
.guia-card p{font-size:.95rem!important;line-height:1.55!important;color:#444444;margin:0!important}
.guia-go{margin-top:auto;padding-top:8px;font-size:.85rem;font-weight:800;color:#98451e}
@media(max-width:700px){.guia-grid{grid-template-columns:1fr;gap:12px}}

/* hero de contacto: la regla genérica del hero le pintaba fondo blanco encima */
.hero.contact-hero{
  background:linear-gradient(100deg,rgba(35,35,35,.94),rgba(35,35,35,.72)),url('/assets/img/reunion-presupuesto.webp') center/cover;
  color:#fff;
  border-bottom:0;
}
@media(max-width:800px){.hero.contact-hero{background-position:62% center}}

/* --- pie de página unificado (markup footer.site) ------------------------ */
footer.site{
  position:static;
  z-index:auto;
  background:#151515;
  color:#cfcfcf;
  padding:64px 0 22px;
  border:0;
  margin-top:0;
}
footer.site .pie-marca{display:flex;align-items:center;justify-content:space-between;gap:20px;padding-bottom:28px;border-bottom:1px solid #424242}
footer.site .pie-telefono{font:650 clamp(16px,2vw,23px)/1.3 system-ui;color:white;text-decoration:none}
footer.site .pie-directorio{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(20px,3vw,48px);padding:28px 0}
footer.site summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;color:#fff;font-size:1rem;font-weight:700;cursor:pointer;list-style:none}
footer.site summary::-webkit-details-marker{display:none}
footer.site summary::after{content:"";width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin-right:3px}
footer.site details[open] summary::after{transform:rotate(225deg)}
footer.site ul{list-style:none;padding:0;margin:6px 0 12px}
footer.site li{font-size:14px;line-height:1.55;color:#ccc;overflow-wrap:anywhere}
footer.site a{color:#ddd;text-decoration:none}
footer.site li a,footer.site .legal-row a{display:inline-block;padding:5px 0}
footer.site a:hover,footer.site a:focus-visible{text-decoration:underline;text-underline-offset:4px;color:#fff}
footer.site :focus-visible{outline:2px solid #ffab78;outline-offset:3px}
footer.site .legal-row{display:flex;align-items:baseline;justify-content:space-between;gap:16px;flex-wrap:wrap;padding-top:18px;border-top:1px solid #424242;color:#bbb;font-size:13px;line-height:1.6}
footer.site .legal-row a{color:#ddd}
@media(max-width:900px){footer.site .pie-directorio{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){
 footer.site{padding:32px 0 24px}
 body:has(.cta-sticky){padding-bottom:0}body:has(.cta-sticky) footer.site{padding-bottom:calc(84px + env(safe-area-inset-bottom))}
 footer.site .pie-marca{flex-wrap:wrap;gap:12px;padding-bottom:20px}
 footer.site .pie-directorio{display:block;padding:0}
 footer.site details{border-bottom:1px solid #424242}
 footer.site summary{min-height:56px}
 footer.site li a,footer.site .legal-row a{min-height:44px;align-content:center}
 footer.site .legal-row{display:grid;gap:4px;border:0}
}
@media(prefers-reduced-motion:reduce){html:focus-within,html{scroll-behavior:auto!important}}
/* --- formulario de presupuesto por pasos --------------------------------- */
.lf{max-width:840px;margin-inline:auto}
.presu.lf-form{display:block;padding:32px}
.lf-form>fieldset,
.lf-form>.lf-nav,
.lf-form>.lf-err,
.lf-form>.lf-trust{grid-column:1/-1}
.lf-form fieldset{border:0;margin:0;padding:0;min-width:0}
.lf-prog{margin:10px 0 6px}
.lf-nav{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px;margin-top:22px}
.lf-nav .btn{flex:0 0 auto;min-width:150px;width:auto}
.lf-trust{margin-top:14px;text-align:right}
@media(max-width:560px){
  .presu.lf-form{padding:20px}
  .lf-nav .btn{flex:1 1 100%;min-width:0}
  .lf-trust{text-align:left}
}

/* --- detalles finales ---------------------------------------------------- */
[hidden]{display:none!important}
:where(a,button,summary,input,select,textarea):focus-visible{
  outline:2px solid #98451e;
  outline-offset:2px;
}

/* Acentos de la identidad NOVAVI */
.header .nav a:hover,.main a:hover{border-bottom-color:#c9683d}
.reading blockquote{border-left-color:#c9683d}
:where(a,button,summary,input,select,textarea):focus-visible{outline-color:#98451e}

.header .brand img.nv-firma, footer .brand img.nv-firma {width:clamp(142px,17vw,196px);height:auto;display:block;object-fit:contain}
.header .cta,.hero .actions .cta {background:#98451e;color:#fff}
.header .cta:hover,.hero .actions .cta:hover {background:#793719}
@media(max-width:480px){.header .brand img.nv-firma{width:132px}.header .header-row{gap:8px}}
.nv-proceso{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.nv-proceso figure,.nv-obra figure{margin:0}
.nv-proceso img,.nv-obra img{width:100%;aspect-ratio:4/3;object-fit:cover}
.nv-proceso figcaption,.nv-obra figcaption{padding:12px 0;font-size:.94rem}
.nv-obra{margin:20px 0 28px;border-block:1px solid #ddd;padding:14px 0}
.nv-obra summary{cursor:pointer;font-weight:700}.nv-obra figure{max-width:600px;margin-top:16px}
@media(max-width:640px){.nv-proceso{grid-template-columns:1fr;gap:12px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* Controles compartidos de la web pública */
.header .menu,.header .cta,.nav .cta,.hero .actions .cta,.proof .cta,
a.cta,button.cta,button[type=submit],.btn.btn-primary,.btn.btn-ghost,.btn,
.cta-sticky a,.lf-nav button{border-radius:999px;min-height:44px}
.header .cta,.header .nav a.cta,.hero .actions .cta,
.cta-sticky a{display:inline-flex;align-items:center;justify-content:center}
.header .menu{background:#fff;border:1px solid #d8d8d8;padding-inline:15px}
.header{background:#fff}
@supports (backdrop-filter:blur(12px)){
  .header{background:#fff;backdrop-filter:blur(16px) saturate(115%);box-shadow:0 2px 12px rgba(0,0,0,.035)}
  .header .menu{background:rgba(255,255,255,.68);box-shadow:inset 0 1px 0 rgba(255,255,255,.85)}
  .contact-hero .btn-ghost{background:rgba(20,20,20,.52);color:white;border-color:rgba(255,255,255,.65);backdrop-filter:blur(12px)}
}

.hero-art{position:relative}
.nv-image-note{position:absolute;bottom:12px;left:12px;z-index:1;color:white;background:rgba(0,0,0,.76);border-radius:20px;padding:5px 12px;font:500 12px/1.4 system-ui}
.btn-row,.cta-sticky{gap:8px}
.cta-sticky{background:rgba(255,255,255,.96);border-top:1px solid #ddd;box-shadow:0 -3px 18px rgba(0,0,0,.06)}
.cta-sticky a,.btn-row .btn,.header .menu{min-height:48px;box-sizing:border-box}
.cta-sticky .cs-tel{background:#161616;color:white;border:1px solid #161616}
.cta-sticky .cs-wa{background:white;color:#181818;border:1px solid #bbb}
a:focus-visible,button:focus-visible{outline:3px solid #b64b13;outline-offset:3px}

/* Superficies claras de la marca */
body,.soft,.section-sand{background-color:#fff}

/* Alinear el contenido visible y conservar el encuadre del comparador. */
.hero-grid > *, .grid > * {min-width:0}
.hero-grid .foto, .hero-grid .hero-art {margin-inline:0;width:100%;max-width:none}
.hero-grid .foto img {border-radius:12px}
.hero-grid .actions, .hero .btn-row {align-items:center;gap:12px}
.nv-proceso {max-width:960px;margin-inline:auto;align-items:start}
.nv-proceso img {display:block;aspect-ratio:3/4;height:auto;border-radius:12px}
.nv-comparador {max-width:540px;margin-inline:auto}
.nv-comparador img {display:block;width:100%;height:auto;aspect-ratio:3/4}
@media(max-width:800px){
  .hero .hero-grid {row-gap:24px}
  section.hero.hero-home {padding-block:32px 40px}
  .hero:not(.hero-home) .wrap {padding-block:32px}
  .cta-sticky a {flex:1 1 0;text-align:center}
}
.nv-proceso{max-width:var(--nv-max);grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(12px,2vw,24px);scroll-margin-top:90px}
@media(max-width:640px){.nv-proceso{grid-template-columns:1fr;max-width:400px}}
.nv-caso{width:min(900px,calc(100% - var(--nv-gutter)));margin:auto;padding:clamp(32px,5vw,72px) 0}
.nv-caso .eyebrow{margin-top:28px}
.nv-caso>p,.nv-caso>h2{max-width:68ch;line-height:1.65}
.nv-caso h2{margin:32px 0 8px;line-height:1.2}
.nv-caso .caso-foto{margin:28px 0}
.nv-caso .caso-foto img{width:100%;max-height:520px;object-fit:cover;border-radius:12px}
.nv-caso figcaption{font-size:.9rem;color:#444}
.nv-caso .btn{margin-top:16px}
.obra .in h3 a{text-decoration:underline;text-decoration-color:#bd7958;text-underline-offset:3px}
.header .nv-sub{position:relative}
.header .nv-sub summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:8px;list-style:none}
.header .nv-sub summary::-webkit-details-marker{display:none}
.header .nv-sub summary::after{content:"";width:6px;height:6px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}
.header .nv-sub[open] summary::after{transform:rotate(225deg)}
.header .nv-sub div{position:absolute;top:100%;left:0;min-width:205px;padding:8px;background:white;border:1px solid #ddd;border-radius:12px;box-shadow:0 8px 24px #0001}
.header .nv-sub div a{display:flex;align-items:center;min-height:44px;padding:8px 12px}
@media(max-width:850px){.header .nav.open{max-height:calc(100dvh - 145px);overflow-y:auto}.header .nv-sub div{position:static;box-shadow:none;border:0;border-left:2px solid #ddd;border-radius:0;margin:0 0 8px 4px}.header .nav.open .nv-sub div a{padding-inline:12px}}
.secuencia-local img{aspect-ratio:auto;height:auto}.secuencia-local{margin-block:28px}
.nv-regiones{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-block:24px}
.nv-regiones a{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:clamp(18px,2.2vw,28px);border:1px solid #d9d9d9;border-radius:16px;background:#fff;color:#111;text-decoration:none}
.nv-regiones a:hover,.nv-regiones a:focus-visible{border-color:#98451e}
.nv-regiones strong{font-size:1.1rem}
.nv-regiones span{font-size:.95rem;line-height:1.5;color:#464646}
.header .nav a[aria-current=page]{border-color:#98451e}
.header .nav{gap:clamp(12px,1.6vw,24px)}
@media(max-width:560px){.nv-regiones{grid-template-columns:1fr}.nv-regiones a{gap:4px}}
@media(min-width:851px) and (max-width:1050px){.header .nav{gap:12px}.header .brand img.nv-firma{width:145px}}
.nv-wa,.header a.nv-wa{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 18px;border-radius:999px;background:#126c48;color:#fff;font:650 .94rem/1.25 system-ui;text-decoration:none;white-space:normal;text-align:center}
.nv-wa:hover,.header a.nv-wa:hover{background:#0c5438;color:white}
.header .nav{font:550 .94rem/1.25 system-ui;letter-spacing:0}
.header .nav > a,.header .nv-sub summary{min-height:44px;display:flex;align-items:center}
.header .nv-sub div{max-height:min(65vh,440px);overflow:auto}
.nv-territorios{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
.nv-territorios details{border:1px solid #ddd;border-radius:12px;padding:12px 16px}
.nv-territorios summary{font-weight:650;cursor:pointer;padding:10px 0}
.nv-territorios details a{display:inline-block;padding:10px 0}
footer.site section.pie-contacto{padding:0;margin:0}
footer.site .pie-contacto h2{font:700 1rem/1.4 system-ui;color:#fff;display:flex;align-items:center;min-height:44px;margin:0}
.nv-pasos{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:24px}
.nv-orientativo{font-size:.94rem;max-width:65ch}
@media(max-width:950px){.nv-pasos{grid-template-columns:1fr 1fr}}
@media(max-width:640px){.nv-pasos,.nv-territorios{grid-template-columns:1fr}.header a.nv-wa{padding-inline:11px;font-size:.85rem}footer.site section.pie-contacto{padding:12px 0}.hero .actions>.nv-wa{width:100%}}
@media(min-width:851px) and (max-width:1100px){.header .nav{font-size:.83rem;gap:10px}.header .brand img.nv-firma{width:133px}}
@media(max-width:400px){.header .header-row{gap:6px}.header .brand img.nv-firma{width:clamp(96px,29vw,118px)}.header .menu{padding-inline:10px}.header .brand{min-width:0}.header a.nv-wa{flex-shrink:0}}
