:root {
  --type-caption: .875rem;
  --type-body: 1rem;
  --type-figure: clamp(1.5rem, 2.4vw, 2rem);
  --type-section: clamp(2.25rem, 4vw, 3rem);
  --type-cover: clamp(3.75rem, 7.5vw, 6rem);
}
body, header nav a, header nav a:hover, header .menu, .menu-icon, .section .intro,
.hero .hero-copy .lead, .talk, .contact .field-control :is(input,textarea),
.contact .field-control label, .contact .button, #viewer button {
  font-size: var(--type-body);
}
.brand span, .section .kicker, .hero .kicker, .metric dt, header .lang a,
.contact .field-control :is(input,textarea):is(:focus,:not(:placeholder-shown),:autofill) + label {
  font-size: var(--type-caption);
}
footer, #view-position, .image-caption, .thumb span.image-caption, .gallery-grid .image-caption,
.field .field-error, .field small { font-size: var(--type-caption); }
.hero .hero-copy .price, .metric dd { font-size: var(--type-figure); }
.section h2 { font-size: var(--type-section); }
.hero .hero-copy h1 { font-size: var(--type-cover); max-width: 100%; }
.hero .hero-copy h1 em { display: inline; }
h1, h2, .lead, .intro, .plans > p, .contact-intro { text-wrap: balance; }
p, .payment-schedule li { text-wrap: pretty; }
.section p:not(.kicker) { max-inline-size: 60ch; }
.hero .hero-copy { max-width: min(50rem, calc(100% - 2 * var(--g))); }
.hero .hero-copy .lead { max-width: 100%; line-height: 1.5; }
.section {
  --section-space: clamp(24px, 4vh, 44px);
  padding-block: var(--section-space);
}
#proyecto, #galeria, #ubicacion { padding-block: calc(var(--section-space) * 1.2); }
#proyecto { padding-block-start: calc(var(--section-space) * 1.728); }
#galeria { padding-block-end: calc(var(--section-space) * 1.44); }
#ubicacion { padding-block-start: calc(var(--section-space) * 1.44); }
#villas { padding-block-start: calc(var(--section-space) * 1.2); }
#inversion { padding-block-end: calc(var(--section-space) * 1.2); }
#proyecto .illustration a { width: fit-content; max-width: 100%; margin-inline: auto; }
#proyecto .illustration img { width: auto; height: auto; max-width: 100%; max-height: min(60svh,490px); object-fit: contain; }
#galeria .gallery-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 18px; align-items: start; }
#galeria .gallery-grid figure { grid-column: auto; }
#galeria .gallery-grid img { aspect-ratio: auto; width: auto; height: auto; max-width: 100%; max-height: 31svh; object-fit: contain; }
#galeria .gallery-grid a { width: fit-content; max-width: 100%; margin-inline: auto; }
#ubicacion .location-map { display: inline-flex; margin: 0; }
#ubicacion .location-map img { display: none; }
#ubicacion .location-map + p { display: inline; margin-left: 16px; }
#ubicacion .maplink { margin-top: 0; }
#ubicacion .location-map span { text-decoration: underline; }
#ubicacion .pin-map { height: clamp(150px,26svh,260px); margin-block: 12px 0; }
#ubicacion .aerial { max-height: min(55svh,420px); object-fit: contain; aspect-ratio: auto; }
#contacto { align-items: center; }
#contacto .contact-intro { max-width: 45ch; }
#contacto .channel { border: 0; padding: 0; margin: 12px 0 0; }
#contacto .contact-panel { padding: clamp(14px,2.5vw,28px); }
#contacto form { margin: 0; gap: 10px; }
#contacto .field-control input { min-height: 54px; }
#contacto .field-control textarea { min-height: 78px; }
#contacto .field-control label { top: 15px; }
#contacto .field-control :is(input,textarea):is(:focus,:not(:placeholder-shown),:autofill) + label { top: 5px; }
.talk { text-decoration: none; }
.contact-dock.at-contact .talk { display: none; }
footer { flex-wrap: wrap; justify-content: flex-start; gap: 4px 18px; padding: 5px max(84px,var(--g)) 5px var(--g); }
footer a { min-height: 44px; margin-inline-start: auto; flex-shrink: 0; }
@media (min-width: 821px) {
  #contacto form { grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); }
  #contacto .field:has(textarea), #contacto .primary-action { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  #galeria .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .section { --section-space: 24px; }
  .section .grid, .section.grid { gap: 16px; }
  .section .intro, #contacto .contact-intro { margin-top: 10px; line-height: 1.45; }
  .section .kicker { margin-bottom: 6px; }
  .metric, .facts { margin-top: 12px; }
  #proyecto .illustration img { max-height: min(28svh,240px); }
  #ubicacion .aerial { max-height: min(23svh,180px); width: auto; margin-inline: auto; }
  .contact-dock.at-contact { bottom: max(6px,env(safe-area-inset-bottom)); right: 8px; }
  #contacto .primary-action { width: fit-content; max-width: calc(100% - 48px); }
  footer { padding-inline: var(--g) 72px; gap: 0 12px; }
}
@media (max-width: 375px) {
  footer { flex-wrap: nowrap; }
}

@media (max-width: 640px) and (max-height: 730px) {
  .section { --section-space: 16px; }
  .section .grid, .section.grid { gap: 10px; }
  #proyecto .illustration img { max-height: 23svh; }
  #ubicacion .aerial { max-height: 16svh; }
  #ubicacion .pin-map { height: 135px; }
  #ubicacion .location-map + p { display: block; margin-left: 0; }
  #villas .planrow { margin-top: 12px; gap: 8px; }
  #villas .planrow figure:first-child img { height: 20svh; }
  #contacto .channel p { margin: 0; }
}
@media (max-width: 375px) and (max-height: 640px) {
  #contacto { padding-block: 12px; }
  #contacto .contact-panel { padding: 12px; }
}

/* Investment and contact share the page surface. */
#inversion, #contacto { background: var(--base); }
.investment-price { margin-top: 8px; color: var(--muted); }
#inversion .payment-schedule {
  display: grid; grid-template-columns: repeat(5,minmax(0,1fr));
  list-style: none; margin: 28px 0 0; padding: 0;
}
.payment-schedule li {
  position: relative; display: flex; flex-direction: column;
  align-items: flex-start; gap: 6px; padding: 0 14px 0 0;
}
.payment-schedule li:not(:last-child)::before {
  content: ""; position: absolute; left: 46px; right: 4px; top: 21px; height: 1px; background: #dfd2c8;
}
.stage-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #f4eae1; color: #78452e; }
.stage-icon svg { width: 25px; height: 25px; }
.payment-schedule strong { font: 400 var(--type-figure)/1.2 Georgia,serif; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.stage-name { font-size: var(--type-body); line-height: 1.35; color: var(--ink); max-width: 21ch; }
#contacto { display: block; border-top: 1px solid #e7ddd4; }
#contacto h2, #contacto form, #contacto #enquiry-status { max-width: 42rem; margin-inline: auto; }
#contacto h2 { font-size: calc(var(--type-section) * .8); margin-bottom: 16px; }
#contacto .field-control :is(input,textarea) { background: var(--base); border: 1px solid #8c7d71; color: var(--ink); }
#contacto .field-control :is(input,textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
#contacto .field-error[hidden] { display: none; }
#contacto .field [aria-invalid=true] { border-color: #973a2f; }
#contacto .field-control label { color: #51463d; }

#contacto { padding-inline: var(--g); }
#inversion .payment-schedule li { align-items: center; text-align: center; gap: 8px; padding: 0 8px; }
.payment-schedule .stage-icon { width: 64px; height: 48px; background: var(--base); border-radius: 0; z-index: 1; }
.stage-icon img { width: 48px; height: 42px; object-fit: contain; }
#inversion .payment-schedule li:not(:last-child)::before { left: 50%; right: -50%; top: 24px; }
.stage-name { font-weight: 500; max-width: 20ch; text-wrap: balance; }
@media (max-width: 700px) {
  #inversion .payment-schedule { grid-template-columns: 1fr; gap: 8px; margin-top: 18px; }
  #inversion .payment-schedule li {
    display: grid; grid-template-columns: 52px minmax(0,1fr); grid-template-rows: auto auto;
    align-content: center; justify-items: start; gap: 0 14px; text-align: left; min-height: 58px; padding: 0;
  }
  .payment-schedule .stage-icon { grid-row: span 2; width: 52px; height: 46px; align-self: center; }
  .stage-icon img { width: 40px; height: 35px; }
  #inversion .payment-schedule li:not(:last-child)::before { left: 25.5px; right: auto; top: 50%; width: 1px; height: calc(100% + 8px); }
  .stage-name { max-width: 100%; text-wrap: pretty; }
}

/* Captions share the page surface, aligned with the photograph. */
.image-caption, .thumb span.image-caption, .gallery-grid .image-caption,
.planrow .image-caption, #viewer .viewer-figure .image-caption {
  position: static; display: block; margin: 0; padding: 6px 0 0;
  color: var(--muted); background: transparent; border-radius: 0; text-shadow: none;
  font-size: var(--type-caption); font-weight: 400; line-height: 1.4;
  letter-spacing: normal; text-align: left;
}
.illustration a[data-gallery] { text-decoration: none; }
#galeria { background: var(--base); }
#galeria .gallery-grid {
  grid-template-columns: repeat(12,minmax(0,1fr));
  gap: clamp(12px,1.4vw,22px); align-items: start;
}
#galeria .gallery-grid figure:nth-child(1) { grid-column: span 6; }
#galeria .gallery-grid figure:nth-child(2),
#galeria .gallery-grid figure:nth-child(3),
#galeria .gallery-grid figure:nth-child(4) { grid-column: span 3; }
#galeria .gallery-grid figure:nth-child(5) { grid-column: span 4; }
#galeria .gallery-grid figure:nth-child(6) { grid-column: span 5; }
#galeria .gallery-grid a { display: block; width: 100%; margin: 0; }
#galeria .gallery-grid img {
  width: 100%; height: clamp(150px,26svh,310px); max-height: none;
  aspect-ratio: auto; object-fit: cover;
}
#galeria .gallery-grid figure:nth-child(1) img { object-position: center 57%; }
#galeria .gallery-grid figure:nth-child(6) img { object-position: center 72%; }
.stage-name { font-weight: 400; }
@media (max-width: 820px) {
  #galeria .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 10px; }
  #galeria .gallery-grid figure:nth-child(n) { grid-column: span 1; }
  #galeria .gallery-grid img { height: auto; aspect-ratio: 1; }
}

#contacto {
  --contact-ivory: 255 253 249;
  isolation: isolate; position: relative; display: grid; align-content: center;
  justify-items: end; min-height: clamp(440px,64svh,740px); padding-block: 38px;
  border: 0; background: #453b30;
}
.contact-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; z-index: -2; }
.contact-backdrop { filter: brightness(1.06); }
#contacto::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,transparent 40%,rgba(43,35,27,.72) 82%,rgba(43,35,27,.77)); }
.contact-content { width: min(35vw,29rem); }
#contacto h2, #contacto #enquiry-status { color: rgb(var(--contact-ivory)); }
#contacto form { grid-template-columns: 1fr; }
#contacto .field-control :is(input,textarea) { background: rgb(var(--contact-ivory) / .664); border-color: rgb(255 253 249 / .62); }
#contacto .field-control :is(input,textarea):focus { background: rgb(255 253 249 / .784); }
#contacto .field-control label { color: #382e27; }
#contacto .field-control input[aria-invalid="true"] {
  background: #faeee8;
  border-color: #973a2f;
}
#contacto .field-control input[aria-invalid="true"] + label { opacity: 0; }
#contacto .field-control .field-error {
  position: absolute;
  inset: 4px 12px auto 16px;
  margin: 0;
  color: #782e24;
  line-height: 1.2;
  pointer-events: none;
}
#contacto .primary-action { background: rgb(255 246 232 / .84); color: #483022; font-weight: 500; border: 1px solid rgb(255 246 232 / .65); }
@media (min-width: 821px) {
  #contacto {
    min-height: clamp(506px,73.6svh,851px);
    align-content: end;
    padding-block: 38px 28px;
  }
  #contacto .contact-backdrop { object-position: 50% 15%; }
  #contacto #enquiry-status:empty { margin: 0; padding: 0; }
  #contacto h2 { text-shadow: 0 1px 2px rgb(40 32 26 / .45); }
}
@media (max-width: 820px) {
  #contacto { min-height: min(620px,83svh); align-content: end; padding-block: clamp(140px,26svh,245px) 24px; }
  .contact-content { width: min(100%,28rem); justify-self: center; }
  .contact-backdrop { object-position: 51% 45%; }
  #contacto::before { background: linear-gradient(180deg,transparent 20%,rgba(40,32,26,.15) 38%,rgba(40,32,26,.70) 73%,rgba(40,32,26,.80)); }
}

.gallery-short-title, .gallery-pages { display: none; }
@media (max-width: 640px) {
  #galeria { overflow: hidden; }
  .gallery-wide-title { display: none; }
  .gallery-short-title { display: inline; }
  #galeria .gallery-grid {
    display: flex; gap: 12px; align-items: flex-start;
    margin: 16px calc(-1 * var(--g)) 0 0; padding: 0 var(--g) 0 0;
    overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  #galeria .gallery-grid::-webkit-scrollbar { display: none; }
  #galeria .gallery-grid figure { flex: 0 0 93%; scroll-snap-align: start; min-width: 0; }
  #galeria .gallery-grid .image-caption { padding-top: 7px; }
  .gallery-pages { display: flex; margin-top: 4px; }
  .gallery-pages button { display: grid; place-items: center; width: 28px; height: 28px; border: 0; background: none; padding: 0; }
  .gallery-pages button::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #998a7e; }
  .gallery-pages button[aria-current=true]::before { background: var(--accent); width: 15px; border-radius: 5px; }
}
#contacto { grid-template-columns: minmax(0,1fr); }
@media (max-width: 640px) { .gallery-grid figure[data-current="false"] .image-caption { visibility: hidden; } }
