/* ============================================================
   SORANGEL GONZALEZ · REALTOR — Landing de Propiedades
   Sistema de diseño derivado del Manual de Marca (Ed. 2026)
   ============================================================ */

:root {
  /* Paleta oficial */
  --navy: #0E2341;
  --navy-900: #07162F;
  --navy-500: #2C466E;
  --gold: #AC8746;
  --gold-300: #D6BD8E;
  --pearl: #F3F2EE;
  --ink: #161B24;
  --stone: #6A6760;
  --border: #DAD7CE;
  --white: #FFFFFF;

  /* Tipografía */
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Ritmo */
  --container: 1180px;
  --radius: 2px;
  --shadow-soft: 0 30px 60px -25px rgba(14, 35, 65, 0.35);
  --shadow-card: 0 18px 40px -22px rgba(14, 35, 65, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--pearl);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow.on-dark { color: var(--gold-300); }

.rule {
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin: 18px 0 0;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--navy);
  margin: 0;
  letter-spacing: -0.01em;
}

.on-dark h1, .on-dark h2, .on-dark h3, .on-dark { color: var(--pearl); }

p { line-height: 1.7; color: var(--stone); margin: 0; }
.on-dark p { color: rgba(243, 242, 238, 0.78); }

button { font-family: var(--sans); cursor: pointer; }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-300), var(--gold) 60%, #8f6f37);
  color: var(--navy-900);
}
.btn-gold:hover { filter: brightness(1.08); transform: translateY(-1px); }

.btn-outline-light {
  border-color: rgba(243, 242, 238, 0.45);
  color: var(--pearl);
  background: transparent;
}
.btn-outline-light:hover { border-color: var(--pearl); background: rgba(243, 242, 238, 0.08); }

.btn-outline-navy {
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn-outline-navy:hover { background: var(--navy); color: var(--pearl); }

.btn-sm { padding: 11px 20px; font-size: 11px; }
.btn-block { width: 100%; }

/* ============== HEADER ============== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 242, 238, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 24px;
}
.brand-lockups {
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand-lockups img.sg-logo { height: 46px; width: auto; }
.brand-divider { width: 1px; height: 30px; background: var(--border); }
.brand-lockups img.broker-logo { height: 26px; width: auto; opacity: 0.9; }

.header-actions { display: flex; align-items: center; gap: 18px; }
.back-link {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-500);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.back-link:hover { color: var(--gold); }

/* ============== HERO ============== */
.hero {
  position: relative;
  background: var(--navy);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: stretch;
  height: 640px;
}
.hero-photo {
  position: relative;
  background: var(--navy-900);
  height: 100%;
  overflow: hidden;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0.96;
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,22,47,0) 55%, rgba(7,22,47,0.65) 100%);
}
.frame-corner {
  position: absolute;
  width: 64px;
  height: 64px;
  border: 1px solid var(--gold-300);
  opacity: 0.85;
  z-index: 2;
}
.frame-corner.tl { top: 28px; left: 28px; border-right: none; border-bottom: none; }
.frame-corner.br { bottom: 28px; right: 28px; border-left: none; border-top: none; }

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 64px;
  position: relative;
}
.hero-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(172,135,70,0.10), transparent 55%);
  pointer-events: none;
}
.hero-headline {
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.12;
  max-width: 14ch;
  margin-top: 18px;
}
.hero-sub {
  margin-top: 22px;
  max-width: 46ch;
  font-size: 16px;
}
.hero-cta-row {
  display: flex;
  gap: 16px;
  margin-top: 38px;
  flex-wrap: wrap;
}
.hero-tagline-en {
  margin-top: 36px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: rgba(214, 189, 142, 0.8);
  border-left: 1px solid var(--gold);
  padding-left: 16px;
}

/* ============== FILTER BAR (signature overlap card) ============== */
.filter-wrap { position: relative; z-index: 5; }
.filter-card {
  background: var(--white);
  margin: -56px auto 0;
  max-width: calc(var(--container) - 64px);
  border-top: 2px solid var(--gold);
  box-shadow: var(--shadow-soft);
  padding: 28px 32px;
  position: relative;
}
.filter-card::before,
.filter-card::after {
  content: "";
  position: absolute;
  top: -2px;
  width: 22px;
  height: 22px;
  border-top: 1px solid var(--gold);
}
.filter-card::before { left: -1px; border-left: 1px solid var(--gold); }
.filter-card::after { right: -1px; border-right: 1px solid var(--gold); }

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 18px;
  align-items: end;
}
.field label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy-500);
  margin-bottom: 8px;
}
.field select, .field input {
  width: 100%;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--pearl);
  appearance: none;
}
.field.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.field select:focus, .field input:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--white);
}
.filter-actions { display: flex; }

/* ============== PROPERTIES SECTION ============== */
.section { padding: 96px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.section-title { font-size: clamp(28px, 3vw, 38px); margin-top: 14px; }
.results-count { font-size: 13px; color: var(--stone); letter-spacing: 0.02em; }

.property-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.property-card {
  background: var(--white);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}
.property-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
  border-color: transparent;
}
.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--navy-900) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"></svg>');
  overflow: hidden;
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.property-card:hover .card-media img { transform: scale(1.05); }
.status-pill {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--navy);
  color: var(--pearl);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 12px;
}
.status-pill.pending { background: var(--gold); color: var(--navy-900); }
.status-pill.closed { background: var(--stone); }

.card-body { padding: 22px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.card-price {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--navy);
}
.card-address {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.5;
}
.card-address span { display: block; color: var(--stone); font-size: 12.5px; }
.card-specs {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--navy-500);
  font-weight: 600;
}
.card-specs span { display: flex; align-items: center; gap: 6px; }
.card-cta {
  margin-top: 18px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Skeleton / states */
.skeleton { background: linear-gradient(100deg, #ECE9E2 30%, #F6F4EF 50%, #ECE9E2 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skel-card .card-media { background: #ECE9E2; }
.skel-line { height: 12px; margin-top: 10px; width: 70%; }

.state-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed var(--border);
}
.state-message h3 { font-size: 22px; margin-bottom: 10px; }
.state-message p { max-width: 44ch; margin: 0 auto; }

.load-more-wrap { display: flex; justify-content: center; margin-top: 48px; }

/* ============== MID CTA ============== */
.mid-cta {
  background: var(--navy);
  position: relative;
  overflow: hidden;
}
.mid-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 15% 0%, rgba(172,135,70,0.14), transparent 50%);
}
.mid-cta-inner {
  position: relative;
  text-align: center;
  padding: 96px 32px;
  max-width: 720px;
  margin: 0 auto;
}
.mid-cta-inner h2 { font-size: clamp(30px, 4vw, 44px); }
.mid-cta-inner p { margin-top: 16px; font-size: 16px; }
.mid-cta-actions {
  margin-top: 36px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.mid-cta-secondary {
  margin-top: 22px;
  font-size: 12.5px;
  color: rgba(243,242,238,0.65);
}
.mid-cta-secondary a { color: var(--gold-300); border-bottom: 1px solid rgba(214,189,142,0.4); }
.mid-cta-secondary a:hover { color: var(--pearl); }

/* ============== ABOUT STRIP ============== */
.about-strip {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.about-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  align-items: center;
  padding: 56px 0;
}
.about-grid img { width: 100%; height: 240px; object-fit: cover; object-position: top; }
.about-grid blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--navy);
  margin: 0 0 14px;
  line-height: 1.4;
}
.about-grid .about-name { font-size: 12px; letter-spacing: 0.12em; color: var(--gold); font-weight: 600; text-transform: uppercase; }

/* ============== FOOTER ============== */
.site-footer { background: var(--navy-900); padding-top: 72px; }
.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(243,242,238,0.12);
}
.footer-logos { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.footer-logos img.sg-logo { height: 40px; }
.footer-logos img.broker-logo { height: 24px; }
.footer-col h4 {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-300); font-weight: 600; margin-bottom: 18px; font-family: var(--sans);
}
.footer-col a, .footer-col p {
  display: block;
  font-size: 13.5px;
  color: rgba(243,242,238,0.75);
  margin-bottom: 12px;
}
.footer-col a:hover { color: var(--gold-300); }
.social-row { display: flex; gap: 12px; flex-wrap: wrap; }
.social-row a {
  width: 36px; height: 36px;
  border: 1px solid rgba(243,242,238,0.25);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  margin-bottom: 0;
}
.social-row a:hover { border-color: var(--gold-300); background: rgba(172,135,70,0.12); }
.social-row svg { width: 16px; height: 16px; fill: var(--pearl); }

.footer-legal {
  padding: 32px 0 28px;
}
.footer-legal p {
  font-size: 11.5px;
  line-height: 1.7;
  color: rgba(243,242,238,0.5);
  max-width: 980px;
}
.footer-legal .equal-housing {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(243,242,238,0.6);
}
.footer-bottom {
  border-top: 1px solid rgba(243,242,238,0.12);
  padding: 20px 0;
  font-size: 12px;
  color: rgba(243,242,238,0.45);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ============== MODAL ============== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(7,22,47,0.72);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal-panel {
  background: var(--white);
  max-width: 920px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-soft);
}
.modal-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 38px; height: 38px;
  background: rgba(7,22,47,0.55);
  color: var(--pearl);
  border: none;
  border-radius: 50%;
  font-size: 18px;
  z-index: 5;
  display: flex; align-items: center; justify-content: center;
}
.modal-gallery { aspect-ratio: 16/9; background: var(--navy-900); }
.modal-gallery img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: 36px 40px 40px; }
.modal-price { font-family: var(--serif); font-size: 34px; color: var(--navy); }
.modal-address { margin-top: 6px; font-size: 15px; color: var(--stone); }
.modal-specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 26px 0;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.modal-specs div { text-align: center; }
.modal-specs strong { display: block; font-family: var(--serif); font-size: 22px; color: var(--navy); }
.modal-specs span { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone); }
.modal-desc { font-size: 14.5px; line-height: 1.8; color: var(--ink); }
.modal-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

/* ============== UTIL ============== */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============== RESPONSIVE ============== */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; height: auto; }
  .hero-photo { height: 340px; }
  .hero-copy { padding: 56px 32px; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .property-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-grid img { height: 280px; }
}

@media (max-width: 620px) {
  .container { padding: 0 20px; }
  .brand-lockups img.sg-logo { height: 36px; }
  .filter-card { margin-top: -36px; padding: 22px 18px; }
  .filter-grid { grid-template-columns: 1fr; }
  .field.price-range { grid-template-columns: 1fr 1fr; }
  .property-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .hero-cta-row { flex-direction: column; align-items: stretch; }
  .modal-specs { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 64px 0; }
}
