/* =========================================================
   CASA LIETA — Design tokens
   Fuente real del proyecto: "urw-geometric" (licencia comercial,
   no disponible vía CDN). Se deja @font-face lista para cuando
   se disponga del archivo, con "Jost" (Google Fonts, geométrica,
   parentesco visual con URW Geometric/Futura) como fallback.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600&display=swap');

@font-face {
  font-family: 'urw-geometric';
  src: url('../assets/fonts/urw-geometric-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  /* Archivo de fuente no incluido — reemplazar cuando esté disponible */
}
@font-face {
  font-family: 'urw-geometric';
  src: url('../assets/fonts/urw-geometric-medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  /* Paleta */
  --color-bg: #ffffff;
  --color-bg-secondary: #d8d1c4; 
  --color-text: #6e6a66;
  --color-accent: #a67c5b;
  --color-accent-hover: #8f6646;

  /* Tipografía */
  --font-main: 'urw-geometric', 'Jost', 'Century Gothic', sans-serif;

  /* Escala tipográfica */
  --fs-h1: clamp(2.4rem, 5vw, 4.2rem);
  --fs-h2: clamp(1.7rem, 3vw, 2.6rem);
  --fs-body: 1rem;
  --fs-small: 0.95rem;
  --fs-eyebrow: 0.78rem;

  /* Espaciado */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 7rem;

  --container-max: 1280px;
  --line-hair: 1px solid var(--color-accent);
}

/* =========================================================
   Reset base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-main);
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0 0 var(--space-sm); font-weight: 500; letter-spacing: 0.01em; }
p { margin: 0 0 var(--space-sm); }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--color-bg); color: var(--color-text);
  padding: var(--space-xs) var(--space-sm); z-index: 999;
}
.skip-link:focus { left: var(--space-sm); top: var(--space-sm); }

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

.eyebrow {
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.3s ease;
}
.site-header.scrolled {
  background: var(--color-accent);
}
.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo img { height: 50px; width: auto; transition: filter 0.3s ease; filter: brightness(0) invert(1); }
.site-header.scrolled .logo img { filter: brightness(0) invert(1); }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}
.main-nav a {
  font-size: calc(var(--fs-small) * 1.1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  position: relative;
  transition: color 1s ease;
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: #ffffff;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.main-nav a:hover::after,
.main-nav a.active::after {
  opacity: 1;
}
.site-header.scrolled .main-nav a { color: #ffffff; }
.site-header.scrolled .main-nav a::after { background: #ffffff; }
.nav-cta {
  border: 1px solid var(--color-accent);
  padding: 0.6em 1.4em;
  background: var(--color-accent);
  color: #ffffff;
  border-radius: 9999px;
  -webkit-border-radius: 9999px;
  -moz-border-radius: 9999px;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  font-size: calc(var(--fs-small) * 1.1);
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); color: #ffffff; }
.site-header.scrolled .nav-cta {
  background: #ffffff;
  color: var(--color-accent) !important;
}
.site-header.scrolled .nav-cta:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); color: #ffffff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: var(--space-xs);
}
.nav-toggle span {
  width: 24px; height: 1px;
  background: #ffffff;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.site-header.scrolled .nav-toggle span { background: #ffffff; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  height: 100vh;
  min-height: 480px;
  background: var(--color-bg-secondary);
  overflow: hidden;
}
.hero-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 1s ease;
}
.hero-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}
.hero-video.loaded {
  opacity: 1;
}
.hero-img.hidden {
  opacity: 0;
}

.hero-bottom {
  position: absolute;
  bottom: 40px;
  left: 0;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  z-index: 3;
}

.hero-bottom a {
  pointer-events: auto;
}

.scroll-container {
  width: 27px;
  height: 38px;
  border: 2px solid #EBD9C6;
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.scroll-to-bottom:hover {
  animation: bounceUp 0.4s ease;
}

.scroller {
  width: 2px;
  height: 6px;
  border-radius: 2px;
  background-color: #fff;
  position: absolute;
  top: 4px;
  left: 10.5px;
  bottom: 24px;
  animation: scroller 2500ms ease-out infinite;
}

@keyframes scroller {
  0% { bottom: 14px; }
  5% { top: 4px; }
  32% { bottom: 4px; }
  66% { top: 24px; bottom: 4px; }
  100% { top: 4px; bottom: 24px; }
}

@keyframes bounceUp {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

.hero-video-btn {
  position: absolute;
  right: 40px;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 57px;
  height: 54px;
  transition: transform 0.3s ease;
}

.hero-video-btn:hover {
  transform: scale(1.05);
}

.hero-video-btn img,
.hero-video-btn svg {
  width: 57px;
  height: 54px;
  display: block;
}

@media (max-width: 768px) {
  .hero-video-btn {
    right: 20px;
    display: none;
  }
}

/* =========================================================
   Split sections (asimétrico 40/60, sangre en imagen)
   ========================================================= */
.split-section {
  display: grid;
  grid-template-columns: 40% 60%;
  grid-template-rows: minmax(95vh, auto);
  align-items: stretch;
  border-bottom: var(--line-hair);
}
.split-section.reverse { grid-template-columns: 60% 40%; }
.split-section.reverse .split-text { order: 2; }
.split-section.reverse .split-media { order: 1; }

.split-text {
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.split-media {
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm);
}
.split-media img { width: 100%; height: 100%; object-fit: cover; min-height: 420px; }

.canvas-wrap {
  width: 100%;
  height: 100%;
  max-width: 100%;
  /* Fallback proporcional: si el contenedor padre no tiene altura definida
     (layout apilado), la proporción del canvas evita que colapse a 0. */
  aspect-ratio: 700 / 525;
  display: flex;
  align-items: center;
  justify-content: center;
}
.canvas-wrap canvas {
  display: block;
}

/* =========================================================
   PROJET SECTION
   ========================================================= */

.brand-panel {
  background-color: var(--color-accent);
  background-image: url('../assets/texture-ligth.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #333333;
  min-height: auto;
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: var(--line-hair);
}
.brand-panel-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}
.projet-icon {
  width: 120px;
  height: auto;
  max-height: 120px;
  filter: brightness(0) saturate(100%) invert(32%) sepia(28%) saturate(625%) hue-rotate(344deg) brightness(92%) contrast(88%);
}
.brand-panel .eyebrow { color: var(--color-accent); }
.brand-panel p { color: #333333; }
.brand-panel h2 { color: var(--color-accent); }
.btn-outline-inverse {
  display: inline-block;
  border: 1px solid #ffffff;
  padding: 0.6em 1.4em;
  background: transparent;
  color: #ffffff;
  background-color: var(--color-accent-hover);
  border-radius: 9999px;
  -webkit-border-radius: 9999px;
  -moz-border-radius: 9999px;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.btn-outline-inverse:hover { background: #ffffff; color: var(--color-accent); border-color: #ffffff; }


/* =========================================================
   Info Carousel (Situation & Commune)
   ========================================================= */
.info-carousel {
  position: relative;
  background: var(--color-accent);
  overflow: hidden;
  border-bottom: var(--line-hair);
}
.info-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}
.info-slide {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: 50% 50%;
  min-height: 500px;
}
.info-media {
  overflow: hidden;
}
.info-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.info-text {
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
}
.info-text .eyebrow { color: rgba(255, 255, 255, 0.75); }
.info-text h2 { color: #ffffff; }
.info-text p { color: rgba(255, 255, 255, 0.92); }
.info-carousel-nav {
  position: absolute;
  bottom: var(--space-lg);
  right: var(--space-lg);
  display: flex;
  gap: var(--space-sm);
  z-index: 10;
}
.info-carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.info-carousel-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: #ffffff;
}


/* =========================================================
   Text section (Commune)
   ========================================================= */
.text-section {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  border-bottom: var(--line-hair);
}
.text-columns {
  columns: 2;
  column-gap: var(--space-lg);
}
.text-columns p { break-inside: avoid; }

/* =========================================================
   MAP
   ========================================================= */

.map-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  background: #E3DDD4;
  border-bottom: var(--line-hair);
  overflow: hidden;
}
.map-header {
  position: absolute;
  top: var(--space-xl);
  left: var(--space-lg);
  z-index: 2;
  max-width: 28ch;
  text-align: left;
}
.map-header h2 {
  font-size: var(--fs-h2);
  margin-bottom: 0.1em;
}
.map-subtitle {
  font-size: var(--fs-body);
  color: var(--color-text);
}
.map-heading {
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}
.map-points {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 3;
  column-gap: 2rem;
  font-size: 1.3rem;
  line-height: 1.15;
}
.map-points li {
  display: flex;
  align-items: center;
  gap: 0.45em;
  white-space: nowrap;
  break-inside: avoid;
  margin-bottom: 0.3em;
}
.map-point-icon {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
}
.map-visual {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 80%;
  z-index: 1;
}
.map-visual img,
.map-visual canvas {
  width: 100%;
  height: auto;
  display: block;
}

.mapa-canvas-wrap {
  --map-zoom: 1;
  position: relative;
  width: 100%;
  height: 100%;
  background-color: rgba(227, 221, 212, 1);
  overflow: hidden;
}

#mapa-canvas {
  position: absolute;
  top: 0;
  left: 0;
}

#mapa-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.mapa-canvas-wrap .northpijil {
  position: absolute;
  top: 25px;
  left: 25px;
  width: 48px;
  height: auto;
  z-index: 10;
  pointer-events: none;
}

/* Scrollbar horizontal para el pan del mapa */
.mapa-h-scrollbar {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  height: 20px;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mapa-h-scrollbar.visible {
  opacity: 1;
  pointer-events: auto;
}
.mapa-h-scrollbar-track {
  position: relative;
  width: calc(100% - 40px);
  height: 4px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 2px;
}
.mapa-h-scrollbar-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 40px;
  height: 12px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  transform: translateY(-50%);
  cursor: grab;
  touch-action: none;
  pointer-events: auto;
}

.map-text {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 20%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.8rem var(--space-lg);
  background: rgba(227, 221, 212, 0.92);
  margin-bottom: 0;
}

@media (max-width: 1499px) {
  .map-header {
    top: var(--space-md);
    left: var(--space-md);
    max-width: 24ch;
  }
  .map-header h2 {
    font-size: calc(var(--fs-h2) * 0.85);
    margin-bottom: 0.05em;
  }
  .map-subtitle {
    font-size: var(--fs-small);
  }
  .map-visual {
    height: 78%;
  }
  .map-text {
    height: 22%;
    margin-bottom: 0;
    padding: 0.6rem var(--space-md);
  }
  .map-heading {
    margin-bottom: 0.3rem;
  }
  .map-points {
    columns: 2;
    column-gap: 1.5rem;
    font-size: 1rem;
    line-height: 1.1;
  }
}

/* A partir de 1050px la sección se apila, el mapa gana altura y
   se aplica un zoom del 25% sobre el canvas para mantener la legibilidad. */
@media (max-width: 1050px) {
  .map-section {
    height: auto;
    min-height: 0;
    display: block;
  }
  .map-visual {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    width: 100%;
    height: 80vh;
    min-height: 460px;
    max-height: none;
    margin-left: auto;
    z-index: 1;
  }
  .mapa-canvas-wrap {
    --map-zoom: 0.8;
  }
  .map-text {
    position: relative;
    bottom: auto;
    left: auto;
    width: 100%;
    height: auto;
    padding: var(--space-md) var(--space-md);
    margin-bottom: 20px;
  }
  .map-points {
    font-size: 0.95rem;
    line-height: 1.2;
  }
  .map-points li {
    white-space: normal;
    align-items: flex-start;
    margin-bottom: 0.5em;
  }
  .map-point-icon {
    margin-top: 0.15em;
  }
}

@media (max-width: 800px) {
  .map-points {
    font-size: 0.85rem;
  }
}

@media (max-width: 520px) {
  .map-points {
    columns: 2;
    column-gap: 0.75rem;
  }
}

@media (min-width: 1400px) {
  .mapa-canvas-wrap {
    --map-zoom: 0.85;
  }
}

@media (min-width: 1500px) {
  .mapa-canvas-wrap {
    --map-zoom: 0.8;
  }
  .map-text {
    margin-bottom: 0;
    padding: 0.5rem var(--space-lg);
  }
  .map-heading {
    font-size: 0.75rem;
  }
  .map-points {
    font-size: 1.1rem;
    line-height: 1.1;
  }
}
@media (min-width: 1900px) {
  .mapa-canvas-wrap {
    --map-zoom: 0.7;
  }
}
@media (min-width: 2000px) {
  .mapa-canvas-wrap {
    --map-zoom: 0.6;
  }
  .map-text {
    padding: 0.4rem var(--space-lg);
  }
  .map-heading {
    font-size: 0.7rem;
  }
  .map-points {
    font-size: 1rem;
    line-height: 1.05;
  }
}

.amenities-section {
  border-bottom: var(--line-hair);
}
.amenities-content {
  display: grid;
  grid-template-columns: 40% 60%;
  max-width: var(--container-max);
  margin: 0 auto;
}
.amenities-text {
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.amenities-intro { max-width: 65ch; }

.amenities-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  padding-top: var(--space-md);
  border-top: var(--line-hair);
}
.amenities-list li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.amenities-list span {
  font-size: var(--fs-small);
  /* text-transform: uppercase;
  letter-spacing: 0.06em; */
}
.amenities-list i {
  font-size: 2.6rem;
  color: var(--color-accent);
  line-height: 1;
}

.amenities-carousel-wrapper {
  background: #ffffff;
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel {
  position: relative;
  width: 100%;
  max-width: 600px;
}
.carousel-track {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide {
  flex: 0 0 100%;
  min-width: 100%;
  scroll-snap-align: start;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-accent);
  background: var(--color-bg);
  color: var(--color-accent);
  font-size: 1.1rem;
}
.carousel-btn.prev { left: -22px; }
.carousel-btn.next { right: -22px; }
.carousel-btn:hover { background: var(--color-accent); color: var(--color-bg); }

/* =========================================================
   Tabla de villas
   ========================================================= */

.bg-clarito {
  background: var(--color-bg-secondary);
}
.table-section {
  padding: var(--space-xl) var(--space-lg);
  border-bottom: var(--line-hair);
}
.table-section > .eyebrow,
.table-section > h2,
.table-wrap {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
}
.table-wrap { overflow-x: auto; }
.villas-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
.villas-table th, .villas-table td {
  text-align: CENTER;
  padding: var(--space-sm);
  border-bottom: 1px solid rgba(110, 106, 102, 0.15);
  font-size: var(--fs-small);
}
.villas-table th {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  font-weight: 500;
}
.status {
  display: inline-block;
  padding: 0.2em 0.8em;
  border: 1px solid var(--color-accent);
  font-size: 0.75rem;
  text-transform: uppercase;
}
.plan-link { color: var(--color-accent); border-bottom: 1px solid var(--color-accent); }
.plan-download-row td { text-align: center; }
.btn-plan {
  display: inline-block;
  padding: 0.6em 1.2em;
  background: #998474;
  color: #ffffff;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: background 0.3s ease;
}
.btn-plan:hover { background: var(--color-accent-hover); }
.table-note { margin-top: var(--space-sm); font-size: var(--fs-small); font-style: italic; opacity: 0.8; }

/* =========================================================
   Matériaux / mot de l'architecte (bloque con fondo)
   ========================================================= */
.architect-section {
  position: relative;
  padding: var(--space-xl) var(--space-lg);
  color: var(--color-bg);
  overflow: hidden;
}
.architect-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
}
.architect-section::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(110, 106, 102, 0.72);
  z-index: -1;
}
.architect-inner { max-width: 65ch; margin: 0 auto var(--space-lg); text-align: center; }
.architect-inner .eyebrow { color: var(--color-bg-secondary); }
.architect-inner h2 { color: var(--color-bg); }
.architect-inner p { color: rgba(255,255,255,0.9); }

.architect-gallery {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}
.architect-gallery img { aspect-ratio: 4/3; object-fit: cover; }

/* =========================================================
   Cita del arquitecto
   ========================================================= */
.quote-section {
  background-color: #d8d1c4;
  background-image: url('../assets/chauArquiteto_tequieroArquiteto.jpg');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: right center;
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  border-bottom: var(--line-hair);
}
.quote-section > * {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.quote-section blockquote { margin: 0 auto; }
.quote-section p {
  font-size: 1.2rem;
  line-height: 1.7;
}
.quote-section cite {
  display: block;
  margin-top: var(--space-sm);
  font-style: normal;
  font-size: var(--fs-small);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.quote-image-mobile {
  display: none;
}

/* En pantallas menores a 1700px el fondo se convierte en imagen centrada debajo del texto */
@media (max-width: 1700px) {
  .quote-section {
    background-image: none;
  }
  .quote-image-mobile {
    display: block;
    margin-top: var(--space-md);
    width: 100%;
    max-width: 800px;
    height: auto;
    margin-left: auto;
    margin-right: auto;
  }
}

/* =========================================================
   Tour virtual (placeholder)
   ========================================================= */
.virtual-tour-section {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  border-bottom: var(--line-hair);
}
.iframe-placeholder {
  aspect-ratio: 16/9;
  background: var(--color-bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: var(--fs-small);
  position: relative;
  overflow: hidden;
}
.tour-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 1em 1.6em;
  border: 1px solid var(--color-accent);
  border-radius: 2px;
  background: var(--color-bg);
  color: var(--color-accent);
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
#virtual-tour-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* =========================================================
   Vidéo projet
   ========================================================= */
.video-section {
  border-bottom: var(--line-hair);
}
.video-preview {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  width: 100%;
}
.video-poster {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.video-preview:hover .video-poster { transform: scale(1.03); }
.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.play-btn svg { margin-left: 4px; }
.video-preview:hover .play-btn { transform: translate(-50%, -50%) scale(1.08); }

.video-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.video-modal.open {
  opacity: 1;
  visibility: visible;
}
.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  cursor: pointer;
}
.video-modal-content {
  position: relative;
  width: 90%;
  max-width: 1100px;
  aspect-ratio: 16/9;
  background: #000;
  z-index: 1;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.video-modal-content video {
  width: 100%;
  height: 100%;
  display: block;
}
.video-modal-close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
}
.video-modal-close:hover { color: var(--color-accent); }

@media (max-width: 768px) {
  .play-btn {
    width: 56px;
    height: 56px;
  }
  .play-btn svg { width: 24px; height: 24px; }
  .video-modal-content { width: 95%; }
}

/* =========================================================
   Galería
   ========================================================= */

 .gallery-section {
  background: var(--color-text);
  padding: var(--space-xl) var(--space-lg);
  border-bottom: var(--line-hair);
}
.gallery-title,
.gallery-carousel,
.thumbnails {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
}
.gallery-carousel {
  position: relative;
  margin-top: var(--space-md);
  overflow: hidden;
  border: var(--line-hair);
}
.gallery-track {
  display: flex;
  transition: transform 0.5s ease;
}
.gallery-slide {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-secondary);
}
.gallery-slide img {
  width: 100%;
  height: 100%;
  max-height: 70vh;
  object-fit: contain;
}
.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-accent);
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-accent);
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s ease, color 0.3s ease;
}
.gallery-btn:hover { background: var(--color-accent); color: var(--color-bg); }
.gallery-btn.prev { left: var(--space-sm); }
.gallery-btn.next { right: var(--space-sm); }

.thumbnails {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  overflow-x: auto;
  scrollbar-width: none;
  padding: var(--space-xs) 0;
}
.thumbnails::-webkit-scrollbar { display: none; }
.thumbnails button {
  flex: 1 1 0;
  min-width: 0;
  height: 60px;
  padding: 0;
  border: 2px solid transparent;
  background: var(--color-bg-secondary);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease, border-color 0.3s ease;
}
.thumbnails button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumbnails button.active {
  opacity: 1;
  border-color: var(--color-accent);
}
.thumbnails button:hover { opacity: 1; }

.gallery-title {
  color: var(--color-bg-secondary)
}

/* =========================================================
   Acteurs du projet
   ========================================================= */
.actors-section {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  border-bottom: var(--line-hair);
}
.actors-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  border-top: var(--line-hair);
  padding-top: var(--space-md);
}
.actors-list li { display: flex; flex-direction: column; gap: 0.3em; }
.actors-list span {
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
}
.actors-list strong { font-weight: 500; }

/* =========================================================
   Contacto
   ========================================================= */
.contact-section {
  background: var(--color-bg-secondary);
  padding: var(--space-xl) var(--space-lg);
}
.contact-form {
  max-width: 700px;
  margin: var(--space-md) 0 0;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
.form-field { margin-bottom: var(--space-md); }
.form-field label {
  display: block;
  font-size: var(--fs-small);
  margin-bottom: 0.4em;
}
.form-field input, .form-field textarea {
  width: 100%;
  padding: 0.7em;
  border: none;
  border-bottom: 1px solid var(--color-accent);
  background: transparent;
  color: var(--color-text);
  font-size: var(--fs-body);
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-bottom-width: 2px; }

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 0.6em;
  font-size: var(--fs-small);
  margin-bottom: var(--space-md);
}
.checkbox-field input { margin-top: 0.2em; }

.btn-primary {
  border: 1px solid var(--color-text);
  background: transparent;
  color: var(--color-text);
  padding: 0.9em 2.2em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--fs-small);
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-primary:hover { background: var(--color-text); color: var(--color-bg-secondary); }
.form-status { margin-top: var(--space-sm); font-size: var(--fs-small); }
.form-status.success { color: #4a6b4a; }
.form-status.error { color: #a64c3f; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--color-bg);
  padding: var(--space-lg) var(--space-lg) var(--space-md);
}
.footer-top {
  max-width: var(--container-max);
  margin: 20px auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: var(--line-hair);
  align-items: start;
}
.footer-top img { margin-top: -60px; }
.footer-contact { display: flex; flex-direction: column; gap: 0.4em; font-size: var(--fs-small); }
.footer-nav { display: flex; flex-direction: column; gap: 0.5em; font-size: var(--fs-small); }
.footer-nav a:hover { color: var(--color-accent); }
.footer-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.btn-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55em 1.4em;
  border: 1px solid var(--color-text);
  border-radius: 9999px;
  -webkit-border-radius: 9999px;
  -moz-border-radius: 9999px;
  background: transparent;
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--fs-small);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background 0.3s ease, color 0.3s ease;
}
.btn-contact:hover {
  background: var(--color-text);
  color: var(--color-bg);
}
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--color-text);
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}
.social-btn i {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
}
.social-btn:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

.footer-bottom {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: var(--fs-small);
  opacity: 0.75;
}
.footer-legal { display: flex; gap: var(--space-md); }

/* =========================================================
   Responsive — proporción de ventana
   Las alturas fijas por viewport (100vh / 95vh) sólo tienen sentido
   cuando la ventana es claramente apaisada. Al acercarse a un cuadrado
   o volverse vertical, el contenido se solapa o aparecen huecos, por lo
   que el layout pasa a flujo natural.
   ========================================================= */
@media (max-aspect-ratio: 5/4) {
  .hero {
    height: 100svh;
    min-height: 420px;
    max-height: 900px;
  }

  .split-section,
  .split-section.reverse {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .split-section.reverse .split-text,
  .split-section.reverse .split-media {
    order: initial;
  }
  .split-text {
    padding: var(--space-lg) var(--space-md);
  }
  .split-media {
    padding: var(--space-md);
    min-height: 0;
  }
  .split-media img {
    height: auto;
    min-height: 0;
    max-height: 60vh;
    object-fit: cover;
  }
  .canvas-wrap {
    max-width: 100%;
    height: auto;
  }

  .info-slide {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .info-media {
    height: 55vw;
    max-height: 380px;
  }
  .info-text {
    padding: var(--space-lg) var(--space-md);
  }
  .info-carousel-nav {
    bottom: var(--space-md);
    right: var(--space-md);
  }

  .text-columns {
    columns: 1;
  }
}

/* =========================================================
   Responsive — Tablet (<=1024px)
   ========================================================= */
@media (max-width: 1024px) {
  .split-section, .split-section.reverse {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .split-section.reverse .split-text,
  .split-section.reverse .split-media { order: initial; }
  .split-media {
    padding: var(--space-md) var(--space-lg);
    min-height: auto;
  }
  .split-media img { min-height: 320px; }
  .canvas-wrap { max-width: 560px; height: auto; }

  .amenities-list { grid-template-columns: repeat(3, 1fr); gap: var(--space-sm); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .architect-gallery { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .actors-list { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   Responsive — Mobile (<=768px)
   ========================================================= */
@media (max-width: 768px) {
  :root {
    --space-md: 1.25rem;
    --space-lg: 1.75rem;
    --space-xl: 2.75rem;

    --fs-h1: clamp(2rem, 9vw, 2.9rem);
    --fs-h2: clamp(1.45rem, 6.5vw, 2rem);
    --fs-body: 1rem;
    --fs-small: 0.9rem;
    --fs-eyebrow: 0.72rem;
  }
  body { line-height: 1.6; }
  h3 { font-size: 1.1rem; }

  .main-nav {
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--color-accent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transform: translateY(-150%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .main-nav.open { transform: translateY(0); opacity: 1; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: var(--space-md); padding: var(--space-md); }
  .main-nav a,
  .main-nav .nav-cta { color: #ffffff; }
  .main-nav .nav-cta { background: transparent; border-color: #ffffff; }
  .main-nav .nav-cta:hover { background: #ffffff; color: var(--color-accent); }
  .nav-toggle { display: flex; }

  /* Tour virtual — alto adaptado a pantalla mobile */
  .virtual-tour-section {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    padding: calc(64px + var(--space-md)) var(--space-md) var(--space-md);
  }
  .virtual-tour-section > *,
  .iframe-placeholder,
  .tour-loading {
    min-width: 0;
  }
  .tour-loading {
    max-width: 100%;
  }
  .iframe-placeholder {
    flex: 1 1 auto;
    aspect-ratio: auto;
    min-height: 280px;
  }

  .split-text, .text-section, .amenities-section, .table-section,
  .quote-section, .virtual-tour-section, .gallery-section, .actors-section {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }
  .split-media { padding: var(--space-md); }
  .canvas-wrap { max-width: 100%; height: auto; }

  .text-columns { columns: 1; }
  .carousel-slide { flex: 0 0 100%; min-width: 100%; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .architect-gallery { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; text-align: left; }
  .footer-bottom { flex-direction: column; }
  .actors-list { grid-template-columns: 1fr; }

  /* Situation / info-carousel */
  .info-slide {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .info-media {
    height: 55vw;
    min-height: 280px;
    max-height: 360px;
  }
  .info-text {
    padding: var(--space-lg) var(--space-md);
  }

  /* Commodités */
  .amenities-content {
    grid-template-columns: 1fr;
  }
  .amenities-text,
  .amenities-carousel-wrapper {
    padding: var(--space-lg) var(--space-md);
  }

  .split-media img { min-height: 0; max-height: 50vh; }
  .carousel-btn.prev { left: 4px; }
  .carousel-btn.next { right: 4px; }
  .gallery-slide img { max-height: 60vh; }
  .info-carousel-btn { width: 38px; height: 38px; font-size: 1rem; }

  /* Las 3 commodités se mantienen en una única fila horizontal */
  .amenities-list {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
  }
  .amenities-list li {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-xs);
  }
  .amenities-list i { font-size: 1.9rem; }
  .amenities-list span {
    font-size: 0.82rem;
    line-height: 1.25;
    text-wrap: balance;
  }
}

@media (max-width: 520px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .footer-legal { flex-direction: column; gap: var(--space-xs); }
}


.cl-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 46rem;
}

.cl-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .cl-form__row { grid-template-columns: 1fr; }
}

.cl-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cl-form__field label {
  font-family: var(--font-sans, 'urw-geometric', 'Jost', sans-serif);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text, #6e6a66);
}

.cl-form__field label span {
  color: var(--color-accent, #a67c5b);
}

.cl-form__field input,
.cl-form__field textarea,
.cl-form__select {
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text, #6e6a66);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-accent, #a67c5b);
  padding: 0.6rem 0;
  border-radius: 0;
  transition: border-bottom-width 0.25s ease;
}

.cl-form__field input:focus,
.cl-form__field textarea:focus,
.cl-form__select:focus {
  outline: none;
  border-bottom-width: 2px;
}

.cl-form__field textarea {
  resize: vertical;
}

.cl-form__select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image:
    linear-gradient(45deg,  transparent 50%, var(--color-accent, #a67c5b) 50%),
    linear-gradient(135deg, var(--color-accent, #a67c5b) 50%, transparent 50%);
  background-position: right 0.75rem center, right 0.4rem center;
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
  padding-right: 1.6rem;
}

.cl-form__hint {
  margin: 0;
  font-size: 0.75rem;
  font-style: italic;
  color: var(--color-accent, #a67c5b);
}

.cl-form__field input[aria-invalid="true"],
.cl-form__field textarea[aria-invalid="true"] {
  border-bottom-color: #b4483c;
}

.cl-form__error {
  min-height: 1rem;
  margin: 0;
  font-size: 0.75rem;
  color: #b4483c;
}

.cl-form__consent {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.cl-form__consent input {
  margin-top: 0.25rem;
  accent-color: var(--color-accent, #a67c5b);
}

.cl-form__consent label {
  font-size: 0.875rem;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-text, #6e6a66);
}

.cl-form__consent a {
  color: var(--color-accent, #a67c5b);
  text-underline-offset: 0.2em;
}

.cl-form__consent .cl-form__error {
  flex-basis: 100%;
}

.cl-form__submit {
  align-self: flex-start;
  font-family: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--color-accent, #a67c5b);
  border: none;
  padding: 1rem 2.5rem;
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.cl-form__submit:hover  { opacity: 0.85; }
.cl-form__submit[disabled] { opacity: 0.5; cursor: progress; }

.cl-form__status {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text, #6e6a66);
}

/* Honeypot fuera de pantalla.
   No usar display:none — algunos bots lo detectan y lo saltean. */
.cl-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
