/* Solstice Villas. Refined Adriatic coastal aesthetic.
   System font stack (zero network) for speed; swap in a self-hosted display
   serif (e.g. Fraunces) later without touching markup. */

:root {
  /* Palette: sun-bleached limestone, deep Adriatic, terracotta */
  --sand:        #f4efe7;
  --sand-deep:   #ebe3d6;
  --paper:       #fbf8f3;
  --ink:         #2b2723;
  --ink-soft:    #5c554c;
  --muted:       #8a8178;
  --sea:         #1d4e5f;
  --sea-deep:    #143945;
  --terracotta:  #c66b4a;
  --terracotta-d:#a8543a;
  --line:        #ddd3c4;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Hoefler Text", Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, sans-serif;

  --wrap: 1180px;
  --gap: clamp(1rem, 4vw, 3rem);
  --radius: 3px;
  --shadow: 0 12px 40px -12px rgba(20, 57, 69, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.1rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 1.6rem + 4vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3rem); }
h3 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem); }

p { margin: 0 0 1.1em; max-width: 62ch; }

/* ---- Layout helpers ---- */
.wrap { width: min(100% - 2.4rem, var(--wrap)); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 7rem) 0; }
.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terracotta-d);
  margin: 0 0 1rem;
}
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 58ch; }
.center { text-align: center; margin-inline: auto; }
.center p { margin-inline: auto; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--sans); font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.85em 1.7em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn-primary { background: var(--terracotta); color: #fff; }
.btn-primary:hover { background: var(--terracotta-d); color: #fff; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--sea); color: var(--sea); transform: translateY(-2px); }
.btn-on-dark { background: rgba(255,255,255,0.14); color: #fff; border-color: rgba(255,255,255,0.4); backdrop-filter: blur(6px); }
.btn-on-dark:hover { background: #fff; color: var(--sea-deep); }
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---- Booking modal ---- */
.modal { position: fixed; inset: 0; z-index: 120; display: none; align-items: center; justify-content: center; padding: 1.5rem; background: rgba(15, 30, 36, 0.6); backdrop-filter: blur(4px); }
.modal.open { display: flex; }
.modal-card { position: relative; width: 100%; max-width: 540px; background: var(--paper); border-radius: 8px; padding: clamp(1.8rem, 4vw, 2.6rem); box-shadow: 0 30px 70px -20px rgba(15, 30, 36, 0.55); text-align: center; }
.modal-card h3 { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2rem); margin-bottom: 0.4rem; }
.modal-card .modal-lead { color: var(--ink-soft); margin: 0 auto 1.6rem; max-width: 36ch; }
.modal-contact { display: flex; flex-direction: column; gap: 0.8rem; }
.modal-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 0.9rem 0.75rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--sand); }
.modal-row .info { text-align: left; line-height: 1.3; }
.modal-row .lbl { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.modal-row .val { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.modal-row .btn { padding: 0.55em 1.1em; font-size: 0.88rem; flex: none; min-width: 6rem; justify-content: center; }
.modal-close { position: absolute; top: 0.7rem; right: 0.85rem; width: 2.2rem; height: 2.2rem; background: none; border: 0; font-size: 1.7rem; line-height: 1; color: var(--muted); cursor: pointer; }
.modal-close:hover { color: var(--ink); }

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 239, 231, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav > nav { display: flex; align-items: center; gap: clamp(0.7rem, 2vw, 1.6rem); }
.brand {
  font-family: var(--serif); font-size: 1.35rem; font-weight: 600;
  color: var(--ink); letter-spacing: 0.01em; display: inline-flex; align-items: center; gap: 0.55rem;
}
.brand .mark { width: 22px; height: 22px; color: var(--terracotta); }
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.2rem); list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-soft); font-size: 0.92rem; font-weight: 500; }
.nav-links a:hover { color: var(--ink); }
.lang-switch { font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.lang-switch a { color: var(--muted); }
.lang-switch .active { color: var(--ink); font-weight: 700; }
.btn-nav { padding: 0.6em 1.3em; font-size: 0.9rem; box-shadow: 0 6px 18px -6px rgba(198, 107, 74, 0.75); white-space: nowrap; }
.nav-toggle { display: none; }

/* ---- Hero ---- */
.hero {
  position: relative; min-height: min(86vh, 760px);
  display: flex; align-items: flex-end;
  color: #fff; overflow: hidden;
}
.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(180deg, rgba(20,57,69,0.2) 0%, rgba(20,57,69,0.12) 35%, rgba(20,57,69,0.85) 100%);
}
.hero-inner { padding-bottom: clamp(2.5rem, 6vw, 5rem); padding-top: 4rem; }
.hero h1 { color: #fff; max-width: 16ch; text-shadow: 0 2px 30px rgba(0,0,0,0.45); }
.hero .eyebrow { color: #fbe4d6; text-shadow: 0 1px 16px rgba(0,0,0,0.7), 0 0 2px rgba(0,0,0,0.5); }
.hero p { color: #fff; font-size: 1.2rem; max-width: 46ch; text-shadow: 0 1px 16px rgba(0,0,0,0.45); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.6rem; }

/* ---- Location strip ---- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fact { background: var(--paper); padding: 1.6rem 1.4rem; }
.fact .n { font-family: var(--serif); font-size: 2rem; color: var(--sea); line-height: 1; }
.fact .l { font-size: 0.85rem; color: var(--muted); margin-top: 0.4rem; letter-spacing: 0.03em; }

/* ---- Villa teaser cards (home) ---- */
.villas { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.4rem, 3vw, 2.4rem); }
.villa-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.villa-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.villa-card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.villa-card .body { padding: 1.6rem 1.7rem 1.9rem; display: flex; flex-direction: column; flex: 1; }
.villa-card h3 { margin-bottom: 0.3rem; }
.villa-card .body p { color: var(--ink-soft); flex: 1; }
.villa-card .btn { justify-content: center; }

/* ---- Amenities ---- */
.amenities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.2rem 2rem; max-width: 920px; margin-inline: auto; }
.amenity { display: flex; gap: 0.9rem; align-items: flex-start; }
.amenity svg { width: 26px; height: 26px; color: var(--sea); flex: none; margin-top: 2px; }
.amenity strong { display: block; font-size: 1.02rem; }
.amenity span { color: var(--muted); font-size: 0.92rem; }

/* ---- Split feature row ---- */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.6rem, 4vw, 3.5rem); align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.split.reverse > :first-child { order: 2; }

/* ---- Map embed ---- */
.map-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16 / 9; }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---- Gallery ---- */
.gallery { columns: 3; column-gap: 14px; }
.gallery .ph { break-inside: avoid; margin-bottom: 14px; min-height: 120px; background: var(--sand-deep); border-radius: var(--radius); }
.gallery button {
  display: block; width: 100%; padding: 0; border: 0; margin-bottom: 14px;
  background: var(--sand-deep); border-radius: var(--radius); overflow: hidden;
  cursor: zoom-in; break-inside: avoid; line-height: 0;
}
.gallery img { width: 100%; transition: transform 0.4s ease, filter 0.4s ease; }
.gallery button:hover img { transform: scale(1.04); filter: brightness(1.04); }

/* ---- Lightbox ---- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(15, 30, 36, 0.94);
  align-items: center; justify-content: center;
  padding: clamp(0.5rem, 3vw, 3rem);
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lb-btn {
  position: absolute; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.3);
  color: #fff; width: 52px; height: 52px; border-radius: 50%; font-size: 1.6rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background 0.2s;
}
.lb-btn:hover { background: rgba(255,255,255,0.28); }
.lb-close { top: 1.2rem; right: 1.2rem; }
.lb-prev { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1.2rem; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.8); font-size: 0.9rem; letter-spacing: 0.1em; }

/* ---- CTA band ---- */
.cta-band { background: var(--sea); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.85); margin-inline: auto; }
.cta-note { margin-top: 1.5rem; font-size: 0.85rem; letter-spacing: 0.03em; color: rgba(255,255,255,0.78); max-width: none; }

/* ---- Footer ---- */
.site-footer { background: var(--sea-deep); color: rgba(255,255,255,0.78); padding: clamp(3rem,6vw,4.5rem) 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.site-footer h4 { font-family: var(--serif); color: #fff; font-size: 1.15rem; margin: 0 0 0.9rem; font-weight: 600; }
.site-footer a { color: rgba(255,255,255,0.78); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; line-height: 2.1; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.14); margin-top: 2.5rem; padding-top: 1.5rem; font-size: 0.85rem; color: rgba(255,255,255,0.55); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }

/* ---- Reveal on scroll ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .villas, .split { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .amenities { grid-template-columns: repeat(2, 1fr); gap: 1.8rem 1.5rem; }
  .gallery { columns: 2; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: center; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 0.5rem 1.2rem 1rem; }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; padding: 0.6rem 0; border-bottom: 1px solid var(--line); text-align: center; }
  .nav-toggle { display: inline-flex; background: none; border: 0; cursor: pointer; padding: 0.4rem; }
  .nav-toggle svg { width: 26px; height: 26px; color: var(--ink); }
  .btn-nav { padding: 0.5em 1em; font-size: 0.85rem; }
}
@media (max-width: 600px) {
  .modal-row { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .modal-row .info { text-align: center; }
  .modal-row .btn { width: 100%; min-width: 0; }
  .map-embed { aspect-ratio: 4 / 3; }
  .hero-actions { justify-content: center; }
  .split > div > .btn { display: flex; width: fit-content; margin-inline: auto; }
}
@media (max-width: 520px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-bottom { justify-content: center; text-align: center; }
  .amenities { grid-template-columns: 1fr; width: fit-content; margin-inline: auto; }
  .amenity { align-items: center; }
  .amenity svg { margin-top: 0; }
  .gallery { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
