:root {
  --ink: #24372d;
  --cream: #f5f0e7;
  --paper: #fbf9f4;
  --sage: #81917b;
  --terracotta: #bb7555;
  --gold: #c9a56b;
  --line: rgba(36, 55, 45, .18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.65 "Montserrat", Arial, sans-serif;
}

body.menu-open,
body.modal-open,
body.gallery-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

h1,
h2,
h3,
.brand {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  line-height: 1.02;
}

h1 {
  max-width: 850px;
  font-size: clamp(3.3rem, 8vw, 7.8rem);
}

h2 {
  font-size: clamp(2.3rem, 5vw, 4.4rem);
}

h3 {
  font-size: 1.8rem;
}

p {
  margin: 0 0 1.2rem;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: 1.1rem;
  color: var(--terracotta);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 34px;
  height: 1px;
  background: currentColor;
  content: "";
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  color: white;
  background: rgba(20, 35, 28, .94);
  border-bottom: 1px solid rgba(255, 255, 255, .2);
}

.site-header.solid {
  position: relative;
  background: var(--ink);
}

.nav {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: 1.75rem;
  letter-spacing: .06em;
}

.brand-mark {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 1.3rem;
}

.menu {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.8rem);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.menu a {
  position: relative;
}

.menu a:not(.btn)::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1px;
  background: white;
  content: "";
  transform: scaleX(0);
  transition: .25s;
}

.menu a:hover::after,
.menu a.active::after {
  transform: scaleX(1);
}

.menu-houses {
  position: relative;
}

.menu-houses-heading {
  display: flex;
  align-items: center;
  gap: .3rem;
}

.submenu-toggle {
  display: grid;
  width: 32px;
  height: 40px;
  padding: 7px;
  place-items: center;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.submenu-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  transition: transform .2s;
}

.submenu-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.submenu {
  position: absolute;
  top: 100%;
  left: -18px;
  min-width: 200px;
  padding: 12px 18px;
  background: #192b21;
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .2);
}

.submenu[hidden] {
  display: none;
}

.submenu a {
  display: block;
  padding: 10px 0;
  white-space: nowrap;
}

.menu .submenu a::after {
  bottom: 4px;
}

.menu-toggle {
  display: none;
  padding: .5rem;
  color: white;
  background: none;
  border: 0;
  font-size: 1.5rem;
}

.btn {
  display: inline-flex;
  min-height: 49px;
  align-items: center;
  justify-content: center;
  padding: .85rem 1.4rem;
  border: 1px solid currentColor;
  background: transparent;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: .25s;
}

.btn:hover {
  color: white;
  background: var(--terracotta);
  border-color: var(--terracotta);
  transform: translateY(-2px);
}

.btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.btn-fill {
  color: white;
  background: var(--terracotta);
  border-color: var(--terracotta);
}

.hero {
  position: relative;
  display: flex;
  min-height: 100svh;
  align-items: flex-end;
  color: white;
  background: linear-gradient(90deg, rgba(21, 35, 27, .72), rgba(21, 35, 27, .12)), url("https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=2000&q=85") center/cover;
}

.hero::after,
.page-hero::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(14, 27, 20, .62), rgba(14, 27, 20, .12)), linear-gradient(0deg, rgba(14, 27, 20, .8), rgba(14, 27, 20, .12) 90%);
  content: "";
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-block: 210px 88px;
}

.hero p {
  max-width: 570px;
  margin: 1.6rem 0 2.2rem;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.scroll-hint {
  position: absolute;
  z-index: 2;
  right: 5vw;
  bottom: 40px;
  writing-mode: vertical-rl;
  font-size: .65rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.intro,
.section {
  padding-block: clamp(75px, 10vw, 140px);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 8vw, 120px);
  align-items: center;
}

.intro-copy>p:not(.eyebrow) {
  max-width: 580px;
  margin-top: 1.8rem;
  color: #58665e;
}

.image-stack {
  position: relative;
  padding: 0 0 55px 75px;
}

.image-stack img:first-of-type {
  height: 570px;
}

.image-stack img:last-of-type {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 220px;
  height: 260px;
  border: 10px solid var(--paper);
}

.features {
  color: white;
  background: var(--ink);
}

.features-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3.2rem;
}

.features-head p {
  max-width: 440px;
  color: #c7d0c9;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.image-card {
  position: relative;
  min-height: 500px;
  overflow: hidden;
}

.image-card img {
  position: absolute;
  height: 100%;
  transition: transform .7s;
}

.image-card:hover img {
  transform: scale(1.04);
}

.image-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(18, 28, 23, .85), transparent 65%);
  content: "";
}

.image-card-content {
  position: absolute;
  z-index: 1;
  right: 30px;
  bottom: 30px;
  left: 30px;
}

.image-card-content p {
  margin: .7rem 0 0;
  color: #e3e6e3;
  font-size: .9rem;
}

.quote {
  padding-block: 90px;
  text-align: center;
}

.quote blockquote {
  max-width: 850px;
  margin: 0 auto 1.3rem;
  font: italic clamp(2rem, 4vw, 3.6rem)/1.15 "Cormorant Garamond", Georgia, serif;
}

.quote span {
  color: var(--terracotta);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.cta {
  padding: 90px 0;
  color: white;
  background: linear-gradient(90deg, rgba(31, 48, 39, .88), rgba(31, 48, 39, .45)), url("assets/img/EXTERIORES/MAJOLERO. LUMINE FOTOGRAFI¦üA9.webp") center/cover;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cta h2 {
  max-width: 720px;
}

.page-hero {
  position: relative;
  display: grid;
  min-height: 65vh;
  place-items: end start;
  color: white;
  background-position: center;
  background-size: cover;
}

.page-hero .container {
  position: relative;
  z-index: 1;
  padding-block: 170px 75px;
}

.page-hero p {
  max-width: 620px;
  margin-top: 1.2rem;
}

.experiences-hero {
  background-image: linear-gradient(90deg, rgba(25, 40, 32, .5), transparent), url("assets/img/PISCINA/MAJOLERO. LUMINE FOTOGRAFI¦üA23.webp");
}

.environment-hero {
  background-image: linear-gradient(90deg, rgba(25, 40, 32, .5), transparent), url("assets/img/EXTERIORES/MAJOLERO. LUMINE FOTOGRAFI¦üA71.webp");
}

.contact-hero {
  background-image: linear-gradient(90deg, rgba(25, 40, 32, .62), transparent), url("assets/img/EXTERIORES/MAJOLERO. LUMINE FOTOGRAFI¦üA74.webp");
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 70px 30px;
}

.editorial-card img {
  height: 380px;
  margin-bottom: 1.5rem;
}

.editorial-card p {
  max-width: 540px;
  color: #647168;
}

.number {
  color: var(--terracotta);
  font: 1rem "Cormorant Garamond", serif;
}

.contact-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 80px;
}

.contact-details {
  padding: 45px;
  color: white;
  background: var(--ink);
}

.contact-details h2 {
  margin-bottom: 2rem;
}

.contact-details a {
  display: block;
  margin-bottom: 1rem;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field {
  display: grid;
  gap: .45rem;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

input,
textarea {
  width: 100%;
  padding: 14px 4px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  font: inherit;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--terracotta);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.form-status {
  grid-column: 1/-1;
  color: var(--terracotta);
}

.site-footer {
  padding: 65px 0 25px;
  color: white;
  background: #19271f;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 55px;
  padding-bottom: 50px;
}

.footer-grid p,
.footer-grid a {
  color: #bfc8c1;
}

.footer-grid a {
  display: block;
  margin: .35rem 0;
}

.footer-title {
  margin-bottom: 1rem;
  color: var(--gold);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.copyright {
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .13);
  color: #8d9b91;
  font-size: .72rem;
}

.whatsapp-float {
  position: fixed;
  z-index: 25;
  right: 24px;
  bottom: 24px;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: white;
  background: #25d366;
  border-radius: 50%;
  box-shadow: 0 8px 25px rgba(0, 0, 0, .25);
  font-size: 1.6rem;
}

/* Welcome */
.welcome-page {
  overflow: hidden;
  background: #10271e;
}

.welcome {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  color: #f8f5ec;
  background: #10271e;
  text-align: center;
}

.welcome-photo {
  position: absolute;
  inset: 5vh 5vw;
  background: url("assets/img/EXTERIORES/MAJOLERO. LUMINE FOTOGRAFI¦üA66.webp") center/cover;
  opacity: .42;
  animation: welcomeReveal 1.8s ease both;
}

.welcome-wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #10271e 0, transparent 25%, transparent 75%, #10271e 100%), linear-gradient(0deg, #10271e 0, rgba(16, 39, 30, .15) 50%, #10271e 100%);
}

.welcome-top {
  position: absolute;
  z-index: 2;
  top: 28px;
  right: 5vw;
  left: 5vw;
  display: flex;
  justify-content: space-between;
  font-size: .6rem;
  letter-spacing: .19em;
  text-transform: uppercase;
}

.welcome-content {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  padding: 80px 24px;
}

.welcome-mark {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 25px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 50%;
  font: 1.7rem "Cormorant Garamond", serif;
}

.welcome-kicker {
  margin-bottom: .3rem;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
}

.welcome h1 {
  font-size: clamp(4.2rem, 11vw, 9rem);
  line-height: .69;
  letter-spacing: -.04em;
  text-shadow: 0 4px 35px rgba(0, 0, 0, .2);
}

.welcome h1 em {
  position: relative;
  left: .14em;
  font-weight: 400;
}

.welcome-copy {
  margin: 2.7rem 0 1.6rem;
  font: 1.15rem/1.45 "Cormorant Garamond", serif;
  letter-spacing: .03em;
}

.welcome-enter {
  display: flex;
  min-width: 155px;
  align-items: center;
  justify-content: space-between;
  padding: .65rem .65rem .65rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 100px;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  transition: .3s;
}

.welcome-enter i {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--ink);
  background: white;
  border-radius: 50%;
  font-style: normal;
  transition: .3s;
}

.welcome-enter:hover {
  color: var(--ink);
  background: white;
}

.welcome-enter:hover i {
  color: white;
  background: var(--terracotta);
  transform: translateX(3px);
}

.welcome-foot {
  position: absolute;
  z-index: 2;
  bottom: 20px;
  margin: 0;
  font-size: .6rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}

@keyframes welcomeReveal {
  from {
    opacity: 0;
    transform: scale(1.05);
  }

  to {
    opacity: .42;
    transform: scale(1);
  }
}

/* Homes overview */
.property-hero {
  position: relative;
  min-height: 100svh;
  color: white;
  background: #1b3026;
}

.property-hero-media {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 31, 23, .8), rgba(15, 31, 23, .18)), url("assets/img/EXTERIORES/MAJOLERO. LUMINE FOTOGRAFI¦üA56.webp") center/cover;
}

.property-hero-content {
  position: relative;
  display: flex;
  min-height: 100svh;
  padding-block: 190px 70px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
}

.property-hero-content>p:not(.eyebrow) {
  max-width: 510px;
  margin: 1.5rem 0;
  font: 1.25rem "Cormorant Garamond", serif;
}

.round-link {
  display: grid;
  width: 50px;
  height: 50px;
  margin-top: 1rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  font-size: 1.2rem;
  transition: .3s;
}

.round-link:hover {
  color: var(--ink);
  background: white;
}

.story {
  background: #eee9df;
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr .8fr;
  gap: 9vw;
}

.story-copy {
  padding-top: 2rem;
  color: #59675f;
}

.houses {
  background: var(--paper);
}

.house-feature {
  display: grid;
  min-height: 720px;
  grid-template-columns: 60% 40%;
}

.house-feature.reverse {
  grid-template-columns: 40% 60%;
}

.house-feature.reverse .house-image {
  order: 2;
}

.house-image {
  display: block;
  min-height: 650px;
  overflow: hidden;
}

.house-image img {
  height: 100%;
  transition: transform 1s ease;
}

.house-image:hover img {
  transform: scale(1.025);
}

.house-info {
  position: relative;
  display: flex;
  padding: clamp(50px, 8vw, 120px);
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.house-info>p:not(.eyebrow):not(.house-number) {
  max-width: 480px;
  margin: 1.5rem 0 2rem;
  color: #627068;
}

.house-number {
  position: absolute;
  top: 45px;
  right: 45px;
  color: #b4b9b4;
  font: italic 1.2rem "Cormorant Garamond", serif;
}

.house-facts {
  display: flex;
  width: 100%;
  margin: 0 0 2.4rem;
  padding: 1.2rem 0;
  gap: 1.5rem;
  border-block: 1px solid var(--line);
  list-style: none;
  color: #67736c;
  font-size: .65rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.house-facts li {
  flex: 1;
}

.house-facts strong {
  display: block;
  color: var(--ink);
  font: 1.8rem "Cormorant Garamond", serif;
}

.text-link {
  padding-bottom: .35rem;
  border-bottom: 1px solid currentColor;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.text-link span {
  margin-left: 1rem;
}

.shared-spaces {
  color: white;
  background: var(--ink);
}

.landscape-strip {
  position: relative;
  margin-top: 3rem;
}

.landscape-strip img {
  height: 600px;
  opacity: .78;
}

.landscape-strip>div {
  position: absolute;
  right: 5%;
  bottom: 8%;
  max-width: 380px;
  padding: 32px;
  background: var(--ink);
}

.light {
  color: white;
}

/* Individual house */
.detail-hero {
  position: relative;
  display: flex;
  min-height: 82svh;
  align-items: flex-end;
  color: white;
  background-position: center;
  background-size: cover;
}

.detail-hero::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(14, 27, 20, .35), rgba(14, 27, 20, .08)), linear-gradient(0deg, rgba(14, 27, 20, .9), rgba(14, 27, 20, .12) 90%);
  content: "";
}

.detail-hero .container {
  position: relative;
  z-index: 1;
  padding-block: 170px 65px;
}

/* Keep text legible over every hero photograph. */
.hero-content,
.page-hero .container,
.property-hero-content,
.detail-hero .container {
  text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}

.hero .eyebrow,
.page-hero .eyebrow,
.property-hero .eyebrow,
.detail-hero .eyebrow,
.cta .eyebrow {
  color: #f3dfb9;
}

.whatsapp-float svg {
  width: 30px;
  height: 30px;
}

.whatsapp-float:hover {
  background: #128c4e;
}

.detail-meta {
  display: flex;
  margin-top: 1.5rem;
  gap: 2rem;
  font-size: .68rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.detail-intro {
  max-width: 1000px;
  margin-inline: auto;
  text-align: center;
}

.detail-intro .eyebrow {
  justify-content: center;
}

.amenities {
  display: grid;
  margin-top: 4rem;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
}

.amenity {
  padding: 28px 18px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.amenity:last-child {
  border: 0;
}

.amenity strong {
  display: block;
  font: 1.5rem "Cormorant Garamond", serif;
}

/* House preview and shared photo viewer */
.house-gallery {
  padding-bottom: 60px;
}

.gallery-preview-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  height: clamp(340px, 43vw, 560px);
  gap: 8px;
}

.gallery-preview-grid > :first-child {
  grid-row: 1 / -1;
}

.gallery-preview-grid[data-count="1"] {
  grid-template-columns: 1fr;
}

.gallery-preview-grid[data-count="2"],
.gallery-preview-grid[data-count="3"] {
  grid-template-columns: 2fr 1fr;
}

.gallery-preview-grid[data-count="2"] > :last-child {
  grid-row: 1 / -1;
}

.gallery-preview-grid[data-count="4"] > :last-child {
  grid-column: 2 / -1;
}

.gallery-preview-grid .gallery-preview {
  min-width: 0;
  min-height: 0;
}

.gallery-preview-grid .gallery-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.gallery-preview {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: white;
  background: var(--ink);
  cursor: pointer;
}

.gallery-preview[hidden], .gallery-photo[hidden] {
  display: none;
}

.gallery-preview img {
  height: clamp(280px, 48vw, 620px);
  transition: transform .4s;
}

.gallery-preview:hover img {
  transform: scale(1.025);
}

.gallery-preview-label {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,.6);
  color: white;
  background: rgba(20,35,28,.94);
  font: 700 .78rem "Montserrat", Arial, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.gallery-preview-label span {
  font-size: 1.3rem;
}

.gallery-status {
  margin: 12px 0 0;
  color: #58665e;
  font-size: .85rem;
}

.gallery-dialog {
  position: fixed;
  inset: 0;
  width: min(1200px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.2);
  color: white;
  background: #14231c;
}

.gallery-dialog::backdrop {
  background: rgba(8,16,12,.94);
}

.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.gallery-toolbar h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.gallery-close, .gallery-previous, .gallery-next {
  display: grid;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255,255,255,.45);
  color: white;
  background: #20372b;
  font-size: 1.5rem;
  cursor: pointer;
}

.gallery-close:hover, .gallery-previous:hover, .gallery-next:hover {
  background: #3a5544;
}

.gallery-previous:disabled, .gallery-next:disabled {
  opacity: .3;
  cursor: default;
}

.gallery-stage {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 16px;
}

.gallery-stage figure {
  min-width: 0;
  margin: 0;
  text-align: center;
}

.gallery-photo {
  width: 100%;
  height: min(65dvh, 740px);
  object-fit: contain;
  touch-action: pan-y pinch-zoom;
}

.gallery-counter {
  margin-top: 12px;
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
}

.gallery-error {
  padding: 60px 20px;
}

.gallery-hint {
  margin: 16px 0 0;
  color: #c2cec5;
  font-size: .75rem;
  text-align: center;
}


.modal {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: none;
  padding: 25px;
  place-items: center;
  background: rgba(14, 25, 19, .8);
}

.modal.open {
  display: grid;
}

.modal-box {
  position: relative;
  width: min(900px, 100%);
  max-height: 92vh;
  padding: 42px;
  overflow: auto;
  background: var(--paper);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: 0;
  color: var(--ink);
  font-size: 1.7rem;
  cursor: pointer;
}

.calendar-frame {
  width: 100%;
  height: 520px;
  margin-top: 25px;
  border: 0;
  background: white;
}

@media (max-width: 1000px) {
  .menu-toggle {
    display: block;
  }

  .menu {
    position: fixed;
    inset: 0;
    display: none;
    padding: 100px 30px 40px;
    overflow-y: auto;
    flex-direction: column;
    justify-content: center;
    color: white;
    background: var(--ink);
    font-size: .9rem;
  }

  .menu.open {
    display: flex;
  }

  .menu-houses {
    width: 100%;
    text-align: center;
  }

  .menu-houses-heading {
    justify-content: center;
  }

  .submenu {
    position: static;
    min-width: 0;
    margin-top: .6rem;
    padding: .4rem 1rem;
    background: rgba(0, 0, 0, .15);
    border: 0;
    box-shadow: none;
    font-size: .75rem;
  }

  .submenu a {
    width: fit-content;
    margin-inline: auto;
  }

  .nav>.brand {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
  }

  .detail-meta {
    flex-wrap: wrap;
    gap: .6rem 1.2rem;
  }

  .menu-toggle {
    position: relative;
    z-index: 2;
  }

  .split,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .image-card {
    min-height: 420px;
  }

  .features-head,
  .cta-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .editorial-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .image-stack {
    padding-left: 35px;
  }

  .image-stack img:first-of-type {
    height: 470px;
  }

  .image-stack img:last-of-type {
    width: 150px;
    height: 190px;
  }

  .story-grid,
  .house-feature,
  .house-feature.reverse {
    grid-template-columns: 1fr;
  }

  .house-feature.reverse .house-image {
    order: 0;
  }

  .house-feature {
    min-height: auto;
  }

  .house-image {
    min-height: 480px;
  }

  .house-info {
    padding: 65px 30px 80px;
  }

  .gallery-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    padding: 16px 10px;
  }

  .gallery-stage {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 4px;
  }

  .gallery-close, .gallery-previous, .gallery-next {
    width: 44px;
    height: 44px;
  }

  .gallery-photo {
    height: 55dvh;
  }

  .gallery-preview-label {
    right: 16px;
    bottom: 16px;
    padding: 12px 18px;
  }

}

@media (max-height: 700px) and (max-width: 1000px) {
  .menu {
    justify-content: flex-start;
    gap: .85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  .hero-content {
    padding-bottom: 65px;
  }

  .scroll-hint {
    display: none;
  }

  .contact-form {
    grid-template-columns: 1fr;
  }

  .field {
    grid-column: 1/-1;
  }

  .contact-details,
  .modal-box {
    padding: 30px 22px;
  }

  .welcome-photo {
    inset: 3vh 14px;
  }

  .welcome-top span:last-child {
    display: none;
  }

  .welcome h1 {
    font-size: clamp(4rem, 23vw, 6rem);
  }

  .house-image {
    min-height: 380px;
  }

  .house-facts {
    gap: .7rem;
  }

  .landscape-strip img {
    height: 500px;
  }

  .landscape-strip>div {
    right: 14px;
    bottom: 14px;
    left: 14px;
  }

  .amenities {
    grid-template-columns: 1fr 1fr;
  }

  .amenity:nth-child(2) {
    border-right: 0;
  }

  .amenity:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .gallery-preview-grid {
    height: auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: clamp(220px, 60vw, 360px) 100px;
    gap: 5px;
  }

  .gallery-preview-grid > :first-child {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .gallery-preview-grid[data-count="1"] {
    grid-template-rows: clamp(220px, 60vw, 360px);
  }

  .gallery-preview-grid[data-count="2"] {
    grid-template-columns: 1fr;
  }

  .gallery-preview-grid[data-count="3"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-preview-grid[data-count="4"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery-preview-grid[data-count="2"] > :last-child {
    grid-row: 2;
  }

  .gallery-preview-grid[data-count="4"] > :last-child {
    grid-column: auto;
  }

  .gallery-preview-grid .gallery-preview-label {
    inset: 0;
    padding: 6px;
    gap: 0;
    justify-content: center;
    background: rgba(20, 35, 28, .75);
    font-size: .65rem;
    letter-spacing: .06em;
    border: 0;
  }

  .gallery-preview-grid .gallery-preview-label span {
    display: none;
  }

  .gallery-preview-grid[data-count="1"] .gallery-preview-label {
    inset: auto 12px 12px auto;
    padding: 12px 16px;
  }
}

/* Home introduction and experiences */
.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, .8fr);
  gap: clamp(32px, 7vw, 100px);
  align-items: start;
}

.home-intro h2 {
  margin-bottom: 28px;
}

.home-intro > div > p:not(.eyebrow),
.experiences-section-heading > p {
  color: #58665e;
}

.home-facts {
  padding: clamp(24px, 4vw, 44px);
  background: var(--cream);
  border-top: 2px solid var(--gold);
}

.home-facts dl {
  margin: 0 0 28px;
}

.home-facts dl > div {
  display: flex;
  flex-direction: column-reverse;
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
}

.home-facts dt {
  font-size: .8rem;
}

.home-facts dd {
  margin: 0 0 6px;
  font: 3.8rem/1 "Cormorant Garamond", Georgia, serif;
}

.experience-row {
  padding-block: clamp(48px, 6vw, 84px);
}

.experience-row:nth-child(even) {
  background: var(--cream);
}

.experience-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 7vw, 100px);
  align-items: center;
}

.experience-photo {
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.experience-row:nth-child(even) .experience-photo {
  order: 2;
}

.experience-copy h2 {
  margin-bottom: 24px;
}

.experience-copy > p:not(.eyebrow) {
  color: #58665e;
}

.experiences-gatherings {
  background: var(--cream);
}

.experiences-section-heading {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(24px, 6vw, 80px);
  align-items: end;
}

.experiences-occasions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 28px;
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
}

.experiences-occasions li {
  padding-block: 18px;
  border-top: 1px solid var(--line);
  font-size: .86rem;
}

.experiences-history-heading {
  max-width: 760px;
  margin-bottom: 56px;
}

.experiences-history-heading > p:last-child {
  margin-top: 24px;
  color: #58665e;
}

.experiences-timeline {
  max-width: 1000px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.experiences-timeline > li {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 40px;
}

.experiences-timeline time {
  padding-top: 28px;
  font-size: .8rem;
  font-weight: 600;
}

.experiences-timeline > li > div {
  position: relative;
  padding: 22px 0 36px 34px;
  border-left: 1px solid var(--line);
}

.experiences-timeline > li > div::before {
  position: absolute;
  top: 32px;
  left: -5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sage);
  content: "";
}

.experiences-timeline .timeline-recognition > div::before {
  background: var(--terracotta);
  box-shadow: 0 0 0 5px var(--cream);
}

.timeline-category {
  margin-bottom: 12px;
  color: #87503a;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.experiences-timeline h3 {
  margin-bottom: 14px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.experiences-timeline h3 + p {
  max-width: 640px;
  margin-bottom: 0;
  color: #58665e;
}

@media (max-width: 800px) {
  .home-intro,
  .experience-layout,
  .experiences-section-heading {
    grid-template-columns: 1fr;
  }

  .experiences-occasions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .experience-row:nth-child(even) .experience-photo {
    order: 0;
  }

}

@media (max-width: 520px) {
  .experiences-timeline > li {
    grid-template-columns: 1fr;
    gap: 0;
    padding-left: 22px;
    border-left: 1px solid var(--line);
  }

  .experiences-timeline time {
    padding-top: 24px;
  }

  .experiences-timeline > li > div {
    padding: 12px 0 28px;
    border: 0;
  }

  .experiences-timeline > li > div::before {
    top: -18px;
    left: -27px;
  }
}

/* Compact surroundings introduction and shared outdoor galleries */
.environment-intro {
  padding-block: clamp(48px, 6vw, 84px);
}

.environment-intro .image-stack {
  padding: 0 0 28px 45px;
}

.environment-intro .image-stack img:first-of-type {
  height: clamp(240px, 26vw, 340px);
}

.environment-intro .image-stack img:last-of-type {
  width: 145px;
  height: 150px;
  border-width: 7px;
}

.environment-galleries {
  background: var(--cream);
}

.environment-galleries-heading {
  max-width: 760px;
  margin-bottom: 44px;
}

.environment-galleries-heading > p:last-child {
  margin-top: 20px;
  color: #58665e;
}

.environment-gallery + .environment-gallery {
  margin-top: 56px;
}

.environment-gallery-heading {
  margin-bottom: 20px;
}

.environment-gallery-heading h3 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.environment-gallery-heading p {
  color: #58665e;
}

/* Optional disclosure: add imagen-ia to an image to show its small AI badge. */
.ai-image-host {
  position: relative;
}

.ai-image-badge {
  position: absolute;
  z-index: 3;
  display: flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 6px;
  color: white;
  background: rgba(20, 35, 28, .94);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
  font: 700 8px/1 Arial, sans-serif;
  cursor: help;
}

.ai-image-badge[hidden] {
  display: none;
}

.ai-image-badge svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.ai-image-badge:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.ai-image-badge::after {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  display: none;
  width: max-content;
  max-width: min(180px, 60vw);
  padding: 8px 10px;
  border-radius: 4px;
  color: white;
  background: #14231c;
  font: 400 .7rem/1.4 "Montserrat", Arial, sans-serif;
  content: "Imagen generada con IA";
  pointer-events: none;
}

.ai-image-badge:hover::after,
.ai-image-badge:focus::after {
  display: block;
}

/* Event albums use the same viewer with a single compact timeline thumbnail. */
.experiences-timeline > li {
  grid-template-columns: 160px minmax(0, 1fr) 160px;
  gap: 28px;
}

.timeline-gallery {
  width: 160px;
  margin: 24px 0 36px;
  align-self: start;
}

.timeline-photo {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--ink);
  cursor: pointer;
}

.timeline-photo[hidden] {
  display: none;
}

.timeline-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  object-fit: cover;
  transition: transform .25s;
}

.timeline-photo:hover img {
  transform: scale(1.04);
}

.timeline-photo-expand {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: white;
  background: rgba(20, 35, 28, .9);
  border: 1px solid rgba(255, 255, 255, .6);
  font-size: 1rem;
}

.timeline-photo-status {
  display: grid;
  min-height: 100px;
  margin: 0;
  padding: 12px;
  place-items: center;
  border: 1px dashed var(--line);
  color: #58665e;
  background: var(--cream);
  font-size: .72rem;
  text-align: center;
}

.timeline-gallery[data-gallery-state="ready"] .timeline-photo-status {
  display: block;
  min-height: 0;
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
}

@media (max-width: 800px) and (min-width: 521px) {
  .experiences-timeline > li {
    grid-template-columns: 125px minmax(0, 1fr) 128px;
    gap: 16px;
  }

  .timeline-gallery {
    width: 128px;
  }
}

@media (max-width: 520px) {
  .experiences-timeline > li {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .experiences-timeline > li > div {
    padding-bottom: 16px;
  }

  .timeline-gallery {
    width: min(160px, 100%);
    margin: 0 0 28px;
  }
}

/* Discreet developer credit within the shared footer. */
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
}

.footer-bottom p {
  margin: 0;
}

.footer-credit {
  padding-right: 72px;
  font-size: .68rem;
}

.footer-credit a {
  color: #bfc8c1;
  text-underline-offset: 3px;
}

.footer-credit a:hover,
.footer-credit a:focus-visible {
  color: white;
  text-decoration: underline;
}
