/* ==========================================================================
   Immobiliària Demo — Variant A «Corporatiu net»
   Navy + brass on white/stone. Newsreader (display) · Hanken Grotesk (text)
   · IBM Plex Mono (references). Mobile first.
   NOTE: property cards (.immoble*) are generated by api/immobles_render.py —
   restyle them here only, never change their markup.
   ========================================================================== */

:root {
  --ink: #0f1e33;          /* deep navy, main text + dark surfaces */
  --navy: #17305a;
  --navy-2: #24467d;
  --brass: #b08d57;
  --brass-dark: #8a6a3a;   /* brass text on white (AA) */
  --brass-soft: #e9dfcc;
  --paper: #ffffff;
  --stone: #f5f2ec;
  --stone-2: #ece7de;
  --line: #e2dccf;
  --line-strong: #cfc6b5;
  --muted: #5a6475;
  --muted-2: #7b8494;
  --danger: #8e3b32;

  --f-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --f-sans: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --gutter: 16px;
  --maxw: 1240px;
  --header-h: 68px;
  --radius: 2px;
  --shadow-1: 0 1px 2px rgba(15, 30, 51, .06), 0 8px 24px -12px rgba(15, 30, 51, .18);
  --shadow-2: 0 2px 4px rgba(15, 30, 51, .06), 0 24px 48px -20px rgba(15, 30, 51, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (min-width: 768px) { :root { --gutter: 32px; --header-h: 76px; } }
@media (min-width: 1200px) { :root { --gutter: 48px; } }

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

.container { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- shared type ---------- */
.eyebrow, .hero__label {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--brass-dark);
  margin-bottom: 16px;
}
.eyebrow--light { color: var(--brass-soft); }
.rule { display: inline-block; width: 28px; height: 1px; background: currentColor; flex: none; }

.sec-title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(30px, 6.5vw, 48px);
  line-height: 1.08;
  letter-spacing: -.015em;
  color: var(--ink);
  text-wrap: balance;
}
.sec-lead { color: var(--muted); font-size: 17px; max-width: 56ch; text-wrap: pretty; }

.sec-head { margin-bottom: 36px; }
.sec-head--split { display: grid; gap: 16px; }
@media (min-width: 900px) {
  .sec-head--split { grid-template-columns: 1.1fr 1fr; align-items: end; gap: 64px; margin-bottom: 48px; }
  .sec-head--split .sec-lead { justify-self: end; }
}

.section { padding: 72px 0; }
@media (min-width: 900px) { .section { padding: 112px 0; } }
.section--stone { background: var(--stone); }

/* ---------- buttons & fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px;
  border: 1px solid transparent; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--navy { background: var(--ink); color: #fff; }
.btn--navy:hover { background: var(--navy-2); }
.btn--brass { background: var(--brass); color: var(--ink); }
.btn--brass:hover { background: #c2a06b; }
.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--outline:hover { background: var(--ink); color: #fff; }

.field-label {
  display: block;
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.field-control {
  width: 100%; min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: #fff;
  font-size: 15px; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.field-control:hover { border-color: var(--muted-2); }
.field-control:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(176, 141, 87, .35); }
select.field-control {
  appearance: none; -webkit-appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230f1e33' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  text-overflow: ellipsis;
}
.field-control--compact { min-height: 40px; padding-top: 7px; padding-bottom: 7px; font-size: 14px; }
.field-control--textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field-control::placeholder { color: var(--muted-2); }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; }
.topbar { display: none; background: var(--ink); color: #c9cfda; font-size: 13px; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; height: 38px; }
.topbar__contact { display: flex; gap: 10px; }
.topbar a { text-decoration: none; color: #fff; }
.topbar a:hover { color: var(--brass-soft); }
@media (min-width: 900px) { .topbar { display: block; } }

.header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--header-h);
}
.site-header { border-bottom: 1px solid var(--line); transition: box-shadow .25s; }
.site-header.is-stuck { box-shadow: 0 8px 24px -16px rgba(15, 30, 51, .35); }

.header__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.header__brand-mark {
  display: grid; place-items: center; flex: none;
  width: 42px; height: 42px;
  background: var(--ink); color: #fff;
  font-family: var(--f-display); font-size: 18px; font-weight: 500; letter-spacing: .04em;
  box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 4px var(--brass);
}
.header__brand-mark--light { background: transparent; box-shadow: inset 0 0 0 1px var(--brass); }
.header__brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.header__brand-name { font-family: var(--f-display); font-size: 20px; font-weight: 500; white-space: nowrap; }
.header__brand-sub { font-size: 10px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--brass-dark); margin-top: 3px; }

.header__toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0 11px;
  background: none; border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.header__toggle-bar { display: block; height: 1.5px; background: var(--ink); transition: transform .25s, opacity .2s; }
.header__toggle[aria-expanded="true"] .header__toggle-bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.header__toggle[aria-expanded="true"] .header__toggle-bar:nth-child(2) { opacity: 0; }
.header__toggle[aria-expanded="true"] .header__toggle-bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.header__nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 8px var(--gutter) 24px;
  box-shadow: 0 24px 32px -24px rgba(15, 30, 51, .3);
  display: none;
}
.header__nav.is-open { display: block; }
.header__nav-list { list-style: none; margin: 0; padding: 0; }
.header__nav-link {
  display: block; padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none; font-size: 17px; font-weight: 500;
}
.header__cta { width: 100%; margin-top: 20px; }

@media (min-width: 1024px) {
  .header__toggle { display: none; }
  .header__nav {
    position: static; display: flex; align-items: center; gap: 36px;
    padding: 0; border: 0; box-shadow: none; background: none;
  }
  .header__nav-list { display: flex; gap: 30px; }
  .header__nav-link {
    position: relative; padding: 6px 0; border: 0;
    font-size: 15px; color: var(--ink);
  }
  .header__nav-link::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
    background: var(--brass); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
  }
  .header__nav-link:hover::after { transform: scaleX(1); }
  .header__cta { width: auto; margin: 0; min-height: 44px; padding: 10px 20px; font-size: 13px; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero { position: relative; background: var(--ink); color: #fff; isolation: isolate; }
.hero__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; animation: heroZoom 14s var(--ease) both; }
.hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 30, 51, .55) 0%, rgba(15, 30, 51, .35) 40%, rgba(15, 30, 51, .92) 100%);
}
@media (min-width: 900px) {
  .hero__overlay {
    background:
      linear-gradient(90deg, rgba(15, 30, 51, .92) 0%, rgba(15, 30, 51, .72) 38%, rgba(15, 30, 51, .1) 72%),
      linear-gradient(0deg, rgba(15, 30, 51, .55) 0%, rgba(15, 30, 51, 0) 35%);
  }
}
.hero__content { padding-top: 72px; padding-bottom: 32px; }
.hero__label { color: var(--brass-soft); }
.hero__title {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(38px, 10vw, 76px);
  line-height: 1.02; letter-spacing: -.02em;
  max-width: 15ch;
  text-wrap: balance;
}
.hero__title em { font-style: italic; color: var(--brass-soft); }
.hero__tagline { margin-top: 22px; max-width: 48ch; font-size: 17px; color: #d5dae3; }

.hero__label, .hero__title, .hero__tagline, .hero-search { animation: rise .9s var(--ease) both; }
.hero__title { animation-delay: .08s; }
.hero__tagline { animation-delay: .16s; }
.hero-search { animation-delay: .26s; }

.hero__search-wrap { padding-bottom: 40px; }
.hero-search {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px;
  padding: 20px;
  background: #fff; color: var(--ink);
  box-shadow: var(--shadow-2);
  border-top: 3px solid var(--brass);
}
.hero-search__submit { grid-column: 1 / -1; }

@media (min-width: 900px) {
  .hero { min-height: min(86vh, 820px); display: flex; flex-direction: column; justify-content: flex-end; }
  .hero__content { padding-top: 120px; padding-bottom: 48px; }
  .hero__search-wrap { padding-bottom: 0; margin-bottom: -56px; position: relative; z-index: 2; }
  .hero-search {
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    align-items: end; gap: 0;
    padding: 0;
  }
  .hero-search__field { padding: 18px 22px 20px; border-right: 1px solid var(--line); }
  .hero-search__field .field-control { border: 0; padding-left: 0; min-height: 34px; padding-top: 2px; padding-bottom: 2px; font-size: 17px; font-weight: 500; background-position: right 0 center; }
  .hero-search__field .field-control:focus { box-shadow: none; border-bottom: 1px solid var(--brass); }
  .hero-search__submit { grid-column: auto; height: 100%; min-height: 92px; padding: 0 36px; border-radius: 0; }
}

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }

/* ==========================================================================
   PROOF (xifres)
   ========================================================================== */
.proof { background: var(--stone); padding: 56px 0 48px; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .proof { padding: 120px 0 64px; } }
.proof__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 32px 20px; }
@media (min-width: 900px) { .proof__list { grid-template-columns: repeat(4, 1fr); gap: 0; } }
.proof__item { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 900px) {
  .proof__item { padding: 0 32px; border-left: 1px solid var(--line-strong); }
  .proof__item:first-child { padding-left: 0; border-left: 0; }
}
.proof__num {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(40px, 9vw, 56px); line-height: 1; color: var(--ink);
  font-variant-numeric: lining-nums;
}
.proof__num small {
  font-family: var(--f-sans); font-size: 12px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--brass-dark);
  margin-left: 6px; vertical-align: .9em;
}
.proof__label { font-size: 14px; color: var(--muted); max-width: 26ch; }

/* ==========================================================================
   FILTERS + RESULTS BAR
   ========================================================================== */
.section--immobles { padding-top: 64px; }
@media (min-width: 900px) { .section--immobles { padding-top: 96px; } }

.filters {
  border: 1px solid var(--line);
  background: var(--stone);
  padding: 18px;
  margin-bottom: 20px;
}
.filters fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.filters__main, .filters__extra { display: grid; gap: 14px; }
.filters__main { grid-template-columns: 1fr 1fr; }
.filters__field--op { grid-column: 1 / -1; }
.filters__more-toggle {
  grid-column: 1 / -1;
  display: flex; justify-content: space-between; align-items: center;
  min-height: 44px; padding: 0 2px;
  background: none; border: 0; border-top: 1px solid var(--line-strong);
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
}
.filters__more-toggle span { font-size: 20px; font-weight: 400; transition: transform .25s; }
.filters__more-toggle[aria-expanded="true"] span { transform: rotate(45deg); }
.filters__extra { grid-template-columns: 1fr 1fr; margin-top: 14px; display: none; }
.filters.is-expanded .filters__extra { display: grid; }

.segmented { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line-strong); background: #fff; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: grid; place-items: center; min-height: 44px; padding: 0 12px;
  font-size: 14px; font-weight: 600; color: var(--muted);
  border-left: 1px solid var(--line);
  transition: background .2s, color .2s;
}
.segmented label:first-child span { border-left: 0; }
.segmented input:checked + span { background: var(--ink); color: #fff; }
.segmented input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: -2px; }

.filters__check {
  display: flex; align-items: center; gap: 10px; align-self: end;
  min-height: 46px; font-size: 14px; font-weight: 500; cursor: pointer;
}
.filters__check input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.filters__reset {
  align-self: end; min-height: 46px; padding: 0 4px;
  background: none; border: 0; text-align: left;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brass-dark); text-decoration: underline; text-underline-offset: 4px;
}
.filters__field .field-control { background-color: #fff; }

@media (min-width: 1024px) {
  .filters { padding: 22px 24px; }
  .filters__main { grid-template-columns: minmax(250px, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 16px; align-items: end; }
  .filters__field--op { grid-column: auto; }
  .filters__more-toggle { display: none; }
  .filters__extra, .filters.is-expanded .filters__extra {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto auto; gap: 16px;
    margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line);
  }
}

.results-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  padding: 6px 0 22px;
}
.results-bar__count { font-size: 15px; color: var(--muted); }
.results-bar__count strong { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.results-bar__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.results-bar__sort { display: flex; align-items: center; gap: 10px; }
.results-bar__sort .field-label { margin: 0; }
.results-bar__sort .field-control { width: auto; min-width: 0; max-width: 220px; }
.view-toggle { display: inline-flex; border: 1px solid var(--line-strong); }
.view-toggle button {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 14px;
  background: #fff; border: 0; font-size: 13px; font-weight: 600; color: var(--muted);
}
.view-toggle button + button { border-left: 1px solid var(--line-strong); }
.view-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }
@media (max-width: 479px) {
  .results-bar__tools { width: 100%; justify-content: space-between; }
  .results-bar__sort .field-label { display: none; }
  .results-bar__sort .field-control { max-width: 190px; }
}

/* ==========================================================================
   PROPERTY CARDS (markup from api/immobles_render.py — CSS only)
   ========================================================================== */
.immobles__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 640px) { .immobles__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; } }
@media (min-width: 1100px) { .immobles__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; } }
.immobles__grid > li { display: flex; min-width: 0; }
.immobles__grid.is-hidden { display: none; }

.immoble {
  position: relative;
  display: flex; flex-direction: column;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: box-shadow .35s var(--ease), border-color .35s, transform .35s var(--ease);
}
.immoble:hover { box-shadow: var(--shadow-2); border-color: transparent; transform: translateY(-3px); }
.immoble:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

/* reference code from data-referencia — no markup needed */
.immoble::before {
  content: "Ref. " attr(data-referencia);
  position: absolute; top: 14px; right: 14px; z-index: 3;
  padding: 5px 9px;
  background: rgba(15, 30, 51, .82);
  color: #fff;
  font-family: var(--f-mono); font-size: 11px; font-weight: 500; letter-spacing: .06em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}

.immoble__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--stone-2); }
.immoble__img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.immoble:hover .immoble__img { transform: scale(1.04); }
.immoble:has(.immoble__badge--estat) .immoble__img { filter: grayscale(.55) brightness(.92); }

.immoble__badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  padding: 6px 10px;
  background: #fff; color: var(--ink);
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  line-height: 1;
}
.immoble__badge--lloguer { background: var(--brass); color: var(--ink); }
.immoble__badge--estat {
  top: auto; bottom: 14px; left: 14px;
  background: var(--danger); color: #fff;
}

.immoble__arrow {
  position: absolute; top: 50%; z-index: 2;
  width: 38px; height: 38px; margin-top: -19px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .92); color: var(--ink);
  border: 0; border-radius: 0;
  font-size: 24px; line-height: 1;
  opacity: 0; transition: opacity .25s, background .2s;
}
.immoble__arrow--prev { left: 10px; }
.immoble__arrow--next { right: 10px; }
.immoble__arrow:hover { background: #fff; }
.immoble:hover .immoble__arrow, .immoble__arrow:focus-visible { opacity: 1; }
@media (hover: none) { .immoble__arrow { opacity: .9; width: 34px; height: 34px; margin-top: -17px; } }

.immoble__dots {
  position: absolute; left: 50%; bottom: 16px; z-index: 2; transform: translateX(-50%);
  display: flex; gap: 6px;
}
.immoble__dots span { width: 18px; height: 2px; background: rgba(255, 255, 255, .5); transition: background .2s; }
.immoble__dots span.is-active { background: #fff; }

.immoble__body {
  display: flex; flex-wrap: wrap; align-items: baseline; align-content: flex-start;
  flex: 1;
  padding: 22px 22px 0;
}
.immoble__body > * { flex: 1 1 100%; min-width: 0; }

.immoble__loc {
  order: 1;
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brass-dark);
  margin-bottom: 8px;
}
.immoble__loc svg { width: 13px; height: 13px; flex: none; }
.immoble__title {
  order: 2;
  font-family: var(--f-display); font-weight: 500;
  font-size: 23px; line-height: 1.18; letter-spacing: -.005em;
  margin-bottom: 8px;
}
.immoble__desc {
  order: 3;
  font-size: 14px; line-height: 1.55; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 18px;
}
.immoble__features {
  order: 4;
  list-style: none; margin: 0 0 18px; padding: 14px 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.immoble__feature {
  display: flex; flex-direction: column; gap: 6px;
  padding: 0 12px;
  font-size: 13px; font-weight: 500; color: var(--ink);
  border-left: 1px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.immoble__feature:first-child { padding-left: 0; border-left: 0; }
.immoble__feature svg { color: var(--brass); width: 18px; height: 18px; }

.immoble__price {
  order: 5;
  flex: 1 1 auto;
  font-family: var(--f-display); font-weight: 500;
  font-size: 28px; line-height: 1.1; letter-spacing: -.01em;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink);
}
/* injected by app.js: €/m² next to the price */
.immoble__ppm {
  order: 6;
  flex: 0 0 auto;
  font-family: var(--f-mono); font-size: 12px; color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.immoble__cta {
  order: 7;
  display: flex; align-items: center; justify-content: space-between;
  margin: 18px -22px 0; padding: 16px 22px;
  border-top: 1px solid var(--line);
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
  transition: background .2s, color .2s;
}
.immoble__cta::after { content: "→"; font-size: 16px; letter-spacing: 0; transition: transform .25s var(--ease); }
.immoble__cta:hover { background: var(--ink); color: #fff; }
.immoble__cta:hover::after { transform: translateX(4px); }

.immobles__empty { grid-column: 1 / -1; padding: 48px; text-align: center; background: var(--stone); color: var(--muted); }

.property-search__empty {
  padding: 40px 24px; text-align: center;
  background: var(--stone); border: 1px dashed var(--line-strong); color: var(--muted);
}
.property-search__empty a { color: var(--ink); font-weight: 600; }

/* ---------- comparison table (built by app.js) ---------- */
.immobles__table { overflow-x: auto; border: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.cmp { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; }
.cmp th, .cmp td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.cmp thead th {
  position: sticky; top: 0;
  background: var(--ink); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}
.cmp td.num, .cmp th.num { text-align: right; font-variant-numeric: tabular-nums; }
.cmp tbody tr { cursor: pointer; transition: background .15s; }
.cmp tbody tr:nth-child(even) { background: #fbfaf7; }
.cmp tbody tr:hover { background: var(--brass-soft); }
.cmp__ref { font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; }
.cmp__open {
  background: none; border: 0; padding: 0; text-align: left;
  font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px;
}
.cmp__price { font-family: var(--f-display); font-size: 17px; font-weight: 500; }
.cmp__tag { display: inline-block; padding: 3px 7px; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; background: var(--stone-2); }
.cmp__tag--lloguer { background: var(--brass-soft); }
.cmp__tag--estat { background: var(--danger); color: #fff; }

.immobles__help {
  display: grid; gap: 20px; align-items: center;
  margin-top: 56px; padding: 28px;
  border: 1px solid var(--line); border-left: 3px solid var(--brass);
}
.immobles__help p { color: var(--muted); max-width: 70ch; }
.immobles__help strong { color: var(--ink); }
@media (min-width: 768px) { .immobles__help { grid-template-columns: 1fr auto; padding: 32px 36px; } }

/* ==========================================================================
   ABOUT / SERVEIS
   ========================================================================== */
.about { display: grid; gap: 40px; }
@media (min-width: 960px) { .about { grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; } }
.about__media { position: relative; }
.about__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about__media::before, .about__media::after {
  content: ""; position: absolute; z-index: 1; width: 72px; height: 72px; pointer-events: none;
}
.about__media::before { top: -12px; left: -12px; border-top: 1px solid var(--brass); border-left: 1px solid var(--brass); }
.about__media::after { right: -12px; bottom: 30px; border-right: 1px solid var(--brass); border-bottom: 1px solid var(--brass); }
@media (max-width: 599px) { .about__media::before { left: -8px; } .about__media::after { right: -8px; } }
.about__caption { margin-top: 12px; font-size: 13px; color: var(--muted); font-style: italic; font-family: var(--f-display); }
.about__copy .sec-lead { margin-top: 18px; }
.about__list { list-style: none; margin: 36px 0 0; padding: 0; }
.about__item { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 22px 0; border-top: 1px solid var(--line-strong); }
.about__item:last-child { border-bottom: 1px solid var(--line-strong); }
.about__num { font-family: var(--f-mono); font-size: 13px; color: var(--brass-dark); padding-top: 4px; }
.about__title { font-family: var(--f-display); font-size: 21px; font-weight: 500; line-height: 1.25; margin-bottom: 6px; }
.about__text { font-size: 15px; color: var(--muted); }

/* ==========================================================================
   PROCÉS
   ========================================================================== */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: s; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { position: relative; padding: 28px 0 32px; border-top: 1px solid var(--ink); }
@media (min-width: 700px) { .step { padding: 32px 28px 36px 0; } }
.step::before {
  content: ""; position: absolute; top: -4px; left: 0;
  width: 7px; height: 7px; background: var(--brass); transform: rotate(45deg);
}
.step__num { display: block; font-family: var(--f-display); font-size: clamp(40px, 9vw, 56px); line-height: 1; font-weight: 400; color: var(--brass); margin-bottom: 18px; font-variant-numeric: lining-nums; }
.step__title { font-family: var(--f-display); font-size: 24px; font-weight: 500; margin-bottom: 10px; }
.step__text { font-size: 15px; color: var(--muted); max-width: 32ch; }

/* ==========================================================================
   VALORACIÓ (CTA)
   ========================================================================== */
.valuation { background: var(--ink); color: #fff; padding: 72px 0; overflow: hidden; }
@media (min-width: 900px) { .valuation { padding: 0; } }
.valuation__inner { display: grid; gap: 40px; }
@media (min-width: 900px) { .valuation__inner { grid-template-columns: 1fr 1fr; gap: 72px; align-items: stretch; } }
.valuation__copy { align-self: center; }
@media (min-width: 900px) { .valuation__copy { padding: 112px 0; } }
.valuation__title {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(32px, 7vw, 52px); line-height: 1.06; letter-spacing: -.015em;
  text-wrap: balance;
}
.valuation__text { margin-top: 18px; color: #c9cfda; font-size: 17px; max-width: 46ch; }
.valuation__list { list-style: none; margin: 28px 0 36px; padding: 0; display: grid; gap: 12px; }
.valuation__list li { display: flex; gap: 14px; align-items: baseline; font-size: 15px; color: #e6e9ef; }
.valuation__list li::before { content: ""; flex: none; width: 14px; height: 1px; background: var(--brass); transform: translateY(-4px); }
.valuation__media { position: relative; min-height: 260px; }
.valuation__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 11; }
@media (min-width: 900px) {
  .valuation__media { margin-right: calc(var(--gutter) * -1); }
  .valuation__media img { position: absolute; inset: 0; aspect-ratio: auto; }
  .valuation__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink) 0%, rgba(15, 30, 51, 0) 30%); }
}

/* ==========================================================================
   CONTACTE
   ========================================================================== */
.contact__inner { display: grid; gap: 48px; }
@media (min-width: 960px) { .contact__inner { grid-template-columns: 5fr 7fr; gap: 80px; } }
.contact__intro .sec-lead { margin-top: 16px; }
.contact__data { margin-top: 36px; display: grid; gap: 0; }
.contact__data > div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.contact__data > div:last-child { border-bottom: 1px solid var(--line); }
.contact__data dt { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.contact__data dd { font-size: 16px; overflow-wrap: anywhere; }
.contact__data a { text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.contact__data a:hover { border-color: var(--brass); }
.contact__data address { font-style: normal; }
.contact__tel { font-family: var(--f-display); font-size: 24px; font-weight: 500; }

.contact__form-wrap { background: var(--stone); padding: 24px 18px; border-top: 3px solid var(--ink); }
@media (min-width: 768px) { .contact__form-wrap { padding: 40px; } }
.contact__form { display: grid; gap: 18px; }
.contact__row { display: grid; gap: 18px; }
@media (min-width: 640px) { .contact__row { grid-template-columns: 1fr 1fr; } }
.contact__required { color: var(--danger); }
.contact__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 4px; }
.contact__required-note { font-size: 13px; color: var(--muted); }
.contact__submit { min-width: 220px; }
@media (max-width: 479px) { .contact__submit { width: 100%; } }
.contact__form.is-highlight { animation: flash 1.4s var(--ease); }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(176, 141, 87, .6); } 100% { box-shadow: 0 0 0 18px rgba(176, 141, 87, 0); } }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: #0a1526; color: #b9c0cc; }
.footer__inner { display: grid; gap: 36px; padding-top: 64px; padding-bottom: 48px; }
@media (min-width: 700px) { .footer__inner { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer__inner { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer__brand { display: flex; gap: 14px; align-items: center; }
.footer__brand .header__brand-mark { color: #fff; }
.footer__brand-name { display: block; font-family: var(--f-display); font-size: 22px; color: #fff; }
.footer__brand-tagline { font-size: 13px; }
.footer__col-title { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); margin-bottom: 14px; }
.footer__address { font-style: normal; line-height: 1.8; }
.footer__nav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer__link { color: #dfe3ea; text-decoration: none; overflow-wrap: anywhere; }
.footer__link:hover { color: var(--brass-soft); text-decoration: underline; text-underline-offset: 3px; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); }
.footer__bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px; padding-bottom: 24px; font-size: 13px; }

/* ==========================================================================
   FITXA MODAL
   ========================================================================== */
.imm-modal { position: fixed; inset: 0; z-index: 100; display: none; }
.imm-modal.is-open { display: block; }
.imm-modal__backdrop { position: absolute; inset: 0; background: rgba(10, 21, 38, .78); animation: fade .25s ease both; }
.imm-modal__dialog {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: #fff;
  overflow: hidden;
  animation: dialogIn .35s var(--ease) both;
}
.imm-modal__dialog:focus { outline: none; }
@media (min-width: 900px) {
  .imm-modal__dialog { inset: 4vh 4vw; max-width: 1280px; margin: 0 auto; box-shadow: var(--shadow-2); }
}
.imm-modal__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 56px; padding: 0 8px 0 20px; flex: none;
  border-bottom: 1px solid var(--line);
}
.imm-modal__ref { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.imm-modal__close { display: grid; place-items: center; width: 44px; height: 44px; background: none; border: 0; color: var(--ink); }
.imm-modal__close:hover { color: var(--brass-dark); }

.imm-modal__grid { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
@media (min-width: 900px) {
  .imm-modal__grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(360px, 1fr); overflow: hidden; }
  .imm-modal__photos { overflow-y: auto; background: var(--ink); display: flex; flex-direction: column; }
  .imm-modal__info { overflow-y: auto; }
}
.imm-modal__stage { position: relative; background: var(--ink); aspect-ratio: 4 / 3; touch-action: pan-y; }
@media (min-width: 900px) { .imm-modal__stage { flex: 1; aspect-ratio: auto; min-height: 0; } }
.imm-modal__img { width: 100%; height: 100%; object-fit: cover; animation: fade .3s ease both; }
@media (min-width: 900px) { .imm-modal__img { position: absolute; inset: 0; } }
.imm-modal__nav {
  position: absolute; top: 50%; z-index: 2;
  width: 44px; height: 44px; margin-top: -22px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .92); border: 0; color: var(--ink); font-size: 26px; line-height: 1;
}
.imm-modal__nav--prev { left: 12px; }
.imm-modal__nav--next { right: 12px; }
.imm-modal__nav:hover { background: #fff; }
.imm-modal__counter {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  padding: 4px 9px; background: rgba(15, 30, 51, .8); color: #fff;
  font-family: var(--f-mono); font-size: 12px;
}
.imm-modal__counter:empty { display: none; }
.imm-modal__thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; background: var(--ink); flex: none; }
.imm-modal__thumb { flex: none; width: 76px; height: 56px; padding: 0; border: 0; background: none; opacity: .5; outline-offset: 2px; transition: opacity .2s; }
.imm-modal__thumb img { width: 100%; height: 100%; object-fit: cover; }
.imm-modal__thumb.is-active, .imm-modal__thumb:hover { opacity: 1; box-shadow: 0 0 0 2px var(--brass); }

.imm-modal__info { padding: 24px 20px 32px; }
@media (min-width: 900px) { .imm-modal__info { padding: 32px 36px 40px; } }
.imm-modal__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.imm-modal__badges .immoble__badge { position: static; box-shadow: inset 0 0 0 1px var(--line-strong); }
.imm-modal__badges .immoble__badge--lloguer, .imm-modal__badges .immoble__badge--estat { box-shadow: none; }
.imm-modal__loc { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--brass-dark); margin-bottom: 8px; }
.imm-modal__title { font-family: var(--f-display); font-weight: 500; font-size: clamp(26px, 6vw, 34px); line-height: 1.12; margin-bottom: 18px; }
.imm-modal__pricebox { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; padding: 16px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.imm-modal__price { font-family: var(--f-display); font-size: 34px; font-weight: 500; line-height: 1; font-variant-numeric: lining-nums; }
.imm-modal__ppm { font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
.imm-modal__keys { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 18px 0; border-bottom: 1px solid var(--line); }
.imm-modal__keys div { padding: 0 12px; border-left: 1px solid var(--line); }
.imm-modal__keys div:first-child { padding-left: 0; border-left: 0; }
.imm-modal__keys dt { font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.imm-modal__keys dd { font-family: var(--f-display); font-size: 26px; line-height: 1.2; font-variant-numeric: lining-nums; }
.imm-modal__desc { margin: 20px 0 24px; color: var(--muted); font-size: 15px; }
.imm-modal__h { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 8px; }
.imm-modal__specs { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 28px; }
.imm-modal__specs th, .imm-modal__specs td { padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.imm-modal__specs th { font-weight: 500; color: var(--muted); width: 45%; }
.imm-modal__specs td { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.imm-modal__actions { display: grid; gap: 10px; }
@media (min-width: 480px) { .imm-modal__actions { grid-template-columns: 1fr 1fr; } }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dialogIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   REVEAL
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
