/* ==========================================================================
   Grupo Andes · inversión inmobiliaria
   Paleta Japandi · Jost
   ========================================================================== */

/* Jost alojada en el propio sitio (sin Google Fonts) */
@font-face {
  font-family: "Jost"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/jost-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jost"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/jost-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Paleta tomada de los esquemas del proceso (fondo crema y verde oliva del logo) */
  --ivory: #FAF6F0;
  --stone: #EFE8DD;
  --brown: #2E2A25;
  --taupe: #6F665B;
  --wood: #5A6544;   /* acento Grupo Andes: verde oliva */
  --wood-dark: #464F33;
  --sage: #7A8463;
  --border: rgba(46, 42, 37, 0.14);

  --font: "Jost", "Helvetica Neue", Arial, sans-serif;
  --header-h: 84px;
  --gutter: clamp(20px, 5vw, 64px);
  --max: 1320px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--brown);
  font-family: var(--font);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }

a { color: var(--wood); text-decoration: none; transition: color .25s var(--ease); }
a:hover { color: var(--sage); }

h1, h2, h3 { font-weight: 300; line-height: 1.15; margin: 0; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.section { padding: clamp(72px, 11vw, 140px) 0; }
.section--alt { background: var(--stone); }

/* Proceso y Proyectos: ritmo más compacto. El mismo espacio arriba del título y entre título y contenido */
.section--compact { --sp: clamp(48px, 5.5vw, 80px); padding: var(--sp) 0; }
.section--compact + .section--compact { padding-top: calc(var(--sp) * 0.5); }
.section--compact .section-title { margin-bottom: var(--sp); }

.philosophy { max-width: 860px; margin-bottom: var(--sp, 64px); }
.philosophy__text {
  margin-top: 18px;
  font-size: clamp(20px, 2.3vw, 28px);
  font-weight: 300;
  line-height: 1.5;
  color: var(--brown);
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--taupe);
}

.section-title {
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 200;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 200;
  background: var(--brown); color: var(--ivory); padding: 8px 16px;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--wood); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: 14px 30px;
  border: 1px solid var(--wood);
  border-radius: 2px;
  background: var(--wood);
  color: var(--ivory);
  font: 400 13px/1 var(--font);
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.btn:hover { background: var(--wood-dark); border-color: var(--wood-dark); color: var(--ivory); }

.btn--ghost { background: transparent; color: var(--brown); border-color: var(--brown); }
.btn--ghost:hover { background: var(--brown); border-color: var(--brown); color: var(--ivory); }

.btn--sm { padding: 11px 20px; font-size: 11px; white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(250, 246, 240, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  max-width: 1500px;
}

.logo img { width: clamp(200px, 17vw, 250px); }

.main-nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); }

.nav-links { display: flex; gap: clamp(18px, 2.4vw, 34px); list-style: none; margin: 0; padding: 0; }
.nav-links a {
  position: relative; white-space: nowrap;
  color: var(--brown);
  font-size: 13px; font-weight: 400;
  letter-spacing: .2em; text-transform: uppercase;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -6px;
  height: 1px; background: var(--sage);
  transition: right .3s var(--ease);
}
.nav-links a:hover { color: var(--sage); }
.nav-links a:hover::after { right: 0; }

.header-tools { display: flex; align-items: center; gap: 14px; }

.social { display: flex; gap: 10px; }
.social a {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  color: var(--brown);
  border-radius: 50%;
  transition: color .25s, background .25s;
}
.social a:hover { color: var(--ivory); background: var(--sage); }
.social svg { width: 17px; height: 17px; }

.lang-toggle {
  display: inline-flex; padding: 3px;
  border: 1px solid var(--border); border-radius: 999px;
  background: transparent; cursor: pointer;
  font: 500 11px/1 var(--font); letter-spacing: .12em;
}
.lang-toggle span {
  padding: 7px 11px; border-radius: 999px; color: var(--taupe);
  transition: background .25s, color .25s;
}
.lang-toggle span.is-active { background: var(--brown); color: var(--ivory); }

.menu-toggle {
  display: none;
  width: 44px; height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer;
  position: relative;
}
.menu-toggle span {
  position: absolute; left: 11px; right: 11px; height: 1px; background: var(--brown);
  transition: transform .3s var(--ease), opacity .2s;
}
.menu-toggle span:nth-child(1) { top: 16px; }
.menu-toggle span:nth-child(2) { top: 22px; }
.menu-toggle span:nth-child(3) { top: 28px; }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero (carrusel) ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex; align-items: flex-end;
  overflow: hidden;
  background: var(--brown);
  color: #fff;
}

.hero__slides { position: absolute; inset: 0; }
.hero__slide {
  position: absolute; inset: 0; margin: 0;
  opacity: 0;
  z-index: 0;
  /* La que sale se apaga recién cuando la nueva ya cubrió todo (sin "bajón" a negro) */
  transition: opacity 1.2s ease-in-out 1.2s;
}
.hero__slide.is-active { opacity: 1; z-index: 1; transition-delay: 0s; }
.hero__slide img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.05);
  transition: transform 7s linear;
}
.hero__slide.is-active img { transform: scale(1); }
.hero__video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Sombra suave solo para que el texto blanco se lea; la foto se ve completa */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(20, 16, 12, .48) 0%, rgba(20, 16, 12, .12) 55%, rgba(20, 16, 12, 0) 75%),
    linear-gradient(0deg, rgba(20, 16, 12, .30) 0%, rgba(20, 16, 12, 0) 40%);
}

.hero__content { position: relative; z-index: 2; padding-bottom: clamp(96px, 14vh, 150px); }

.hero__tag {
  display: inline-block; margin-bottom: 22px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, .55); border-radius: 999px;
  font-size: 12px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase;
  color: #fff;
}

.hero__title {
  font-size: clamp(42px, 8vw, 104px);
  font-weight: 200;
  letter-spacing: .06em;
  text-transform: uppercase;
  max-width: 13ch;
  color: #fff;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .25);
}

.hero__subtitle {
  max-width: 34em; margin: 22px 0 36px;
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 300;
  color: #fff;
  text-shadow: 0 1px 16px rgba(0, 0, 0, .3);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__controls {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
}
.hero__caption {
  font-size: 12px; font-weight: 400; letter-spacing: .22em; text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
}
.hero__caption:hover { color: #fff; }
.hero__caption::after { content: " →"; }

.hero__nav { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.hero__count { min-width: 52px; text-align: center; font-size: 12px; letter-spacing: .2em; color: rgba(255, 255, 255, .85); }
.hero__arrow {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  background: transparent; border: 1px solid rgba(255, 255, 255, .55); border-radius: 50%;
  color: #fff; font: 200 22px/1 var(--font);
  cursor: pointer;
  transition: background .25s, border-color .25s;
}
.hero__arrow:hover { background: var(--wood); border-color: var(--wood); }

/* ---------- Projects ---------- */
.section--projects { padding-bottom: 0; }

.projects-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: var(--ivory);
}

.project-card {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 8 / 5;
  background: var(--stone);
  color: #fff;
}
.project-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s var(--ease);
}
.project-card:hover img,
.project-card:focus-visible img { transform: scale(1.05); }

.project-card__overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  padding: clamp(16px, 2vw, 28px);
  background: linear-gradient(0deg, rgba(20, 16, 12, .62) 0%, rgba(20, 16, 12, .15) 55%, rgba(20, 16, 12, .05) 100%);
  opacity: 0;
  transition: opacity .45s var(--ease);
}
.project-card:hover .project-card__overlay,
.project-card:focus-visible .project-card__overlay { opacity: 1; }

.project-card__name {
  font-size: clamp(15px, 1.25vw, 19px); font-weight: 400; letter-spacing: .16em; text-transform: uppercase;
  transform: translateY(10px); transition: transform .45s var(--ease);
}
.project-card__place {
  font-size: 13px; color: rgba(255, 255, 255, .85);
  transform: translateY(10px); transition: transform .45s var(--ease) .05s;
}
.project-card:hover .project-card__name,
.project-card:hover .project-card__place { transform: none; }

.project-card__badge {
  position: absolute; top: 14px; left: 14px;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(250, 246, 240, .92);
  font-size: 10px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase;
  color: var(--sage);
}

/* Pantallas táctiles (sin cursor): el nombre siempre visible */
@media (hover: none) {
  .project-card__overlay { opacity: 1; background: linear-gradient(0deg, rgba(20, 16, 12, .55) 0%, rgba(20, 16, 12, 0) 50%); }
  .project-card__name,
  .project-card__place { transform: none; }
}

/* ---------- Process ----------
   Dos líneas de dibujos: obra nueva (arriba) y reforma (abajo), con el texto común en medio.
   Cada paso usa subgrid para que las 5 columnas queden alineadas fila a fila. */
.process-head { display: flex; align-items: flex-end; gap: clamp(24px, 5vw, 72px); margin-bottom: var(--sp, 64px); }
.section--compact .process-head .section-title { margin-bottom: 0; }
.process-head__intro {
  margin: 0 0 4px; padding-left: clamp(24px, 4vw, 56px); border-left: 1px solid var(--border);
  max-width: 46ch; font-style: italic; font-size: clamp(17px, 1.45vw, 20px); line-height: 1.55; color: var(--taupe);
}
.process-grid {
  --step-gap: clamp(16px, 2.4vw, 40px);
  position: relative;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(5, auto);
  column-gap: var(--step-gap);
}
.step { display: grid; grid-row: 1 / span 5; grid-template-rows: subgrid; }
.step__figure { position: relative; margin: 0; }
.step__figure--obra { margin-bottom: 20px; }
.step__figure--reforma { margin-top: 30px; }
.step__img { width: 100%; max-width: 300px; aspect-ratio: 330 / 296; object-fit: contain; }
.step__cap { display: none; }
/* Línea con punto que une los dibujos de cada fila */
.step:not(:last-child) .step__figure::after {
  content: ""; position: absolute; top: 50%; right: calc(-1 * var(--step-gap) - 6px);
  width: calc(var(--step-gap) + 12px); height: 7px;
  background:
    radial-gradient(circle, var(--wood) 0 3px, transparent 3.5px) center / 7px 7px no-repeat,
    linear-gradient(var(--wood), var(--wood)) center / 100% 1px no-repeat;
  opacity: .7;
}
/* Etiqueta vertical a la izquierda de cada fila */
.process-label {
  position: absolute; grid-column: 1; top: 0; bottom: 0; left: -38px;
  writing-mode: vertical-rl; transform: rotate(180deg); text-align: center;
  font-size: 11px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: var(--wood);
}
.process-label--new { grid-row: 1 / 2; }
.process-label--reform { grid-row: 5 / 6; }
.step__num {
  display: block; margin-bottom: 12px;
  font-size: 44px; font-weight: 200; line-height: 1; color: var(--wood);
}
.step__title {
  font-size: 15px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 10px;
}
.step__text { margin: 0; font-size: 15.5px; color: var(--brown); line-height: 1.65; }


/* ---------- Quiénes somos ---------- */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(36px, 7vw, 110px); align-items: center; }
.about__photo { margin: 0; }
.about__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about__text .section-title { margin-bottom: 28px; }
.about__text p { margin: 0 0 16px; color: var(--taupe); line-height: 1.75; max-width: 36em; }
.about__text .about__lead { font-size: clamp(18px, 1.6vw, 21px); font-weight: 300; color: var(--brown); line-height: 1.6; }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(36px, 7vw, 110px); }
.contact__title {
  font-size: clamp(30px, 3.8vw, 48px); font-weight: 200; letter-spacing: .04em; margin-bottom: 22px;
}
.contact__subtitle { margin: 0 0 32px; color: var(--taupe); font-size: 18px; }
.contact__direct { list-style: none; padding: 0; margin: 0; font-size: 15px; }
.contact__direct li { padding: 12px 0; border-top: 1px solid var(--border); }
.contact__direct li:last-child { border-bottom: 1px solid var(--border); }
.contact__direct span {
  display: inline-block; width: 110px;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--taupe);
}

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 28px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--taupe);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 0;
  background: transparent;
  border: 0; border-bottom: 1px solid rgba(46, 42, 37, .3);
  border-radius: 0;
  font: 300 17px/1.5 var(--font); color: var(--brown);
  transition: border-color .25s;
}
.field select {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--taupe) 50%), linear-gradient(135deg, var(--taupe) 50%, transparent 50%);
  background-position: calc(100% - 12px) 55%, calc(100% - 7px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--wood); }
.field input::placeholder,
.field textarea::placeholder { color: rgba(129, 115, 101, .6); }

.consent {
  grid-column: 1 / -1;
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 14px; line-height: 1.5; color: var(--taupe); cursor: pointer;
}
.consent input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brown); cursor: pointer; }
.consent a { color: var(--brown); text-decoration: underline; text-underline-offset: 3px; }

.form__footer { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 6px; }
.form__note { margin: 0; font-size: 13px; color: var(--taupe); }
.form__note.is-ok { color: var(--sage); font-size: 15px; }
.form__note.is-error { color: #A0522D; }
.form .btn:disabled { opacity: .6; cursor: wait; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brown); color: var(--stone); padding: 80px 0 32px; font-size: 15px; }
.site-footer a { color: var(--stone); }
.site-footer a:hover { color: var(--wood); }

.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
.footer__logo img { width: 220px; }
.footer__heading {
  margin: 0 0 14px;
  font-size: 11px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--wood);
}
.footer__list { list-style: none; margin: 0; padding: 0; line-height: 2; }

.footer__alliance {
  margin: 56px 0 0; padding-top: 28px;
  border-top: 1px solid rgba(239, 232, 221, .16);
  font-style: italic; font-size: 15px; color: rgba(239, 232, 221, .75);
}
.footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin-top: 20px; font-size: 12px; letter-spacing: .08em; color: rgba(239, 232, 221, .55);
}

.footer__bottom a { color: inherit; }
.footer__bottom a:hover { color: var(--wood); }
.footer__legal { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer__legal button {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; letter-spacing: inherit; color: inherit;
}
.footer__legal button:hover { color: var(--wood); }

/* ---------- Información básica de protección de datos (formulario) ---------- */
.form__legal { grid-column: 1 / -1; margin: 4px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--taupe); }
.form__legal strong { font-weight: 500; }
.form__legal a, .consent a { color: var(--brown); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Banner de cookies ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 300;
  display: flex; justify-content: center; pointer-events: none;
}
.cookie-banner[hidden] { display: none; }
.cookie-box {
  pointer-events: auto;
  width: 100%; max-width: 760px; max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 22px 24px;
  background: var(--brown); color: var(--stone);
  border-radius: 4px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  font-size: 14.5px; line-height: 1.6;
}
.cookie-text { margin: 0 0 16px; }
.cookie-text a { color: var(--ivory); text-decoration: underline; text-underline-offset: 3px; }
.cookie-settings { margin: 0 0 16px; border-top: 1px solid rgba(239, 232, 221, .2); }
.cookie-settings__title {
  margin: 14px 0 6px;
  font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--wood);
}
.cookie-cat { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid rgba(239, 232, 221, .15); cursor: pointer; }
.cookie-cat input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--wood); cursor: pointer; }
.cookie-cat input:disabled { cursor: default; }
.cookie-cat strong { font-weight: 500; color: var(--ivory); }
.cookie-cat em { font-style: normal; font-size: 12px; color: var(--wood); }
.cookie-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
/* "Aceptar" y "Rechazar" tienen exactamente el mismo estilo y tamaño */
.cookie-btn {
  padding: 13px 10px;
  border: 1px solid var(--ivory); border-radius: 2px;
  background: var(--ivory); color: var(--brown);
  font: 500 12px/1 var(--font); letter-spacing: .16em; text-transform: uppercase;
  cursor: pointer; transition: background .2s, color .2s;
}
.cookie-btn:hover { background: var(--stone); border-color: var(--stone); }
.cookie-btn--line { background: transparent; color: var(--ivory); }
.cookie-btn--line:hover { background: rgba(250, 246, 240, .12); border-color: var(--ivory); }

/* ---------- Página de gracias ---------- */
.thanks { padding: clamp(24px, 6vw, 80px) 0 clamp(64px, 10vw, 140px); max-width: 640px; }
.thanks .section-title { margin: 10px 0 20px; }
.thanks__text { margin: 0 0 32px; font-size: clamp(18px, 1.8vw, 22px); font-weight: 300; line-height: 1.6; }

/* ---------- Tabla de cookies ---------- */
.table-wrap { overflow-x: auto; margin: 8px 0 16px; }
.cookie-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cookie-table th, .cookie-table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.cookie-table th { font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--taupe); }
.cookie-table .mono { white-space: nowrap; font-weight: 500; }
.cookie-table tr[hidden] { display: none; }
.link-btn {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--brown); text-decoration: underline; text-underline-offset: 3px;
}

/* ---------- Aviso legal ---------- */
.legal { max-width: 760px; padding-bottom: clamp(64px, 8vw, 110px); }
.legal__owner { margin-bottom: 40px; }
.legal__text h2 {
  margin: 40px 0 12px;
  font-size: 13px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--taupe);
}
.legal__text p { margin: 0 0 12px; line-height: 1.7; }
.legal__text strong { font-weight: 500; }
.legal__text a { text-decoration: underline; text-underline-offset: 3px; }
html[lang="en"] [data-lang-block="es"],
html:not([lang="en"]) [data-lang-block="en"] { display: none; }

/* ---------- Project page ---------- */
.project-top { padding-top: 32px; padding-bottom: 28px; }
.back-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase;
}
.back-link__arrow { transition: transform .3s var(--ease); }
.back-link:hover .back-link__arrow { transform: translateX(-5px); }

.project-info {
  display: grid; grid-template-columns: 6fr 5fr; gap: clamp(32px, 6vw, 96px);
  padding: clamp(16px, 3vw, 40px) 0 clamp(48px, 7vw, 88px);
}
.project-info__title {
  font-size: clamp(36px, 5.4vw, 68px); font-weight: 200; letter-spacing: .08em; text-transform: uppercase;
  margin: 12px 0 24px;
}
.project-info__lead { margin: 0; font-size: 19px; color: var(--taupe); max-width: 34em; }

.facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; align-self: end; border-top: 1px solid var(--border); }
.facts div { padding: 18px 0; border-bottom: 1px solid var(--border); }
.facts dt { font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--taupe); }
.facts dd { margin: 4px 0 0; font-size: 18px; }

.gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.4vw, 18px);
  padding-bottom: clamp(72px, 10vw, 130px);
}
.gallery__item {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 3 / 2; background: var(--stone); cursor: zoom-in;
}
.gallery__item:nth-child(5n + 1) { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), opacity .3s; }
.gallery__item:hover img { transform: scale(1.03); opacity: .92; }

.project-cta { text-align: center; }
.project-cta p { margin: 0 auto 28px; max-width: 30em; font-size: 19px; color: var(--taupe); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: rgba(30, 25, 21, .94);
  opacity: 0; visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox__figure { margin: 0; max-width: calc(100vw - 160px); max-height: calc(100vh - 120px); }
.lightbox__img {
  max-width: 100%; max-height: calc(100vh - 120px);
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  transition: opacity .25s;
}
.lightbox__img.is-loading { opacity: 0; }

.lightbox__btn {
  position: absolute;
  display: grid; place-items: center;
  width: 54px; height: 54px;
  background: transparent; border: 1px solid rgba(250, 246, 240, .3); border-radius: 50%;
  color: var(--ivory); font: 200 26px/1 var(--font);
  cursor: pointer;
  transition: background .25s, border-color .25s;
}
.lightbox__btn:hover { background: var(--wood); border-color: var(--wood); }
.lightbox__prev { left: 28px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 28px; top: 50%; transform: translateY(-50%); }
.lightbox__close { top: 22px; right: 28px; width: 46px; height: 46px; font-size: 22px; }

.lightbox__counter {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  font-size: 12px; letter-spacing: .24em; color: rgba(250, 246, 240, .7);
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1180px) {
  .main-nav .social { display: none; }
  .nav-cta { display: none; }
}

@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
  /* Proceso en tarjetas: los dos dibujos lado a lado y el texto debajo */
  .process-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .process-head__intro { padding-left: 0; border-left: 0; }
  .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; gap: 56px var(--step-gap); }
  .step { grid-row: auto; grid-template-rows: none; grid-template-columns: 1fr 1fr; column-gap: 12px; align-content: start; }
  .step__figure--obra { grid-column: 1; grid-row: 1; margin: 0 0 18px; }
  .step__figure--reforma { grid-column: 2; grid-row: 1; margin: 0 0 18px; }
  .step__num, .step__title, .step__text { grid-column: 1 / -1; }
  .step .step__figure::after, .process-label { display: none; }
  .step__cap {
    display: block; margin-top: 4px; text-align: center;
    font-size: 10px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--taupe);
  }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery__item:nth-child(5n + 1) { grid-row: auto; aspect-ratio: 16 / 9; }
}

@media (max-width: 900px) {
  :root { --header-h: 70px; }
  .logo img { width: 210px; }

  .menu-toggle { display: block; }

  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h));
    flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 36px;
    padding: 48px var(--gutter);
    background: var(--ivory);
    opacity: 0; visibility: hidden; transform: translateY(-12px);
    transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s;
    overflow-y: auto;
  }
  .menu-open .main-nav { opacity: 1; visibility: visible; transform: none; }

  .nav-links { flex-direction: column; gap: 22px; }
  .nav-links a { font-size: 26px; font-weight: 200; letter-spacing: .12em; }

  .nav-cta { display: inline-flex; }
  .main-nav .social { display: flex; }
  .main-nav .social a { width: 44px; height: 44px; border: 1px solid var(--border); }

  .contact__grid,
  .about,
  .project-info { grid-template-columns: 1fr; }
  .about__photo { max-width: 460px; }
}

@media (max-width: 680px) {
  .cookie-banner { left: 10px; right: 10px; bottom: 10px; }
  .cookie-box { padding: 18px; font-size: 13.5px; }
  .cookie-actions { grid-template-columns: 1fr 1fr; }
  .cookie-actions .cookie-btn--line { grid-column: 1 / -1; }

  body { font-size: 16px; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .hero__caption { display: none; }

  /* Título del inicio: que "CONTEMPORÁNEA" quepa en una línea */
  .hero__title { font-size: 9.8vw; letter-spacing: .03em; }

  /* Proceso: un paso por fila */
  .process-grid { grid-template-columns: 1fr; gap: 44px; }
  .step__num { font-size: 34px; }
  .step__text { font-size: 15px; line-height: 1.6; }

  .form { grid-template-columns: 1fr; }

  .footer__grid { grid-template-columns: 1fr; gap: 36px; }

  .hero__actions .btn { flex: 1 1 100%; }
  .hero__tag { font-size: 10.5px; letter-spacing: .12em; border-radius: 14px; }

  .gallery { grid-template-columns: 1fr; }
  .gallery__item:nth-child(5n + 1) { grid-column: auto; aspect-ratio: 3 / 2; }

  .lightbox__figure { max-width: 100vw; }
  .lightbox__btn { width: 44px; height: 44px; }
  .lightbox__prev { left: 10px; top: auto; bottom: 14px; transform: none; }
  .lightbox__next { right: 10px; top: auto; bottom: 14px; transform: none; }
  .lightbox__close { top: 12px; right: 12px; }
  .lightbox__counter { bottom: 28px; }
}

@media (max-width: 440px) {
  .projects-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Grupo Andes — añadidos
   ========================================================================== */
/* Marcador de datos que faltan: [PENDIENTE: …] */
.pending {
  display: inline-block; padding: 2px 8px; border: 1px dashed #B5462F; color: #B5462F;
  background: rgba(181, 70, 47, .06); font-size: 13px; letter-spacing: 0; text-transform: none; line-height: 1.5;
}
.project-card--pending { display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--stone); text-align: center; }
.step__figure .pending { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 260px; aspect-ratio: 260 / 226; text-align: center; }
.projects-more { margin: 28px 0 0; font-size: 15px; color: var(--taupe); }

/* Nosotros: dos fichas */
.team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 96px); margin-top: 8px; }
.person__photo { margin: 0 0 22px; max-width: 360px; }
.person__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.person__photo--pending { aspect-ratio: 4 / 5; background: var(--stone); display: flex; align-items: center; justify-content: center; }
.person__name { font-size: 24px; font-weight: 300; letter-spacing: .04em; margin: 0 0 4px; }
.person__role { font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--wood); margin: 0 0 14px; }
.person p:last-child { max-width: 46ch; }

.whatsapp { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.whatsapp .btn[aria-disabled] { cursor: default; }

@media (max-width: 680px) {
  .team { grid-template-columns: 1fr; }
}

/* Portada: titular más largo que el de BUNSTER y fotos de interior claras */
.hero__title { font-size: clamp(34px, 5.4vw, 76px); max-width: 17ch; }
.hero::after {
  background:
    linear-gradient(90deg, rgba(20, 16, 12, .66) 0%, rgba(20, 16, 12, .30) 55%, rgba(20, 16, 12, .08) 80%),
    linear-gradient(0deg, rgba(20, 16, 12, .40) 0%, rgba(20, 16, 12, 0) 45%);
}
@media (max-width: 680px) { .hero__title { font-size: 8.4vw; } }
.contact__direct a[href^="tel:"] { white-space: nowrap; }

/* Proyectos: vista previa de portadas agrupadas por país */
.projects-country + .projects-country { margin-top: clamp(36px, 4vw, 56px); }
.projects-country__title {
  margin: 0 0 16px;
  font-size: 12px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--wood);
}
div.project-card { cursor: default; }

/* Texto del inicio: blanco sobre un velo oscuro suave a la izquierda (opción 1 elegida por Tom).
   El velo cubre la zona del texto y se desvanece hacia la derecha. */
.hero::after {
  --veil: .56; /* lo mínimo que cumple contraste AA (4,5:1) con las 4 fotos actuales; medir si cambian */
  z-index: 1; /* sin esto el velo quedaba detrás de la foto activa */
  background: linear-gradient(90deg, rgba(20, 16, 12, var(--veil)) 0%, rgba(20, 16, 12, var(--veil)) 62%, rgba(20, 16, 12, 0) 88%);
}
.hero__tag, .hero__title, .hero__subtitle, .hero__caption, .hero__caption:hover { color: #fff; text-shadow: none; }
.hero__title { font-weight: 300; }
.hero__tag { border-color: rgba(255, 255, 255, .7); }

/* Logo de cabecera: "INVERSIONES INMOBILIARIAS" a la misma altura de letra que el menú (13px).
   En el SVG esa línea mide 50 de 1910 de ancho → 13 × 1910 / 50 ≈ 497px. */
.logo img { width: 375px; } /* tamaño intermedio pedido por Tom (antes 250px, luego 497px) */
@media (max-width: 900px) { .logo img { width: min(255px, 60vw); } }
/* Entre 901 y 1360px no caben logo grande + menú + botón: el botón de la cabecera se oculta
   (el mismo botón está en la portada) para dejar el logo lo más grande posible. */
@media (min-width: 901px) and (max-width: 1360px) { .logo img { width: clamp(250px, 26vw, 375px); } }
@media (min-width: 901px) and (max-width: 1200px) { .header-tools .btn, .nav-cta { display: none; } }
/* Móvil: el texto ocupa todo el ancho, así que el velo va de abajo hacia arriba */
@media (max-width: 900px) {
  .hero::after { --veil: .6; background: linear-gradient(0deg, rgba(20, 16, 12, var(--veil)) 0%, rgba(20, 16, 12, var(--veil)) 66%, rgba(20, 16, 12, 0) 90%); }
}
