/* ==========================================================================
   INMOBILIARIA • MODERNO, PROFESIONAL, RÁPIDO
   - Sin backdrop-filter
   - Sin sombras gigantes
   - Hover suave sin lag
   ========================================================================== */

:root{
  --bg: #0b1220;
  --surface: #0f1a2e;
  --card: #101c33;
  --card2: #0f1a2e;
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.72);
  --line: rgba(255,255,255,.10);

  --primary: #4f8cff;
  --primary2:#6a5cff;
  --ok: #22c55e;

  --radius: 18px;
  --radius2: 24px;

  --shadow: 0 10px 30px rgba(0,0,0,.28);
  --shadow2: 0 18px 60px rgba(0,0,0,.35);

  --container: min(1180px, 92%);
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes reveal-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(79,140,255,.3), 0 0 40px rgba(79,140,255,.1); }
  50% { box-shadow: 0 0 30px rgba(79,140,255,.4), 0 0 60px rgba(79,140,255,.2); }
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

/* Custom cursor para desktop */
@media (min-width: 981px) {
  body { cursor: default; }
  a, button, [role="button"] { cursor: pointer; }
}
body{
  margin:0;
  font-family: system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 15% 10%, rgba(79,140,255,.18), transparent 60%),
    radial-gradient(900px 600px at 80% 20%, rgba(106,92,255,.16), transparent 55%),
    radial-gradient(900px 600px at 50% 90%, rgba(34,197,94,.08), transparent 60%),
    linear-gradient(180deg, #070b14 0%, #0b1220 40%, #070b14 100%);
  background-attachment: fixed;
  position: relative;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

img{ max-width:100%; display:block; }
a{ color: inherit; }
.skip{
  position:absolute; left:-9999px; top:auto;
  width:1px; height:1px; overflow:hidden;
}
.skip:focus{
  left: 12px; top: 12px; width:auto; height:auto;
  background: #fff; color:#000;
  padding: 10px 12px; border-radius: 10px;
  z-index: 999;
}

.container{ width: var(--container); margin-inline:auto; }

/* TOPBAR */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7,11,20,.85);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.topbar.scrolled {
  background: rgba(7,11,20,.92);
  border-bottom-color: rgba(79,140,255,.25);
}
.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  padding: 14px 0;
}
.brand{
  display:flex;
  align-items:center;
  gap: 12px;
  text-decoration:none;
}
.brand__mark{
  width: 42px; height: 42px;
  border-radius: 14px;
  display:grid; place-items:center;
  background: linear-gradient(135deg, rgba(79,140,255,.35), rgba(106,92,255,.25));
  border: 1px solid rgba(255,255,255,.12);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.brand__mark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.brand:hover .brand__mark {
  transform: scale(1.05);
}

.brand:hover .brand__mark::before {
  transform: translateX(100%);
}
.brand__mark img{ width: 20px; height: 20px; opacity: .9; }
.brand__text{ display:flex; flex-direction:column; line-height:1.05; }
.brand__text strong{ font-size: 0.98rem; letter-spacing: -.02em; }
.brand__text small{ font-size: .78rem; color: var(--muted); }

.topbar__actions{ display:flex; gap: 10px; flex-wrap:wrap; }

/* BUTTONS (modernos y dinámicos) */
.btn{
  appearance:none;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  text-decoration:none;
  position: relative;
  overflow: hidden;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  will-change: transform; /* solo transform, no 20 cosas */
}
.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.20);
}
.btn:active{ transform: translateY(0); }
.btn--primary{
  border-color: rgba(79,140,255,.35);
  background: linear-gradient(135deg, rgba(79,140,255,.95), rgba(106,92,255,.9));
  background-size: 200% 200%;
  box-shadow: 0 10px 26px rgba(79,140,255,.18);
  position: relative;
  overflow: hidden;
}

.btn--primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
  transition: left 0.5s ease;
}

.btn--primary:hover::before {
  left: 100%;
}

.btn--primary:hover{
  background: linear-gradient(135deg, rgba(79,140,255,1), rgba(106,92,255,.98));
  background-position: 100% 50%;
  box-shadow: 0 12px 35px rgba(79,140,255,.3), 0 0 30px rgba(79,140,255,.2);
  transform: translateY(-2px);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 6px 18px rgba(79,140,255,.25);
}
.btn--ghost{
  background: transparent;
  position: relative;
  overflow: hidden;
}

.btn--ghost::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(79,140,255,.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn--ghost:hover {
  background: rgba(255,255,255,.10);
  border-color: rgba(79,140,255,.25);
  transform: translateY(-1px);
}

.btn--ghost:hover::after {
  opacity: 1;
}
.btn--block{ width:100%; padding: 14px 16px; }

/* HERO */
.hero{ padding: 56px 0 36px; }
.hero__grid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 32px;
  align-items:center;
}
.pill{
  display:inline-flex;
  padding: 8px 12px;
  border: 1px solid rgba(79,140,255,.25);
  background: rgba(79,140,255,.10);
  border-radius: 999px;
  color: rgba(255,255,255,.86);
  font-weight: 800;
  letter-spacing: .02em;
  font-size: .82rem;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.pill::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  animation: shimmer 3s infinite;
}
h1{
  margin: 14px 0 10px;
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  letter-spacing: -.05em;
  line-height: 1.05;
}
.lead{
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}
.hero__actions{ display:flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.badges{
  margin: 18px 0 0;
  padding: 0;
  list-style:none;
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
}
.badges li{
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.80);
  font-weight: 700;
  font-size: .85rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.badges li:hover {
  background: rgba(79,140,255,.15);
  border-color: rgba(79,140,255,.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79,140,255,.15);
}

/* PREVIEW */
.preview{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius2);
  box-shadow: var(--shadow2);
  padding: 14px;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.preview:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0,0,0,.4), 0 0 40px rgba(79,140,255,.15);
  border-color: rgba(79,140,255,.25);
}
.preview__bar{
  display:flex;
  gap: 6px;
  padding: 6px 6px 12px;
}
.preview__bar span{
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.18);
}
.preview__panel{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(16,28,51,.55);
  overflow:hidden;
}
.preview__img{
  height: 170px;
  background:
    radial-gradient(600px 260px at 20% 40%, rgba(79,140,255,.35), transparent 60%),
    radial-gradient(520px 240px at 70% 20%, rgba(106,92,255,.28), transparent 60%),
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  background-size: 150% 150%;
  animation: gradient-shift 8s ease infinite;
}
.preview__content{ padding: 14px; }
.preview__title{
  height: 14px; width: 75%;
  background: rgba(255,255,255,.18);
  border-radius: 999px;
}
.preview__line{
  height: 10px; margin-top: 10px;
  background: rgba(255,255,255,.12);
  border-radius: 999px;
}
.preview__line.short{ width: 60%; }
.preview__cta{
  height: 38px; width: 55%;
  margin-top: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(79,140,255,.9), rgba(106,92,255,.9));
  box-shadow: 0 4px 15px rgba(79,140,255,.3);
  animation: glow-pulse 3s ease-in-out infinite;
}
.preview__cards{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.mini{
  height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
}

/* SECTIONS */
.section{ padding: 44px 0; }
.section--alt{
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.section--tight{ padding: 28px 0; }

.section__head{ margin-bottom: 18px; }
.section__head h2{
  margin: 0 0 8px;
  letter-spacing: -.04em;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
}
.section__head p{
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  max-width: 70ch;
}

.cards{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.card{
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: transform .3s ease, border-color .3s ease, background .3s ease, box-shadow .3s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.card::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle at center, rgba(79,140,255,.15), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card:hover{
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(79,140,255,.4);
  background: rgba(255,255,255,.08);
  box-shadow: 0 15px 40px rgba(0,0,0,.35), 0 0 30px rgba(79,140,255,.2);
}

.card:hover::before {
  opacity: 1;
}
.card h3{ margin: 0 0 8px; font-size: 1.05rem; letter-spacing: -.02em; }
.card p{ margin: 0; color: var(--muted); line-height: 1.55; }

.two{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
  align-items:start;
}

.list{
  list-style:none;
  padding:0;
  margin: 14px 0 0;
  display:grid;
  gap: 10px;
}
.list li{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}
.list li strong{ display:block; min-width: 160px; }
.list li span{ color: var(--muted); line-height: 1.45; }

.cta-inline{ display:flex; gap: 12px; margin-top: 14px; flex-wrap:wrap; }

.box{
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius2);
  padding: 18px;
  box-shadow: var(--shadow);
}
.box h3{ margin: 0 0 8px; letter-spacing: -.02em; }
.box p{ margin: 0; color: var(--muted); line-height: 1.55; }
.box__meta{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.box__meta > div{
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}
.box__meta small{ display:block; color: rgba(255,255,255,.68); }
.box__meta strong{ display:block; margin-top: 2px; }

/* FORM */
.form{
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius2);
  padding: 18px;
  box-shadow: var(--shadow);
}
.form__grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.field--full{ grid-column: 1 / -1; }

label{
  display:block;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -.01em;
}
input, select, textarea{
  width:100%;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(7,11,20,.55);
  color: var(--text);
  padding: 12px 12px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
select{ cursor: pointer; }
textarea{ resize: vertical; min-height: 110px; }

input:focus, select:focus, textarea:focus{
  border-color: rgba(79,140,255,.65);
  box-shadow: 0 0 0 4px rgba(79,140,255,.2), 0 4px 15px rgba(79,140,255,.15);
  background: rgba(7,11,20,.85);
  transform: translateY(-1px);
}

.error{
  display:block;
  margin-top: 6px;
  color: rgba(255,120,120,.95);
  min-height: 18px;
  font-size: .86rem;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea{
  border-color: rgba(255,120,120,.75);
  box-shadow: 0 0 0 4px rgba(255,120,120,.12);
}

.note{
  margin: 12px 0 0;
  color: rgba(255,255,255,.65);
  font-size: .92rem;
  line-height: 1.5;
}

/* FOOTER */
.footer{
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(7,11,20,.65);
}
.footer__inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
  padding: 18px 0;
  color: rgba(255,255,255,.70);
}
.link{
  color: rgba(255,255,255,.82);
  text-decoration:none;
  border-bottom: 1px dashed rgba(255,255,255,.25);
}
.link:hover{ border-bottom-color: rgba(255,255,255,.60); }

.footer-cta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius2);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}

/* RESPONSIVE */
@media (max-width: 980px){
  .hero__grid{ grid-template-columns: 1fr; }
  .cards{ grid-template-columns: 1fr; }
  .two{ grid-template-columns: 1fr; }
  .form__grid{ grid-template-columns: 1fr; }
  .footer-cta{ flex-direction: column; align-items: stretch; }
  .topbar__inner{ flex-wrap: wrap; }
  
  /* Simplificar efectos en móvil */
  .card:hover {
    transform: translateY(-3px) scale(1.01);
  }
  
  .preview:hover {
    transform: translateY(-4px) scale(1.01);
  }
}

/* Dispositivos táctiles - Deshabilitar hovers complejos */
@media (hover: none) {
  .btn::before,
  .btn::after,
  .btn--ghost::after,
  .card::before,
  .brand__mark::before {
    display: none;
  }
  
  .btn--primary:hover,
  .card:hover,
  .preview:hover {
    transform: none;
    box-shadow: var(--shadow);
  }
  
  /* Efectos para toque activo */
  .btn:active {
    transform: scale(0.98);
  }
  
  .card:active {
    transform: scale(0.99);
  }
}

/* Optimizaciones móviles adicionales */
@media (max-width: 640px) {
  .pill::before,
  .preview__img {
    animation: none;
  }
  
  input, select, textarea {
    font-size: 16px; /* Prevenir zoom en iOS */
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after { 
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}