/* =========================================================
   TERRENOS EN VENTA PY — Landing Page
   Identidad: tierra oscura + dorado. Poppins en toda la tipografía,
   JetBrains Mono solo en microetiquetas (duraciones, contador, eyebrow).
   ========================================================= */

:root {
  --ink-950: #180f07;
  --bark-900: #241609;
  --bark-800: #33210f;
  --bark-700: #4a3220;
  --bark-500: #6e4a2c;

  --gold-500: #c99a56;
  --gold-400: #d8b273;
  --gold-300: #e7cda0;

  --terracotta-600: #a8562a;
  --terracotta-500: #c06a35;

  --sand-50: #faf6ee;
  --sand-100: #f3ead9;
  --sand-200: #e6d8bf;

  --ink-900: #211407;
  --ink-500: #6a5540;

  --shadow-lg: 0 30px 70px -24px rgba(12, 7, 2, 0.55);
  --shadow-md: 0 14px 34px -16px rgba(12, 7, 2, 0.45);

  --font-display: "Poppins", "Segoe UI", sans-serif;
  --font-body: "Poppins", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--sand-50);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button { font-family: inherit; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--sand-50);
  color: var(--terracotta-600);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 3px; }
.btn svg { width: 17px; height: 17px; flex-shrink: 0; }

.btn--solid {
  background: var(--terracotta-600);
  color: var(--sand-50);
  box-shadow: 0 14px 34px -16px rgba(168, 86, 42, 0.75);
}
.btn--solid:hover { background: var(--terracotta-500); }

/* =================== HERO (1ª dobra) =================== */
.hero {
  position: relative;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  color: var(--sand-50);
}
.hero-fallback {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(175deg, #d8c39c 0%, #b98f52 32%, var(--bark-700) 62%, var(--ink-950) 100%);
}
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
  background: transparent;
}
.hero.video-missing .hero-video { display: none; }

.hero-scrim {
  position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(180deg, rgba(20,12,5,0.55) 0%, rgba(20,12,5,0.08) 30%, rgba(20,12,5,0.30) 55%, rgba(15,9,4,0.92) 100%);
}

.hero-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 4;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px clamp(20px, 5vw, 56px);
}
.brand {
  display: flex; align-items: baseline; gap: 2px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em;
  color: var(--sand-50);
}
.brand .accent { color: var(--gold-400); }
.hero-top .ph {
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--sand-50);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(250, 246, 238, 0.3);
  border-radius: 999px;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.hero-top .ph:hover { background: rgba(250, 246, 238, 0.1); border-color: rgba(250, 246, 238, 0.55); }
.hero-top .ph svg { width: 15px; height: 15px; color: var(--gold-400); }

.hero-caption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  padding: 0 clamp(20px, 5vw, 56px) clamp(38px, 7vh, 68px);
  max-width: 900px;
}
.hero-caption .eyebrow { color: var(--gold-300); margin-bottom: 16px; }
.hero-caption h1 {
  font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em;
  font-size: clamp(2rem, 5.2vw, 3.6rem);
  max-width: 17ch;
  text-shadow: 0 2px 26px rgba(0,0,0,0.35);
}
.hero-caption h1 .gold { color: var(--gold-400); }

.hero-loc {
  display: flex; align-items: center; gap: 10px; margin-top: 18px;
  font-size: 0.98rem; color: var(--sand-100);
}
.hero-loc svg { width: 16px; height: 16px; color: var(--gold-400); flex-shrink: 0; }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--sand-200); opacity: 0.85;
}
.hero-meta .dot { opacity: 0.5; }
.hero-meta .gold { color: var(--gold-300); opacity: 1; }

.hero-bottom-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px;
  margin-top: 26px;
}
.price-chip {
  display: flex; align-items: center; gap: 12px;
}
.price-chip .tag-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 11px;
  background: linear-gradient(155deg, var(--gold-500), var(--terracotta-600));
  display: flex; align-items: center; justify-content: center;
}
.price-chip .tag-icon svg { width: 20px; height: 20px; color: var(--ink-950); }
.price-chip .price-main {
  font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--sand-50);
  line-height: 1.15;
}
.price-chip .price-sub { font-size: 0.85rem; color: var(--sand-200); }


.scroll-cue {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 4;
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--sand-200);
  display: flex; flex-direction: column; align-items: center; gap: 8px; opacity: 0.85;
}
.scroll-cue span {
  width: 1px; height: 24px;
  background: linear-gradient(var(--sand-200), transparent);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0%, 100% { opacity: 0.3; transform: scaleY(0.6); } 50% { opacity: 1; transform: scaleY(1); } }

/* =================== SPLIT (2ª dobra) =================== */
.split { display: grid; grid-template-columns: 1fr 1fr; }
.half { padding: clamp(48px, 6vw, 84px) clamp(24px, 3.5vw, 52px); }
.half-fotos { background: var(--sand-100); border-right: 1px solid var(--sand-200); }
.half-videos { background: var(--ink-950); color: var(--sand-50); }

.half-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.half-head h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 2.4vw, 2.1rem); letter-spacing: -0.01em; margin-top: 12px; }
.half-fotos .eyebrow { color: var(--terracotta-600); }
.half-videos .eyebrow { color: var(--gold-400); }
.half-head .cnt { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; }
.half-fotos .cnt { color: var(--ink-500); }
.half-videos .cnt { color: var(--sand-200); }

/* fotos grid */
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fitem {
  position: relative; border-radius: 14px; overflow: hidden; min-height: 150px;
  cursor: pointer; border: 1px solid var(--sand-200);
}
.fitem img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.fitem:hover img { transform: scale(1.05); }
.fitem.big { grid-column: 1 / -1; min-height: 240px; }
.fitem .tag {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.05em;
  background: rgba(20, 12, 5, 0.72); color: var(--sand-50); padding: 5px 10px; border-radius: 6px;
}
.fitem::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, transparent 60%, rgba(20,12,5,0.55) 100%);
}
.fitem .zoom {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 30px; height: 30px; border-radius: 9px;
  background: rgba(20, 12, 5, 0.55);
  display: grid; place-items: center; opacity: 0; transition: opacity 0.2s ease;
}
.fitem:hover .zoom { opacity: 1; }
.fitem .zoom svg { width: 15px; height: 15px; color: var(--sand-50); }

.half-note {
  margin-top: 24px; font-size: 0.86rem; display: flex; align-items: center; gap: 9px;
}
.half-fotos .half-note { color: var(--ink-500); }
.half-videos .half-note { color: var(--sand-200); opacity: 0.85; }
.half-note svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--gold-500); }

/* descripción de la propiedad (debajo del listado de videos) */
.prop-info {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid rgba(231, 205, 160, 0.16);
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.prop-block { display: flex; gap: 16px; align-items: flex-start; }
.prop-icon {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 11px;
  background: linear-gradient(155deg, var(--gold-500), var(--terracotta-600));
  display: flex; align-items: center; justify-content: center;
}
.prop-icon svg { width: 19px; height: 19px; color: var(--ink-950); }
.prop-block h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  color: var(--sand-50); margin-bottom: 8px;
}
.prop-block p { font-size: 0.9rem; line-height: 1.65; color: var(--sand-200); opacity: 0.88; }
.map-link {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 12px; font-size: 0.85rem; font-weight: 600; color: var(--gold-400);
  transition: gap 0.2s ease;
}
.map-link:hover { gap: 11px; }
.map-link svg { width: 15px; height: 15px; }

/* videos list */
.vlist { display: flex; flex-direction: column; gap: 16px; }
.vcard {
  position: relative; border-radius: 14px; overflow: hidden; cursor: pointer;
  border: 1px solid rgba(231, 205, 160, 0.16);
  transition: transform 0.25s ease;
}
.vcard:hover { transform: translateY(-3px); }
.vcard .vthumb { height: 200px; position: relative; background: var(--bark-800); }
.vcard .vthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vcard .vthumb::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(20,12,5,0.1) 40%, rgba(20,12,5,0.75) 100%);
}
.vcard .play {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
}
.vcard .play .pb-btn {
  width: 58px; height: 58px; border-radius: 50%;
  background: rgba(250, 246, 238, 0.95);
  display: grid; place-items: center;
  transition: transform 0.2s ease;
}
.vcard:hover .play .pb-btn { transform: scale(1.08); }
.vcard .play .pb-btn svg { width: 22px; height: 22px; color: var(--ink-950); margin-left: 3px; }
.vcard .dur {
  position: absolute; bottom: 12px; right: 12px; z-index: 3;
  font-family: var(--font-mono); font-size: 0.66rem;
  background: rgba(20, 12, 5, 0.75); padding: 4px 9px; border-radius: 5px; color: var(--sand-50);
}
.vcard .vmeta { position: absolute; left: 14px; bottom: 12px; z-index: 3; }
.vcard .vmeta h4 { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; text-shadow: 0 1px 12px rgba(0,0,0,0.5); }
.vcard .vmeta span { font-size: 0.82rem; color: var(--sand-200); }

/* =================== CONTACT CTA =================== */
.contact {
  background: linear-gradient(150deg, var(--terracotta-600), var(--bark-900));
  color: var(--sand-50);
  text-align: center;
  padding: 68px 24px;
}
.contact h3 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.3rem); letter-spacing: -0.01em; margin-bottom: 10px;
}
.contact p { color: var(--sand-100); opacity: 0.9; margin-bottom: 28px; max-width: 46ch; margin-inline: auto; }
.contact .foot { margin-top: 38px; font-family: var(--font-mono); font-size: 0.72rem; opacity: 0.75; }

/* =================== LIGHTBOX =================== */
.lightbox {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(10, 6, 2, 0.94);
  display: none; place-items: center; padding: 24px;
}
.lightbox.open { display: grid; }
.lb-media { width: min(920px, 92vw); max-height: 82vh; border-radius: 16px; overflow: hidden; position: relative; box-shadow: var(--shadow-lg); }
.lb-media img, .lb-media video { width: 100%; max-height: 82vh; object-fit: contain; background: var(--ink-950); }
.lb-cap {
  position: absolute; bottom: 30px; left: 0; right: 0; text-align: center;
  color: var(--sand-200); font-family: var(--font-mono); font-size: 0.8rem;
}
.lb-close {
  position: absolute; top: 22px; right: 24px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(250, 246, 238, 0.12); border: none; color: var(--sand-50);
  font-size: 1.3rem; cursor: pointer;
}
.lb-close:hover { background: rgba(250, 246, 238, 0.22); }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .half-fotos { border-right: none; border-bottom: 1px solid var(--sand-200); }
  .hero-bottom-row { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
