:root {
  --ink: #14202e;
  --muted: #566476;
  --line: #dfe5ec;
  --bg: #ffffff;
  --soft: #f4f7fa;
  --brand: #12304f;
  --brand-2: #1d4a78;
  --accent: #e2632b;
  --accent-ink: #ffffff;
  --ok: #1f7a4d;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(18, 48, 79, 0.08);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font: 16px/1.6 var(--font);
  color: var(--ink);
  background: var(--bg);
}
img {
  max-width: 100%;
  height: auto;
}
a {
  color: var(--brand-2);
}
a:hover {
  color: var(--accent);
}
h1,
h2,
h3 {
  line-height: 1.2;
  color: var(--brand);
  margin: 0 0 0.6em;
}
h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.01em;
}
h3 {
  font-size: 1.15rem;
}
p {
  margin: 0 0 1em;
}
.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
}
.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 8px 12px;
  z-index: 10;
}
.skip:focus {
  left: 8px;
  top: 8px;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Cabecera */
.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 5;
}
.header-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--brand);
  text-decoration: none;
  font-size: 1.1rem;
}
.site-header nav {
  flex: 1;
}
.nav {
  list-style: none;
  display: flex;
  gap: 4px 18px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}
.nav a[aria-current='page'] {
  color: var(--accent);
}
@media (max-width: 760px) {
  .site-header nav {
    order: 3;
    flex-basis: 100%;
    padding-bottom: 10px;
    overflow-x: auto;
  }
  .nav {
    flex-wrap: nowrap;
  }
  .header-cta {
    margin-left: auto;
  }
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
}
.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-accent:hover {
  background: #c9521f;
  color: #fff;
}
.btn-ghost {
  border-color: currentColor;
  color: var(--brand);
  background: transparent;
}
.btn-light {
  background: #fff;
  color: var(--brand);
}
.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Secciones */
.section {
  padding: 56px 0;
}
.section-soft {
  background: var(--soft);
}
.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 60ch;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.4em;
}
.hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  padding: 64px 0 72px;
}
.hero h1,
.hero .lead {
  color: #fff;
}
.hero .lead {
  opacity: 0.9;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}
.hero-card {
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.hero-card h2 {
  font-size: 1.2rem;
}
.price-big {
  font-size: 2.6rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}
.checks {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
}
.checks li {
  padding-left: 28px;
  position: relative;
  margin: 0.35em 0;
}
.checks li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.45em;
  width: 12px;
  height: 7px;
  border-left: 3px solid var(--ok);
  border-bottom: 3px solid var(--ok);
  transform: rotate(-45deg);
}
.hero .checks li::before {
  border-color: #7fe0ae;
}

/* Rejillas y tarjetas */
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h3 {
  margin-bottom: 0.4em;
}
.card img {
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
}
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: middle;
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  margin-bottom: 10px;
}
.stat {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--brand);
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.9rem;
}

/* Comparativa */
.compare {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.compare th,
.compare td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.compare thead th {
  background: var(--brand);
  color: #fff;
}
.compare td.num,
.compare th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.compare .ours {
  color: var(--ok);
  font-weight: 800;
}
.table-scroll {
  overflow-x: auto;
}

/* Listas de enlaces (municipios, provincias) */
.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 4 180px;
  column-gap: 24px;
}
.link-list li {
  break-inside: avoid;
  margin: 0.2em 0;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.chips a,
.chips span {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  background: #fff;
  font-size: 0.92rem;
}

/* Inmuebles */
.prop-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.prop-card img {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
  background: var(--soft);
}
.prop-card .body {
  padding: 16px;
}
.prop-price {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--brand);
}
.prop-meta {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

/* Galeria de la ficha */
.gallery {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 16px;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  aspect-ratio: 3/2;
  background: var(--soft);
}
.gallery img:first-child {
  grid-column: 1/-1;
  aspect-ratio: 16/9;
}
@media (max-width: 760px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
.pager {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

/* FAQ */
.faq details {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 10px 0;
  background: #fff;
}
.faq summary {
  font-weight: 700;
  cursor: pointer;
  color: var(--brand);
}
.faq details p {
  margin: 0.8em 0 0;
}

/* Formularios */
.form {
  display: grid;
  gap: 14px;
}
.form-row {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
label {
  font-weight: 600;
  font-size: 0.95rem;
  display: grid;
  gap: 6px;
}
input,
select,
textarea {
  font: inherit;
  padding: 11px 12px;
  border: 1px solid #b9c4d0;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
textarea {
  min-height: 110px;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
  font-size: 0.9rem;
}
.check input {
  width: auto;
  margin-top: 4px;
}
.hp {
  position: absolute;
  left: -5000px;
}
.notice {
  padding: 14px 16px;
  border-radius: 10px;
  background: #eaf6ef;
  border: 1px solid #bfe3cd;
}
.notice-error {
  background: #fdeeee;
  border-color: #f0c2c2;
}
.result {
  background: var(--soft);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--line);
}

/* Migas */
.crumbs {
  padding: 14px 0 0;
}
.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 auto;
  padding: 0 16px;
  max-width: 1160px;
  font-size: 0.9rem;
  color: var(--muted);
}
.crumbs li + li::before {
  content: '›';
  margin-right: 6px;
}

/* Contenido legal y texto largo */
.prose {
  max-width: 760px;
}
.prose h2 {
  margin-top: 1.6em;
}

/* Pie */
.site-footer {
  background: var(--brand);
  color: #d7e2ee;
  padding: 48px 0 24px;
  margin-top: 40px;
}
.site-footer a {
  color: #fff;
}
.footer-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 2fr 1fr 1fr;
}
@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-brand {
  font-weight: 800;
  color: #fff;
  font-size: 1.2rem;
}
.footer-title {
  font-weight: 800;
  color: #fff;
}
.legal-line {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 24px;
}
.stat {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand);
  margin: 0;
}
.owner-photo {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 12px 0 20px;
}
.agent-contact img {
  border-radius: 50%;
  object-fit: cover;
  float: left;
  margin-right: 14px;
}
