/* ==========================================================================
   Residencial Carme 15 — landing
   Sistema de marca Pastor + Associates (pastor-associates.com)
   ========================================================================== */

/* --- Tipografies de marca (Founders Grotesk, servides localment) --------- */
@font-face {
  font-family: 'PA';
  src: url('../fonts/4314light.woff2') format('woff2'),
       url('../fonts/4314light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'PA';
  src: url('../fonts/2690Regular.woff2') format('woff2'),
       url('../fonts/2690Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'PA';
  src: url('../fonts/82medium.woff2') format('woff2'),
       url('../fonts/82medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'PA';
  src: url('../fonts/2701semibold.woff2') format('woff2'),
       url('../fonts/2701semibold.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'PA';
  src: url('../fonts/374italic-light.woff2') format('woff2'),
       url('../fonts/374italic-light.woff') format('woff');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

/* --- Tokens ------------------------------------------------------------- */
:root {
  --navy: #0d0a59;
  --navy-80: rgba(13, 10, 89, 0.8);
  --navy-55: rgba(13, 10, 89, 0.55);
  --navy-20: rgba(13, 10, 89, 0.2);
  --navy-10: rgba(13, 10, 89, 0.1);
  --green: #3dd990;
  --grey: #f2f2f2;
  --grey-dk: #e4e4e4;
  --white: #fff;

  --stack: 'PA', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --pad: clamp(1.25rem, 5vw, 5rem);
  --gutter: clamp(1.5rem, 3vw, 3rem);
  --section: clamp(4.5rem, 11vh, 9rem);
  --maxw: 1440px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --- Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--grey);
  color: var(--navy);
  font-family: var(--stack);
  font-weight: 300;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

::selection { background: var(--green); color: var(--navy); }

/* --- Tipografia --------------------------------------------------------- */
h1, h2, h3, h4 {
  margin: 0;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.h-display {
  font-size: clamp(2.5rem, 8.5vw, 7.5rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.h-section {
  font-size: clamp(1.9rem, 4.2vw, 3.6rem);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.h-sub {
  font-size: clamp(1.15rem, 1.9vw, 1.6rem);
  font-weight: 400;
  line-height: 1.25;
}

.eyebrow {
  display: block;
  margin: 0 0 1.75rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--navy-55);
}

.lead {
  font-size: clamp(1.1rem, 1.5vw, 1.45rem);
  line-height: 1.5;
  font-weight: 300;
}

.muted { color: var(--navy-55); }

.rule {
  border: 0;
  border-top: 1px solid var(--navy-20);
  margin: 0;
}

/* --- Layout ------------------------------------------------------------- */
.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * 0.6); }
.section--white { background: var(--white); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: var(--gutter) clamp(2rem, 6vw, 6rem);
  align-items: start;
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
}

/* --- Capçalera ---------------------------------------------------------- */
.site-head {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  padding: 1rem var(--pad);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), padding 0.4s var(--ease);
}
.site-head__row {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--gutter);
}
.site-head::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(13, 10, 89, 0.62) 0%, rgba(13, 10, 89, 0.28) 55%, transparent 100%);
  opacity: 1;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.site-head.is-stuck {
  background: var(--grey);
  box-shadow: 0 1px 0 var(--navy-10);
  padding-block: 0.6rem;
}
.site-head.is-stuck::before { opacity: 0; }

/* Logotip de P+A: únic element a l'esquerra de la capçalera, enllaç a la home. */
.brand__logo {
  position: relative;
  display: block;
  flex: none;
  line-height: 0;
  margin-right: auto;
}
.brand__logo img {
  width: 68px;
  height: auto;
  transition: filter 0.4s var(--ease), width 0.4s var(--ease), opacity 0.3s var(--ease);
}
/* Amb la capçalera enganxada l'alçada baixa: el logotip l'acompanya. */
.site-head.is-stuck .brand__logo img { width: 56px; }
.site-head:not(.is-stuck) .brand__logo img { filter: brightness(0) invert(1); }
.brand__logo:hover img,
.brand__logo:focus-visible img { opacity: 0.72; }

@media (max-width: 620px) {
  .brand__logo img { width: 52px; }
  .site-head.is-stuck .brand__logo img { width: 46px; }
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
  /* Ocupa l'alçada de la fila perquè l'ítem amb desplegable la pugui heretar
     i el panell pengi arran de la vora inferior de la capçalera. */
  align-self: stretch;
}
.nav a {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  padding-block: 0.35rem;
  border-bottom: 1px solid transparent;
  transition: color 0.4s var(--ease), border-color 0.25s var(--ease);
}
.site-head.is-stuck .nav a { color: var(--navy); }
.nav a:hover { border-bottom-color: currentColor; }

/* Selector d'idioma */
.lang {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}
.lang button {
  background: none;
  border: 0;
  padding: 0.35rem 0.1rem;
  cursor: pointer;
  color: var(--white);
  opacity: 0.55;
  text-transform: uppercase;
  letter-spacing: inherit;
  font-size: inherit;
  transition: opacity 0.25s var(--ease), color 0.4s var(--ease);
}
.site-head.is-stuck .lang button { color: var(--navy); }
.lang button[aria-pressed='true'] { opacity: 1; font-weight: 500; }
.lang button:hover { opacity: 1; }
.lang .sep { color: currentColor; opacity: 0.35; }
.site-head:not(.is-stuck) .lang .sep { color: var(--white); }
.site-head.is-stuck .lang .sep { color: var(--navy); }

/* Menú mòbil */
.burger {
  display: none;
  background: none;
  border: 0;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  cursor: pointer;
  position: relative;
}
.burger span {
  position: absolute;
  left: 0.3rem;
  right: 0.3rem;
  height: 1px;
  background: var(--white);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease), background 0.4s var(--ease);
}
.site-head.is-stuck .burger span { background: var(--navy); }
.burger span:nth-child(1) { top: 0.8rem; }
.burger span:nth-child(2) { top: 1.4rem; }
.site-head.is-open .burger span:nth-child(1) { transform: translateY(0.3rem) rotate(45deg); }
.site-head.is-open .burger span:nth-child(2) { transform: translateY(-0.3rem) rotate(-45deg); }

@media (max-width: 900px) {
  .burger { display: block; order: 3; }
  .nav {
    position: fixed;
    inset: 0 0 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--grey);
    padding: 4.5rem var(--pad) 2rem;
    transform: translateY(-100%);
    transition: transform 0.45s var(--ease);
    box-shadow: 0 1px 0 var(--navy-10);
    /* Amb les promocions i les seccions dins, la llista pot passar de
       l'alçada de la pantalla: que es pugui recórrer i no quedi res amagat. */
    max-height: 100svh;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .site-head.is-open .nav { transform: translateY(0); }
  .nav a {
    color: var(--navy) !important;
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    padding-block: 0.75rem;
    width: 100%;
    border-bottom: 1px solid var(--navy-10);
  }
  .lang { margin: 1.5rem 0 0; }
  .lang button, .lang .sep { color: var(--navy) !important; font-size: 0.85rem; }

}

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--white);
  overflow: hidden;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
  animation: heroIn 1.6s var(--ease) both;
}
@keyframes heroIn {
  from { transform: scale(1.07); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(13, 10, 89, 0.8) 0%, rgba(13, 10, 89, 0.5) 26%, rgba(13, 10, 89, 0.12) 52%, transparent 74%);
}
.hero__inner {
  padding: 0 var(--pad) clamp(3rem, 8vh, 6rem);
  max-width: var(--maxw);
  margin-inline: auto;
  width: 100%;
}
.hero .eyebrow { color: rgba(255, 255, 255, 0.72); }
.hero h1 { margin-bottom: 1.25rem; }
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 2.5rem;
}
.hero__meta span { display: inline-flex; align-items: center; gap: 0.75rem; }
.hero__meta span + span::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--green);
  flex: none;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.scroll-cue {
  position: absolute;
  right: var(--pad);
  bottom: clamp(3rem, 8vh, 6rem);
  writing-mode: vertical-rl;
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.scroll-cue::after {
  content: '';
  width: 1px; height: 3.5rem;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7), transparent);
}
@media (max-width: 900px) { .scroll-cue { display: none; } }

/* --- Botons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.75rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  background: none;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--navy); border-color: var(--navy); color: var(--white); }
.btn--solid:hover { background: var(--green); border-color: var(--green); color: var(--navy); }
.btn--light { background: var(--white); border-color: var(--white); color: var(--navy); }
.btn--light:hover { background: var(--green); border-color: var(--green); }
.btn--ghost-light { color: var(--white); }
.btn--ghost-light:hover { background: var(--white); color: var(--navy); }
.btn__arrow { transition: transform 0.3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* --- Franja de dades ---------------------------------------------------- */
.facts {
  background: var(--white);
  border-bottom: 1px solid var(--navy-10);
}
.facts__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}
@media (max-width: 1180px) { .facts__grid { grid-template-columns: repeat(3, 1fr); } }
.fact {
  padding: clamp(2rem, 4vw, 3.25rem) clamp(1rem, 2vw, 2rem);
  border-left: 1px solid var(--navy-10);
}
.fact:first-child { border-left: 0; }
@media (max-width: 1180px) and (min-width: 641px) {
  .fact { border-top: 1px solid var(--navy-10); }
  .fact:nth-child(3n + 1) { border-left: 0; }
  .fact:nth-child(-n + 3) { border-top: 0; }
}
.fact dt {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy-55);
  margin-bottom: 0.75rem;
}
.fact dd {
  margin: 0;
  font-size: clamp(1.45rem, 2.6vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.fact dd small {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0;
  color: var(--navy-55);
  margin-top: 0.35rem;
  line-height: 1.4;
}
@media (max-width: 640px) {
  .facts__grid { grid-template-columns: repeat(2, 1fr); }
  .fact { border-left: 1px solid var(--navy-10); border-top: 1px solid var(--navy-10); }
  .fact:nth-child(odd) { border-left: 0; }
  .fact:nth-child(-n+2) { border-top: 0; }
}

/* --- Imatge a sang ------------------------------------------------------ */
.band {
  position: relative;
  height: clamp(20rem, 62vh, 40rem);
  overflow: hidden;
}
.band img { width: 100%; height: 100%; object-fit: cover; }
.band--wide { height: clamp(14rem, 42vh, 26rem); }
.band__caption {
  position: absolute;
  left: var(--pad);
  bottom: 1.75rem;
  color: var(--white);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

/* --- Model cooperatiu --------------------------------------------------- */
.coop { background: var(--navy); color: var(--white); }
.coop .eyebrow { color: rgba(255, 255, 255, 0.6); }
.coop .rule { border-color: rgba(255, 255, 255, 0.22); }

.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.22);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
@media (max-width: 1200px) { .steps { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px)  { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--navy);
  padding: clamp(1.75rem, 3vw, 2.5rem) clamp(1.25rem, 2.5vw, 2rem);
}
.step__n {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--green);
  margin-bottom: 1.1rem;
}
.step h3 {
  font-size: 1.15rem;
  margin-bottom: 0.7rem;
  letter-spacing: -0.005em;
}
.step p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

.coop__points {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}
.coop__points li {
  position: relative;
  padding-left: 1.6rem;
  color: rgba(255, 255, 255, 0.85);
}
.coop__points li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.72em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
}

/* --- Habitatges --------------------------------------------------------- */
.houses {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
@media (max-width: 1000px) { .houses { grid-template-columns: 1fr; } }
.house {
  background: var(--white);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--navy-10);
}
.house__head {
  padding: clamp(1.5rem, 2.5vw, 2rem) clamp(1.5rem, 2.5vw, 2rem) 1.25rem;
  border-bottom: 1px solid var(--navy-10);
}
.house__head h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  text-transform: uppercase;
  letter-spacing: -0.015em;
}
.house__tag {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy-55);
}
.house__plan {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  position: relative;
  /* 16/9 i no 4/3: les làmines són apaïsades (4963×3508) i amb aquest marc
     hi caben senceres d'amplada, sense haver de retallar-ne els costats. */
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--white);
  border-bottom: 1px solid var(--navy-10);
  cursor: zoom-in;
}
/* Enquadrament dels plànols.
 *
 * Els plànols del dossier són làmines A3 amb marges blancs i el caixetí a peu
 * de pàgina; aquests valors els retallen. Si substitueixes una imatge i queda
 * mal enquadrada, ajusta aquestes variables al mateix <button> de l'HTML:
 *
 *   <button class="house__plan" style="--plan-zoom:115%; --plan-y:-52%" …>
 *
 *   --plan-zoom  amplada de la imatge respecte del marc. 100% = hi cap sencera
 *                d'amplada; més gran = més ampliada i més retallada pels costats.
 *   --plan-y     desplaçament vertical. -50% = centrada; menys (-56%) la puja
 *                i amaga el peu de la làmina; més (-44%) la baixa.
 *   --plan-x     desplaçament horitzontal. -50% = centrada.
 *
 * Si el plànol nou ja ve retallat i net, fes servir la classe .house__plan--fit
 * i es veurà sencer, sense retallar res.
 */
/* Valors calculats mesurant els píxels de les làmines actuals:
 *   làmina    dibuix        caixetí des de
 *   66-A      4,1 – 80,6 %  84,7 %
 *   66-B      5,9 – 74,1 %  84,7 %
 *   66-C      4,1 – ~82 %   84,7 %
 * Amb marc 16/9 i zoom 102 % la finestra visible cau entre el 3,6 % i el
 * 81,6 %: la làmina sencera d'amplada, el dibuix complet i el peu fora. */
.house__plan {
  --plan-zoom: 102%;
  --plan-x: -50%;
  --plan-y: -42.5%;
}
.house__plan img {
  position: absolute;
  top: 50%; left: 50%;
  width: var(--plan-zoom);
  max-width: none; /* cal: la regla base img{max-width:100%} anul·laria el zoom */
  transform: translate(var(--plan-x), var(--plan-y));
  transition: transform 0.7s var(--ease);
}
.house__plan:hover img { transform: translate(var(--plan-x), var(--plan-y)) scale(1.05); }

/* Imatge sencera dins del marc, sense retallar. */
.house__plan--fit img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: none;
}
.house__plan--fit:hover img { transform: scale(1.03); }
.house__plan .zoom {
  position: absolute;
  right: 0.85rem; bottom: 0.85rem;
  background: var(--navy);
  color: var(--white);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.house__plan:hover .zoom, .house__plan:focus-visible .zoom { opacity: 1; transform: translateY(0); }

.house__body { padding: clamp(1.5rem, 2.5vw, 2rem); flex: 1; }
.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.spec th, .spec td {
  text-align: left;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--navy-10);
  font-weight: 300;
}
.spec th { color: var(--navy-55); font-weight: 300; }
.spec td { text-align: right; font-weight: 400; white-space: nowrap; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.spec .is-total th, .spec .is-total td { font-weight: 500; border-top: 1px solid var(--navy-20); }

.rooms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.rooms li {
  list-style: none;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--navy-20);
  border-radius: 999px;
  color: var(--navy-80);
}

/* --- Opcions de distribució --------------------------------------------- */
/* Sempre 3 columnes: la planta primera n'ocupa 2 i deixa la tercera buida,
   així les targetes conserven la mateixa amplada a tot l'apartat. */
.options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
  margin-top: clamp(2rem, 4vw, 3rem);
}
@media (max-width: 900px) { .options { grid-template-columns: 1fr; } }
.option {
  background: var(--white);
  border: 1px solid var(--navy-10);
  padding: clamp(1.5rem, 2.5vw, 2rem);
}
.option__k {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem; height: 2.25rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}
.option--base .option__k { background: var(--green); color: var(--navy); }
.option h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.option p { margin: 0 0 1.25rem; font-size: 0.94rem; color: var(--navy-55); }
.option ul { margin: 0; padding: 0; list-style: none; font-size: 0.9rem; }
.option li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--navy-10);
}
.option li:last-child { border-bottom: 0; }
.option li span:last-child { color: var(--navy-55); white-space: nowrap; }

/* --- Qualitats ---------------------------------------------------------- */
.quals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter) clamp(2rem, 6vw, 5rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}
@media (max-width: 1000px) { .quals { grid-template-columns: 1fr; } }
.quals h3 {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--navy-20);
  margin-bottom: 1.5rem;
}
.quals ul { margin: 0; padding: 0; list-style: none; columns: 1; }
.quals li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.5rem;
  font-size: 0.96rem;
  border-bottom: 1px solid var(--navy-10);
}
.quals li::before {
  content: '';
  position: absolute;
  left: 0; top: 1.25em;
  width: 8px; height: 1px;
  background: var(--navy-55);
}
.quals--opt li::before { background: var(--green); height: 2px; }

/* --- Galeria ------------------------------------------------------------ */
.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(0.5rem, 1vw, 1rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.gallery figure { margin: 0; position: relative; overflow: hidden; cursor: zoom-in; background: var(--navy-10); }
.gallery img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2.5rem 1rem 0.9rem;
  background: linear-gradient(to top, rgba(13, 10, 89, 0.75), transparent);
  color: var(--white);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.gallery figure:hover figcaption { opacity: 1; }
.g-a { grid-column: span 4; aspect-ratio: 16 / 9; }
.g-b { grid-column: span 2; aspect-ratio: 8 / 9; }
.g-c { grid-column: span 2; aspect-ratio: 1; }
.g-d { grid-column: span 4; aspect-ratio: 2 / 1; }
.g-e { grid-column: span 3; aspect-ratio: 3 / 2; }
.g-f { grid-column: span 3; aspect-ratio: 3 / 2; }
@media (max-width: 980px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .g-a, .g-d { grid-column: span 2; aspect-ratio: 16 / 10; }
  .g-b, .g-c, .g-e, .g-f { grid-column: span 1; aspect-ratio: 1; }
}

/* --- Ubicació ----------------------------------------------------------- */
.loc__map {
  /* És un <button>: sense display:block + width:100% encongiria fins al contingut,
     i el contingut (la imatge) va en posició absoluta, així que quedaria a zero. */
  display: block;
  width: 100%;
  padding: 0;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--white);
  border: 1px solid var(--navy-10);
  cursor: zoom-in;
}
/* Mateix sistema i mateixos valors que els plànols: la làmina d'ubicació té el
   mateix format, amb la foto aèria del 7,6 % al 80 % i el caixetí des del 89,4 %. */
.loc__map {
  --plan-zoom: 102%;
  --plan-x: -50%;
  --plan-y: -42.5%;
}
.loc__map img {
  position: absolute;
  top: 50%; left: 50%;
  width: var(--plan-zoom);
  max-width: none; /* igual que als plànols */
  transform: translate(var(--plan-x), var(--plan-y));
}
.loc__list { list-style: none; margin: 2rem 0 0; padding: 0; }
.loc__list li {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--navy-10);
  font-size: 0.96rem;
}
.loc__list span:last-child { color: var(--navy-55); text-align: right; }

/* --- Contacte ----------------------------------------------------------- */
.contact { background: var(--navy); color: var(--white); }
.contact .eyebrow { color: rgba(255, 255, 255, 0.6); }

.form { display: grid; gap: 1.5rem; margin-top: 2rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }

.field { position: relative; }
.field label {
  display: block;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.6rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 300;
  padding: 0.6rem 0;
  border-radius: 0;
  transition: border-color 0.3s var(--ease);
}
.field textarea { resize: vertical; min-height: 5rem; }
.field select option { background: var(--navy); color: var(--white); }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--green); }
.field input::placeholder, .field textarea::placeholder { color: rgba(255, 255, 255, 0.35); }

.consent {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  font-size: 0.84rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
}
.consent input { accent-color: var(--green); margin-top: 0.25rem; flex: none; width: 1rem; height: 1rem; }
.consent a { text-decoration: underline; text-underline-offset: 3px; }

.form__status {
  font-size: 0.9rem;
  color: var(--green);
  min-height: 1.4em;
}

.contact__card {
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  padding-top: 1.75rem;
  margin-top: 1.75rem;
}
.contact__card:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.contact__card h4 {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.9rem;
}
.contact__card p { margin: 0 0 0.35rem; color: rgba(255, 255, 255, 0.78); font-size: 0.95rem; }
.contact__card a:hover { color: var(--green); }

/* --- Peu ---------------------------------------------------------------- */
.site-foot {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding: 2.5rem var(--pad);
  font-size: 0.8rem;
}
.site-foot__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  align-items: center;
}
.site-foot__logo { display: block; flex: none; line-height: 0; }
.site-foot img {
  width: 64px;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
  transition: opacity 0.3s var(--ease);
}
.site-foot__logo:hover img,
.site-foot__logo:focus-visible img { opacity: 1; }
.site-foot a:hover { color: var(--green); }
.site-foot .push { margin-left: auto; }
@media (max-width: 700px) { .site-foot .push { margin-left: 0; } }

.legal {
  max-width: var(--maxw);
  margin: 1.75rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.72rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.4);
}

.copyright {
  max-width: var(--maxw);
  margin: 1.25rem auto 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
}

/* --- Lightbox ----------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(13, 10, 89, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  object-fit: contain;
  background: var(--white);
}
.lightbox__close {
  position: absolute;
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  width: 3rem; height: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: none;
  color: var(--white);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.lightbox__close:hover { background: var(--white); color: var(--navy); }
.lightbox__cap {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(0.75rem, 2vw, 1.5rem);
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* --- Revelat en scroll -------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --- Accessibilitat ----------------------------------------------------- */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  background: var(--navy);
  color: var(--white);
  padding: 1rem 1.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Residencial Carme 15 — components propis
   ========================================================================== */

/* --- Taula d'habitatges i preus ----------------------------------------- */
.units {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid var(--navy-20);
}
.units__table {
  width: 100%;
  min-width: 44rem;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--white);
}
.units__table th,
.units__table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--navy-10);
  font-weight: 300;
  white-space: nowrap;
}
.units__table thead th {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-55);
  font-weight: 400;
  border-bottom: 1px solid var(--navy-20);
  padding-top: 0;
}
.units__table .num { text-align: right; }
.units__table tbody th {
  font-weight: 500;
  letter-spacing: 0.02em;
  position: sticky;
  left: 0;
  background: var(--white);
}
.units__table .price { font-weight: 500; }

.units__group th {
  position: static;
  background: var(--grey);
  color: var(--navy-80);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-top: 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--navy-20);
}
.units__group th::before {
  content: '';
  display: inline-block;
  width: 1.25rem;
  height: 1px;
  margin-right: 0.7rem;
  vertical-align: middle;
  background: var(--green);
}
.units__table tbody tr:not(.units__group):hover th,
.units__table tbody tr:not(.units__group):hover td { background: rgba(61, 217, 144, 0.08); }
.units__table tr.is-muted th,
.units__table tr.is-muted td { color: var(--navy-55); }

/* --- Graella de plantes -------------------------------------------------- */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
@media (max-width: 980px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .plans { grid-template-columns: 1fr; } }

.plan { margin: 0; cursor: zoom-in; }
.plan img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  object-position: center;
  background: var(--white);
  border: 1px solid var(--navy-10);
  transition: border-color 0.3s var(--ease);
}
.plan:hover img { border-color: var(--green); }
.plan figcaption { margin-top: 0.9rem; }
.plan figcaption strong {
  display: block;
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.plan figcaption span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.86rem;
  color: var(--navy-55);
}

/* --- Galeria dels àtics (secció fosca) ---------------------------------- */
.gallery--roof .g-a { grid-column: span 6; aspect-ratio: 16 / 9; }
.gallery--roof .g-b,
.gallery--roof .g-c { grid-column: span 3; aspect-ratio: 4 / 5; }
@media (max-width: 980px) {
  .gallery--roof .g-a { grid-column: span 2; aspect-ratio: 16 / 10; }
  .gallery--roof .g-b,
  .gallery--roof .g-c { grid-column: span 1; aspect-ratio: 4 / 5; }
}

.units__hint {
  display: none;
  margin: 0.9rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy-55);
}
@media (max-width: 780px) { .units__hint { display: block; } }
