/* Inmobiliaria JR Propiedades — estilos
   Paleta tomada del logo: azul #2337BC y amarillo #F8C900, usados con moderación. */

:root {
  --blue: #2337bc;
  --blue-deep: #1a2a8f;
  --navy: #121a46;
  --yellow: #f8c900;
  --yellow-soft: #fff4c2;
  --bg: #faf8f4;
  --surface: #ffffff;
  --tint: #f1f2fa;
  --ink: #161a2e;
  --ink-2: #4a4f66;
  --ink-3: #7a7e92;
  --line: #e6e4dd;
  --wa: #1f9d55;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(18, 26, 70, .06), 0 8px 24px rgba(18, 26, 70, .07);
  --shadow-lg: 0 24px 60px rgba(18, 26, 70, .22);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.ic { width: 20px; height: 20px; flex: none; }
.ic.flip { transform: scaleX(-1); }
.muted { color: var(--ink-2); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 14px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-soft); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(35, 55, 188, .25); }
.btn-primary:hover { background: var(--blue-deep); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-3); background: #fff; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #188547; }
.btn-yellow { background: var(--yellow); color: var(--navy); }
.btn-yellow:hover { background: #ffd51f; }

/* Encabezado */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 248, 244, .86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 2px 8px rgba(18, 26, 70, .15); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--serif); font-weight: 600; font-size: 19px; color: var(--navy); }
.brand-text span { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); margin-top: 3px; }
.main-nav { display: flex; gap: 28px; margin-left: auto; }
.main-nav a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink-2); position: relative; padding: 6px 0; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--yellow);
  transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after { transform: scaleX(1); }

/* Portada */
.hero { padding: 56px 0 88px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.2vw, 62px); color: var(--navy); margin-bottom: 20px; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-stats { display: flex; gap: 40px; margin: 44px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.hero-stats div { margin: 0; }
.hero-stats dt { font-family: var(--serif); font-size: 30px; color: var(--navy); line-height: 1; }
.hero-stats dd { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-3); }

.hero-media { position: relative; height: 560px; }
.hm { position: absolute; margin: 0; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow); background: var(--tint); }
.hm img { width: 100%; height: 100%; object-fit: cover; }
.hm-a { left: 0; top: 0; width: 62%; height: 100%; }
.hm-b { right: 0; top: 0; width: 34%; height: 48%; }
.hm-c { right: 0; bottom: 0; width: 34%; height: 48%; }
.hm-badge {
  position: absolute; left: 62%; top: 50%; transform: translate(-50%, -50%);
  width: 96px; height: 96px; border-radius: 50%; padding: 6px; background: var(--bg);
  box-shadow: var(--shadow);
}
.hm-badge img { width: 100%; height: 100%; border-radius: 50%; }

/* Secciones */
.section { padding: 96px 0; }
.section-tint { background: var(--tint); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 42px); color: var(--navy); margin-bottom: 10px; }
.section-head.center { justify-content: center; text-align: center; }

/* Filtros */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 9px 16px; font-size: 14px; font-weight: 500; color: var(--ink-2); cursor: pointer;
  transition: all .2s;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Tarjetas */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow); text-decoration: none; cursor: pointer;
  border: 0; padding: 0; text-align: left; width: 100%;
  transition: transform .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(18, 26, 70, .06), 0 18px 40px rgba(18, 26, 70, .12); }
.card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--tint); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-badge {
  position: absolute; left: 14px; top: 14px; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .94); color: var(--navy); border-radius: 999px;
  padding: 5px 11px 5px 9px; font-size: 13px; font-weight: 600;
}
.card-badge .ic { width: 16px; height: 16px; color: var(--blue); }
.card-photos {
  position: absolute; right: 14px; bottom: 14px; background: rgba(18, 26, 70, .72); color: #fff;
  border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 500;
}
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card-title h3 { font-size: 24px; color: var(--navy); }
.card-loc { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.card-loc .ic { width: 15px; height: 15px; }
.card-tagline { color: var(--ink-2); font-size: 14.5px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; color: var(--ink-2); }
.card-meta span { display: inline-flex; align-items: center; gap: 6px; }
.card-meta .ic { width: 17px; height: 17px; color: var(--ink-3); }
.card-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.card-amen { display: flex; gap: 6px; }
.card-amen span {
  width: 32px; height: 32px; border-radius: 50%; background: var(--tint); color: var(--blue);
  display: grid; place-items: center;
}
.card-amen .ic { width: 17px; height: 17px; }
.card-more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--blue); }
.card-more .ic { width: 17px; height: 17px; transition: transform .2s; }
.card:hover .card-more .ic { transform: translateX(3px); }
.card-ask {
  grid-column: span 2; border-radius: var(--radius-lg); padding: 40px; display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start; gap: 14px; background: var(--navy); color: #fff; position: relative; overflow: hidden;
}
.card-ask::after {
  content: ""; position: absolute; right: -60px; bottom: -60px; width: 240px; height: 240px; border-radius: 50%;
  background: url(img/logo.png) center / cover; opacity: .14;
}
.card-ask h3 { font-size: 30px; max-width: 420px; }
.card-ask p { color: rgba(255, 255, 255, .75); max-width: 440px; }
.card-ask .btn { margin-top: 8px; position: relative; z-index: 1; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--ink-3); padding: 40px 0; }

/* Pasos */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; }
.steps li { background: var(--surface); border-radius: var(--radius-lg); padding: 32px 28px; box-shadow: var(--shadow); }
.step-n {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--yellow); color: var(--navy); font-family: var(--serif); font-size: 19px; font-weight: 600; margin-bottom: 20px;
}
.steps h3 { font-size: 22px; color: var(--navy); margin-bottom: 8px; }
.steps p { color: var(--ink-2); font-size: 15px; }

/* Zona */
.zona-grid { display: grid; grid-template-columns: .9fr 1fr; gap: 64px; align-items: center; }
.zona-media { margin: 0; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 5; box-shadow: var(--shadow); }
.zona-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.zona-copy h2 { font-size: clamp(30px, 3.6vw, 42px); color: var(--navy); margin-bottom: 20px; }
.zona-copy p:not(.eyebrow) { color: var(--ink-2); font-size: 17px; margin-bottom: 16px; }
.zona-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.zona-list li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.zona-list .ic { color: var(--blue); }

/* Contacto */
.section-blue { background: var(--blue); color: #fff; position: relative; overflow: hidden; }
.section-blue::before {
  content: ""; position: absolute; right: -180px; top: -180px; width: 520px; height: 520px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 0 0 80px rgba(255, 255, 255, .03);
}
.section-blue .section-head h2 { color: #fff; }
.eyebrow.on-blue { color: var(--yellow); }
.eyebrow.on-blue .dot { box-shadow: 0 0 0 3px rgba(248, 201, 0, .25); }
.muted-on-blue { color: rgba(255, 255, 255, .78); max-width: 560px; }
.locales { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; position: relative; }
.local {
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius-lg); padding: 28px;
}
.local h3 { font-size: 22px; margin-bottom: 18px; color: #fff; }
.local .ic { width: 19px; height: 19px; color: var(--yellow); }
.local a { text-decoration: none; }
.local a:hover { text-decoration: underline; text-underline-offset: 3px; }
.local-addr { display: flex; gap: 10px; align-items: flex-start; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.local-tel { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.local-tel li { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }
.tag { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; background: rgba(255, 255, 255, .14); padding: 2px 8px; border-radius: 999px; }
.local-cta { background: var(--surface); color: var(--ink); border-color: transparent; display: flex; flex-direction: column; align-items: flex-start; }
.local-cta img { width: 56px; height: 56px; border-radius: 50%; margin-bottom: 16px; }
.local-cta h3 { color: var(--navy); margin-bottom: 8px; }
.local-cta p { color: var(--ink-2); margin-bottom: 20px; }
.local-cta .btn { margin-top: auto; }
.local-cta .ic { color: inherit; }

/* Pie */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, .72); padding: 36px 0; font-size: 14px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.brand-footer img { width: 40px; height: 40px; }
.brand-footer .brand-text strong { color: #fff; font-size: 17px; }
.brand-footer .brand-text span { color: rgba(255, 255, 255, .55); }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 40; width: 56px; height: 56px; border-radius: 50%;
  background: var(--wa); color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(31, 157, 85, .35); transition: transform .2s;
}
.wa-float:hover { transform: scale(1.06); }
.wa-float .ic { width: 28px; height: 28px; }

/* Ficha (modal) */
.modal {
  border: 0; padding: 0; background: transparent; max-width: none; max-height: none;
  width: 100%; height: 100%; margin: 0; overflow: auto;
}
.modal::backdrop { background: rgba(14, 18, 44, .62); backdrop-filter: blur(4px); }
.modal[open] { display: grid; place-items: center; padding: 32px 24px; }
.modal-box {
  position: relative; width: 100%; max-width: 1120px; background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); display: grid; grid-template-columns: 1.35fr 1fr; overflow: hidden;
  height: min(760px, calc(100vh - 64px));
  animation: pop .28s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 255, 255, .94); color: var(--navy);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .15); transition: transform .15s, background .15s;
}
.icon-btn:hover { background: #fff; transform: scale(1.05); }
.modal-close { position: absolute; right: 14px; top: 14px; z-index: 3; }
.m-gallery { background: #0e1230; display: flex; flex-direction: column; min-width: 0; }
.m-stage { position: relative; flex: 1; min-height: 0; background: #0e1230; }
.m-stage img { width: 100%; height: 100%; object-fit: contain; transition: opacity .2s; }
.m-stage img.loading { opacity: .35; }
.m-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.m-nav:hover { transform: translateY(-50%) scale(1.05); }
.m-prev { left: 14px; }
.m-next { right: 14px; }
.m-count { position: absolute; left: 14px; bottom: 14px; color: #fff; font-size: 13px; background: rgba(0, 0, 0, .45); padding: 3px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.m-thumbs { display: flex; gap: 8px; padding: 12px; overflow-x: auto; scrollbar-width: thin; }
.m-thumbs button { flex: none; width: 72px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; opacity: .55; background: #222; transition: opacity .2s, border-color .2s; }
.m-thumbs button:hover { opacity: .85; }
.m-thumbs button.is-active { opacity: 1; border-color: var(--yellow); }
.m-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.m-info { padding: 40px 36px 32px; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.m-info h2 { font-size: 38px; color: var(--navy); margin-bottom: 12px; }
.m-desc { color: var(--ink-2); margin-bottom: 22px; }
.m-facts { list-style: none; padding: 0; margin: 0 0 26px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.m-facts li { background: var(--tint); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.m-facts .ic { color: var(--blue); }
.m-facts strong { font-size: 17px; color: var(--navy); line-height: 1.2; }
.m-facts span { font-size: 12.5px; color: var(--ink-3); }
.m-sub { font-family: var(--sans); font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.m-amen { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.m-amen li { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.m-amen .ic { color: var(--blue); }
.m-rooms { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.m-rooms li { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13.5px; color: var(--ink-2); }
.m-cta { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); }
.m-cta .btn { width: 100%; }
.m-note { text-align: center; font-size: 13px; color: var(--ink-3); margin-top: 10px; }
body.modal-open { overflow: hidden; }

/* Aparición suave */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-media { height: 440px; }
  .zona-grid { gap: 40px; }
  .locales { grid-template-columns: 1fr 1fr; }
  .local-cta { grid-column: 1 / -1; }
  .modal-box { grid-template-columns: 1fr; max-width: 720px; height: auto; }
  .m-stage { flex: none; aspect-ratio: 4 / 3.4; }
  .m-info { overflow: visible; }
  .modal[open] { place-items: start center; }
}
@media (max-width: 860px) {
  .main-nav { display: none; }
  .header-cta { margin-left: auto; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .header-inner { height: 64px; }
  .brand img { width: 38px; height: 38px; }
  .brand-text strong { font-size: 17px; }
  .header-cta span { display: none; }
  .header-cta { width: 40px; padding: 0; }
  .hero { padding: 28px 0 64px; }
  .lead { font-size: 16.5px; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { gap: 22px; justify-content: space-between; }
  .hero-stats dt { font-size: 24px; }
  .hero-stats dd { font-size: 12.5px; }
  .hero-media { height: 340px; }
  .hm-a { width: 60%; }
  .hm-b, .hm-c { width: 37%; }
  .hm-badge { left: 60%; width: 72px; height: 72px; }
  .section { padding: 68px 0; }
  .grid { grid-template-columns: 1fr; gap: 20px; }
  .card-ask { grid-column: auto; padding: 32px 24px; }
  .card-ask h3 { font-size: 26px; }
  .steps { grid-template-columns: 1fr; }
  .zona-grid { grid-template-columns: 1fr; }
  .zona-media { aspect-ratio: 4 / 3; }
  .locales { grid-template-columns: 1fr; }
  .modal[open] { padding: 0; }
  .modal-box { border-radius: 0; min-height: 100%; }
  .m-stage { aspect-ratio: 1 / 1; }
  .m-info { padding: 28px 20px 96px; }
  .m-info h2 { font-size: 32px; }
  .m-facts { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .m-facts li { padding: 10px; }
  .m-cta { position: sticky; bottom: 0; background: var(--surface); padding: 14px 0 6px; margin-bottom: -76px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
