/* Estilos — Lola Fernández. Solo tokens de tokens.css (ver DESIGN.md). */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--s-4)); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, .h3 {
  font-family: var(--font-display);
  font-variant-numeric: lining-nums;
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: -0.01em;
  margin: 0 0 var(--s-4);
  color: var(--c-ink);
  text-wrap: balance;
}
h1 { font-size: var(--fs-3xl); font-weight: 500; line-height: var(--lh-tight); }
h2 { font-size: var(--fs-3xl); font-weight: 500; line-height: 1.1; }
h3, .h3 { font-size: var(--fs-xl); }
p { margin: 0 0 var(--s-4); }
a { color: var(--c-primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--c-primary-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
main:focus { outline: none; }
::selection { background: var(--c-rose); color: var(--c-ink); }

.wrap { width: 100%; max-width: calc(var(--w-content) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.lead { font-size: var(--fs-lg); line-height: 1.5; color: var(--c-ink); max-width: 46ch; }
.prose p { max-width: var(--measure); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--s-4); top: -100px; z-index: 100; background: var(--c-ink); color: var(--c-on-dark); padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); }
.skip-link:focus { top: var(--s-4); }
.icon { width: 20px; height: 20px; flex: none; }

/* Separador de marca: las tres líneas del logo */
.lf-lines { width: 48px; height: 10px; color: var(--c-ink); flex: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5);
  border: 1px solid transparent; border-radius: var(--r-sm);
  font: 700 var(--fs-sm)/1.2 var(--font-body); letter-spacing: .01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.btn:hover { text-decoration: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn--primary { background: var(--c-primary); color: #fff; }
.btn--primary:hover { background: var(--c-primary-hover); color: #fff; }
.btn--secondary { background: transparent; color: var(--c-ink); border-color: var(--c-ink); }
.btn--secondary:hover { background: var(--c-ink); color: var(--c-on-dark); }
.btn--quiet { background: none; color: var(--c-primary); padding-inline: 0; min-height: 40px; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.btn--quiet:hover { color: var(--c-primary-hover); text-decoration-thickness: 2px; }
.btn--light { background: var(--c-on-dark); color: var(--c-ink); }
.btn--light:hover { background: #fff; color: var(--c-ink); }
.btn--outline-light { color: var(--c-on-dark); border-color: rgba(247, 243, 236, .55); background: transparent; }
.btn--outline-light:hover { border-color: var(--c-on-dark); color: #fff; }
.btn--block { width: 100%; }

.link-arrow { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 700; text-decoration: none; white-space: nowrap; }
.link-arrow .icon { transition: transform var(--t-fast); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Etiquetas y precio ---------- */
.tag {
  display: inline-block; padding: 3px 8px; border-radius: var(--r-sm);
  font: 700 0.8125rem/1.35 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
}
.tag--op { background: var(--c-surface); color: var(--c-ink); }
.tag--rose { background: var(--c-rose); color: var(--c-ink); }
.tag--new, .ficha-head__meta .tag--op.tag--new { background: var(--c-primary); color: #fff; }
.price { font-variant-numeric: lining-nums; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-xl); line-height: 1.1; margin: 0; color: var(--c-ink); display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-3); }
.price--lg { font-size: var(--fs-2xl); }
.price--xl { font-size: var(--fs-2xl); }
.price__old { font-family: var(--font-body); font-weight: 400; font-size: var(--fs-sm); color: var(--c-muted); }
.price__extra { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-2) 0 0; }
.price__note { font-family: var(--font-body); font-weight: 400; font-size: var(--fs-xs); color: var(--c-muted); }
.price__extra--iva { font-size: var(--fs-xs); color: var(--c-muted); }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: var(--s-3); color: var(--c-ink); text-decoration: none; }
.logo:hover { color: var(--c-ink); }
.logo__mark { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.logo__lf { font-variant-numeric: lining-nums; font-family: var(--font-display); font-weight: 600; font-size: 42px; line-height: .8; letter-spacing: -0.02em; }
.logo__mark .lf-lines { width: 44px; height: 10px; color: currentColor; }
.logo__text { display: flex; flex-direction: column; border-left: 1px solid currentColor; padding-left: var(--s-3); }
.logo__name { font-family: var(--font-display); font-weight: 600; font-size: 23px; line-height: 1.1; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.logo__tag { font-size: 14px; letter-spacing: .04em; line-height: 1.4; opacity: .85; }
/* Logo de la cabecera en ordenador: un 50 % más grande (en móvil, hasta 720 px, se queda como arriba) */
@media (min-width: 721px) {
  .site-header .logo { gap: 18px; }
  .site-header .logo__mark { gap: 3px; }
  .site-header .logo__lf { font-size: 63px; }
  .site-header .logo__mark .lf-lines { width: 66px; height: 15px; }
  .site-header .logo__text { padding-left: 18px; }
  .site-header .logo__name { font-size: 34px; }
  .site-header .logo__tag { font-size: 21px; }
}
.logo--stacked { flex-direction: column; gap: var(--s-2); text-align: center; color: var(--c-on-dark); }
.logo--stacked:hover { color: var(--c-on-dark); }
.logo--stacked .logo__lf { font-variant-numeric: lining-nums; font-size: 56px; }
.logo--stacked .logo__mark { gap: 6px; }
.logo--stacked .logo__mark .lf-lines { width: 64px; height: 12px; }
.logo--stacked .logo__text { border: 0; padding: 0; align-items: center; }
.logo--stacked .logo__name { font-size: 22px; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--c-bg); border-bottom: 1px solid var(--c-border);
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); min-height: var(--header-h); }
.site-nav { display: flex; align-items: center; gap: var(--s-6); }
.site-nav__list { display: flex; gap: var(--s-5); list-style: none; margin: 0; padding: 0; }
.site-nav a { color: inherit; text-decoration: none; font-weight: 700; font-size: var(--fs-sm); }
.site-nav__list a { padding-block: var(--s-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.site-nav__list a:hover, .site-nav__list a[aria-current="page"] { border-bottom-color: currentColor; }
.site-nav__phone { display: inline-flex; align-items: center; gap: var(--s-2); font-variant-numeric: tabular-nums; }
.site-nav__phone .icon { width: 18px; height: 18px; }
.site-nav__lang { display: inline-grid; place-items: center; min-width: 40px; height: 32px; border: 1px solid currentColor; border-radius: var(--r-sm); font-size: 13px !important; letter-spacing: .08em; }
.site-nav__lang:hover { background: var(--c-ink); color: var(--c-on-dark) !important; border-color: var(--c-ink); }
.menu-toggle { display: none; }

/* Cabecera sobre la foto de portada */
.site-header--over { position: fixed; left: 0; right: 0; background: transparent; border-color: transparent; color: var(--c-on-dark); }
.site-header--over .logo { color: var(--c-on-dark); }
.site-header--over .site-nav__lang:hover { background: var(--c-on-dark); color: var(--c-ink) !important; border-color: var(--c-on-dark); }
.site-header--over.is-solid { background: var(--c-bg); border-color: var(--c-border); color: var(--c-ink); }
.site-header--over.is-solid .logo { color: var(--c-ink); }
.site-header--over.is-solid .site-nav__lang:hover { background: var(--c-ink); color: var(--c-on-dark) !important; border-color: var(--c-ink); }

@media (max-width: 1240px) { /* con el logo grande, el número de teléfono deja paso al icono */
  .site-nav__phone span { display: none; }
}
@media (max-width: 1140px) { /* menú de hamburguesa: con el logo grande, el menú completo ya no cabe en una línea */
  .menu-toggle {
    display: inline-flex; align-items: center; gap: var(--s-2);
    min-height: 44px; padding: 0 var(--s-3); margin-right: calc(-1 * var(--s-3));
    background: none; border: 0; color: inherit; font: 700 var(--fs-sm) var(--font-body); cursor: pointer;
  }
  .menu-toggle > span { display: inline-flex; align-items: center; gap: var(--s-2); }
  .menu-toggle__close { display: none !important; }
  .menu-open .menu-toggle__open { display: none !important; }
  .menu-open .menu-toggle__close { display: inline-flex !important; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 40;
    flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: var(--s-6);
    padding: var(--s-7) var(--gutter); background: var(--c-bg); color: var(--c-ink);
    visibility: hidden; opacity: 0; transition: opacity .2s ease, visibility 0s linear .2s;
    overflow-y: auto;
  }
  .menu-open .site-nav { visibility: visible; opacity: 1; transition: opacity .2s ease, visibility 0s; }
  .site-nav__list { flex-direction: column; gap: var(--s-2); }
  .site-nav__list a { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-2xl); border: 0; }
  .site-nav__phone span { display: inline; }
  .menu-open .site-header { background: var(--c-bg); color: var(--c-ink); border-color: var(--c-border); }
  .menu-open .site-header .logo { color: var(--c-ink); }
  body.menu-open { overflow: hidden; }
}
@media (max-width: 420px) {
  .logo__tag { display: none; }
  .logo__name { font-size: 17px; letter-spacing: .06em; }
  .logo__lf { font-variant-numeric: lining-nums; font-size: 34px; }
}

/* ---------- Portada ---------- */
.hero { position: relative; min-height: max(620px, 92vh); min-height: max(620px, 92svh); display: flex; flex-direction: column; justify-content: flex-end; color: var(--c-on-dark); isolation: isolate; background: var(--c-ink); }
.hero__slides { position: absolute; inset: 0; z-index: -2; }
.hero__slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.2s ease; }
.hero__slide.is-active { opacity: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; }
.hero__scrim { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(to right, rgba(18, 26, 32, .55) 0%, rgba(18, 26, 32, .3) 45%, rgba(18, 26, 32, 0) 72%),
  linear-gradient(to top, rgba(18, 26, 32, .72) 0%, rgba(18, 26, 32, .2) 50%, rgba(18, 26, 32, 0) 70%),
  linear-gradient(to bottom, rgba(18, 26, 32, .6), rgba(18, 26, 32, 0) 24%); }
.hero__places, .hero__title, .hero__sub, .hero__caption { text-shadow: 0 1px 18px rgba(12, 17, 21, .45); }
.hero__content { padding-top: calc(var(--header-h) + var(--s-8)); padding-bottom: var(--s-6); }
.hero__places { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: var(--s-4); color: var(--c-on-dark); }
.hero__title { color: #fff; font-size: var(--fs-4xl); font-weight: 500; max-width: 20ch; margin-bottom: var(--s-5); }
.hero__line { display: block; }
.hero__sub { max-width: 56ch; font-size: var(--fs-md); color: var(--c-on-dark); margin-bottom: var(--s-6); }
.hero__meta { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); padding-bottom: var(--s-5); font-size: var(--fs-xs); }
.hero__caption { margin: 0; color: var(--c-on-dark); font-style: italic; font-family: var(--font-display); font-size: var(--fs-md); }
.hero__controls { display: flex; align-items: center; gap: var(--s-3); }
.hero__progress { font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.hero__pause { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm); border: 1px solid rgba(247, 243, 236, .5); background: transparent; color: var(--c-on-dark); cursor: pointer; }
.hero__pause:hover { border-color: var(--c-on-dark); }
.hero__pause .icon { width: 16px; height: 16px; }
.hero__play-icon { display: none; }
.hero.is-paused .hero__pause-icon { display: none; }
.hero.is-paused .hero__play-icon { display: block; }

.hero__owners { display: inline-flex; align-items: center; gap: var(--s-2); margin-top: var(--s-4); color: var(--c-on-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-shadow: 0 1px 12px rgba(12, 17, 21, .5); }
.hero__owners:hover { color: #fff; text-decoration-thickness: 2px; }
.hero__owners:focus-visible { box-shadow: 0 0 0 3px #fff; }

/* Buscador */
.search {
  display: grid; grid-template-columns: auto 1fr 1fr auto; align-items: end; gap: var(--s-3);
  max-width: 880px; padding: var(--s-4); background: var(--c-surface); color: var(--c-ink); border-radius: var(--r-md);
}
.search__op { display: flex; border: 0; padding: 0; margin: 0; align-self: end; }
.search__op label { position: relative; }
.search__op input { position: absolute; opacity: 0; pointer-events: none; }
.search__op span { display: grid; place-items: center; height: 48px; padding: 0 var(--s-4); border: 1px solid var(--c-border-strong); font-weight: 700; font-size: var(--fs-sm); cursor: pointer; }
.search__op label:first-of-type span { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.search__op label:last-of-type span { border-radius: 0 var(--r-sm) var(--r-sm) 0; border-left: 0; }
.search__op input:checked + span { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-on-dark); }
.search__op input:focus-visible + span { box-shadow: var(--focus); position: relative; z-index: 1; }
.search__field, .field { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
.search__label, .field__label { font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--c-muted); }
select {
  appearance: none; -webkit-appearance: none; width: 100%; height: 48px; padding: 0 40px 0 var(--s-3);
  font: 400 var(--fs-sm) var(--font-body); color: var(--c-ink); background-color: var(--c-surface);
  border: 1px solid var(--c-border-strong); border-radius: var(--r-sm); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231C2830' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
select:hover { border-color: var(--c-ink); }
select:focus-visible { box-shadow: var(--focus); border-color: var(--c-primary); }

@media (max-width: 860px) {
  .search { grid-template-columns: 1fr 1fr; }
  .search__op { grid-column: 1 / -1; }
  .search__op label { flex: 1; }
  .search__submit { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .hero { min-height: auto; }
  .hero__content { padding-top: calc(var(--header-h) + 18vh); }
  .hero__sub { font-size: var(--fs-sm); margin-bottom: var(--s-5); }
  .hero__title { font-size: var(--fs-4xl); }
  .search { grid-template-columns: 1fr; padding: var(--s-3); }
  .hero__meta { padding-bottom: var(--s-4); }
}

/* ---------- Cabeceras de sección ---------- */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-6); margin-bottom: var(--s-7); }
.section-head h2 { margin-bottom: var(--s-3); }
.section-head__text { color: var(--c-muted); max-width: 52ch; margin: 0; }
@media (max-width: 720px) {
  .section-head { flex-direction: column; align-items: flex-start; gap: var(--s-4); margin-bottom: var(--s-6); }
}

/* ---------- Tarjeta de vivienda ---------- */
.card { min-width: 0; }
.card__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md); overflow: hidden; transition: box-shadow var(--t-fast), border-color var(--t-fast); }
.card__link:hover { color: inherit; box-shadow: var(--shadow-1); border-color: transparent; }
.card__link:hover .card__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.card__media { position: relative; aspect-ratio: 4 / 3; background: var(--c-stone); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card__link:hover .card__media img { transform: scale(1.025); }
.card__media .tag--op { position: absolute; top: var(--s-3); left: var(--s-3); }
.card__count { position: absolute; right: var(--s-3); bottom: var(--s-3); display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: var(--r-sm); background: rgba(18, 26, 32, .72); color: #fff; font-size: 13px; font-weight: 700; }
.card__count .icon { width: 15px; height: 15px; }
.card__body { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-5); flex: 1; }
.card__zone { margin: 0; font-size: var(--fs-xs); color: var(--c-muted); }
.card__title { font-size: var(--fs-lg); margin: 0 0 var(--s-2); line-height: 1.2; }
.card__facts { margin: var(--s-1) 0 0; font-size: var(--fs-sm); }
.card__ref { margin: auto 0 0; padding-top: var(--s-3); font-size: 13px; color: var(--c-muted); letter-spacing: .04em; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s-6) var(--s-5); }

/* Destacadas: una grande + dos apiladas */
.featured__grid { display: grid; grid-template-columns: 1.45fr 1fr; grid-template-rows: auto auto; gap: var(--s-5); }
.featured__grid .card--large { grid-row: span 2; }
.featured__grid .card--large .card__media { aspect-ratio: auto; flex: 1; min-height: 360px; }
.featured__grid .card--large .card__body { flex: none; }
.featured__grid .card--large .card__title { font-size: var(--fs-xl); }
.featured__grid .card--large .price { font-size: var(--fs-2xl); }
.featured__grid .card:not(.card--large) .card__link { flex-direction: row; }
.featured__grid .card:not(.card--large) .card__media { aspect-ratio: auto; width: 46%; flex: none; }
@media (max-width: 960px) {
  .featured__grid { grid-template-columns: 1fr; }
  .featured__grid .card--large { grid-row: auto; }
  .featured__grid .card--large .card__media { aspect-ratio: 4 / 3; min-height: 0; }
}
@media (max-width: 560px) {
  .featured__grid .card:not(.card--large) .card__link { flex-direction: column; }
  .featured__grid .card:not(.card--large) .card__media { width: 100%; aspect-ratio: 4 / 3; }
}

/* ---------- Servicios (inicio) ---------- */
.services { background: var(--c-stone); }
.services__grid { display: grid; grid-template-columns: 5fr 7fr; gap: var(--s-8); align-items: start; }
.services__aside { position: sticky; top: calc(var(--header-h) + var(--s-6)); }
.services__aside .lf-lines { margin-bottom: var(--s-5); }
.services__photo { margin: var(--s-6) 0 0; max-width: 340px; }
.services__photo img { border-radius: var(--r-md); aspect-ratio: 4 / 5; object-fit: cover; object-position: center 35%; width: 100%; }
.service-list { list-style: none; margin: 0 0 var(--s-6); padding: 0; }
.service { padding: var(--s-5) 0; border-top: 1px solid var(--c-border); }
.service:last-child { border-bottom: 1px solid var(--c-border); }
.service__num { font-variant-numeric: lining-nums; font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 500; line-height: 1; color: var(--c-rose-text); padding-top: 2px; }
.service__title { font-size: var(--fs-xl); margin-bottom: var(--s-2); }
.service p { margin: 0; color: var(--c-muted); max-width: 54ch; }
@media (max-width: 900px) {
  .services__grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .services__aside { position: static; }
  .services__photo { display: none; }
}

/* ---------- Nosotros ---------- */
.about__grid { display: grid; grid-template-columns: 5fr 6fr; gap: var(--s-8); align-items: start; }
.about__photo { margin: 0; position: sticky; top: calc(var(--header-h) + var(--s-6)); }
.about__photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--r-md); }
.about__quote { margin: var(--s-6) 0; padding: 0 0 0 var(--s-5); border-left: 2px solid var(--c-rose); }
.about__quote p { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: var(--fs-2xl); line-height: 1.22; margin-bottom: var(--s-4); }
.about__quote footer { font-size: var(--fs-sm); color: var(--c-muted); }
.about__quote strong { color: var(--c-ink); }
.about__body > p { max-width: 58ch; }
.about__facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: var(--s-6) 0; border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); }
.about__facts div { padding: var(--s-4) var(--s-4) var(--s-4) 0; }
.about__facts div + div { padding-left: var(--s-4); border-left: 1px solid var(--c-border); }
.about__facts dt { font-variant-numeric: lining-nums; font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; line-height: 1.1; }
.about__facts dd { margin: var(--s-1) 0 0; font-size: var(--fs-xs); color: var(--c-muted); }
.about__media { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--s-4); align-items: start; }
.about__media > img { border-radius: var(--r-md); aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
.about__video { margin: 0; }
/* height:auto para que mande la proporción 9:16 (el atributo height="960" la anulaba y el vídeo se recortaba) */
.about__video video { width: 100%; max-width: 320px; height: auto; aspect-ratio: 9 / 16; object-fit: contain; border-radius: var(--r-md); background: var(--c-ink); }
.about__video figcaption { font-size: var(--fs-xs); color: var(--c-muted); margin-top: var(--s-2); }
/* En el móvil, la foto y el vídeo uno debajo del otro: lado a lado el vídeo quedaba en 140 px de ancho */
@media (max-width: 560px) {
  .about__media { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .about__photo { position: static; }
  .about__photo img { aspect-ratio: 4 / 3; }
}
@media (max-width: 560px) {
  .about__facts { grid-template-columns: 1fr; }
  .about__facts div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--c-border); }
  .about__quote p { font-size: var(--fs-xl); }
}

/* ---------- Zonas ---------- */
.zones__grid { display: grid; grid-template-columns: 7fr 5fr; gap: var(--s-8); align-items: center; }
.zones__photo { margin: 0; }
.zones__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); background: var(--c-stone); }
.zones__list { margin: var(--s-6) 0 0; border-top: 1px solid var(--c-border); }
.zones__list div { padding: var(--s-4) 0; border-bottom: 1px solid var(--c-border); }
.zones__list dt { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; line-height: 1.2; }
.zones__list dd { margin: var(--s-1) 0 0; color: var(--c-muted); }
.zones__more { margin: var(--s-5) 0 0; font-size: var(--fs-sm); color: var(--c-muted); }
@media (max-width: 900px) {
  .zones__grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .zones__photo { order: 2; }
}

/* ---------- Opiniones ---------- */
.reviews { background: var(--c-stone); }
.reviews h2 { margin-bottom: var(--s-7); }
.reviews__grid { display: grid; grid-template-columns: 7fr 5fr; gap: var(--s-8); }
.review { margin: 0; }
.review blockquote { margin: 0 0 var(--s-4); }
.review blockquote p { margin: 0; }
.review figcaption { display: flex; flex-direction: column; font-size: var(--fs-sm); }
.review figcaption span { color: var(--c-muted); font-size: var(--fs-xs); }
.review--main blockquote p { font-family: var(--font-display); font-size: var(--fs-2xl); line-height: 1.25; font-weight: 500; }
.review--main blockquote p::before { content: "“"; display: block; font-size: 88px; line-height: .6; color: var(--c-rose); margin-bottom: var(--s-3); }
.reviews__list { display: flex; flex-direction: column; gap: var(--s-6); }
.reviews__list .review { padding-left: var(--s-5); border-left: 1px solid var(--c-border); }
@media (max-width: 900px) {
  .reviews__grid { grid-template-columns: 1fr; gap: var(--s-7); }
  .review--main blockquote p { font-size: var(--fs-xl); }
}

/* ---------- Propietarios ---------- */
.owners-band { background: var(--c-surface); border-block: 1px solid var(--c-border); }
.owners { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); align-items: center; }
.owners__visual { position: relative; padding-bottom: var(--s-8); }
.owners__photo { width: 86%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); }
.owners__card { position: absolute; right: 0; bottom: 0; width: min(330px, 62%); }
.owners__card .card__link { box-shadow: var(--shadow-1); border-color: transparent; }
.owners__card .card__body { padding: var(--s-4); }
.owners__card .card__title { font-size: var(--fs-md); }
.owners__card .price { font-size: var(--fs-lg); }
.owners__body .btn { margin-top: var(--s-6); }
@media (max-width: 900px) {
  .owners { grid-template-columns: 1fr; gap: var(--s-6); }
  .owners__visual { order: 2; }
}
@media (max-width: 560px) {
  .owners__photo { width: 100%; }
  .owners__card { position: relative; width: 88%; margin: calc(-1 * var(--s-8)) 0 0 auto; }
  .owners__visual { padding-bottom: 0; }
}

/* Lista con las tres líneas como viñeta */
.ticks { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: grid; gap: var(--s-3); }
.ticks li { display: flex; align-items: baseline; gap: var(--s-3); }
.ticks .lf-lines { width: 22px; height: 6px; color: var(--c-muted); transform: translateY(-2px); }
.ticks--cols { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-6); }
@media (max-width: 560px) { .ticks--cols { grid-template-columns: 1fr; } }

/* ---------- Pie / contacto ---------- */
.site-footer { background: var(--c-ink); color: var(--c-on-dark); }
.site-footer a { color: var(--c-on-dark); }
.site-footer a:hover { color: #fff; }
.site-footer .btn--light, .site-footer .btn--light:hover { color: var(--c-ink); }
.contact { display: grid; grid-template-columns: 6fr 5fr; gap: var(--s-8); padding-block: var(--s-9) var(--s-8); border-bottom: 1px solid rgba(247, 243, 236, .16); }
.contact h2 { color: var(--c-on-dark); }
.contact__intro p { color: var(--c-on-dark-muted); max-width: 44ch; }
.contact__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.contact__data { margin: 0; display: grid; gap: var(--s-5); align-content: start; }
.contact__data dt { display: flex; align-items: center; gap: var(--s-2); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-on-dark-muted); margin-bottom: var(--s-1); }
.contact__data dt .icon { width: 16px; height: 16px; }
.contact__data dd { margin: 0; }
.contact__note { color: var(--c-on-dark-muted); font-size: var(--fs-sm); }
.site-footer__bottom { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: var(--s-7); padding-block: var(--s-7); }
.site-footer__text { margin: 0; color: var(--c-on-dark-muted); max-width: 32ch; }
.site-footer__legal { margin: 0; font-size: var(--fs-xs); color: var(--c-on-dark-muted); text-align: right; }
.site-footer__legal a { color: var(--c-on-dark-muted); }
:where(.site-footer) :focus-visible { box-shadow: 0 0 0 2px var(--c-ink), 0 0 0 5px var(--c-on-dark); }
@media (max-width: 900px) {
  .contact { grid-template-columns: 1fr; gap: var(--s-7); padding-block: var(--s-8) var(--s-7); }
  .site-footer__bottom { grid-template-columns: 1fr; justify-items: start; gap: var(--s-5); }
  .site-footer__bottom .logo--stacked { align-items: flex-start; text-align: left; }
  .site-footer__bottom .logo--stacked .logo__text { align-items: flex-start; }
  .site-footer__legal { text-align: left; }
}
@media (max-width: 480px) {
  .contact__actions .btn { width: 100%; white-space: normal; }
}

/* Barra de contacto fija en el móvil */
.mobile-bar { display: none; }
@media (max-width: 720px) {
  .mobile-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2);
    padding: var(--s-2) var(--gutter) calc(var(--s-2) + env(safe-area-inset-bottom));
    background: var(--c-bg); border-top: 1px solid var(--c-border);
  }
  .mobile-bar .btn { min-height: 48px; padding: 0 var(--s-3); }
  .mobile-bar .btn--secondary { background: var(--c-surface); }
  body { padding-bottom: 72px; }
  .menu-open .mobile-bar { display: none; }
}

/* ---------- Páginas interiores ---------- */
.page-head { padding-top: var(--s-8); padding-bottom: var(--s-7); }
.page-head h1 { font-size: var(--fs-4xl); }
.page-head--split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); align-items: end; }
.page-head__photo { margin: 0; }
.page-head__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); }
@media (max-width: 900px) {
  .page-head--split { grid-template-columns: 1fr; gap: var(--s-6); }
  .page-head { padding-top: var(--s-7); padding-bottom: var(--s-6); }
}

/* Catálogo */
.filters-wrap__toggle { display: none; }
.filters-wrap > summary::-webkit-details-marker { display: none; }
@media (max-width: 720px) {
  .filters-wrap__toggle { display: inline-flex; list-style: none; width: 100%; margin-bottom: var(--s-3); }
  .filters-wrap[open] .filters-wrap__toggle { background: var(--c-ink); color: var(--c-on-dark); }
}
@media (min-width: 721px) {
  .filters-wrap > summary { display: none; }
}
.error-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.filters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-3); padding: var(--s-4); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md); }
.catalog { padding-bottom: var(--section); }
.catalog__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); margin: var(--s-5) 0 var(--s-5); min-height: 40px; }
.catalog__count { margin: 0; font-weight: 700; }
.card[hidden] { display: none; }
.catalog__jump { margin-top: var(--s-5); }
/* Apartados de la página de propiedades: segunda mano y obra nueva */
.catalog__group + .catalog__group { margin-top: var(--s-9); }
.catalog__group-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2) var(--s-6);
  margin-bottom: var(--s-6); padding-bottom: var(--s-4); border-bottom: 1px solid var(--c-border); }
.catalog__group-head h2 { font-size: var(--fs-2xl); margin: 0; }
.catalog__group-head p { margin: 0; max-width: 60ch; color: var(--c-muted); }
@media (max-width: 720px) { .catalog__group + .catalog__group { margin-top: var(--s-8); } }
.empty { padding: var(--s-8) var(--s-6); text-align: left; background: var(--c-stone); border-radius: var(--r-md); }
.empty h2 { font-size: var(--fs-2xl); }
.empty p { max-width: 56ch; color: var(--c-ink); }
.empty .btn { margin-top: var(--s-3); }
@media (max-width: 1080px) { .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .filters { grid-template-columns: 1fr 1fr; padding: var(--s-3); } }

/* Ficha */
.ficha-head { padding-top: var(--s-6); padding-bottom: var(--s-6); }
.back-link { display: inline-flex; align-items: center; gap: var(--s-1); font-weight: 700; font-size: var(--fs-sm); text-decoration: none; margin-bottom: var(--s-5); margin-left: -4px; }
.back-link .icon { width: 18px; height: 18px; }
.ficha-head__row { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-6); }
.ficha-head__title { max-width: 760px; }
.ficha-head__title h1 { font-size: var(--fs-3xl); margin-bottom: var(--s-3); }
.ficha-head__meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-3); color: var(--c-muted); font-size: var(--fs-sm); margin-bottom: var(--s-4); }
.ficha-head__meta .tag--op { background: var(--c-ink); color: var(--c-on-dark); }
.ficha-head__facts { margin: 0; font-size: var(--fs-md); }
.ficha-head__price { text-align: right; flex: none; }
.ficha-head__price .price { justify-content: flex-end; }
.ficha-head__price .price__extra { justify-content: flex-end; }
@media (max-width: 720px) {
  .ficha-head__row { flex-direction: column; align-items: flex-start; gap: var(--s-4); }
  .ficha-head__price { text-align: left; }
  .ficha-head__price .price, .ficha-head__price .price__extra { justify-content: flex-start; }
}

.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: var(--s-2); height: min(62vh, 560px); position: relative; }
.gallery__main { grid-row: span 2; }
.gallery__side { display: contents; }
.gallery__main, .gallery__item { position: relative; display: block; overflow: hidden; background: var(--c-stone); }
.gallery__main img, .gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: opacity var(--t-fast); }
.gallery__main:hover img, .gallery__item:hover img { opacity: .9; }
.gallery__main { border-radius: var(--r-md) 0 0 var(--r-md); }
.gallery__item:nth-child(2) { border-top-right-radius: var(--r-md); }
.gallery__item:nth-child(4) { border-bottom-right-radius: var(--r-md); }
/* Planos: enteros sobre blanco, sin recortar */
.gallery__item--plano { background: #fff; }
.gallery__item--plano img { object-fit: contain; padding: var(--s-2); }
/* Con 4 fotos, la tercera lateral ocupa el ancho de dos */
.gallery--4 .gallery__item:nth-child(3) { grid-column: span 2; border-bottom-right-radius: var(--r-md); }
.gallery--3 { grid-template-columns: 2fr 1fr; }
.gallery--3 .gallery__item:nth-child(1) { border-top-right-radius: var(--r-md); }
.gallery--3 .gallery__item:nth-child(2) { border-top-right-radius: 0; border-bottom-right-radius: var(--r-md); }
.gallery--2, .gallery--1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.gallery--2 .gallery__main, .gallery--1 .gallery__main { grid-row: auto; border-radius: var(--r-md); }
.gallery--2 .gallery__item { display: none; }
.gallery__more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: var(--s-2); background: rgba(18, 26, 32, .55); color: #fff; font-weight: 700; }
.gallery__all { position: absolute; left: calc(var(--gutter) + var(--s-4)); bottom: var(--s-4); background: var(--c-surface); border-color: var(--c-surface); min-height: 40px; padding: 0 var(--s-4); display: none; }
.gallery__all:hover { background: var(--c-ink); border-color: var(--c-ink); }
@media (max-width: 720px) {
  .gallery { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; padding-inline: 0; }
  .gallery__main { grid-row: auto; border-radius: 0; aspect-ratio: 4 / 3; }
  .gallery__item { display: none; }
  .gallery__all { left: var(--s-4); }
  .js .gallery__all { display: inline-flex; }
}

.ficha-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s-8); padding-top: var(--s-7); align-items: start; }
.ficha-main > section { margin-top: var(--s-7); }
.ficha-main .lead { max-width: 52ch; }
.ficha-main h2.h3 { font-size: var(--fs-xl); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin: 0; border-top: 1px solid var(--c-border); }
.facts div { padding: var(--s-4) var(--s-4) var(--s-4) 0; border-bottom: 1px solid var(--c-border); }
.facts dt { font-size: var(--fs-xs); color: var(--c-muted); }
.facts dd { margin: 2px 0 0; font-weight: 700; }

/* Nota legal al final de la descripción de cada vivienda */
.ficha-legal { margin-top: var(--s-5); font-size: var(--fs-xs); color: var(--c-muted); max-width: 64ch; }
.ficha-legal strong { color: var(--c-ink); }

/* Obra nueva: villas libres */
.units { width: 100%; border-collapse: collapse; font-variant-numeric: lining-nums tabular-nums; }
.units th, .units td { text-align: left; padding: var(--s-3) var(--s-4) var(--s-3) 0; border-bottom: 1px solid var(--c-border); vertical-align: top; }
.units thead th { font-size: var(--fs-xs); font-weight: 400; color: var(--c-muted); border-top: 1px solid var(--c-border); }
.units tbody th { font-weight: 700; }
.units td strong { display: block; }
.units td span { display: block; font-size: var(--fs-xs); color: var(--c-muted); }
.units__note { margin: var(--s-4) 0 0; font-size: var(--fs-sm); color: var(--c-muted); max-width: 60ch; }
@media (max-width: 720px) {
  .units thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .units, .units tbody, .units tr, .units th, .units td { display: block; }
  .units tr { padding: var(--s-4) 0; border-bottom: 1px solid var(--c-border); }
  .units tr:first-child { border-top: 1px solid var(--c-border); }
  .units th, .units td { border: 0; padding: 2px 0; }
  .units tbody th { font-size: var(--fs-md); margin-bottom: var(--s-2); }
  .units td { display: flex; justify-content: space-between; gap: var(--s-4); }
  .units td::before { content: attr(data-label); color: var(--c-muted); font-size: var(--fs-xs); }
  .units td:last-child { display: grid; grid-template-columns: auto auto; justify-content: space-between; margin-top: var(--s-2); }
  .units td:last-child::before { grid-row: span 2; align-self: start; }
  .units td:last-child strong, .units td:last-child span { text-align: right; }
}
.ficha-aside { position: sticky; top: calc(var(--header-h) + var(--s-5)); }
.contact-card { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-6); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md); }
.contact-card .price__extra { margin: 0; }
.contact-card__facts { margin: 0 0 var(--s-3); color: var(--c-muted); }
.contact-card .btn--quiet { align-self: flex-start; }
.contact-card__who { display: flex; gap: var(--s-3); align-items: center; padding-top: var(--s-4); margin-top: var(--s-2); border-top: 1px solid var(--c-border); }
.contact-card__who img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--r-sm); flex: none; }
.contact-card__who p { margin: 0; font-size: var(--fs-xs); }
.contact-card__note { margin: 0; font-size: 13px; color: var(--c-muted); }
@media (max-width: 960px) {
  .ficha-body { grid-template-columns: 1fr; gap: var(--s-6); }
  .ficha-aside { position: static; order: -1; }
  .contact-card > .price, .contact-card > .price__extra, .contact-card__facts { display: none; }
  .contact-card { padding: var(--s-5); }
  .ficha-main > section:first-of-type { margin-top: var(--s-6); }
}

/* Visor de fotos */
.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(12, 17, 21, .96); color: #fff; }
.lightbox::backdrop { background: rgba(12, 17, 21, .96); }
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; padding: var(--s-3) var(--s-4); }
.lightbox__count { margin: 0; font-variant-numeric: tabular-nums; }
.lightbox__bar .lightbox__btn { margin: 0; }
.lightbox__stage { flex: 1; display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; min-height: 0; padding-bottom: var(--s-5); }
.lightbox__img { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lightbox__btn { display: grid; place-items: center; width: 48px; height: 48px; margin: auto; border: 1px solid rgba(255, 255, 255, .3); border-radius: var(--r-sm); background: transparent; color: #fff; cursor: pointer; }
.lightbox__btn:hover { border-color: #fff; }
.lightbox__btn:focus-visible { box-shadow: 0 0 0 3px #fff; }
@media (max-width: 720px) {
  .lightbox__stage { grid-template-columns: 1fr; position: relative; }
  .lightbox__prev, .lightbox__next { position: absolute; bottom: var(--s-4); z-index: 1; background: rgba(12, 17, 21, .6); }
  .lightbox__prev { left: var(--s-4); }
  .lightbox__next { right: var(--s-4); }
}

/* Gestoría */
.serv-index { list-style: none; padding: 0; margin: var(--s-6) 0 0; display: grid; gap: var(--s-2); }
.serv-index a { font-weight: 700; }
.serv-blocks { padding-block: var(--s-6); }
.serv-block { display: grid; grid-template-columns: 5fr 6fr; gap: var(--s-6); padding: var(--s-7) 0; border-top: 1px solid var(--c-border); }
.serv-block__num { font-variant-numeric: lining-nums; font-family: var(--font-display); font-size: var(--fs-3xl); font-weight: 500; line-height: 1; color: var(--c-rose-text); margin: 0; }
.serv-block__head h2 { font-size: var(--fs-2xl); }
.serv-block__head p { color: var(--c-muted); max-width: 44ch; margin: 0; }
.serv-block .ticks { margin-top: 0; }
@media (max-width: 900px) {
  .serv-block { grid-template-columns: 1fr; gap: var(--s-4); padding: var(--s-6) 0; }
  .serv-block__num { font-size: var(--fs-2xl); }
}
.cta-band { display: flex; justify-content: space-between; align-items: center; gap: var(--s-6); border-top: 1px solid var(--c-border); }
.cta-band h2 { font-size: var(--fs-2xl); }
.cta-band .lead { margin: 0; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
@media (max-width: 900px) { .cta-band { flex-direction: column; align-items: flex-start; } }

/* Legales */
.legal { padding-bottom: var(--s-8); }
.legal h2 { font-size: var(--fs-xl); margin-top: var(--s-6); }
.notice { padding: var(--s-4) var(--s-5); background: var(--c-stone); border-left: 3px solid var(--c-warning); border-radius: var(--r-sm); font-size: var(--fs-sm); }

/* Otras viviendas */
.others .section-head { margin-bottom: var(--s-6); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
}
