/* ============================================================
   Realto — muestra de diseño
   Turquesa sobre blanco. Independiente del sitio de Red Dominion
   y de los otros proyectos: no comparte hoja de estilos.
   ============================================================ */

:root {
  --teal:      #0FD3AC;
  --teal-dark: #0BB08F;
  --teal-soft: #E6FBF6;

  --ink:      #16262E;
  --ink-2:    #22323B;
  --ink-mid:  #5C6E77;
  --ink-dim:  #93A1A8;

  --paper:    #FFFFFF;
  --paper-2:  #F5F8F8;
  --line:     #E4EAEA;

  --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --shell: 1140px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* height:auto es imprescindible: sin él, el atributo height del HTML
   gana al width:100% y las imágenes salen enmarcadas con franjas */
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

::selection { background: var(--teal); color: var(--ink); }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- Barra de muestra ---------- */
.demo-bar {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 9px 20px;
  background: var(--ink);
  color: rgba(255, 255, 255, .55);
  font-size: .74rem;
  text-align: center;
}
.demo-bar a { color: var(--teal); font-weight: 500; }
.demo-bar a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
/* Flota sobre el hero: la foto se ve por detrás */
.site-header {
  position: absolute;
  top: 34px; left: 0; right: 0;
  z-index: 40;
  padding-block: 18px;
}
.header-inner { display: flex; align-items: center; gap: 28px; }

.logo { font-size: 1.4rem; font-weight: 700; letter-spacing: -.4px; color: #fff; }
.logo span { color: var(--teal); }

.nav { margin-inline: auto; }
.nav-list { display: flex; align-items: center; gap: 34px; }
.nav-link {
  font-size: .86rem;
  font-weight: 400;
  color: rgba(255, 255, 255, .85);
  transition: color .25s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--teal); }

.header-side { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  transition: background .25s var(--ease);
}
.icon-btn:hover { background: rgba(255, 255, 255, .16); }
.icon-btn svg {
  width: 18px; height: 18px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: #fff; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 30px;
  border-radius: var(--radius-pill);
  font-size: .88rem;
  font-weight: 500;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }

.btn-teal { background: var(--teal); color: var(--ink); font-weight: 600; }
.btn-teal:hover { background: var(--teal-dark); color: #fff; }

.btn-dark { background: rgba(22, 38, 46, .55); color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-dark:hover { background: var(--ink); border-color: var(--ink); }

.btn-sm { padding: 9px 22px; font-size: .82rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  padding: 150px 0 130px;
  background: var(--ink);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center right;
}
/* Velo desde la izquierda: deja al agente visible a la derecha */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(14, 26, 32, .86) 0%, rgba(14, 26, 32, .55) 42%, rgba(14, 26, 32, .1) 72%, transparent 100%);
}
.hero-inner { position: relative; z-index: 1; color: #fff; }

.hero-inner h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.3rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -1px;
}
.hero-text { margin: 16px 0 30px; color: rgba(255, 255, 255, .82); font-size: .92rem; font-weight: 300; }

/* Buscador */
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(440px, 100%);
  padding: 7px 7px 7px 22px;
  border-radius: var(--radius-pill);
  background: #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: none;
  font-size: .88rem;
  color: var(--ink);
}
.search input::placeholder { color: var(--ink-dim); }
.search-btn {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--teal);
  transition: background .25s var(--ease);
}
.search-btn:hover { background: var(--teal-dark); }
.search-btn svg {
  width: 18px; height: 18px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

/* ---------- Tarjetas montadas ---------- */
.cards-wrap { position: relative; z-index: 2; }
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  /* Suben para pisar el borde inferior del hero */
  margin-top: -92px;
}
.card {
  padding: 28px 26px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 44px rgba(22, 38, 46, .12);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: 0 24px 54px rgba(22, 38, 46, .18); }

.card h2 { font-size: 1.05rem; font-weight: 600; margin-bottom: 20px; }

.card-ico {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--teal-soft);
}
.card-ico svg {
  width: 19px; height: 19px;
  fill: none;
  stroke: var(--teal-dark);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card-lead { font-size: .92rem; font-weight: 500; margin-bottom: 8px; }
.card p:last-child { font-size: .82rem; color: var(--ink-mid); font-weight: 300; }

/* Tarjeta destacada en turquesa */
.card-teal { background: var(--teal); }
.card-teal .card-ico { background: rgba(255, 255, 255, .3); }
.card-teal .card-ico svg { stroke: #fff; }
.card-teal p:last-child { color: rgba(255, 255, 255, .9); }

/* ---------- Secciones ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--paper-2); }

.section-head { max-width: 640px; margin: 0 auto 46px; text-align: center; }
.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -.6px;
  margin-bottom: 14px;
}
.section-head p { color: var(--ink-mid); font-size: .9rem; font-weight: 300; }

/* ---------- Listados ---------- */
.homes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.home {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: 0 14px 34px rgba(22, 38, 46, .12);
}
.home img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.home:hover img { transform: scale(1.06); }

.home-body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px 20px 18px;
  background: linear-gradient(0deg, rgba(10, 20, 25, .9) 25%, transparent);
  color: #fff;
}
.home-body h3 { font-size: 1.05rem; font-weight: 600; line-height: 1.25; }
.home-body p { font-size: .78rem; color: rgba(255, 255, 255, .75); }

/* ---------- Búsqueda ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.split-text h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.8px;
}
/* Filete turquesa bajo el titular */
.rule {
  display: block;
  width: 54px; height: 4px;
  margin: 18px 0 20px;
  border-radius: 4px;
  background: var(--teal);
}
.split-text p { color: var(--ink-mid); font-size: .9rem; font-weight: 300; }

.ticks { display: grid; gap: 11px; margin: 24px 0 30px; }
.ticks li {
  position: relative;
  padding-left: 28px;
  font-size: .86rem;
  color: var(--ink-2);
}
/* Palomita dibujada con dos bordes girados */
.ticks li::before {
  content: '';
  position: absolute;
  left: 2px; top: 6px;
  width: 5px; height: 10px;
  border: solid var(--teal-dark);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.split-media img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(22, 38, 46, .16);
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #fff; padding-top: 54px; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  padding-bottom: 44px;
}
.logo-footer { display: inline-block; margin-bottom: 6px; }
.footer-text { color: rgba(255, 255, 255, .65); font-size: .88rem; font-weight: 300; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-block: 18px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .76rem;
  color: rgba(255, 255, 255, .5);
}
.footer-back { color: var(--teal); }
.footer-back:hover { text-decoration: underline; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1000px) {
  .nav-list { gap: 22px; }
  .homes { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .header-side { display: none; }
  .nav { margin-inline: 0; margin-left: auto; }

  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(280px, 80vw);
    padding: 96px 26px 26px;
    background: var(--ink);
    transform: translateX(100%);
    transition: transform .35s var(--ease);
    z-index: 45;
  }
  .nav.open { transform: translateX(0); }
  .nav-list { flex-direction: column; align-items: flex-start; gap: 0; }
  .nav-list li { width: 100%; }
  .nav-link { display: block; width: 100%; padding: 14px 0; font-size: 1rem; border-bottom: 1px solid rgba(255, 255, 255, .12); }

  .hero { min-height: 0; padding: 130px 0 110px; }
  /* La foto pasa a fondo completo y el velo a vertical */
  .hero::after { background: linear-gradient(180deg, rgba(14, 26, 32, .8), rgba(14, 26, 32, .88)); }

  .cards { grid-template-columns: 1fr; margin-top: -60px; }
  .section { padding: 64px 0; }
}

@media (max-width: 620px) {
  .homes { grid-template-columns: 1fr; }
  .hero-inner h1 br, .hero-text br { display: none; }
  .hero-actions .btn { flex: 1 1 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-bottom { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
