/* ============================================================
   VECINDO — Landing · estilos propios (materializa el prototipo v8)
   NO edita vecindo.css. Usa sus tokens (--muro, --bug, --radio-*, etc.)
   y agrega solo el layout específico de la landing (portada, secciones).
   Branding v1.2 (DF-43): líneas suaves, fondo Muro, tarjetas flotantes.
   ============================================================ */

/* Alias locales legibles sobre los tokens de vecindo.css */
:root {
  --bug: var(--bugambilia);
  --bug-hover: var(--accion-oscura);
  --sub: #31403A;      /* subtítulo, verdín aclarado (v8) */
  --soft: #5C6A62;     /* texto secundario (v8) */
  --ok-bg: #DDEAE2;    /* fondo del kicker verificado (v8) */
}

.w { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* --- Navegación --- */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(248, 249, 245, .92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  padding-top: env(safe-area-inset-top);
}
.nav .w { display: flex; align-items: center; gap: 10px; padding-top: 12px; padding-bottom: 12px; }
.logo { height: 42px; width: auto; display: block; }
.nav-r { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.lnk {
  font-weight: 600; font-size: 15px; text-decoration: none;
  padding: 9px 12px; border-radius: var(--radio-pildora); color: var(--verdin);
}
.lnk:hover { background: var(--cal); }

/* --- Botones (píldora, v1.2) --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
  border-radius: var(--radio-pildora); padding: 14px 24px;
  border: 1.5px solid transparent; transition: background .15s, border-color .15s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-p { background: var(--bug); color: #fff; }
/* El color se re-afirma en hover: vecindo.css tiene un a:hover global que, sobre un
   <a class="btn">, pintaba el texto del mismo tono que el fondo y lo hacía desaparecer. */
.btn-p:hover { background: var(--bug-hover); color: #fff; }
.btn-s { background: transparent; color: var(--verdin); border-color: var(--verdin); }
.btn-s:hover { background: var(--cal); color: var(--verdin); }
.btn-sm { font-size: 15px; padding: 9px 18px; }

/* --- Portada --- */
.portada .w {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.72fr);
  gap: 24px; align-items: center; min-height: 680px;
}
.ilus {
  align-self: stretch; position: relative;
  margin-right: calc(-1 * max(20px, (100vw - 1180px)/2 + 20px)); z-index: 0;
}
.ilus img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: right bottom;
  -webkit-mask-image: linear-gradient(270deg, #000 75%, transparent);
  mask-image: linear-gradient(270deg, #000 75%, transparent);
}
.ilus::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  background: linear-gradient(180deg, rgba(248,249,245,0), var(--muro)); pointer-events: none;
}
.texto { padding: 36px 0 56px; position: relative; z-index: 2; }
.kicker {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--jade);
  background: var(--ok-bg); border-radius: var(--radio-pildora); padding: 6px 14px;
}
.kicker svg { width: 15px; height: 15px; }
h1 {
  font-family: var(--fuente-display); font-weight: 900;
  font-size: clamp(40px, 6.2vw, 74px); line-height: .98;
  letter-spacing: -.035em; margin-top: 16px; color: var(--verdin);
}
h1 span { display: block; color: var(--bug); }  /* segunda frase en Bugambilia (v1.2) */
.sub { margin-top: 18px; font-size: clamp(17px, 1.7vw, 20px); color: var(--sub); max-width: 42ch; }

/* Tarjetas de ejemplo: inclinadas y empalmadas (v8) */
.pile { margin-top: 34px; display: flex; align-items: flex-end; width: calc(100% + 140px); max-width: 820px; }
.card {
  background: var(--blanco); border-radius: var(--radio-tarjeta);
  box-shadow: var(--sombra-flotante); padding: 14px 16px 13px;
  width: 250px; flex: none; position: relative; margin-right: -14px;
}
.card:nth-child(1) { transform: rotate(-3.4deg) translateY(8px); z-index: 2; }
.card:nth-child(2) { transform: rotate(1.6deg) translateY(-14px); z-index: 4; }
.card:nth-child(3) { transform: rotate(3.4deg) translateY(12px); z-index: 3; }
.card:hover { z-index: 10; }
.c-top { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--soft); line-height: 1.2; }
.c-top b { color: var(--verdin); font-weight: 600; }
.av { width: 34px; height: 34px; border-radius: 50%; flex: none; overflow: hidden; }
.vc-ok { width: 17px; height: 17px; flex: none; margin-left: auto; }
.card .card-titulo { font-family: var(--fuente-display); font-weight: 700; font-size: 17px; line-height: 1.2; margin-top: 10px; color: var(--verdin); }
.price { font-family: var(--fuente-display); font-weight: 800; font-size: 19px; margin-top: 6px; }
.price small { font-family: var(--fuente-cuerpo); font-weight: 500; font-size: 13px; color: var(--soft); }
.dist { font-size: 12.5px; color: var(--soft); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--cal); }

/* Movimiento: las tarjetas entran UNA vez al cargar (respeta reduced-motion) */
@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform .18s ease; }
  .card:hover { transform: rotate(0) translateY(-4px) scale(1.02); }
  .pile .card { animation: sube .6s cubic-bezier(.2,.8,.3,1) backwards; }
  .pile .card:nth-child(1) { animation-delay: .15s; }
  .pile .card:nth-child(2) { animation-delay: .3s; }
  .pile .card:nth-child(3) { animation-delay: .45s; }
  @keyframes sube { from { opacity: 0; translate: 0 18px; } }
}
.acciones { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 10px; }

/* --- Responsive portada --- */
@media (max-width: 860px) {
  .portada .w { grid-template-columns: 1fr; min-height: 0; gap: 0; }
  .ilus { height: 240px; margin: 0 -20px; }
  .ilus img {
    object-position: right 70%;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%);
    mask-image: linear-gradient(180deg, transparent, #000 30%);
  }
  .pile { flex-direction: column; align-items: center; width: 100%; margin-top: 26px; }
  .card { width: min(300px, 86vw); margin: 0 0 -10px; }
  .card:nth-child(1) { transform: rotate(-2.2deg); }
  .card:nth-child(2) { transform: rotate(1.8deg); }
  .card:nth-child(3) { transform: rotate(-1.4deg); }
  .acciones { margin-top: 30px; }
  .texto { padding: 20px 0 8px; }
  .logo { height: 35px; }
  .lnk { display: none; }
}

/* --- Secciones generales --- */
.sec { padding: 72px 0; }
h2 {
  font-family: var(--fuente-display); font-weight: 900;
  font-size: clamp(30px, 4vw, 46px); line-height: 1; letter-spacing: -.03em;
  max-width: 18ch; color: var(--verdin);
}
.intro { margin-top: 12px; color: var(--soft); max-width: 52ch; font-size: 17px; }

/* Cómo funciona: tres pasos */
.pasos {
  margin-top: 32px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px; list-style: none; counter-reset: p;
}
.pasos li {
  background: var(--blanco); border-radius: var(--radio-tarjeta); padding: 22px;
  box-shadow: var(--sombra-flotante); counter-increment: p;
}
.pasos li::before {
  content: counter(p); display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%; background: var(--bug); color: #fff;
  font-family: var(--fuente-display); font-weight: 800; font-size: 18px; margin-bottom: 14px;
}
.pasos b { font-family: var(--fuente-display); font-weight: 800; font-size: 19px; display: block; }
.pasos span { display: block; color: var(--soft); margin-top: 4px; }

/* Confianza: fondo Verdín */
.confianza { background: var(--verdin); color: var(--muro); }
.confianza .w { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 48px; }
.confianza h2 { color: var(--muro); }
.confianza .intro { color: #C9D2CC; }
.reglas { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 32px; }
.reglas b { display: block; color: #fff; font-weight: 600; font-size: 17px; margin-bottom: 3px; }
.reglas span { color: #C9D2CC; font-size: 15.5px; }
.reglas li { padding-left: 34px; position: relative; }
.reglas li::before {
  content: ""; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--jade) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}

/* Categorías */
.cats { margin-top: 32px; display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 14px; }
.cat { background: var(--blanco); border-radius: var(--radio-tarjeta); padding: 20px 18px; box-shadow: var(--sombra-flotante); }
.cat-ic { width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: #F3E1EA; color: var(--bug); }
.cat b { font-family: var(--fuente-display); font-weight: 800; font-size: 18px; display: block; margin-top: 14px; line-height: 1.15; }
.cat span { display: block; color: var(--soft); font-size: 14.5px; margin-top: 5px; }

/* Dudas: acordeón */
.dudas .w { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 48px; }
details {
  background: var(--blanco); border-radius: var(--radio-tarjeta); padding: 18px 20px;
  margin-bottom: 10px; box-shadow: 0 1px 2px rgba(28,43,37,.06);
}
summary {
  font-family: var(--fuente-display); font-weight: 800; font-size: 18px; cursor: pointer;
  list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--bug); font-size: 22px; line-height: 1; }
details[open] summary::after { content: "\2013"; }
details p { margin-top: 10px; color: var(--soft); max-width: 60ch; }

/* Buscador */
.buscar {
  background: var(--blanco); border-radius: 24px; box-shadow: var(--sombra-flotante); padding: 40px;
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 40px; align-items: center;
}
.buscar h2 { font-size: clamp(28px, 3.4vw, 40px); }
.buscar .intro { margin-top: 12px; }
.geo { width: 100%; font-size: 18px; padding: 18px 24px; }
.perm { display: block; font-size: 13.5px; color: var(--soft); margin-top: 10px; }
.alt { margin-top: 22px; padding-top: 20px; border-top: 1.5px solid var(--cal); }
.alt label { display: block; font-size: 14px; color: var(--soft); margin-bottom: 8px; }
.fila { display: flex; gap: 10px; flex-wrap: wrap; }
.fila input {
  flex: 1; min-width: 190px; font: inherit; font-size: 16px; padding: 13px 16px;
  border: 1.5px solid var(--junta); border-radius: var(--radio-campo); background: var(--muro); color: var(--verdin);
}
.fila input:focus { outline: none; border-color: var(--bug); box-shadow: 0 0 0 3px rgba(176,37,107,.15); }

/* Pie */
footer { border-top: 1.5px solid var(--cal); }
footer .w { padding-top: 36px; padding-bottom: max(40px, env(safe-area-inset-bottom)); }
.fgrid { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.fgrid img { height: 26px; width: auto; margin-right: auto; }
.fgrid a { color: var(--soft); text-decoration: none; font-size: 14.5px; }
.fgrid a:hover { color: var(--verdin); }
.legal { margin-top: 18px; color: var(--soft); font-size: 13.5px; max-width: 72ch; }

/* Responsive secciones */
@media (max-width: 980px) { .cats { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 860px) {
  .sec { padding: 52px 0; }
  .pasos, .reglas { grid-template-columns: 1fr; }
  .confianza .w, .dudas .w { grid-template-columns: 1fr; gap: 24px; }
  .buscar { grid-template-columns: 1fr; padding: 26px 20px; gap: 22px; }
}

/* --- Banner de cookies (RF-25.7): sutil y discreto (UAT 1-oct) ---
   Ya no es una barra de borde a borde: tarjeta compacta flotante abajo a la
   izquierda, no bloqueante. Guarda y respeta la decisión; único botón "Aceptar"
   (el rechazo/gestión vive en /pages/cookies.html). */
.landing-cookies {
  position: fixed; left: 16px; right: auto; bottom: 16px; z-index: 50;
  max-width: 360px;
  background: var(--blanco); border: 1px solid var(--cal);
  box-shadow: var(--sombra-flotante); padding: 12px 14px;
  border-radius: 12px;
}
.landing-cookies__inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}
.landing-cookies__texto { flex: 1; min-width: 180px; font-size: 12.5px; line-height: 1.35; color: var(--soft); }
.landing-cookies__texto a { color: var(--bug); }

@media (max-width: 440px) {
  .landing-cookies { left: 10px; right: 10px; max-width: none; bottom: 10px; }
}
