/* ==========================================================================
   Villa Loto — demo property site (villa-loto.chatlyn.com)
   Palette + type per villa-loto brand package (BRAND_USAGE.md):
   forest #17362E · ivory #F4EFE5 · terracotta #AA6044 · brass #B38A52
   Display: Fraunces · Sans: Source Sans 3 (humanist, per brand fallback rule)
   ========================================================================== */

:root {
  --forest: #17362e;
  --forest-soft: #24473d;
  --ivory: #f4efe5;
  --ivory-bright: #faf7f0;
  --terracotta: #aa6044;
  --brass: #b38a52;
  --brass-soft: #d0b077;
  --ink: #2b3a34;
  --ink-muted: #5d6b64;
  --line: rgba(23, 54, 46, 0.16);

  --font-display: 'Fraunces', 'Bodoni 72', Didot, 'Times New Roman', serif;
  --font-sans: Optima, 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;

  --measure: 62ch;
  --radius: 14px;
  --pad-x: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--terracotta);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--forest);
  line-height: 1.15;
  text-wrap: balance;
}

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1rem;
}

.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  margin-bottom: 1rem;
}

.section-head p {
  color: var(--ink-muted);
  max-width: var(--measure);
}

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-forest {
  background: var(--forest);
  color: var(--ivory);
}

.btn-forest:hover {
  background: var(--forest-soft);
}

.btn-ivory {
  background: var(--ivory);
  color: var(--forest);
}

.btn-ivory:hover {
  background: var(--ivory-bright);
}

.btn-outline {
  background: transparent;
  color: var(--ivory);
  border-color: rgba(244, 239, 229, 0.55);
}

.btn-outline:hover {
  border-color: var(--ivory);
}

/* --- Header ------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 239, 229, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 4.5rem;
}

.brand svg {
  height: 3rem;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.site-nav a:not(.btn) {
  color: var(--forest);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav a:not(.btn):hover {
  color: var(--terracotta);
}

.site-nav a:hover {
  text-decoration: none;
}

.site-nav .btn {
  padding: 0.6rem 1.4rem;
}

@media (max-width: 860px) {
  .site-nav a:not(.btn) {
    display: none;
  }
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: min(88vh, 52rem);
  display: flex;
  align-items: flex-end;
  color: var(--ivory);
  isolation: isolate;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      to top,
      rgba(15, 33, 28, 0.88) 0%,
      rgba(15, 33, 28, 0.45) 45%,
      rgba(15, 33, 28, 0.3) 100%
    ),
    radial-gradient(ellipse at 25% 60%, rgba(15, 33, 28, 0.35) 0%, rgba(15, 33, 28, 0) 60%);
}

.hero-inner {
  width: 100%;
  padding-top: 8rem;
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}

.hero .eyebrow,
.hero h1,
.hero p {
  text-shadow: 0 2px 24px rgba(15, 33, 28, 0.6);
}

.hero .eyebrow {
  color: var(--ivory);
  font-weight: 700;
}

.hero h1 {
  color: var(--ivory);
  font-size: clamp(2.4rem, 6vw, 4.3rem);
  font-weight: 600;
  max-width: 16em;
  margin-bottom: 1.25rem;
}

.hero p {
  max-width: 38rem;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ivory);
  margin-bottom: 2rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.75rem;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2.2rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(244, 239, 229, 0.3);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 239, 229, 0.85);
}

/* --- Intro -------------------------------------------------------------- */

.intro {
  text-align: center;
}

.intro .eyebrow {
  margin-bottom: 1.25rem;
}

.intro h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  max-width: 24em;
  margin: 0 auto 1.5rem;
}

.intro p {
  max-width: var(--measure);
  margin: 0 auto 1.1rem;
  color: var(--ink-muted);
}

.intro-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 2.5rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--forest);
}

.intro-facts span::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brass);
  margin-right: 0.65rem;
  vertical-align: 0.14em;
}

/* --- Cards -------------------------------------------------------------- */

.card-grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(21rem, 100%), 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Below 3 columns, an odd last card would orphan next to an empty cell —
   span it across the full row as a horizontal card instead. */
@media (max-width: 999px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 > .card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    flex-direction: row;
  }

  .grid-3 > .card:last-child:nth-child(odd) img {
    width: 45%;
    height: auto;
    aspect-ratio: auto;
    object-fit: cover;
  }
}

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

  .grid-3 > .card:last-child:nth-child(odd) {
    flex-direction: column;
  }

  .grid-3 > .card:last-child:nth-child(odd) img {
    width: 100%;
    aspect-ratio: 4 / 3;
  }
}

.card {
  background: var(--ivory-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.card.card-square img {
  aspect-ratio: 1 / 1;
}

.card-body {
  padding: 1.5rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.card-body h3 {
  font-size: 1.35rem;
}

.card-body p {
  color: var(--ink-muted);
  font-size: 0.98rem;
  flex: 1;
}

.card-meta {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
}

/* --- Alternating showcase rows ------------------------------------------ */

.showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}

.showcase + .showcase {
  margin-top: clamp(3rem, 7vw, 5.5rem);
}

.showcase img {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.showcase.flip > .showcase-media {
  order: 2;
}

.showcase h3 {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  margin-bottom: 0.9rem;
}

.showcase p {
  color: var(--ink-muted);
  margin-bottom: 0.9rem;
  max-width: var(--measure);
}

.showcase ul {
  list-style: none;
  margin-top: 0.4rem;
}

.showcase li {
  padding-left: 1.4rem;
  position: relative;
  margin-bottom: 0.45rem;
  color: var(--ink-muted);
  font-size: 0.98rem;
}

.showcase li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brass);
}

@media (max-width: 820px) {
  .showcase {
    grid-template-columns: 1fr;
  }

  .showcase.flip > .showcase-media {
    order: 0;
  }
}

/* --- Tinted sections ---------------------------------------------------- */

.section-tint {
  background: #ece5d6;
}

.section-forest {
  background: var(--forest);
  color: rgba(244, 239, 229, 0.88);
}

.section-forest h2,
.section-forest h3 {
  color: var(--ivory);
}

.section-forest .eyebrow {
  color: var(--brass-soft);
}

.section-forest .section-head p {
  color: rgba(244, 239, 229, 0.75);
}

/* --- Location ----------------------------------------------------------- */

.location-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

@media (max-width: 820px) {
  .location-grid {
    grid-template-columns: 1fr;
  }
}

.travel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.travel-table td {
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(244, 239, 229, 0.18);
}

.travel-table td:last-child {
  text-align: right;
  color: var(--brass-soft);
  white-space: nowrap;
}

.location-note {
  margin-top: 1.4rem;
  font-size: 0.92rem;
  color: rgba(244, 239, 229, 0.65);
}

.location-copy p {
  margin-bottom: 1rem;
  color: rgba(244, 239, 229, 0.82);
  max-width: var(--measure);
}

.location-copy address {
  font-style: normal;
  margin-top: 1.5rem;
  padding-left: 1.1rem;
  border-left: 2px solid var(--brass);
  color: var(--ivory);
  line-height: 1.8;
}

/* --- Concierge band ------------------------------------------------------ */

.concierge {
  text-align: center;
}

.concierge h2 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  margin-bottom: 1.2rem;
}

.concierge p {
  max-width: 40rem;
  margin: 0 auto 1rem;
  color: var(--ink-muted);
}

.concierge-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 2rem;
}

.concierge-powered {
  margin-top: 2.25rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* --- Footer -------------------------------------------------------------- */

.site-footer {
  background: var(--forest);
  color: rgba(244, 239, 229, 0.75);
  padding: clamp(3rem, 6vw, 4.5rem) 0 2.5rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(244, 239, 229, 0.18);
}

.footer-brand svg {
  height: 3.2rem;
  width: auto;
}

.footer-contact {
  font-size: 0.95rem;
  line-height: 2;
  text-align: right;
}

.footer-contact a {
  color: var(--brass-soft);
}

.footer-note {
  margin-top: 2rem;
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(244, 239, 229, 0.55);
  max-width: 56rem;
}

.footer-note a {
  color: var(--brass-soft);
}

.footer-legal {
  margin-top: 1rem;
  font-size: 0.85rem;
}

.footer-legal a {
  color: var(--brass-soft);
}

@media (max-width: 640px) {
  .footer-contact {
    text-align: left;
  }
}
