/* ==========================================================================
   Fincas Marpa
   Rejilla de 12 columnas en vw · Geist · azul, rojo y papel (marca: brand-v2)
   ========================================================================== */

:root {
  --bg: #ffffff;
  --ink: #141a26;
  --muted: #6b7080;
  --line: rgba(20, 26, 38, .14);
  --paper: #f4f0e8;
  --paper-ink: #3a4150;
  --azul: #2f4874;
  --azul-oscuro: #1b2d4f;
  --rojo: #a84434;
  --dark: var(--azul-oscuro);

  --margin: 1.3889vw;
  --gutter: 1.3889vw;
  --section: 11vw;

  --sans: "Geist", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.65, 0, .35, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --slide: 7s;
}
@media (max-width: 640px) {
  :root { --margin: 4vw; --gutter: 4vw; --section: 26vw; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-weight: 400;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
h1, h2, h3, p, ul, ol, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
::selection { background: var(--rojo); color: #fff; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

/* ---------- Tipografía ---------- */
/* Texto pequeño de apoyo: misma fuente que el resto (antes Geist Mono en mayúsculas) */
.mono { font-family: var(--sans); letter-spacing: 0; font-size: max(1vw, 13px); line-height: 1.25; }
.t-xs { font-size: max(1.1vw, 13px); line-height: 1.4; }
/* Etiqueta de sección: misma fuente que el texto, algo más grande */
.label { font-family: var(--sans); font-size: max(1.3vw, 15px); line-height: 1.2; letter-spacing: -.01em; font-weight: 500; }
.t-s  { font-size: max(1.6vw, 15px); line-height: 1.2; letter-spacing: -.01em; }
.t-m  { font-size: 2.4vw; line-height: 1.05; letter-spacing: -.028em; font-weight: 400; }
.t-l  { font-size: 7vw; line-height: .95; letter-spacing: -.055em; font-weight: 400; }
@media (max-width: 640px) {
  .mono { font-size: 3.4vw; }
  .t-xs { font-size: 3.7vw; }
  .label { font-size: 4.2vw; }
  .t-s  { font-size: 4.6vw; }
  .t-m  { font-size: 7.4vw; }
  .t-l  { font-size: 14vw; }
}

/* ---------- Rejilla ---------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding-inline: var(--margin); }
@media (max-width: 640px) { .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.section { padding-top: var(--section); }

/* Subrayado que entra por un lado y sale por el otro */
.u { position: relative; display: inline-block; }
.u::after {
  content: ""; position: absolute; left: 0; bottom: -.1em; width: 100%; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .55s var(--ease);
}
.u:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Botón con estrella ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: max(2.3vw, 26px);
  padding: max(.7vw, 10px) max(.9vw, 13px) max(.7vw, 10px) max(1vw, 14px);
  font-size: max(1.1vw, 13px); line-height: 1; white-space: nowrap; width: fit-content;
  transition: background .35s, color .35s;
}
.btn--dark { background: var(--azul); color: #fff; }
.btn--light { background: #fff; color: var(--ink); }
.btn--form { background: var(--paper-ink); color: var(--paper); }
.btn--lg { font-size: max(1.4vw, 16px); padding: max(1vw, 14px) max(1.2vw, 16px) max(1vw, 14px) max(1.4vw, 18px); gap: max(5vw, 48px); }
.btn__text { transition: transform .4s var(--ease-out); }
.btn__star { width: max(1.05vw, 13px); height: max(1.05vw, 13px); flex: none; transition: transform .5s var(--ease-out); }
.btn--lg .btn__star { width: max(1.4vw, 16px); height: max(1.4vw, 16px); }
.btn:hover .btn__text { transform: translateX(.35vw); }
.btn:hover .btn__star { transform: rotate(45deg) scale(1.3); }
.btn--light .btn__star { color: var(--rojo); }
.btn.is-sending .btn__star { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Logo (símbolo + logotipo del sprite) ---------- */
.logo { display: inline-flex; align-items: center; gap: calc(var(--logo-h, 32px) * .14); color: var(--azul); --mf: var(--rojo); line-height: 0; }
.logo__mark { height: var(--logo-h, 32px); width: calc(var(--logo-h, 32px) * 1.409); flex: none; }
.logo__word { height: calc(var(--logo-h, 32px) * .62); width: calc(var(--logo-h, 32px) * .62 * 2.222); flex: none; }

/* ---------- Imagen con parallax ---------- */
.img { position: relative; overflow: hidden; background: #e8e4dc; }
.img > img { width: 100%; height: 100%; object-fit: cover; }
.img::after { content: ""; position: absolute; inset: 0; background: #000; opacity: 0; transition: opacity .6s var(--ease); pointer-events: none; }

/* ---------- Cortina ---------- */
.curtain { position: fixed; inset: 0; z-index: 1000; background: var(--dark); color: #fff; display: grid; place-items: center; pointer-events: none; }
.no-js .curtain, .no-anim .curtain { display: none; }
.curtain__inner { display: flex; align-items: center; gap: max(1.4vw, 14px); overflow: hidden; padding: .4vw 0; --mf: #fff; }
.curtain__mark { height: max(5vw, 52px); width: calc(max(5vw, 52px) * 1.409); }
.curtain__word { height: max(3vw, 32px); width: calc(max(3vw, 32px) * 2.222); }

/* ---------- Etiqueta del cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 900; pointer-events: none;
  width: 6.4vw; height: 6.4vw; margin: -3.2vw 0 0 -3.2vw;
  color: #fff; display: grid; place-items: center; text-align: center;
  transform: translate3d(-200px, -200px, 0);
}
.cursor::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--rojo); transform: scale(0); transition: transform .45s var(--ease-out); }
.cursor__label { position: relative; display: block; transform: scale(0); transition: transform .45s var(--ease-out); }
.cursor.is-on::before, .cursor.is-on .cursor__label { transform: scale(1); }
@media (hover: none), (max-width: 640px) { .cursor { display: none; } }

/* ---------- Cabecera fija (píldoras) ---------- */
.bar {
  position: fixed; top: max(1vw, 12px); left: var(--margin); right: var(--margin); z-index: 200;
  display: flex; justify-content: space-between; align-items: center;
  opacity: 0; transform: translateY(-14px); pointer-events: none;
  transition: opacity .5s var(--ease), transform .6s var(--ease-out);
}
.bar.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.bar__right { display: flex; gap: .5vw; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: max(1.6vw, 18px);
  background: rgba(255,255,255,.92); color: var(--ink);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(20,26,38,.08);
  padding: max(.7vw, 10px) max(1vw, 14px); font-size: max(1.1vw, 13px); line-height: 1;
  transition: background .4s, color .4s, border-color .4s;
}
.bar__logo { color: var(--azul); --logo-h: max(2.6vw, 32px); gap: calc(var(--logo-h) * .14); padding-block: max(.4vw, 6px); }
.bar.on-dark .bar__logo { color: #fff; --mf: #fff; }
.bar__menu { display: none; }
.bar.on-dark .pill { background: rgba(27,45,79,.82); color: #fff; border-color: rgba(255,255,255,.12); }
.bar.on-dark .bar__cta { background: #fff; color: var(--ink); }
@media (max-width: 900px) {
  .bar__nav, .bar__cta { display: none; }
  .bar__menu { display: inline-flex; }
}

/* ---------- Menú ---------- */
.menu {
  position: fixed; inset: 0; z-index: 400; background: var(--dark); color: #fff;
  display: flex; flex-direction: column; overflow-y: auto;
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path .8s var(--ease), visibility 0s .8s;
}
.menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .8s var(--ease), visibility 0s; }
.menu__top { display: flex; justify-content: space-between; align-items: center; padding: max(1.4vw, 16px) var(--margin); }
.menu__logo { --logo-h: max(3vw, 36px); color: #fff; --mf: #fff; }
.menu__close { font-size: max(1.6vw, 18px); }
.menu__body { flex: 1; display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gutter); padding: 6vh var(--margin) max(2vw, 24px); align-content: space-between; row-gap: 8vh; }
.menu__nav { grid-column: 1 / span 8; display: flex; flex-direction: column; }
.menu__nav a { display: flex; align-items: flex-start; gap: 1.2vw; overflow: hidden; border-top: 1px solid rgba(255,255,255,.14); padding-top: .4vw; }
.menu__nav a:last-child { border-bottom: 1px solid rgba(255,255,255,.14); }
.menu__nav .mono { padding-top: 1vw; opacity: .5; width: 3vw; }
.menu__item { display: block; font-size: 5.6vw; line-height: 1.02; letter-spacing: -.05em; transform: translateY(105%); transition: transform .9s var(--ease-out), color .3s; }
.menu__nav a:hover .menu__item { color: var(--rojo); }
.menu.is-open .menu__item { transform: none; }
.menu.is-open a:nth-child(1) .menu__item { transition-delay: .25s; }
.menu.is-open a:nth-child(2) .menu__item { transition-delay: .3s; }
.menu.is-open a:nth-child(3) .menu__item { transition-delay: .35s; }
.menu.is-open a:nth-child(4) .menu__item { transition-delay: .4s; }
.menu.is-open a:nth-child(5) .menu__item { transition-delay: .45s; }
.menu.is-open a:nth-child(6) .menu__item { transition-delay: .5s; }
.menu__side { grid-column: 10 / span 3; align-self: end; display: flex; flex-direction: column; gap: 3vw; font-size: max(1.3vw, 15px); }
.menu__group { display: flex; flex-direction: column; gap: .5vw; align-items: flex-start; }
.menu__h { opacity: .5; margin-bottom: .5vw; }
@media (max-width: 640px) {
  .menu__body { grid-template-columns: 1fr; padding-top: 4vh; }
  .menu__nav, .menu__side { grid-column: 1; }
  .menu__nav a { gap: 3vw; padding-top: 1.5vw; }
  .menu__nav .mono { width: 7vw; padding-top: 3vw; }
  .menu__item { font-size: 12.5vw; }
  .menu__side { gap: 8vw; }
  .menu__group { gap: 2vw; }
}

/* ---------- Modal + ficha ---------- */
.modal { position: fixed; inset: 0; z-index: 500; visibility: hidden; transition: visibility 0s .7s; }
.modal.is-open { visibility: visible; transition: visibility 0s; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(10,10,10,.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; transition: opacity .6s var(--ease); }
.modal.is-open .modal__backdrop { opacity: 1; }
.modal__scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; pointer-events: none; }
.modal.is-open .modal__scroll { pointer-events: auto; }
.modal__inner { position: relative; width: min(58vw, 980px); margin: 14svh auto 8svh; transform: translateY(40svh); opacity: 0; transition: transform .9s var(--ease-out), opacity .5s; }
.modal.is-open .modal__inner { transform: none; opacity: 1; transition-delay: .1s; }
.modal__close { position: absolute; right: 0; top: -2.6vw; color: #fff; z-index: 2; }
.modal__close:hover { color: var(--rojo); }
@media (max-width: 640px) {
  .modal__inner { width: auto; margin: 22svh var(--margin) 6svh; }
  .modal__close { top: -9vw; }
}

.paper {
  position: relative; background-color: var(--paper); color: var(--paper-ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  padding: 4.5vw 4vw 2vw; font-size: max(1.1vw, 13px); line-height: 1.3;
  box-shadow: 0 2.5vw 5vw -1.5vw rgba(0,0,0,.55);
}
.paper .mono { font-size: max(1vw, 12px); }
.paper__clip { position: absolute; top: -2.6vw; left: 5vw; width: 2.3vw; color: #8f8f8f; filter: drop-shadow(1px 2px 1px rgba(0,0,0,.3)); }
.paper__row { display: grid; grid-template-columns: 4vw 1fr; column-gap: var(--gutter); margin-bottom: 3vw; }
.paper__top { grid-template-columns: 4vw 1fr auto; align-items: baseline; margin-bottom: 4.5vw; }
.paper__heading { font-size: max(1.8vw, 18px) !important; font-weight: 400; }
.paper__brand { --logo-h: max(2.6vw, 28px); }
.field { display: flex; flex-direction: column; gap: .5vw; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field input, .field textarea { width: 100%; border: 0; border-bottom: 1px solid var(--paper-ink); border-radius: 0; background: transparent; color: var(--ink); padding: .35vw 0; outline: none; font: inherit; }
.field input:focus { border-bottom-color: var(--rojo); }
.field.is-invalid input { border-bottom-color: var(--rojo); }
.field legend { float: left; width: 100%; margin-bottom: 1.1vw; }
.checks { clear: both; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1vw var(--gutter); }
.checks label, .consent { display: flex; align-items: center; gap: .9vw; cursor: pointer; }
.checks input, .consent input { position: absolute; opacity: 0; pointer-events: none; }
.checks i, .consent i { width: max(1vw, 12px); height: max(1vw, 12px); background: rgba(61,61,61,.3); flex: none; transition: background .25s; }
.checks input:checked + i, .consent input:checked + i { background: var(--paper-ink); }
.checks input:focus-visible + i, .consent input:focus-visible + i { outline: 1px solid var(--paper-ink); outline-offset: 3px; }
.consent.is-invalid i { background: var(--rojo); }
.lined { display: block; }
.lined textarea { display: block; border: 0; resize: none; height: 7.5vw; line-height: 2.5vw; padding: 0; background-image: linear-gradient(transparent calc(2.5vw - 1px), var(--paper-ink) calc(2.5vw - 1px)); background-size: 100% 2.5vw; background-attachment: local; }
.paper__submit > div { display: flex; align-items: center; gap: 1.5vw; flex-wrap: wrap; }
.paper__foot { display: flex; justify-content: space-between; border-top: 1px solid var(--paper-ink); padding-top: 1.5vw; margin-top: 1vw; }
@media (max-width: 640px) {
  .paper { padding: 13vw 5vw 5vw; }
  .paper__clip { top: -8vw; left: 8vw; width: 7vw; }
  .paper__row { grid-template-columns: 8vw 1fr; margin-bottom: 8vw; }
  .paper__top { grid-template-columns: 8vw 1fr; margin-bottom: 10vw; }
  .paper__brand { display: none; }
  .field { gap: 2vw; }
  .field input { padding: 1.5vw 0; }
  .field legend { margin-bottom: 4vw; }
  .checks { grid-template-columns: 1fr 1fr; gap: 4vw; }
  .checks label, .consent { gap: 3vw; }
  .lined textarea { height: 24vw; line-height: 8vw; background-image: linear-gradient(transparent calc(8vw - 1px), var(--paper-ink) calc(8vw - 1px)); background-size: 100% 8vw; }
  .paper__submit > div { gap: 4vw; }
  .paper__foot { padding-top: 5vw; }
}

/* ---------- Hero ---------- */
.hero { position: relative; height: 100svh; min-height: 620px; color: #fff; overflow: hidden; background: var(--dark); }
.hero__media { position: absolute; inset: 0; }
.hero__slide { position: absolute; inset: 0; opacity: 0; transform: scale(1.06); transition: opacity 1.1s var(--ease), transform 2.2s var(--ease-out); }
.hero__slide.is-active { opacity: 1; transform: scale(1); }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,22,44,.5) 0%, rgba(14,22,44,.08) 24%, rgba(14,22,44,.2) 45%, rgba(14,22,44,.65) 100%); pointer-events: none; }

.hero__nav { position: absolute; top: max(1.5vw, 16px); left: 0; right: 0; align-items: start; z-index: 2; }
.hero__logo { grid-column: 1 / span 4; width: fit-content; --logo-h: 4.8vw; color: #fff; --mf: #fff; }
.hero__links { grid-column: 6 / span 5; display: flex; gap: max(2vw, 20px); font-size: max(1.4vw, 15px); line-height: 1.15; padding-top: .4vw; }
.hero__cta { grid-column: 11 / span 2; justify-self: end; }
.hero__menu { display: none; }

.hero__ui { position: absolute; left: 0; right: 0; bottom: 28.5vw; align-items: end; z-index: 2; }
.hero__label { grid-column: 1 / span 5; }
.hero__slider { grid-column: 7 / span 6; display: flex; flex-direction: column; gap: 1.4vw; }
.hero__copy { position: relative; min-height: 7.6vw; }
.hero__text { position: absolute; left: 0; top: 0; width: 100%; font-size: 2.2vw; line-height: 1.1; letter-spacing: -.025em; opacity: 0; transition: opacity .6s var(--ease); max-width: 26ch; }
.hero__text.is-active { opacity: 1; }
.hero__actions { position: relative; }
.hero__go { display: none; }
.hero__go.is-active { display: inline-flex; }

.tabs { display: flex; gap: .6vw; width: 100%; }
.tab { flex: 1 1 25%; display: flex; flex-direction: column; gap: .6vw; opacity: .75; transition: flex-basis .5s var(--ease), flex-grow .5s var(--ease), opacity .4s; min-width: 0; }
.tab .mono { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab.is-active { flex: 2 1 50%; opacity: 1; }
.tab:hover { opacity: 1; }
.tab__line { display: block; height: 2px; background: rgba(255,255,255,.3); position: relative; overflow: hidden; }
.tab__line b { position: absolute; inset: 0; background: currentColor; transform: scaleX(0); transform-origin: left; }
.tab.is-active .tab__line b { animation: fill var(--slide) linear forwards; }
.tab.was-active .tab__line b { transform-origin: right; animation: unfill .5s var(--ease) forwards; }
.tabs--dark .tab__line { background: var(--line); }
/* Pestañas de pasos: se nota que se pueden pulsar */
.tabs--dark .tab { opacity: 1; color: var(--muted); transition: flex-basis .5s var(--ease), flex-grow .5s var(--ease), color .3s; }
.tabs--dark .tab.is-active, .tabs--dark .tab:hover, .tabs--dark .tab:focus-visible { color: var(--ink); }
.tabs--dark .tab:not(.is-active) .tab__line { transition: background .3s; }
.tabs--dark .tab:not(.is-active):hover .tab__line { background: var(--rojo); }
.tabs__hint { display: flex; align-items: center; gap: .5em; color: var(--muted); margin-bottom: max(.8vw, 10px); }
.tabs__hint svg { width: 1em; height: 1em; color: var(--rojo); }
.paused .tab.is-active .tab__line b { animation-play-state: paused; }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes unfill { from { transform: scaleX(1); } to { transform: scaleX(0); } }

.hero__word { position: absolute; left: 0; right: 0; bottom: -2.8vw; padding-inline: var(--margin); font-size: 35.2vw; line-height: .85; letter-spacing: -.07em; font-weight: 500; white-space: nowrap; pointer-events: none; }
.hero__word-inner { display: flex; overflow: hidden; padding-bottom: .02em; }
.hero__word-inner span { display: inline-block; }

@media (max-width: 640px) {
  .hero { min-height: 560px; }
  .hero__logo { grid-column: 1 / span 4; --logo-h: 11vw; }
  .hero__links, .hero__cta { display: none; }
  .hero__menu { display: block; grid-column: 5 / span 2; justify-self: end; font-size: 5.4vw; }
  .hero__ui { bottom: 35vw; row-gap: 6vw; }
  .hero__label { grid-column: 1 / -1; }
  .hero__slider { grid-column: 1 / -1; gap: 4vw; }
  .tabs { gap: 2vw; }
  .tab { gap: 2vw; }
  .tabs--dark .tab, .tabs--dark .tab.is-active { flex: 1 1 25%; }
  .hero__copy { min-height: 17vw; }
  .hero__text { font-size: 5.6vw; }
  .hero__word { font-size: 35vw; bottom: -2vw; }
}

/* ---------- La agencia ---------- */
.agency { background: var(--paper); padding: 2vw 0 5vw; }
.agency__top { padding-bottom: 1vw; border-bottom: 1px solid var(--line); margin-inline: var(--margin); padding-inline: 0; }
.agency__top > :first-child { grid-column: 1 / span 6; }
.agency__meta { grid-column: 7 / span 6; justify-self: end; color: var(--muted); white-space: nowrap; }
.agency__quote {
  padding: 9vw var(--margin) 10vw; max-width: 94vw;
  font-size: 6.4vw; line-height: 1.02; letter-spacing: -.055em; font-weight: 400;
  text-wrap: balance;
}
.agency__script { font-style: normal; color: var(--rojo); }
.agency__facts { row-gap: 3vw; align-items: start; }
.fact { grid-column: span 3; display: flex; flex-direction: column; gap: 1.2vw; padding-top: 1vw; border-top: 1px solid var(--ink); }
.fact .label { color: var(--azul); }
.fact p { color: var(--muted); max-width: 32ch; }
.agency__more { grid-column: 11 / span 2; justify-self: end; padding-top: 1vw; }

/* Palabras que se oscurecen al hacer scroll (solo con animación) */
.js:not(.no-anim) .agency__quote .w { color: #c9c2b5; }
.js:not(.no-anim) .agency__quote .agency__script { color: #dcc0b8; }

@media (max-width: 640px) {
  .agency { padding: 5vw 0 14vw; }
  .agency__top { padding-bottom: 3vw; }
  .agency__top > :first-child { grid-column: 1 / span 3; }
  .agency__meta { grid-column: 4 / span 3; }
  .agency__quote { padding: 16vw var(--margin) 18vw; font-size: 11.5vw; max-width: none; }
  .agency__facts { row-gap: 9vw; }
  .fact { grid-column: 1 / -1; gap: 3vw; padding-top: 3vw; }
  .agency__more { grid-column: 1 / -1; justify-self: start; padding-top: 0; }
}

/* ---------- Inmuebles ---------- */
.props__head { margin-bottom: 3vw; align-items: end; }
.props__head > .label { grid-column: 1 / span 3; align-self: start; padding-top: .8vw; }
.props__title { grid-column: 4 / span 9; }
.props__grid { row-gap: 4vw; align-items: start; }
.prop { display: block; }
.prop .img { width: 100%; }
.prop--tall { grid-column: 1 / span 5; }
.prop--tall .img { aspect-ratio: 4 / 5.2; }
.props__side { grid-column: 7 / span 6; display: flex; flex-direction: column; gap: 4vw; }
.props__text { display: flex; flex-direction: column; gap: 2vw; align-items: flex-start; max-width: 34ch; }
.prop--wide .img { aspect-ratio: 16 / 10.5; }
.prop--mid { grid-column: 7 / span 6; grid-row: 2; }
.prop--mid .img { aspect-ratio: 16 / 10; }
.prop--val { grid-column: 1 / span 5; grid-row: 2; align-self: stretch; display: flex; flex-direction: column; gap: 1.2vw; justify-content: flex-end; padding: 2vw; background: var(--paper); transition: background .5s var(--ease), color .5s var(--ease); min-height: 22vw; }
.prop__val-title { font-size: 3.6vw; letter-spacing: -.05em; line-height: 1; }
.prop--val .t-xs { max-width: 30ch; }
.prop--val:hover { background: var(--rojo); color: #fff; }
.prop__cap { display: grid; grid-template-columns: 2.6vw 1fr auto; column-gap: .8vw; align-items: baseline; padding-top: .9vw; }
.prop__go { transition: transform .5s var(--ease-out); }
.prop:hover .prop__go { transform: translateX(-.4vw); }
.prop:hover .img::after { opacity: .12; }
@media (max-width: 640px) {
  .props__head { margin-bottom: 8vw; row-gap: 4vw; }
  .props__head > .label, .props__title { grid-column: 1 / -1; }
  .props__grid { row-gap: 12vw; }
  .prop--tall, .props__side, .prop--mid, .prop--val { grid-column: 1 / -1; grid-row: auto; }
  .props__side { gap: 12vw; }
  .props__text { gap: 5vw; }
  .prop__cap { grid-template-columns: 7vw 1fr auto; padding-top: 3vw; }
  .prop--val { padding: 6vw; gap: 3vw; min-height: 60vw; }
  .prop__val-title { font-size: 10vw; }
}

/* ---------- Servicios: tarjetas apiladas ---------- */
.services__head { margin-bottom: 5vw; }
.services__head > .label { grid-column: 1 / span 3; padding-top: .8vw; }
.services__intro { grid-column: 4 / span 8; font-size: 3.6vw; line-height: 1.02; }
.scard { position: sticky; top: 0; height: 100svh; min-height: 560px; background: var(--bg); border-top: 1px solid var(--ink); overflow: hidden; }
.scard__inner { height: 100%; padding-block: 1.4vw var(--margin); align-items: stretch; }
.scard__txt { grid-column: 1 / span 5; display: flex; flex-direction: column; gap: 1.6vw; padding-bottom: 1vw; }
.scard__title { font-size: 5.2vw; line-height: .95; letter-spacing: -.055em; font-weight: 400; margin-top: auto; }
.scard__txt p { color: var(--muted); max-width: 40ch; }
.scard__cta { width: fit-content; }
.scard__ctas { display: flex; flex-wrap: wrap; gap: .8vw 2.4vw; }
.scard__img--contain { background: #eceef1; }
.scard__img--contain > img { object-fit: contain; }
.scard__img { grid-column: 7 / span 6; height: 100%; }
.scard__cover { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
@media (max-width: 640px) {
  .services__head { margin-bottom: 10vw; row-gap: 6vw; }
  .services__head > .label, .services__intro { grid-column: 1 / -1; }
  .services__intro { font-size: 9vw; }
  .scard__inner { grid-template-rows: auto 1fr; row-gap: 5vw; padding-block: 4vw; }
  .scard__txt { grid-column: 1 / -1; gap: 3vw; }
  .scard__title { font-size: 11vw; margin-top: 4vw; }
  .scard__img { grid-column: 1 / -1; height: auto; }
  .scard__ctas { gap: 2vw 6vw; }
}

/* ---------- Nosotros ---------- */
.about { background: var(--dark); color: #fff; padding-top: var(--section); margin-top: var(--section); overflow: hidden; }
.about__head { row-gap: 3vw; align-items: start; }
.about__head > .label { grid-column: 1 / span 3; padding-top: .8vw; }
.about__title { grid-column: 4 / span 9; font-size: 6vw; }
.about__cta { grid-column: 4 / span 3; }
.about__cols { margin-top: 6vw; }
.about__cols p { color: rgba(255,255,255,.62); max-width: 38ch; }
.about__cols p:nth-child(1) { grid-column: 4 / span 3; }
.about__cols p:nth-child(2) { grid-column: 7 / span 3; }
.about__media { height: 92svh; margin-top: 8vw; background: #222; }
@media (max-width: 640px) {
  .about__head { row-gap: 6vw; }
  .about__head > .label, .about__title, .about__cta { grid-column: 1 / -1; }
  .about__title { font-size: 12vw; }
  .about__cols { margin-top: 12vw; row-gap: 6vw; }
  .about__cols p:nth-child(n) { grid-column: 1 / -1; }
  .about__media { height: 70svh; margin-top: 16vw; }
}

/* ---------- 1969 ---------- */
.since { overflow-x: clip; }
.since__head, .since__foot { align-items: baseline; }
.since__head > :first-child { grid-column: 1 / span 6; }
.since__right { grid-column: 7 / span 6; justify-self: end; text-align: right; }
.since__year { font-size: 37vw; line-height: .8; letter-spacing: -.075em; font-weight: 500; padding-inline: calc(var(--margin) - 1.2vw); margin: 1vw 0 2vw; font-variant-numeric: tabular-nums; white-space: nowrap; }
.since__foot { border-top: 1px solid var(--ink); padding-top: 1vw; margin-inline: var(--margin); padding-inline: 0; }
.since__foot > :nth-child(1) { grid-column: 1 / span 4; }
.since__foot > :nth-child(2) { grid-column: 5 / span 4; }
.since__years { grid-column: 9 / span 4; justify-self: end; color: var(--rojo); }
@media (max-width: 640px) {
  .since__head { row-gap: 1.5vw; }
  .since__head > :first-child, .since__right { grid-column: 1 / -1; justify-self: start; text-align: left; }
  .since__year { font-size: 36vw; margin: 4vw 0; }
  .since__foot { padding-top: 3vw; }
  .since__foot > :nth-child(1) { grid-column: 1 / span 2; }
  .since__foot > :nth-child(2) { grid-column: 3 / span 2; }
  .since__years { grid-column: 5 / span 2; }
}

/* ---------- Alquilar mi piso ---------- */
.rent__head { align-items: end; }
.rent__head > .label { grid-column: 1 / span 3; align-self: start; padding-top: .8vw; }
.rent__title { grid-column: 4 / span 9; font-size: 6vw; }
.rent__body { margin-top: 5vw; align-items: end; }
.rent__media { grid-column: 1 / span 6; position: relative; aspect-ratio: 4 / 4.6; overflow: hidden; background: #e8e4dc; }
.rent__img { position: absolute; inset: 0; opacity: 0; transform: scale(1.05); transition: opacity .8s var(--ease), transform 1.4s var(--ease-out); }
.rent__img.is-active { opacity: 1; transform: none; }
.rent__img img { width: 100%; height: 100%; object-fit: cover; }
.rent__panel { grid-column: 8 / span 5; display: flex; flex-direction: column; gap: 2.4vw; }
.rent__copy { position: relative; min-height: 12vw; }
.rent__slide { position: absolute; inset: 0 0 auto 0; display: flex; flex-direction: column; gap: 1.2vw; opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .5s var(--ease), transform .8s var(--ease-out), visibility 0s linear .5s; pointer-events: none; }
.rent__slide.is-active { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition-delay: .15s, .15s, 0s; }
.rent__slide p { color: var(--muted); max-width: 38ch; }
@media (max-width: 640px) {
  .rent__head { row-gap: 5vw; }
  .rent__head > .label, .rent__title { grid-column: 1 / -1; }
  .rent__title { font-size: 12vw; }
  .rent__body { margin-top: 10vw; row-gap: 8vw; }
  .rent__media, .rent__panel { grid-column: 1 / -1; }
  .rent__panel { gap: 6vw; }
  .rent__copy { min-height: 40vw; }
  .rent__slide { gap: 3vw; }
}

/* ---------- Proceso ---------- */
.process { padding-top: var(--section); }
.process__pin { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-block: 3vw; }
.process__head { align-items: end; margin-bottom: 3vw; }
.process__head > .label { grid-column: 1 / span 3; align-self: start; padding-top: .8vw; }
.process__head h2 { grid-column: 4 / span 9; }
.process__body { align-items: start; row-gap: 2vw; }
.process__num { grid-column: 1 / span 5; height: 17vw; overflow: hidden; font-size: 20vw; line-height: .85; letter-spacing: -.07em; font-weight: 500; color: var(--rojo); }
.process__digits { display: flex; flex-direction: column; transition: transform .8s var(--ease-out); }
.process__digits span { height: 17vw; display: block; }
.process__list { grid-column: 7 / span 6; }
.step { display: grid; grid-template-columns: 3vw 1fr; column-gap: var(--gutter); padding: 1.3vw 0 1.8vw; border-top: 1px solid var(--ink); transition: opacity .5s var(--ease); }
.step:last-child { border-bottom: 1px solid var(--ink); }
.step .t-xs { color: var(--muted); max-width: 42ch; margin-top: .6vw; }
.process__bar { grid-column: 7 / span 6; height: 2px; background: var(--line); position: relative; overflow: hidden; }
.process__bar b { position: absolute; inset: 0; background: var(--rojo); transform: scaleX(0); transform-origin: left; }
.is-pinned .step { opacity: .22; }
.is-pinned .step.is-active { opacity: 1; }
.process:not(.is-pinned) .process__bar, .process:not(.is-pinned) .process__num { display: none; }
.process:not(.is-pinned) .process__list { grid-column: 4 / span 9; }
@media (max-width: 640px) {
  .process__pin { min-height: 0; }
  .process__head { row-gap: 4vw; margin-bottom: 8vw; }
  .process__head > .label, .process__head h2 { grid-column: 1 / -1; }
  .process:not(.is-pinned) .process__list { grid-column: 1 / -1; }
  .step { grid-template-columns: 8vw 1fr; padding: 4vw 0 6vw; }
  .step .t-xs { margin-top: 2vw; }
}

/* ---------- Contacto ---------- */
.contact { position: relative; color: #fff; background: var(--dark); margin-top: var(--section); padding: 10vw 0 8vw; overflow: hidden; }
.contact__bg { position: absolute; inset: 0; opacity: .32; background: transparent; }
.contact__bg img { filter: grayscale(1); }
.contact__grid { position: relative; row-gap: 2.5vw; align-items: start; }
.contact__label { grid-column: 1 / span 3; padding-top: 1.5vw; }
.contact__title { grid-column: 4 / span 9; font-size: 13vw; line-height: .85; letter-spacing: -.07em; font-weight: 400; }
.contact__intro { grid-column: 4 / span 5; max-width: 32ch; }
.contact__cta { grid-column: 4 / span 5; margin-bottom: 5vw; }
.contact__list { grid-column: 4 / span 9; display: grid; grid-template-columns: repeat(4, 1fr); column-gap: var(--gutter); }
.contact__list li { display: flex; flex-direction: column; gap: .8vw; border-top: 1px solid rgba(255,255,255,.3); padding-top: 1vw; }
.contact__list .mono { opacity: .6; }
@media (max-width: 640px) {
  .contact { padding: 22vw 0 16vw; }
  .contact__grid { row-gap: 6vw; }
  .contact__label, .contact__title, .contact__intro, .contact__cta, .contact__list { grid-column: 1 / -1; }
  .contact__title { font-size: 21vw; }
  .contact__cta { margin-bottom: 8vw; }
  .contact__list { grid-template-columns: 1fr 1fr; row-gap: 6vw; }
  .contact__list li { gap: 2vw; padding-top: 3vw; }
}

/* ---------- Pie ---------- */
.footer { background: var(--dark); color: #fff; padding-top: 8vw; overflow: hidden; }
.footer__cols { row-gap: 5vw; }
.footer__col { grid-column: span 2; display: flex; flex-direction: column; gap: .5vw; align-items: flex-start; }
.footer__col--idx { grid-column: 1 / span 3; }
.footer__col--wide { grid-column: span 4; }
.footer__h { color: rgba(255,255,255,.6); margin-bottom: 1vw; }
.footer__word { display: flex; align-items: center; gap: 3vw; padding: 8vw var(--margin) 5vw; color: #fff; --mf: #fff; }
.footer__mark { height: 21vw; width: calc(21vw * 1.409); flex: none; }
.footer__logo { height: 18vw; width: calc(18vw * 2.222); flex: none; }
.footer__panot { height: 16vw; width: 16vw; flex: none; color: var(--rojo); }
.footer__base { padding-block: 2vw 1.5vw; border-top: 1px solid rgba(255,255,255,.2); margin-inline: var(--margin); padding-inline: 0; row-gap: 2vw; }
.footer__base > :first-child { grid-column: 1 / span 8; color: rgba(255,255,255,.6); }
.footer__up { grid-column: 9 / span 4; justify-self: end; }
@media (max-width: 640px) {
  .footer { padding-top: 20vw; }
  .footer__cols { row-gap: 12vw; }
  .footer__col, .footer__col--idx { grid-column: span 3; gap: 2vw; }
  .footer__col--wide { grid-column: 1 / -1; }
  .footer__h { margin-bottom: 2vw; }
  .footer__word { padding: 20vw var(--margin) 8vw; }
  .footer__base { padding-block: 5vw; row-gap: 3vw; }
  .footer__base > :first-child, .footer__up { grid-column: 1 / -1; justify-self: start; }
}

/* ---------- Estados de animación ---------- */
.js:not(.no-anim) [data-reveal] { opacity: 0; transform: translateY(30px); }
.js:not(.no-anim) [data-split] { visibility: hidden; }
.js:not(.no-anim) [data-split].is-split { visibility: visible; }
.split-line { padding-bottom: .06em; margin-bottom: -.06em; }

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

/* ---------- Selector de idioma ---------- */
.lang { display: inline-flex; align-items: center; gap: .7em; font-size: max(1.1vw, 13px); line-height: 1; }
.lang a { opacity: .5; transition: opacity .3s; }
.lang a:hover, .lang a[aria-current] { opacity: 1; }
.lang a[aria-current] { text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; }
.bar__lang { gap: .8em; }
.hero__lang { grid-column: 10 / span 1; justify-self: end; color: #fff; padding-top: .55vw; font-size: max(1.2vw, 14px); }
.hero__links { grid-column: 6 / span 4; }
.menu__lang { font-size: inherit; gap: 1.2em; }
@media (max-width: 640px) {
  .hero__lang { display: none; }
  .bar__lang { padding-inline: 12px; gap: .7em; }
}

/* ---------- Primera capa de protección de datos en la ficha ---------- */
.paper__legal { color: rgba(58, 65, 80, .7); max-width: 60ch; }

/* ---------- WhatsApp flotante ---------- */
.wa {
  position: fixed; right: max(1.4vw, 16px); bottom: max(1.4vw, 16px); z-index: 300;
  width: max(3.8vw, 54px); height: max(3.8vw, 54px); border-radius: 50%;
  display: grid; place-items: center; background: #25d366; color: #fff;
  box-shadow: 0 8px 24px rgba(20, 26, 38, .22);
  transition: transform .4s var(--ease-out), box-shadow .4s;
}
.wa svg { width: 56%; height: 56%; fill: currentColor; }
.wa:hover { transform: scale(1.08); box-shadow: 0 12px 30px rgba(20, 26, 38, .3); }
.wa:focus-visible { outline: 2px solid var(--azul); outline-offset: 3px; }
/* Mientras el aviso de cookies está abierto, el botón se oculta para no taparlo */
.has-cookie-banner .wa { opacity: 0; pointer-events: none; }

/* ---------- Aviso de cookies ---------- */
.cookies {
  position: fixed; left: max(1.4vw, 16px); bottom: max(1.4vw, 16px); z-index: 600;
  width: min(30rem, calc(100vw - 32px)); background: #fff; color: var(--ink);
  border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(20, 26, 38, .2);
  padding: max(1.6vw, 20px); display: grid; gap: 14px;
  font-size: 15px; line-height: 1.45;
}
.cookies[hidden] { display: none; }
.cookies__title { font-size: 17px; font-weight: 500; display: flex; align-items: center; gap: 10px; color: var(--azul); }
.cookies__title svg { width: 18px; height: 18px; color: var(--rojo); flex: none; }
.cookies p { color: var(--paper-ink); }
.cookies a { text-decoration: underline; text-underline-offset: .2em; }
.cookies__opts { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.cookies__opts[hidden] { display: none; }
.cookies__opt { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; }
.cookies__opt small { grid-column: 1; color: var(--muted); font-size: 13px; }
.cookies__opt input { grid-row: 1 / span 2; grid-column: 2; width: 18px; height: 18px; accent-color: var(--azul); }
.cookies__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.cookies__btns button { padding: 11px 14px; font-size: 14px; line-height: 1; border: 1px solid var(--azul); }
.cookies__btns .is-primary { background: var(--azul); color: #fff; }
.cookies__btns .is-link { border-color: transparent; padding-inline: 4px; text-decoration: underline; text-underline-offset: .2em; }
