/* =========================================================================
   InmoIA — Editorial Light Cream (paleta marca: navy + turquesa + crema)
   ========================================================================= */

:root {
  --bg:        #F7F5F0;
  --bg-2:      #EFEBE2;
  --paper:     #FFFFFF;
  --ink:       #0F2C4C;
  --ink-soft:  #1E3A56;
  --ink-mute:  #5B6B7B;
  --accent:    #22B8CF;
  --accent-deep:#0E7E92;
  --accent-soft:#DAF3F8;
  --wa:        #25D366;
  --wa-deep:   #1EAE57;
  --line:      rgba(15,44,76,0.12);
  --line-2:    rgba(15,44,76,0.20);

  --btn-radius: 10px;
  --radius:     14px;
  --radius-lg:  22px;
  --shadow:     0 18px 50px rgba(15,44,76,0.13);
  --shadow-sm:  0 6px 20px rgba(15,44,76,0.08);
  --maxw:       1180px;
  --header-h:   74px;
  --ease:       cubic-bezier(.22,.61,.36,1);

  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Inter", "Segoe UI", system-ui, sans-serif;
}

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

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; color: var(--ink); }
em { font-style: normal; color: var(--accent-deep); }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.4rem); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Eyebrow / titles ---------- */
.eyebrow {
  display: inline-block; font-family: var(--font-display); font-weight: 600;
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-deep); margin-bottom: 1rem;
}
.eyebrow--light { color: #9fe6f2; }
.section-title { font-size: clamp(1.7rem, 3.6vw, 2.7rem); max-width: 20ch; text-wrap: balance; }
.section-lead { color: var(--ink-mute); font-size: 1.08rem; max-width: 56ch; margin-top: .9rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  padding: .9rem 1.5rem; border-radius: var(--btn-radius); border: 1.5px solid transparent;
  cursor: pointer; transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease), color .25s var(--ease);
  text-align: center; line-height: 1.15;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-soft); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-whatsapp { background: var(--wa); color: #fff; }
.btn-whatsapp:hover { background: var(--wa-deep); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn-lg { padding: 1.05rem 1.9rem; font-size: 1.06rem; }
.wa-ico { flex: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(247,245,240,.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 38px; width: auto; }
.brand-logo--light { display: none; }

.nav { display: flex; align-items: center; gap: 1.7rem; }
.nav a {
  font-family: var(--font-display); font-weight: 500; font-size: .96rem; color: var(--ink-soft);
  position: relative; padding: .3rem 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--accent); transition: width .28s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { width: 100%; }

.header-cta { padding: .62rem 1.1rem; font-size: .95rem; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 44px; height: 44px; flex-direction: column; gap: 5px; align-items: center; justify-content: center; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); transition: transform .3s var(--ease), opacity .3s var(--ease); }

/* Header over hero (transparent, white) — added by JS; default is solid (robust) */
.site-header.at-hero { background: transparent; border-color: transparent; }
.site-header.at-hero .brand-logo--dark { display: none; }
.site-header.at-hero .brand-logo--light { display: block; }
.site-header.at-hero .nav a { color: rgba(255,255,255,.9); }
.site-header.at-hero .nav a:hover { color: #fff; }
.site-header.at-hero .nav-toggle span { background: #fff; }
.site-header.at-hero .header-cta { background: #fff; color: var(--ink); }
.site-header.at-hero .header-cta:hover { background: var(--accent-soft); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding-top: calc(var(--header-h) + 2.4rem); padding-bottom: 3rem;
  color: #fff; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.92) contrast(1.02); z-index: 0; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(110deg, rgba(15,44,76,.93) 0%, rgba(15,44,76,.82) 38%, rgba(15,44,76,.50) 70%, rgba(15,44,76,.30) 100%),
    linear-gradient(0deg, rgba(15,44,76,.55), rgba(15,44,76,0) 45%);
}
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.6rem, 4vw, 3.4rem); align-items: center; width: 100%; }
.hero-copy { max-width: 36rem; }
.hero-title { font-size: clamp(2.2rem, 5.4vw, 4rem); font-weight: 700; text-wrap: balance; color: #fff; }
.hero-title em { color: #6fdcec; }
.hero-sub { margin-top: 1.2rem; font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: rgba(255,255,255,.9); max-width: 34rem; }
.hero-points { list-style: none; display: flex; flex-wrap: wrap; gap: 1.1rem; margin-top: 1.6rem; }
.hero-points li { font-family: var(--font-display); font-weight: 500; font-size: .98rem; display: inline-flex; align-items: center; gap: .5rem; color: #fff; }
.tick { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--ink); font-size: .8rem; font-weight: 700; flex: none; }

/* ---------- Form card ---------- */
.form-card { background: var(--paper); color: var(--ink); border-radius: var(--radius-lg); padding: clamp(1.4rem, 2.6vw, 2rem); box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.6); }
.form-title { font-size: 1.4rem; }
.form-sub { color: var(--ink-mute); font-size: .96rem; margin-top: .35rem; margin-bottom: 1.1rem; }
.lead-form { display: flex; flex-direction: column; gap: .85rem; }
.lead-form label { display: flex; flex-direction: column; gap: .35rem; font-family: var(--font-display); font-weight: 500; font-size: .86rem; color: var(--ink-soft); }
.lead-form input[type="text"], .lead-form input[type="tel"], .lead-form input[type="email"] {
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  padding: .8rem .95rem; border: 1.5px solid var(--line-2); border-radius: 10px; background: #fff;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.lead-form input::placeholder { color: #9aa6b2; }
.lead-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lead-form .opt { color: var(--ink-mute); font-weight: 400; }
.lead-form .hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.lead-form .check { flex-direction: row; align-items: flex-start; gap: .55rem; font-weight: 400; font-family: var(--font-body); font-size: .82rem; color: var(--ink-mute); }
.lead-form .check input { margin-top: .2rem; accent-color: var(--accent-deep); width: 16px; height: 16px; flex: none; }
.lead-form .check a { color: var(--accent-deep); text-decoration: underline; }
.form-foot { font-size: .8rem; color: var(--ink-mute); text-align: center; margin-top: .2rem; }
.form-success { background: var(--accent-soft); color: var(--ink); border-radius: 10px; padding: .8rem 1rem; font-size: .92rem; text-align: center; }

/* ---------- Stats band ---------- */
.stats { background: var(--ink); color: #fff; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding-block: 2.2rem; }
.stat { text-align: center; border-right: 1px solid rgba(255,255,255,.14); padding-inline: .6rem; }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.2rem, 2.4vw, 1.7rem); color: #fff; }
.stat span { display: block; font-size: .86rem; color: rgba(255,255,255,.72); margin-top: .2rem; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.4rem, 8vw, 6rem); }
.section--alt { background: var(--bg-2); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2.4rem; }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem 1.6rem; box-shadow: var(--shadow-sm); }
.step-num { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: #fff; background: var(--accent); width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 1.1rem; }
.step h3 { font-size: 1.22rem; margin-bottom: .5rem; }
.step p { color: var(--ink-mute); font-size: .98rem; }

/* Split (por qué) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.8rem, 4vw, 3.6rem); align-items: center; }
.split-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.split-copy p { color: var(--ink-mute); margin-top: 1rem; }
.feature-list { list-style: none; margin: 1.4rem 0 1.8rem; display: flex; flex-direction: column; gap: .7rem; }
.feature-list li { display: flex; align-items: center; gap: .7rem; font-weight: 500; font-family: var(--font-display); font-size: 1rem; color: var(--ink-soft); }
.feature-list .tick { background: var(--accent); }

/* Zonas */
.zonas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2.4rem; }
.zona-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.zona-card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; transition: transform .6s var(--ease); }
.zona-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.zona-card:hover img { transform: scale(1.06); }
.zona-body { padding: 1.2rem 1.3rem 1.5rem; }
.zona-body h3 { font-size: 1.3rem; margin-bottom: .35rem; }
.zona-body p { color: var(--ink-mute); font-size: .94rem; }
.zonas-extra { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1rem; }
.zonas-extra-label { font-family: var(--font-display); font-weight: 600; color: var(--ink-soft); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .6rem; }
.chips li { background: var(--accent-soft); color: var(--accent-deep); border-radius: 999px; padding: .42rem .95rem; font-size: .88rem; font-weight: 500; font-family: var(--font-display); }

/* Testimonios */
.placeholder-note { font-size: .82rem; color: var(--ink-mute); font-style: italic; margin-top: .6rem; }
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2rem; }
.testi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.stars { color: #E8B23A; letter-spacing: .12em; margin-bottom: .8rem; }
.testi blockquote { font-size: 1.04rem; color: var(--ink-soft); line-height: 1.55; }
.testi figcaption { margin-top: 1rem; font-family: var(--font-display); font-weight: 600; font-size: .9rem; color: var(--ink); }

/* FAQ */
.faq-wrap { max-width: 820px; }
.faq { margin-top: 2rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 1.2rem .2rem; font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; color: var(--ink); display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.5rem; color: var(--accent-deep); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 .2rem 1.3rem; color: var(--ink-mute); max-width: 70ch; }

/* CTA final */
.cta-final { background: var(--ink); color: #fff; padding-block: clamp(3.4rem, 8vw, 5.4rem); }
.cta-inner { text-align: center; max-width: 720px; margin-inline: auto; }
.cta-final h2 { color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.6rem); text-wrap: balance; }
.cta-final p { color: rgba(255,255,255,.8); margin-top: .9rem; font-size: 1.08rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 1.8rem; }

/* Footer */
.site-footer { background: #0A2138; color: rgba(255,255,255,.78); padding-block: 3rem 1.6rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-logo { height: 40px; width: auto; margin-bottom: 1rem; }
.footer-tag { font-size: .95rem; max-width: 34ch; color: rgba(255,255,255,.72); }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: .9rem; }
.footer-col p { font-size: .94rem; margin-bottom: .5rem; }
.footer-col a:hover, .footer-legal a:hover { color: var(--accent); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem; padding-top: 1.4rem; font-size: .85rem; color: rgba(255,255,255,.6); }
.footer-legal a { color: rgba(255,255,255,.7); }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff;
  display: grid; place-items: center; box-shadow: 0 10px 26px rgba(37,211,102,.45);
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.wa-float:hover { transform: scale(1.08); background: var(--wa-deep); }

/* ---------- Páginas legales ---------- */
.legal-page { max-width: 800px; margin-inline: auto; padding: calc(var(--header-h) + 2.6rem) clamp(1.1rem, 4vw, 2.4rem) 4rem; }
.legal-page .back-link { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: 1.6rem; font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.legal-page .back-link:hover { color: var(--accent-deep); }
.legal-page h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .4rem; }
.legal-page .updated { color: var(--ink-mute); font-size: .9rem; margin-bottom: 1.6rem; }
.legal-page h2 { font-size: 1.22rem; margin: 2rem 0 .6rem; }
.legal-page p, .legal-page li { color: var(--ink-soft); margin-bottom: .7rem; }
.legal-page ul { padding-left: 1.3rem; }
.legal-page a { color: var(--accent-deep); text-decoration: underline; }
.legal-page .note { background: var(--accent-soft); border-radius: 12px; padding: 1rem 1.2rem; font-size: .9rem; color: var(--ink); margin-bottom: 1.6rem; }
.legal-page .fill { background: #FFF3D6; border-radius: 4px; padding: 0 .25rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }   /* defensive (gotcha A.4.5) */
.steps .reveal:nth-child(2), .zonas-grid .reveal:nth-child(2), .testi-grid .reveal:nth-child(2) { transition-delay: .1s; }
.steps .reveal:nth-child(3), .zonas-grid .reveal:nth-child(3), .testi-grid .reveal:nth-child(3) { transition-delay: .2s; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-copy { max-width: 40rem; }
  .split { grid-template-columns: 1fr; }
  .split-media { order: -1; }
}

@media (max-width: 880px) {
  .nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }

  .site-header.nav-open { background: var(--paper); border-color: var(--line); }
  .site-header.nav-open .brand-logo--dark { display: block; }
  .site-header.nav-open .brand-logo--light { display: none; }
  .site-header.nav-open .nav-toggle span { background: var(--ink); }
  .site-header.nav-open .nav {
    display: flex; flex-direction: column; align-items: flex-start; gap: .2rem;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .6rem clamp(1.1rem, 4vw, 2.4rem) 1.1rem; box-shadow: var(--shadow);
  }
  .site-header.nav-open .nav a { color: var(--ink-soft); width: 100%; padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 760px) {
  .steps, .zonas-grid, .testi-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
  .stat:nth-child(2) { border-right: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
}

@media (max-width: 480px) {
  .hero { padding-top: calc(var(--header-h) + 1.4rem); }
  .hero-points { gap: .7rem 1.1rem; }
  .btn { width: 100%; }
  .cta-actions .btn { width: 100%; }
}
