:root {
  --ink: #1C1B17;
  --body-text: #3A3831;
  --sand: #F3ECDF;
  --sand-deep: #EFE1C9;
  --teal: #14342F;
  --teal-mid: #3C6153;
  --palm: #5B7A6A;
  --terracotta: #B75C3B;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Public Sans', system-ui, sans-serif;
  background: var(--sand);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  margin: 0;
  color: var(--teal);
  font-weight: 500;
}

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

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 64px;
}

.hairline {
  border: none;
  border-top: 1px solid rgba(28, 27, 23, 0.15);
  margin: 0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
}
.btn-dark { background: var(--teal); color: var(--sand); }
.btn-dark:hover { background: #0e2621; }
.btn-accent { background: var(--terracotta); color: var(--sand); padding: 12px 22px; font-size: 14px; }
.btn-accent:hover { background: #9c4b2f; }

.link-underline {
  font-size: 15px;
  font-weight: 500;
  color: var(--teal);
  border-bottom: 1px solid var(--teal);
  padding-bottom: 2px;
}

.ph {
  color: var(--palm);
  font-style: italic;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: var(--sand);
  z-index: 10;
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  padding-bottom: 24px;
}
.logo {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--teal);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a:not(.btn) {
  font-size: 15px;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--teal);
  border-radius: 1px;
}

/* Hero */
.hero {
  padding: 160px 0 96px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  min-height: 560px;
}
.hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 640px;
}
.tag {
  font-size: 14px;
  color: var(--palm);
  font-weight: 500;
  margin: 0;
}
.tag-light { color: #DCE8DF; }
.hero-title {
  font-size: 50px;
  line-height: 1.1;
  color: #F3ECDF;
}
.lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--body-text);
  max-width: 480px;
  margin: 0;
}
.lead-light { color: #E7E1D2; }
.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 6px;
}
.btn-light { background: #F3ECDF; color: var(--teal); }
.btn-light:hover { background: #E7E1D2; }
.link-light { color: #F3ECDF; border-bottom-color: #F3ECDF; }

/* Hero search bar */
.search-bar {
  display: flex;
  align-items: stretch;
  gap: 12px;
  background: #F3ECDF;
  padding: 10px;
  border-radius: 3px;
  max-width: 560px;
  margin-top: 8px;
}
.search-field {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 14px;
  min-width: 0;
}
.search-label {
  font-size: 12px;
  color: var(--palm);
  font-weight: 500;
}
.search-field input {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  padding: 0;
  min-width: 0;
}
.search-field input:focus { outline: none; }
.search-submit {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.hero-contact-link {
  margin-top: 4px;
  width: fit-content;
}

/* Trust strip */
.trust-strip {
  background: var(--sand-deep);
  padding: 32px 0;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--body-text);
}
.trust-item svg {
  flex-shrink: 0;
  color: var(--teal);
}

/* Filter chips */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.chip {
  font-family: inherit;
  font-size: 14px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(28,27,23,0.2);
  background: none;
  color: var(--body-text);
  cursor: pointer;
}
.chip:hover { border-color: var(--teal); }
.chip.is-active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--sand);
}
.no-results {
  text-align: center;
  padding: 40px 0;
  color: var(--body-text);
  font-size: 15px;
}

/* Intro / quick facts */
.intro { padding: 72px 0; }
.intro-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 48px;
  align-items: start;
}
.intro-copy h2 { font-size: 30px; margin-bottom: 16px; }
.intro-copy p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--body-text);
  margin: 0;
  max-width: 520px;
}
.intro-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid rgba(28,27,23,0.15);
  padding-top: 12px;
}
.fact-label { font-size: 13px; color: var(--palm); }
.fact-value { font-family: 'Fraunces', serif; font-size: 24px; color: var(--teal); }

/* Section head (reused by gallery) */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 40px;
}
.section-head p {
  max-width: 380px;
  color: var(--body-text);
  font-size: 15px;
  margin: 0;
}

/* Gallery */
.gallery { padding: 88px 0; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 220px;
  gap: 16px;
}
.gallery-item {
  position: relative;
  border: none;
  padding: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  overflow: hidden;
  border-radius: 2px;
  display: block;
}
.gallery-item.span-2 {
  grid-column: span 2;
  grid-row: span 2;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}
.gallery-caption {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  padding: 10px 14px;
  font-size: 13px;
  color: #F3ECDF;
  background: linear-gradient(180deg, rgba(20,52,47,0) 0%, rgba(20,52,47,0.75) 100%);
  text-align: left;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(12, 20, 18, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  z-index: 100;
}
.lightbox.open { display: flex; }
.lightbox-figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.lightbox-figure img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 2px;
  display: block;
}
.lightbox-figure figcaption {
  color: #F3ECDF;
  font-size: 14px;
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: #F3ECDF;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
}

/* Villas listing (homepage) */
.villas { padding: 88px 0; }
.villa-listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}
.villa-listing-card {
  display: flex;
  flex-direction: column;
  border-radius: 2px;
  overflow: hidden;
  background: var(--sand-deep);
  transition: transform 0.2s ease;
}
.villa-listing-card:hover { transform: translateY(-4px); }
.villa-listing-image {
  height: 260px;
  overflow: hidden;
}
.villa-listing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.villa-listing-body {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.villa-listing-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--palm);
}
.villa-listing-facts { font-size: 13px; }
.villa-listing-name { font-size: 26px; }
.villa-listing-body p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--body-text);
  margin: 0;
}
.villa-listing-body .link-underline { margin-top: 8px; width: fit-content; }

/* Breadcrumb (villa detail page) */
.breadcrumb {
  padding: 20px 64px 0;
}

/* Location */
.location {
  background: var(--teal);
  color: var(--sand);
  padding: 88px 0;
}
.location-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 24px;
}
.location h2 { color: var(--sand); font-size: 32px; }
.location-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.location-copy p {
  font-size: 17px;
  line-height: 1.7;
  margin: 0;
  color: #E7E1D2;
}
.location-copy .ph { color: #cfd8c8; }

/* Included */
.included { padding: 88px 0; }
.included h2 { font-size: 32px; margin-bottom: 40px; }
.included-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}
.included-grid h4 {
  font-size: 15px;
  color: var(--teal);
  margin-bottom: 8px;
}
.included-grid p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--body-text);
  margin: 0;
}

/* Testimonial */
.testimonial {
  padding: 88px 0;
  display: flex;
  justify-content: center;
  text-align: left;
}
.testimonial blockquote {
  max-width: 640px;
  margin: 0 auto;
  font-family: 'Fraunces', serif;
  font-size: 25px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--teal);
}
.testimonial cite {
  display: block;
  font-family: 'Public Sans', sans-serif;
  font-style: normal;
  font-size: 14px;
  color: var(--palm);
  margin-top: 16px;
}

/* Contact */
.contact {
  background: var(--sand-deep);
  padding: 72px 0 56px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 40px;
}
.contact-intro h2 { font-size: 30px; margin-bottom: 16px; }
.contact-intro p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--body-text);
  margin: 0;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 420px;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--palm);
}
.contact-form input,
.contact-form textarea {
  font-family: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid rgba(28,27,23,0.25);
  border-radius: 2px;
  background: var(--sand);
  color: var(--ink);
  resize: vertical;
}
.contact-form button {
  width: fit-content;
  margin-top: 4px;
}
.form-note {
  font-size: 14px;
  color: var(--teal);
  margin: 0;
  min-height: 20px;
}

/* Footer */
.site-footer {
  background: var(--sand-deep);
  padding: 0 0 40px;
}
.footer-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  padding-bottom: 32px;
}
.footer-details span:first-child {
  color: var(--palm);
  margin-right: 6px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--palm);
  padding-top: 24px;
}

/* Responsive */
@media (max-width: 900px) {
  .wrap { padding: 0 24px; }
  .breadcrumb { padding: 20px 24px 0; }
  .intro-grid,
  .location-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .included-grid {
    grid-template-columns: 1fr 1fr;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 200px;
  }
  .gallery-item.span-2 {
    grid-column: span 2;
    grid-row: span 1;
  }
  .hero { min-height: 460px; padding: 120px 0 72px; }
  .hero-title { font-size: 36px; }
  .search-bar { flex-direction: column; max-width: 100%; }
  .search-submit { justify-content: center; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--sand);
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
    border-bottom: 1px solid rgba(28,27,23,0.1);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
}

@media (max-width: 600px) {
  .included-grid,
  .intro-facts {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 160px;
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .trust-grid { grid-template-columns: 1fr; }
}
