:root {
  --paper: #f5f1ea;
  --paper-2: #ece6db;
  --ink: #1e2a31;
  --muted: #5b676d;
  --line: #d9d1c3;
  --sea: #24505f;
  --sea-deep: #173640;
  --clay: #b0532e;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
figure { margin: 0; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}

/* ---------- Cabecera ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top__inner { display: flex; align-items: center; gap: 32px; height: 60px; }
.brand { font-family: var(--serif); font-size: 22px; text-decoration: none; white-space: nowrap; }
.brand span { font-family: var(--sans); font-size: 12px; color: var(--muted); margin-left: 6px; letter-spacing: 0.05em; }
.nav { display: flex; gap: 24px; margin-left: auto; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.top__call {
  font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap;
  padding: 7px 14px; border: 1px solid var(--ink); border-radius: 99px;
  transition: background .2s, color .2s;
}
.top__call:hover { background: var(--ink); color: var(--paper); }

/* ---------- Portada ---------- */
.hero {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: end;
  padding-top: clamp(40px, 7vw, 96px);
  padding-bottom: 48px;
}
.hero h1 { font-size: clamp(40px, 5.6vw, 72px); margin-bottom: 24px; }
.lead { font-size: 19px; color: var(--muted); max-width: 34ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 99px;
  border: 1px solid var(--ink); text-decoration: none; font-weight: 500; font-size: 15px;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--sea); border-color: var(--sea); }
.hero__media { position: relative; }
.hero__media img { width: 100%; aspect-ratio: 4 / 3.2; object-fit: cover; border-radius: var(--radius); }
.hero__media figcaption {
  position: absolute; left: 14px; bottom: 12px;
  font-size: 13px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.4);
}

/* ---------- Datos ---------- */
.facts dl {
  display: grid; grid-template-columns: repeat(5, 1fr);
  margin: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line);
}
.facts dl > div { padding: 18px 0 20px; }
.facts dl > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.facts dt { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.facts dd { margin: 0; font-family: var(--serif); font-size: 30px; line-height: 1.1; }

/* ---------- Secciones ---------- */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section--tint { background: var(--paper-2); }
.section__head {
  display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 72px);
  margin-bottom: 44px; align-items: start;
}
.section__head h2 { font-size: clamp(34px, 4vw, 52px); }
.section__head p { color: var(--muted); max-width: 60ch; padding-top: 8px; }

/* ---------- Pestañas + galería ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tab {
  font: inherit; font-size: 15px; cursor: pointer;
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 99px; padding: 7px 16px;
  transition: border-color .2s, background .2s, color .2s;
}
.tab:hover { border-color: var(--ink); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tab small { opacity: .6; margin-left: 4px; font-size: 12px; }

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 210px;
  gap: 10px;
}
.gallery a { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--paper-2); }
.gallery a:first-child { grid-column: span 2; grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gallery a:hover img { transform: scale(1.03); }
.gallery.is-fading { opacity: 0; }
.gallery { transition: opacity .25s; }

/* ---------- Distribución ---------- */
.plan { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.plan__2d { background: #fff; padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); }
.plan { align-items: center; }
.plan__3d a { display: block; overflow: hidden; border-radius: var(--radius); }
.plan__3d img { width: 100%; transition: transform .6s ease; }
.plan__3d a:hover img { transform: scale(1.02); }
.plan__3d figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.where__aerial figcaption a { color: var(--sea); }

/* ---------- Calidades ---------- */
.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 56px clamp(28px, 5vw, 72px); }
.specs__group h3 { font-size: 26px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.specs dl { margin: 0; display: grid; grid-template-columns: 11rem 1fr; }
.specs dt, .specs dd { padding: 12px 0; border-bottom: 1px solid var(--line); }
.specs dt { font-weight: 500; font-size: 15px; padding-right: 16px; }
.specs dd { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Entorno ---------- */
.section--dark { background: var(--sea-deep); color: #e9eef0; }
.section--dark .section__head p { color: #a9bcc2; }
.mosaic {
  display: grid; gap: 10px;
  grid-template-columns: 7fr 5fr;
  grid-template-areas: "a b" "a c" "d c";
  grid-template-rows: 240px 120px 240px;
}
.mosaic figure { position: relative; overflow: hidden; border-radius: var(--radius); }
.mosaic a, .mosaic img { display: block; width: 100%; height: 100%; }
.mosaic img { object-fit: cover; transition: transform .6s ease; }
.mosaic a:hover img { transform: scale(1.03); }
.mosaic figcaption {
  position: absolute; left: 14px; bottom: 12px; font-size: 14px; color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,.5); pointer-events: none;
}
.mosaic__a { grid-area: a; } .mosaic__b { grid-area: b; } .mosaic__c { grid-area: c; } .mosaic__d { grid-area: d; }

/* ---------- Situación ---------- */
.where { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.where__aerial img { width: 100%; aspect-ratio: 700 / 412; object-fit: cover; border-radius: var(--radius); }
.where__aerial figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.where__map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; border-radius: var(--radius); filter: grayscale(.35); }

/* ---------- Contacto ---------- */
.contact { background: var(--clay); color: #fff7f1; padding-block: clamp(56px, 8vw, 104px); }
.contact__inner { display: grid; grid-template-columns: 7fr 5fr; gap: 40px; align-items: end; }
.contact .eyebrow { color: #f6d6c6; }
.contact h2 { font-size: clamp(32px, 4vw, 50px); margin-bottom: 16px; max-width: 18ch; }
.contact p { color: #fbe4d8; max-width: 44ch; }
.contact__phone {
  justify-self: end; text-decoration: none;
  font-family: var(--serif); font-size: clamp(38px, 5vw, 64px); line-height: 1;
  border-bottom: 2px solid currentColor; padding-bottom: 8px; white-space: nowrap;
}
.contact__phone span { display: block; font-family: var(--sans); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; color: #f6d6c6; }

/* ---------- Pie ---------- */
.foot { padding-block: 28px; font-size: 14px; color: var(--muted); }
.foot__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot a { text-decoration: none; }

/* ---------- Visor ---------- */
.lb {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(14, 22, 26, .94);
  display: flex; align-items: center; justify-content: center;
}
.lb[hidden] { display: none; }
.lb__fig { max-width: min(1200px, 88vw); }
.lb__fig img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: var(--radius); }
.lb__fig figcaption { color: #c9d3d6; font-size: 14px; text-align: center; margin-top: 12px; }
.lb button {
  position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
  font-size: 44px; line-height: 1; padding: 16px; opacity: .75;
}
.lb button:hover { opacity: 1; }
.lb__close { top: 8px; right: 12px; }
.lb__prev { left: 8px; }
.lb__next { right: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .top__call { margin-left: auto; }
  .hero, .section__head, .plan, .contact__inner { grid-template-columns: 1fr; }
  .hero { align-items: start; }
  .section__head { gap: 12px; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .specs { grid-template-columns: 1fr; }
  .where { grid-template-columns: 1fr; }
  .contact__phone { justify-self: start; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .facts dl { grid-template-columns: repeat(3, 1fr); }
  .facts dl > div:nth-child(4) { padding-left: 0; border-left: 0; }
  .facts dl > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .facts dd { font-size: 24px; }
  .facts dl > div + div { padding-left: 14px; }
  .gallery { grid-auto-rows: 140px; gap: 6px; }
  .specs dl { grid-template-columns: 1fr; }
  .specs dt { padding-bottom: 0; border-bottom: 0; }
  .specs dd { padding-top: 4px; }
  .mosaic {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "a a" "b c" "d d";
    grid-template-rows: 220px 180px 180px;
  }
  .lb button { font-size: 36px; padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
