/* =========================================================
   VIVIEN CÓRDOBA — Portal de valles
   Sistema de diseño. Concepto: carta topográfica.
   ========================================================= */

/* ---------- 1. TOKENS ---------- */
:root {
  /* Color */
  --papel:      #eef1f4;  /* papel de carta */
  --papel-alto: #f8fafb;  /* superficie elevada */
  --tinta:      #0d1b2a;  /* azul tinta, casi negro */
  --azul:       #1b4965;  /* agua, embalse */
  --azul-claro: #5b8fa8;
  --azul-pale:  #d6e2ea;
  --rojo:       #b3202c;  /* marca de ruta / agrimensor */
  --rojo-alto:  #8e1621;
  --cota:       #93a3b1;  /* curvas de nivel, texto secundario */
  --linea:      rgba(13, 27, 42, 0.12);

  /* Tipografía */
  --display: "Archivo Expanded", "Archivo", system-ui, sans-serif;
  --texto:   "Source Serif 4", Georgia, serif;
  --ui:      "Archivo", system-ui, -apple-system, sans-serif;
  --dato:    "IBM Plex Mono", ui-monospace, monospace;

  /* Escala tipográfica — cuatro tamaños, disciplina */
  --t-xl: clamp(2.4rem, 6.5vw, 5.2rem);
  --t-lg: clamp(1.7rem, 3.4vw, 2.9rem);
  --t-md: clamp(1.15rem, 1.6vw, 1.4rem);
  --t-sm: 1rem;
  --t-xs: 0.78rem;

  /* Ritmo */
  --gap: 1.5rem;
  --bloque: clamp(4rem, 9vw, 7.5rem);
  --ancho: 1240px;
  --radio: 4px;
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--texto);
  font-size: 1.06rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--t-xl); text-transform: uppercase; letter-spacing: -0.02em; }
h2 { font-size: var(--t-lg); text-transform: uppercase; }
h3 { font-size: var(--t-md); }
p  { margin: 0 0 1rem; text-wrap: pretty; }

:focus-visible {
  outline: 3px solid var(--rojo);
  outline-offset: 3px;
}

.saltar {
  position: absolute;
  left: -9999px;
  background: var(--tinta);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 999;
}
.saltar:focus { left: 1rem; top: 1rem; }

/* ---------- 3. UTILIDADES ---------- */
.contenedor {
  width: min(100% - 2.5rem, var(--ancho));
  margin-inline: auto;
}
.bloque { padding-block: var(--bloque); }

/* Etiqueta de mapa: coordenada, cota, categoría */
.rotulo {
  font-family: var(--dato);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--rojo);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.rotulo::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--rojo);
  flex: none;
}

.entrada {
  font-size: var(--t-md);
  max-width: 62ch;
  color: color-mix(in srgb, var(--tinta) 78%, transparent);
}

.encabezado-bloque {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--gap);
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--linea);
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--ui);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radio);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--rojo { background: var(--rojo); color: #fff; }
.btn--rojo:hover { background: var(--rojo-alto); }
.btn--linea { border-color: currentColor; }
.btn--linea:hover { background: var(--tinta); color: var(--papel); border-color: var(--tinta); }
.btn--claro { border-color: rgba(255,255,255,0.6); color: #fff; }
.btn--claro:hover { background: #fff; color: var(--tinta); }

/* Trama de curvas de nivel, reutilizable */
.curvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* ---------- 4. CABECERA ---------- */
.cabecera {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  padding: 0.9rem clamp(1.25rem, 3vw, 2.5rem);
  background: color-mix(in srgb, var(--papel) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--linea);
  transition: padding 0.25s ease, box-shadow 0.25s ease;
}
.cabecera.compacta {
  padding-block: 0.55rem;
  box-shadow: 0 12px 30px -26px rgba(13, 27, 42, 0.9);
}

.marca {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.marca__sello {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--tinta);
  color: var(--papel);
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px var(--rojo);
}
.marca__nombre {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.02rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.1;
}
.marca__lema {
  display: block;
  font-family: var(--dato);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--rojo);
}

.menu {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  font-family: var(--ui);
  font-size: 0.9rem;
  font-weight: 500;
}
.menu a { text-decoration: none; position: relative; padding-block: 0.3rem; }
.menu a:not(.menu__cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--rojo);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.menu a:not(.menu__cta):hover::after,
.menu a.activo::after { transform: scaleX(1); transform-origin: left; }
.menu__cta {
  background: var(--rojo);
  color: #fff;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radio);
}
.menu__cta:hover { background: var(--rojo-alto); }

.menu-btn {
  display: none;
  width: 44px; height: 44px;
  background: none;
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  cursor: pointer;
  padding: 0;
}
.menu-btn span {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--tinta);
  margin: 4px auto;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(5.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child  { transform: translateY(-5.5px) rotate(-45deg); }

/* ---------- 5. PORTADA / HERO ---------- */
.hero {
  position: relative;
  min-height: min(86vh, 780px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--tinta);
  color: #fff;
}
.hero__foto {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  will-change: transform;
}
.hero__velo {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(13,27,42,0.72) 0%, rgba(13,27,42,0.22) 42%, rgba(13,27,42,0.94) 100%);
}
.hero__contenido {
  position: relative;
  width: min(100% - 2.5rem, var(--ancho));
  margin-inline: auto;
  padding-block: 4rem 2.5rem;
}
.hero .rotulo { color: #ff9aa3; }
.hero h1 { max-width: 16ch; }
.hero__bajada {
  max-width: 46ch;
  margin-top: 1.4rem;
  font-size: var(--t-md);
  color: rgba(255, 255, 255, 0.86);
}
.hero__acciones { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

/* Perfil de altitud: la firma del portal */
.perfil {
  position: relative;
  background: var(--tinta);
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.perfil__grafico { display: block; width: 100%; height: 88px; }
.perfil__lista {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.perfil__punto {
  padding: 1.1rem 1.25rem;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--dato);
  font-size: var(--t-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  display: block;
  transition: background 0.25s ease, color 0.25s ease;
}
.perfil__punto:last-child { border-right: 0; }
.perfil__punto:hover { background: rgba(255,255,255,0.06); color: #fff; }
.perfil__punto strong {
  display: block;
  font-family: var(--ui);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
  margin-bottom: 0.15rem;
}
.perfil__punto em {
  color: var(--azul-claro);
  font-style: normal;
}

/* ---------- 6. LOS VALLES ---------- */
.valles { background: var(--papel-alto); }
.valles__grilla {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 1px;
  background: var(--linea);
  border: 1px solid var(--linea);
}
.valle {
  background: var(--papel-alto);
  padding: 1.9rem 1.6rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: background 0.3s ease;
}
.valle:hover { background: var(--azul-pale); }
.valle__cota {
  font-family: var(--dato);
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cota);
}
.valle h3 { font-size: 1.35rem; text-transform: uppercase; }
.valle p { font-size: 0.96rem; color: color-mix(in srgb, var(--tinta) 70%, transparent); margin: 0; }

.valle--foco {
  grid-row: span 2;
  background: var(--tinta);
  color: #fff;
  position: relative;
  overflow: hidden;
  justify-content: flex-end;
  min-height: 340px;
}
.valle--foco:hover { background: var(--tinta); }
.valle--foco img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}
.valle--foco:hover img { transform: scale(1.06); opacity: 0.55; }
.valle--foco > * { position: relative; }
.valle--foco .valle__cota { color: #ff9aa3; }
.valle--foco h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.valle--foco p { color: rgba(255,255,255,0.82); max-width: 42ch; }
.valle--foco .valle__marca {
  position: absolute;
  top: 1.4rem; left: 1.6rem;
  font-family: var(--dato);
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--rojo);
  padding: 0.3rem 0.7rem;
  border-radius: 2px;
}

/* ---------- 7. PROPIEDADES ---------- */
.fichas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.75rem;
}
.ficha {
  background: var(--papel-alto);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.ficha:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 48px -30px rgba(13, 27, 42, 0.65);
  border-color: var(--azul-claro);
}
.ficha__foto { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--azul-pale); }
.ficha__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.ficha:hover .ficha__foto img { transform: scale(1.06); }
.ficha__zona {
  position: absolute;
  left: 0; bottom: 0;
  background: var(--tinta);
  color: #fff;
  font-family: var(--dato);
  font-size: var(--t-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem;
}
.ficha__cuerpo { padding: 1.35rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
.ficha__tipo {
  font-family: var(--dato);
  font-size: var(--t-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cota);
}
.ficha h3 { font-size: 1.2rem; }
.ficha__precio {
  font-family: var(--dato);
  font-size: 1.28rem;
  font-weight: 500;
  color: var(--rojo);
  letter-spacing: -0.01em;
}
.ficha__datos {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--linea);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  font-family: var(--dato);
  font-size: var(--t-xs);
  letter-spacing: 0.06em;
  color: var(--cota);
  text-transform: uppercase;
}
.ficha__datos b { color: var(--tinta); font-weight: 500; }

/* Filtros */
.filtros { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filtro {
  font-family: var(--ui);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--linea);
  background: transparent;
  color: var(--tinta);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filtro:hover { border-color: var(--rojo); color: var(--rojo); }
.filtro.activo { background: var(--tinta); border-color: var(--tinta); color: var(--papel); }
.ficha[hidden] { display: none; }
.ficha.animando { animation: aparecer 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes aparecer {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 8. VIVIR ACÁ ---------- */
.vivir {
  background: var(--tinta);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.vivir .rotulo { color: #ff9aa3; }
.vivir__intro { max-width: 54ch; color: rgba(255,255,255,0.82); font-size: var(--t-md); }
.vivir__grilla {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  margin-top: 3rem;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.14);
}
.vivir__item {
  background: var(--tinta);
  padding: 1.8rem 1.5rem;
  display: block;
  text-decoration: none;
  transition: background 0.3s ease;
}
.vivir__item:hover { background: #12263a; }
.vivir__item span {
  font-family: var(--dato);
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--azul-claro);
}
.vivir__item h3 { margin: 0.55rem 0 0.5rem; color: #fff; }
.vivir__item p { color: rgba(255,255,255,0.7); font-size: 0.95rem; margin: 0; }

/* ---------- 9. EL FARO / DESTACADO ---------- */
.destacado {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0;
  border: 1px solid var(--linea);
  background: var(--papel-alto);
  overflow: hidden;
}
.destacado__foto { position: relative; min-height: 380px; }
.destacado__foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.destacado__cuerpo { padding: clamp(1.75rem, 4vw, 3.25rem); }
.destacado__lista { list-style: none; margin: 1.75rem 0 2rem; padding: 0; display: grid; gap: 1px; background: var(--linea); border-block: 1px solid var(--linea); }
.destacado__lista li { background: var(--papel-alto); padding: 1rem 0 1rem 0; display: flex; gap: 1rem; align-items: baseline; }
.destacado__lista b {
  font-family: var(--dato);
  font-size: var(--t-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rojo);
  min-width: 96px;
  flex: none;
}
.destacado__lista span { font-size: 0.98rem; color: color-mix(in srgb, var(--tinta) 76%, transparent); }

/* ---------- 10. CONTACTO ---------- */
.contacto {
  background: var(--azul);
  color: #fff;
}
.contacto__caja {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contacto .rotulo { color: #ffc2c7; }
.contacto p { color: rgba(255,255,255,0.85); }
.contacto__vias { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1.5rem; font-family: var(--dato); font-size: 0.92rem; }
.contacto__vias a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.4); width: fit-content; padding-bottom: 2px; }
.contacto__vias a:hover { border-color: #fff; }

.formulario { display: grid; gap: 1rem; }
.formulario label { display: grid; gap: 0.4rem; font-family: var(--ui); font-size: 0.82rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(255,255,255,0.8); }
.formulario input, .formulario select, .formulario textarea {
  font-family: var(--texto);
  font-size: 1rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radio);
  background: rgba(255,255,255,0.96);
  color: var(--tinta);
  width: 100%;
}
.formulario textarea { resize: vertical; }
.formulario .btn { justify-content: center; }
.formulario__nota { font-family: var(--ui); font-size: 0.85rem; min-height: 1.2em; margin: 0; color: #ffd9dc; }

/* ---------- 11. PIE ---------- */
.pie {
  background: var(--tinta);
  color: rgba(255,255,255,0.62);
  font-family: var(--ui);
  font-size: 0.88rem;
}
.pie__caja {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  justify-content: space-between;
  align-items: center;
  padding-block: 2.5rem;
}
.pie a { color: #fff; text-decoration: none; }
.pie a:hover { color: #ff9aa3; }

/* ---------- 12. WHATSAPP ---------- */
.wsp {
  position: fixed;
  right: 1.25rem; bottom: 1.25rem;
  z-index: 95;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: #1fa855;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 16px 34px -16px rgba(31, 168, 85, 0.95);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.wsp:hover { transform: scale(1.08) rotate(-5deg); }

/* ---------- 13. FICHA INDIVIDUAL ---------- */
.prop-hero { position: relative; background: var(--tinta); }
.prop-hero img { width: 100%; height: clamp(300px, 52vh, 560px); object-fit: cover; opacity: 0.92; }
.prop-cuerpo { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.prop-precio {
  font-family: var(--dato);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  color: var(--rojo);
  letter-spacing: -0.02em;
  margin: 0.5rem 0 1.5rem;
}
.prop-tabla { width: 100%; border-collapse: collapse; margin: 1.5rem 0 2rem; }
.prop-tabla th, .prop-tabla td { text-align: left; padding: 0.85rem 0; border-bottom: 1px solid var(--linea); }
.prop-tabla th {
  font-family: var(--dato);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cota);
  width: 45%;
}
.prop-tabla td { font-family: var(--ui); font-weight: 500; }
.prop-aside {
  position: sticky;
  top: 96px;
  background: var(--papel-alto);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  padding: 1.75rem;
}
.prop-aside .btn { width: 100%; justify-content: center; margin-bottom: 0.7rem; }
.migas {
  font-family: var(--dato);
  font-size: var(--t-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cota);
  padding-block: 1.5rem 0;
}
.migas a { color: var(--cota); text-decoration: none; }
.migas a:hover { color: var(--rojo); }

/* ---------- 14. MOVIMIENTO ---------- */
[data-revelar] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--demora, 0ms);
}
[data-revelar].visible { opacity: 1; transform: none; }

/* ---------- 15. RESPONSIVE ---------- */
@media (max-width: 980px) {
  .valles__grilla { grid-template-columns: 1fr 1fr; }
  .valle--foco { grid-column: span 2; grid-row: auto; }
  .destacado { grid-template-columns: 1fr; }
  .destacado__foto { min-height: 260px; }
  .contacto__caja { grid-template-columns: 1fr; }
  .prop-cuerpo { grid-template-columns: 1fr; }
  .prop-aside { position: static; }
}

@media (max-width: 760px) {
  .menu-btn { display: block; }
  .menu {
    position: fixed;
    inset: 64px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--papel);
    border-bottom: 1px solid var(--linea);
    padding: 0.5rem 1.25rem 1.5rem;
    transform: translateY(-120%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 24px 40px -30px rgba(13,27,42,0.9);
  }
  .menu.abierto { transform: translateY(0); }
  .menu a { padding: 0.9rem 0; border-bottom: 1px solid var(--linea); }
  .menu__cta { text-align: center; margin-top: 1rem; border-bottom: 0; }
  .valles__grilla { grid-template-columns: 1fr; }
  .valle--foco { grid-column: auto; }
  .perfil__grafico { height: 64px; }
  .hero { min-height: 78vh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-revelar] { opacity: 1 !important; transform: none !important; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}


/* =========================================================
   16. GALERÍA DE PROPIEDAD + LIGHTBOX
   ========================================================= */
.galeria { background: var(--tinta); }
.galeria__principal {
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  overflow: hidden;
}
.galeria__principal img {
  width: 100%;
  height: clamp(280px, 54vh, 580px);
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.galeria__principal:hover img { transform: scale(1.03); }
.galeria__lupa {
  position: absolute;
  right: 1rem; bottom: 1rem;
  font-family: var(--dato);
  font-size: var(--t-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(13, 27, 42, 0.78);
  padding: 0.5rem 0.9rem;
  border-radius: 2px;
}
.galeria__tira {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(120px, 1fr);
  gap: 2px;
  background: var(--tinta);
  overflow-x: auto;
}
.galeria__mini {
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.galeria__mini img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition: opacity 0.3s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.galeria__mini:hover img { opacity: 1; transform: scale(1.05); }

.visor {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: center;
  background: rgba(8, 17, 27, 0.94);
  padding: clamp(1rem, 4vw, 3rem);
}
.visor[open], .visor.abierto { display: grid; }
.visor img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 2px;
}
.visor__cerrar, .visor__nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease;
}
.visor__cerrar:hover, .visor__nav:hover { background: rgba(255, 255, 255, 0.24); }
.visor__cerrar { top: 1.25rem; right: 1.25rem; }
.visor__nav--ant { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.visor__nav--sig { right: 1.25rem; top: 50%; transform: translateY(-50%); }
.visor__cuenta {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--dato);
  font-size: var(--t-xs);
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.75);
}

@media (max-width: 760px) {
  .galeria__tira { grid-auto-columns: minmax(96px, 1fr); }
  .visor__nav { width: 42px; height: 42px; }
}

/* =========================================================
   17. CAPA DE MOVIMIENTO
   Regla: cada efecto tiene que ser pequeño. Si se nota
   demasiado, molesta a la tercera visita.
   ========================================================= */

/* ---------- Barra de progreso de lectura ---------- */
.progreso {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--rojo), var(--azul-claro));
  z-index: 100;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ---------- Rótulos rojos: la rayita respira ---------- */
.rotulo::before {
  transform-origin: left center;
  animation: respirar 4.5s ease-in-out infinite;
}
@keyframes respirar {
  0%, 100% { transform: scaleX(1);   opacity: 0.85; }
  50%      { transform: scaleX(1.6); opacity: 1; }
}
/* Al entrar en pantalla la rayita se dibuja */
[data-revelar] .rotulo::before,
.rotulo[data-revelar]::before { animation-delay: 0.5s; }

/* ---------- Título del hero: entra palabra por palabra ---------- */
.palabra {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.38em) rotate(1.5deg);
  animation: subirPalabra 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--orden, 0ms);
}
@keyframes subirPalabra {
  to { opacity: 1; transform: none; }
}

/* ---------- Botones ---------- */
.btn {
  --brillo: -140%;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.32) 50%, transparent 65%);
  transform: translateX(var(--brillo));
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn:hover::before { --brillo: 140%; }
.btn:active { transform: scale(0.97) !important; }

/* La flecha del botón principal se adelanta */
.btn--rojo::after {
  content: "→";
  display: inline-block;
  margin-left: 0.1rem;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn--rojo:hover::after { transform: translateX(4px); }
.formulario .btn--rojo::after { content: none; }

/* Latido muy leve en el CTA del menú */
.menu__cta { animation: latidoCta 5.5s ease-in-out infinite; }
@keyframes latidoCta {
  0%, 92%, 100% { box-shadow: 0 0 0 0 rgba(179, 32, 44, 0); }
  96%           { box-shadow: 0 0 0 7px rgba(179, 32, 44, 0.16); }
}

/* ---------- Filtros ---------- */
.filtro { position: relative; overflow: hidden; }
.filtro::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--tinta);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: -1;
}
.filtro:hover::before { transform: scaleY(1); }
.filtro:hover { color: #fff; border-color: var(--tinta); }

/* ---------- Fichas: destello al pasar ---------- */
.ficha__foto::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.22) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.ficha:hover .ficha__foto::after { transform: translateX(120%); }
.ficha__precio { transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1); transform-origin: left; }
.ficha:hover .ficha__precio { transform: scale(1.045); }
.ficha__zona { transition: background 0.3s ease, padding 0.3s ease; }
.ficha:hover .ficha__zona { background: var(--rojo); padding-right: 1.15rem; }

/* ---------- Tarjetas de valle: barra roja que crece ---------- */
.valle { position: relative; }
.valle::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--rojo);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.valle:hover::before { transform: scaleY(1); }
.valle--foco::before { width: 4px; }

/* ---------- Ítems de "Vivir acá" ---------- */
.vivir__item { position: relative; }
.vivir__item::after {
  content: "→";
  position: absolute;
  right: 1.5rem; top: 1.8rem;
  color: var(--rojo);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.vivir__item:hover::after { opacity: 1; transform: none; }

/* ---------- Perfil topográfico: se dibuja y late ---------- */
.perfil__grafico path { transition: stroke-dashoffset 1.8s cubic-bezier(0.4, 0, 0.2, 1); }
.perfil__grafico circle {
  transform-box: fill-box;
  transform-origin: center;
  animation: marcaLate 2.8s ease-in-out infinite;
}
@keyframes marcaLate {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.5); opacity: 0.65; }
}
.perfil__punto { position: relative; }
.perfil__punto::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--rojo);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.perfil__punto:hover::after { transform: scaleX(1); }

/* ---------- WhatsApp: la ondita verde ---------- */
.wsp { position: fixed; }
.wsp::before, .wsp::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #1fa855;
  z-index: -1;
  animation: ondaWsp 2.4s cubic-bezier(0.2, 0.6, 0.4, 1) infinite;
}
.wsp::after { animation-delay: 1.2s; }
@keyframes ondaWsp {
  0%   { transform: scale(1);    opacity: 0.55; }
  70%  { transform: scale(1.85); opacity: 0; }
  100% { transform: scale(1.85); opacity: 0; }
}
.wsp svg { transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.wsp:hover svg { transform: rotate(-8deg) scale(1.06); }

/* ---------- Marca del encabezado ---------- */
.marca__sello { transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease; }
.marca:hover .marca__sello { transform: rotate(-6deg); box-shadow: inset 0 0 0 2px var(--rojo); }

/* ---------- Formulario ---------- */
.formulario label { transition: color 0.25s ease; }
.formulario label:focus-within { color: #fff; }

/* ---------- Galería ---------- */
.galeria__mini { position: relative; }
.galeria__mini::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--rojo);
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.galeria__mini:hover::after { transform: scaleX(1); }

/* ---------- Nada de esto si el visitante pidió menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  .rotulo::before, .wsp::before, .wsp::after,
  .perfil__grafico circle, .menu__cta { animation: none !important; }
  .palabra { opacity: 1 !important; transform: none !important; animation: none !important; }
  .progreso { display: none; }
}
