/* Constructora Los Encinos — sitio web (maqueta)
   Colores: Guía de colores V1.0 (Biblioteca Diseño). Público 40–80 años: letra grande, botones grandes, alto contraste. */

@import url("https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&display=swap");

:root {
  color-scheme: light dark;

  /* Marca */
  --verde: #2d6b2d;          /* Verde Encinos: botones, títulos */
  --verde-oscuro: #1f4f22;   /* hover, fondos de portada */
  --verde-suave: #9cc49e;    /* decorativo, nunca texto */
  --verde-seleccion: #eef4ee;

  /* Neutros */
  --texto: #1c2a1d;
  --texto-sec: #5b665c;
  --borde: #d6dde0;
  --fondo: #f5f6f4;
  --superficie: #ffffff;

  /* Apoyo */
  --aviso: #8a5300;
  --aviso-fondo: #fdf1dc;
  --alerta: #b23a2e;
  --alerta-fondo: #fbeae8;
  --ok-fondo: #e5f0e5;

  --enlace: var(--verde);
  --boton: var(--verde);
  --boton-hover: var(--verde-oscuro);

  --radio: 12px;
  --sombra: 0 1px 2px rgb(28 42 29 / 6%), 0 4px 16px rgb(28 42 29 / 6%);
  --ancho: 1120px;
  --barra-movil: 76px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --texto: #e8efe8;
    --texto-sec: #b3bfb4;
    --borde: #34433a;
    --fondo: #111812;
    --superficie: #1a241b;
    --verde-seleccion: #22331f;
    --enlace: #9cc49e;
    --aviso: #f2c27a;
    --aviso-fondo: #3a2a0e;
    --alerta: #f0a097;
    --alerta-fondo: #3d1c18;
    --ok-fondo: #1f3320;
    --sombra: none;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 100%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  font-size: 1.1875rem;          /* 19 px */
  line-height: 1.6;
  color: var(--texto);
  background: var(--fondo);
  padding-bottom: var(--barra-movil);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--enlace); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--texto); }
h1 { font-size: clamp(2rem, 6vw, 3rem); }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.1rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--verde-suave); outline-offset: 3px; border-radius: 4px; }

.contenedor { width: min(100% - 2.5rem, var(--ancho)); margin-inline: auto; }

.saltar {
  position: absolute; left: -999px; top: 0;
  background: var(--superficie); padding: .75rem 1rem; z-index: 50;
}
.saltar:focus { left: 1rem; }

/* ---------- Aviso de maqueta y pendientes ---------- */
.aviso-maqueta {
  background: var(--aviso-fondo); color: var(--aviso);
  font-size: 1rem; text-align: center; padding: .5rem 1rem;
}
mark.pendiente {
  background: var(--aviso-fondo); color: var(--aviso);
  padding: 0 .3em; border-radius: 4px; border: 1px dashed currentColor;
}

/* ---------- Encabezado ---------- */
.encabezado {
  background: var(--superficie);
  border-bottom: 1px solid var(--borde);
  position: sticky; top: 0; z-index: 20;
}
.encabezado .contenedor {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 76px;
}
.marca { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--texto); }
.marca-logo {
  width: 64px; height: 54px; background: #fff; border-radius: 8px; padding: 2px;
}
.marca-texto { font-weight: 700; line-height: 1.15; font-size: 1.05rem; }
.marca-texto small { display: block; font-weight: 400; color: var(--texto-sec); font-size: .9rem; }

.boton-menu {
  font: inherit; font-size: 1.05rem; font-weight: 700;
  min-height: 52px; padding: 0 1.1rem;
  border: 2px solid var(--verde); border-radius: var(--radio);
  background: transparent; color: var(--enlace);
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
}
.boton-menu svg { width: 24px; height: 24px; }

.navegacion ul { list-style: none; margin: 0; padding: 0; }
.navegacion a {
  display: block; text-decoration: none; color: var(--texto); font-weight: 700;
  padding: .9rem 1rem; border-radius: var(--radio);
}
.navegacion a:hover { background: var(--verde-seleccion); }
.navegacion a[aria-current="page"] { background: var(--verde-seleccion); color: var(--enlace); }

/* Menú en celular: panel debajo del encabezado */
@media (max-width: 899px) {
  .navegacion {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--superficie); border-bottom: 1px solid var(--borde);
    padding: .5rem 1.25rem 1rem; display: none;
  }
  .navegacion.abierta { display: block; }
  .navegacion a { font-size: 1.25rem; padding: 1rem; }
  .solo-escritorio { display: none !important; }
}
@media (min-width: 900px) {
  .boton-menu { display: none; }
  .navegacion ul { display: flex; gap: .25rem; }
  .navegacion a { padding: .6rem .9rem; }
}

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 56px; padding: .8rem 1.5rem;
  font: inherit; font-weight: 700; font-size: 1.15rem; text-decoration: none;
  border-radius: var(--radio); border: 2px solid var(--boton);
  background: var(--boton); color: #fff; cursor: pointer;
}
.boton:hover { background: var(--boton-hover); border-color: var(--boton-hover); }
.boton svg { width: 26px; height: 26px; flex: none; }
.boton-secundario { background: transparent; color: var(--enlace); border-color: currentColor; }
.boton-secundario:hover { background: var(--verde-seleccion); color: var(--enlace); border-color: currentColor; }
.botones { display: flex; flex-wrap: wrap; gap: .9rem; }

/* ---------- Secciones ---------- */
.seccion { padding: 3rem 0; }
.seccion-blanca { background: var(--superficie); }
.seccion-titulo { max-width: 46rem; margin-bottom: 2rem; }
.seccion-titulo p { color: var(--texto-sec); font-size: 1.2rem; }
.mas { margin-top: 1.5rem; }

/* Portada */
.portada { background: var(--superficie); }
.portada .contenedor { display: grid; gap: 2rem; padding: 2.5rem 0 3rem; align-items: center; }
.portada-texto p { font-size: 1.3rem; color: var(--texto-sec); max-width: 34rem; }
.portada-zonas { font-size: 1.1rem !important; color: var(--texto) !important; font-weight: 700; }
.portada-foto { position: relative; }
.portada-foto img { border-radius: var(--radio); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
@media (min-width: 900px) {
  .portada .contenedor { grid-template-columns: 1.05fr 1fr; padding: 4rem 0; }
}

/* Etiquetas Antes / Después (texto + color, nunca solo color) */
.etiqueta {
  position: absolute; left: .75rem; top: .75rem;
  font-size: 1rem; font-weight: 700; padding: .25rem .75rem; border-radius: 999px;
  background: #fff; color: #1c2a1d; box-shadow: 0 1px 4px rgb(0 0 0 / 25%);
}
.etiqueta-despues { background: var(--verde); color: #fff; }
.etiqueta-durante { background: #fdf1dc; color: #8a5300; }

/* Tarjetas de tipos de trabajo */
.tipos { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .tipos { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tipos { grid-template-columns: repeat(4, 1fr); } }
.tipo-tarjeta {
  display: flex; flex-direction: column; text-decoration: none; color: var(--texto);
  background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio);
  overflow: hidden; box-shadow: var(--sombra);
}
.tipo-tarjeta img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.tipo-tarjeta div { padding: 1rem 1.1rem 1.25rem; }
.tipo-tarjeta h3 { margin-bottom: .3rem; }
.tipo-tarjeta p { margin: 0; color: var(--texto-sec); font-size: 1.05rem; }
.tipo-tarjeta .ver { display: inline-block; margin-top: .6rem; color: var(--enlace); font-weight: 700; }
.tipo-tarjeta:hover { border-color: var(--verde); }
.tipo-tarjeta:hover .ver { text-decoration: underline; }

/* Comparación antes / después */
.comparacion { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .comparacion { grid-template-columns: repeat(var(--columnas, 2), 1fr); } }
.comparacion figure { margin: 0; position: relative; }
.comparacion img { border-radius: var(--radio); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; background: var(--borde); }

/* Catálogo */
/* Que el encabezado fijo no tape lo que se muestra al saltar con # */
[id], .filtros { scroll-margin-top: 100px; }

.filtros { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.filtro {
  font: inherit; font-size: 1.05rem; font-weight: 700; cursor: pointer;
  min-height: 52px; padding: .5rem 1.1rem; border-radius: 999px;
  border: 2px solid var(--borde); background: var(--superficie); color: var(--texto);
}
.filtro:hover { border-color: var(--verde); }
.filtro[aria-pressed="true"] { background: var(--verde); border-color: var(--verde); color: #fff; }

.tipo-bloque { padding: 2rem 0; border-top: 1px solid var(--borde); }
.tipo-bloque:first-of-type { border-top: 0; padding-top: 0; }
.tipo-bloque > p { max-width: 44rem; color: var(--texto-sec); }
.casa { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1rem; margin-top: 1.25rem; box-shadow: var(--sombra); }
.casa-dato { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-weight: 700; margin: 0 0 .9rem; }
.casa-dato span { display: inline-flex; align-items: center; gap: .4rem; }
.casa-dato svg { width: 22px; height: 22px; color: var(--enlace); }
.casa-nota { color: var(--texto-sec); font-size: 1rem; margin: .9rem 0 0; }

/* Pasos */
.pasos { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; counter-reset: paso; }
@media (min-width: 900px) { .pasos-horizontal { grid-template-columns: repeat(5, 1fr); } }
.pasos li {
  counter-increment: paso; position: relative;
  background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio);
  padding: 1rem 1.1rem 1.1rem 4.6rem; min-height: 5rem;
}
.pasos li::before {
  content: counter(paso); position: absolute; left: 1rem; top: 1rem;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--verde); color: #fff; font-weight: 700; font-size: 1.3rem;
  display: grid; place-items: center;
}
.pasos strong { display: block; font-size: 1.2rem; }
.pasos span { color: var(--texto-sec); font-size: 1.05rem; }
@media (min-width: 900px) {
  .pasos-horizontal li { padding: 4.2rem 1rem 1.1rem; }
}

/* Listas con casillas */
.lista-check { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .6rem; }
.lista-check li { display: flex; gap: .75rem; align-items: flex-start; }
.lista-check li::before {
  content: ""; flex: none; width: 1.6rem; height: 1.6rem; margin-top: .1rem;
  border: 2px solid var(--verde); border-radius: 6px;
}
.lista-ok li::before {
  background: var(--verde) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 80% no-repeat;
}

.dos-columnas { display: grid; gap: 2rem; }
@media (min-width: 900px) { .dos-columnas { grid-template-columns: 1fr 1fr; align-items: start; } }

.caja { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1.5rem; box-shadow: var(--sombra); }
.nota-fuente { font-size: 1rem; color: var(--texto-sec); }

/* Preguntas frecuentes */
.preguntas details {
  background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio);
  margin-bottom: .75rem;
}
.preguntas summary {
  cursor: pointer; list-style: none; font-weight: 700; font-size: 1.2rem;
  padding: 1.1rem 3.5rem 1.1rem 1.25rem; position: relative; min-height: 56px;
}
.preguntas summary::-webkit-details-marker { display: none; }
.preguntas summary::after {
  content: "+"; position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%);
  font-size: 1.8rem; color: var(--enlace); line-height: 1;
}
.preguntas details[open] summary::after { content: "−"; }
.preguntas details > div { padding: 0 1.25rem 1.1rem; }

/* Formulario */
.formulario { display: grid; gap: 1.1rem; }
.campo label { display: block; font-weight: 700; margin-bottom: .35rem; }
.campo .ayuda { display: block; font-weight: 400; color: var(--texto-sec); font-size: 1rem; }
.campo input, .campo select, .campo textarea {
  width: 100%; font: inherit; font-size: 1.15rem; color: var(--texto);
  background: var(--superficie); min-height: 56px; padding: .7rem .9rem;
  border: 2px solid #6f7b70; border-radius: 10px;   /* 3:1 contra el fondo */
}
.campo textarea { min-height: 120px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--verde); outline: 3px solid var(--verde-suave); outline-offset: 1px; }
.campo [aria-invalid="true"] { border-color: var(--alerta); }
.error { display: none; color: var(--alerta); font-weight: 700; margin-top: .35rem; font-size: 1rem; }
.error.visible { display: flex; gap: .4rem; align-items: center; }
.oculto-trampa { position: absolute; left: -5000px; }
.privacidad { font-size: 1rem; color: var(--texto-sec); margin: 0; }
.mensaje-ok {
  background: var(--ok-fondo); border: 2px solid var(--verde); border-radius: var(--radio);
  padding: 1.25rem; font-size: 1.15rem;
}
.mensaje-ok strong { display: block; font-size: 1.3rem; color: var(--enlace); margin-bottom: .3rem; }
.mensaje-error {
  background: var(--alerta-fondo); color: var(--alerta); border-radius: var(--radio);
  padding: 1rem 1.25rem; font-weight: 700;
}
.error-envio:not([hidden]) { display: flex; gap: .5rem; align-items: flex-start; }
.error-envio svg { flex: none; margin-top: .2rem; }
.error-envio a { color: inherit; }

/* Datos de contacto */
.contacto-lista { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 1rem; }
.contacto-lista li { display: flex; gap: .9rem; align-items: flex-start; }
.contacto-lista svg { width: 28px; height: 28px; flex: none; color: var(--enlace); margin-top: .15rem; }
.contacto-lista strong { display: block; }

/* Franja de llamada a la acción */
.franja { background: var(--verde-oscuro); color: #fff; }
.franja h2, .franja p { color: #fff; }
.franja .boton { background: #fff; color: var(--verde-oscuro); border-color: #fff; }
.franja .boton:hover { background: var(--verde-seleccion); }
.franja .boton-secundario { background: transparent; color: #fff; }
.franja .boton-secundario:hover { background: rgb(255 255 255 / 12%); color: #fff; }

/* Pie */
.pie { background: var(--superficie); border-top: 1px solid var(--borde); padding: 2.5rem 0; font-size: 1.05rem; }
.pie .contenedor { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .pie .contenedor { grid-template-columns: 2fr 1fr 1fr; } }
.pie h2 { font-size: 1.15rem; }
.pie ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.pie p { color: var(--texto-sec); }

/* Barra fija en celular: Llamar / WhatsApp */
.barra-contacto {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr 1fr; gap: .6rem;
  padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom));
  background: var(--superficie); border-top: 1px solid var(--borde);
  box-shadow: 0 -4px 16px rgb(0 0 0 / 8%);
}
.barra-contacto .boton { min-height: 56px; padding: .5rem; font-size: 1.15rem; }
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .barra-contacto { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
