/* Terranova — sistema corporativo de inmobiliaria.
   Tokens: ver DESIGN.md en la raíz del repo. */

@font-face {
  font-family: "Source Serif 4";
  src: url("../source-serif-4.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("../public-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0b2340;
  --navy-deep: #081a30;
  --navy-soft: #16365c;
  --gold: #b8902f;
  --gold-deep: #8f6f22;
  --cream: #eef1f5;
  --paper: #ffffff;
  --ink: #1c2430;
  --gray: #5c6672;
  --line: #dde2ea;
  --line-navy: rgba(255,255,255,.16);
  --radius: 10px;
  --shadow-card: 0 14px 32px -18px rgba(11,35,64,.28);
  --shadow-card-hover: 0 20px 40px -16px rgba(11,35,64,.34);
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: "Public Sans", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.12;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

::selection { background: var(--gold); color: var(--navy-deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.marco { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

/* ===== Buttons ===== */
.boton {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: "Public Sans", sans-serif; font-weight: 600; font-size: .9375rem;
  text-decoration: none; border-radius: 6px;
  padding: 12px 22px; border: 1.5px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.boton-grande { padding: 15px 28px; font-size: 1rem; }
.boton-dorado { background: var(--gold); color: var(--navy-deep); }
.boton-dorado:hover { background: #cba542; transform: translateY(-1px); }
.boton-dorado:active { background: var(--gold-deep); transform: translateY(0); }
.boton-fantasma { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.boton-fantasma:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.boton-linea { background: transparent; color: var(--navy); border-color: var(--navy); width: 100%; margin-top: 18px; }
.boton-linea:hover { background: var(--navy); color: #fff; }

.icono { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(11,35,64,.97);
  color: #fff;
  border-bottom: 1px solid var(--line-navy);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; gap: 24px;
}
.logo {
  font-family: "Source Serif 4", serif; font-weight: 700;
  font-size: 1.375rem; letter-spacing: .01em; text-decoration: none; color: #fff;
}
.logo span { color: var(--gold); }
.nav { display: flex; gap: 30px; }
.nav a {
  text-decoration: none; font-weight: 500; font-size: .9375rem;
  color: rgba(255,255,255,.82);
}
.nav a:hover { color: #fff; }
.header-actions { display: flex; align-items: center; gap: 22px; }
.telefono {
  display: flex; align-items: center; gap: 8px; text-decoration: none;
  font-weight: 600; font-size: .9375rem; color: rgba(255,255,255,.9);
  white-space: nowrap;
}
.telefono .icono { fill: var(--gold); }

.menu-movil {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; background: none; border: none; cursor: pointer;
}
.menu-movil span { display: block; height: 2px; width: 100%; background: #fff; border-radius: 2px; }

.nav-movil {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--navy-deep); border-top: 1px solid var(--line-navy);
  padding: 8px 22px 18px;
}
.nav-movil a {
  text-decoration: none; color: rgba(255,255,255,.88); font-weight: 500;
  padding: 12px 0; border-bottom: 1px solid var(--line-navy);
}
.nav-movil .boton { margin-top: 14px; justify-content: center; }
.nav-movil[hidden] { display: none; }

@media (max-width: 900px) {
  .nav, .header-actions .telefono { display: none; }
  .menu-movil { display: flex; }
}
@media (min-width: 901px) { .nav-movil { display: none !important; } }

/* ===== Hero ===== */
.hero {
  background-size: cover; background-position: center;
  color: #fff;
}
.hero-contenido { padding: 100px 0 56px; max-width: 760px; }
.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  text-wrap: balance;
}
.hero-intro { margin-top: 20px; max-width: 54ch; font-size: 1.1875rem; color: rgba(255,255,255,.88); }
.hero-acciones { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.hero-metricas { background: rgba(8,26,48,.78); border-top: 1px solid var(--line-navy); padding: 0 6px; }
.metricas-fila {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 18px 28px; padding: 28px 22px;
}
.metrica { text-align: left; }
.metrica strong {
  display: block; font-family: "Source Serif 4", serif; font-weight: 700;
  font-size: 1.875rem; color: var(--gold); font-variant-numeric: tabular-nums;
}
.metrica span { font-size: .875rem; color: rgba(255,255,255,.78); }

/* ===== Sections ===== */
.seccion { padding: 80px 0; }
.seccion-navy { background: var(--navy); color: #fff; }
.seccion-crema { background: var(--paper); border-top: 1px solid var(--line); }

h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); max-width: 22ch; }
.titulo-claro { color: #fff; }
.seccion-intro { margin-top: 16px; max-width: 65ch; color: var(--gray); font-size: 1.0625rem; }
.seccion-navy .seccion-intro { color: rgba(255,255,255,.82); }

/* ===== Project cards ===== */
.grid-proyectos { display: grid; gap: 28px; margin-top: 44px; }
@media (min-width: 880px) { .grid-proyectos { grid-template-columns: repeat(3, 1fr); } }

.tarjeta-proyecto {
  background: var(--paper); border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .2s ease, transform .2s ease;
}
.tarjeta-proyecto:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }

.tarjeta-foto { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--line); }
.tarjeta-foto img { width: 100%; height: 100%; object-fit: cover; }
.etiqueta {
  position: absolute; top: 14px; left: 14px;
  font-size: .75rem; font-weight: 700; letter-spacing: .03em;
  padding: 6px 12px; border-radius: 999px; color: #fff;
}
.etiqueta-construccion { background: var(--navy); }
.etiqueta-preventa { background: var(--gold-deep); }

.tarjeta-cuerpo { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.tarjeta-tipo { font-size: .75rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--gray); }
.tarjeta-cuerpo h3 { font-size: 1.5rem; margin-top: 4px; }
.tarjeta-ubicacion { color: var(--gray); font-size: .9375rem; margin-top: 4px; }

.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.specs dt { font-size: .75rem; color: var(--gray); }
.specs dd { font-weight: 600; font-size: .9375rem; font-variant-numeric: tabular-nums; }

.avance { margin-top: 20px; }
.avance-etiqueta { display: flex; justify-content: space-between; font-size: .8125rem; font-weight: 600; margin-bottom: 7px; }
.avance-etiqueta span:last-child { color: var(--gold-deep); font-variant-numeric: tabular-nums; }
.avance-barra { height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; }
.avance-barra span { display: block; height: 100%; background: var(--gold); border-radius: 999px; width: 0; transition: width 1.1s cubic-bezier(.16,.84,.44,1); }
.avance-barra.es-visible span { width: var(--meta, 0) !important; }
@media (prefers-reduced-motion: reduce) {
  .avance-barra span { transition: none; width: var(--meta, 0) !important; }
}

/* ===== Why Terranova ===== */
.grid-razones { display: grid; gap: 30px; margin-top: 44px; }
@media (min-width: 700px) { .grid-razones { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .grid-razones { grid-template-columns: repeat(4, 1fr); } }
.razon h3 { color: #fff; font-size: 1.125rem; margin-top: 16px; }
.razon p { color: rgba(255,255,255,.78); font-size: .9375rem; margin-top: 8px; }
.icono-razon { width: 34px; height: 34px; color: var(--gold); }

/* ===== Cómo comprar ===== */
.pasos { list-style: none; display: grid; gap: 0; margin-top: 44px; }
@media (min-width: 760px) { .pasos { grid-template-columns: repeat(4, 1fr); gap: 24px; } }
.pasos li { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .pasos li { flex-direction: column; border-bottom: none; padding: 0; } }
.paso-num {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
  background: var(--navy); color: #fff; font-family: "Source Serif 4", serif; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 1.0625rem;
}
.pasos strong { display: block; font-size: 1.0625rem; margin-top: 2px; }
.pasos p { color: var(--gray); font-size: .9375rem; margin-top: 6px; }

/* ===== Contact ===== */
.contacto-grid { display: grid; gap: 44px; }
@media (min-width: 900px) { .contacto-grid { grid-template-columns: 1fr 1fr; align-items: center; } }
.lista-contacto { list-style: none; margin-top: 28px; display: flex; flex-direction: column; gap: 18px; }
.lista-contacto li { display: flex; gap: 14px; align-items: flex-start; }
.lista-contacto .icono { color: var(--gold-deep); margin-top: 3px; }
.lista-contacto strong { display: block; font-size: .9375rem; }
.lista-contacto span { color: var(--gray); font-size: .9375rem; }
.lista-contacto a { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.contacto-info .boton { margin-top: 28px; }

.contacto-mapa { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); aspect-ratio: 4 / 3; }
.contacto-mapa iframe { width: 100%; height: 100%; border: 0; }

/* ===== Footer ===== */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.72); padding: 48px 0 32px; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1.4fr; } }
.logo-footer { font-size: 1.1875rem; }
.footer-grid p { font-size: .875rem; margin-top: 8px; }
.footer-grid nav { display: flex; flex-direction: column; gap: 10px; }
.footer-grid nav a { text-decoration: none; font-size: .9375rem; color: rgba(255,255,255,.78); }
.footer-grid nav a:hover { color: #fff; }
.footer-legal p { font-size: .8125rem; color: rgba(255,255,255,.55); }
.creditos-foto a { color: rgba(255,255,255,.68); text-decoration: underline; text-underline-offset: 2px; }
