/* ── Design Tokens ── */
:root {
  --cream:       #FAF8F3;
  --white:       #FFFFFF;
  --green:       #2D6A4F;
  --green-dark:  #1B4332;
  --gold:        #C9A84C;
  --text:        #1A1A1A;
  --text-muted:  #6B6B6B;
  --serif:       'Playfair Display', Georgia, serif;
  --sans:        'Inter', system-ui, sans-serif;
  --transition:  0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { background: var(--cream); color: var(--text); font-family: var(--sans); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
ul { list-style: none; }

/* ── Typography utilities ── */
.section-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 500;
  margin-bottom: 1.25rem;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.12;
  margin-bottom: 2rem;
}

/* ── Layout utility ── */
.section-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* ── Button ── */
.btn-primary {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--green);
  color: var(--white);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.25s, transform 0.25s;
}
.btn-primary:hover { background: var(--gold); transform: translateY(-2px); }

/* ── Navbar on light (cream hero) background ── */
#navbar.on-light { color: var(--text); }
#navbar.on-light .nav-links a { color: var(--text); }
#navbar.on-light .nav-toggle span { background: var(--text); }
#navbar.on-light .nav-logo img { filter: brightness(0); }

/* ── Navbar ── */
#navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  padding: 1.25rem 2.5rem;
  color: var(--white);
  transition: background 0.35s, box-shadow 0.35s, padding 0.35s, transform 0.35s;
}
#navbar.nav-hidden { transform: translateY(-100%); }

/* Gradient backdrop only over the dark intro canvas */
#navbar:not(.on-light):not(.scrolled) {
  background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, transparent 100%);
}
#navbar.scrolled {
  background: var(--white);
  color: var(--text);
  box-shadow: 0 2px 24px rgba(0,0,0,0.07);
  padding: 0.75rem 2.5rem;
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}
/* push links to fill space, actions stay at the end */
.nav-links { flex: 1; }

/* ── Nav actions: lang switcher + CTA ── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}
.lang-switcher {
  display: flex;
  gap: 0;
}
.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: inherit;
  opacity: 0.45;
  padding: 0.3rem 0.4rem;
  transition: opacity 0.2s;
  line-height: 1;
}
.lang-btn:hover,
.lang-btn.active { opacity: 1; }
.lang-btn.active { font-weight: 700; }
.nav-cta {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
  transition: background 0.22s, color 0.22s, border-color 0.22s;
}
.nav-cta:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
#navbar.scrolled .nav-cta:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
.nav-logo img {
  height: 44px;
  width: auto;
  transition: filter 0.35s;
}
#navbar.scrolled .nav-logo img {
  filter: brightness(0);
}
.nav-links {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
}
.nav-links a {
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  transition: color 0.2s;
}
#navbar.scrolled .nav-links a { color: var(--text); }
.nav-links a:hover { color: var(--gold) !important; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform 0.3s, opacity 0.3s, background 0.3s;
}
#navbar.scrolled .nav-toggle span { background: var(--text); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
@media (max-width: 767px) {
  #navbar {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-100%);
  }
  #navbar.mobile-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav-inner {
    position: relative;
    justify-content: flex-end;
  }
  .nav-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }           /* CTA lives in mobile menu instead */
  .nav-contact-mobile { display: list-item; }
  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--white);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 998;
  }
  .nav-links.open { display: flex; }
  .nav-links a { color: var(--text) !important; font-size: 1.1rem; }
  .lang-btn { color: var(--text); opacity: 0.5; }
  .lang-btn:hover, .lang-btn.active { opacity: 1; }
}
@media (min-width: 768px) {
  .nav-contact-mobile { display: none; } /* hidden in desktop ul, shown as CTA button */
}

/* ── Intro Animation ── */
#intro-section {
  height: 300vh;
  position: relative;
}
.intro-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
#intro-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #0d0d0d;
}
#intro-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  color: var(--white);
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.10) 50%, rgba(0,0,0,0.50) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  padding: 8rem 2rem 2rem 2rem;
}
#intro-overlay.visible { opacity: 1; pointer-events: auto; }
.intro-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
  margin-bottom: auto;
}
.intro-logo {
  width: 50%;
  max-width: 500px;
  min-width: 250px;
  margin-bottom: 1.5rem;
}
.intro-tagline {
  font-size: 1.15rem;
  font-weight: 300;
  margin-bottom: 2rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.intro-label {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--white);
  text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
.intro-btn { 
  pointer-events: auto; 
  background: rgba(45, 106, 79, 0.9);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(5px);
}
.intro-btn:hover {
  background: var(--green);
}
.intro-features {
  display: flex;
  justify-content: center;
  gap: 3rem;
  width: 100%;
  max-width: 1000px;
  margin-bottom: 2rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 2rem;
}
.intro-feature {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.intro-feature i {
  width: 28px;
  height: 28px;
  stroke-width: 1.5;
  color: var(--white);
  opacity: 0.9;
}
.intro-feature h4 {
  font-family: var(--serif);
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 400;
}
.intro-feature p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
}
.intro-scroll {
  margin-bottom: 1rem;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

@media (max-width: 767px) {
  .intro-features {
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-top: 1.5rem;
  }
  .intro-feature {
    flex: 1 1 40%;
  }
}
.intro-title {
  font-family: var(--serif);
  font-size: clamp(3rem, 9vw, 8rem);
  line-height: 1.05;
  margin-bottom: 3rem;
  text-shadow: 0 2px 30px rgba(0,0,0,0.4);
}
.intro-btn { pointer-events: auto; }

/* ── Hero ── */
#hero-section {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 6rem;
}
.hero-title {
  font-size: clamp(3.5rem, 9vw, 8rem) !important;
  margin-bottom: 2rem;
}
.hero-body {
  max-width: 480px;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

/* ── Scroll Reveal ── */
.reveal-fade,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition: opacity var(--transition), transform var(--transition);
  transition-delay: var(--delay, 0s);
}
.reveal-fade  { transform: translateY(40px); }
.reveal-left  { transform: translateX(-60px); }
.reveal-right { transform: translateX(60px); }

.reveal-fade.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
  opacity: 1;
  transform: translate(0);
}

/* ── About ── */
#about-section {
  padding: 9rem 0 6rem;
  background: var(--white);
}
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7rem;
  align-items: center;
}
.about-text p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.about-image img {
  width: 100%;
  height: 580px;
  object-fit: cover;
}

@media (max-width: 900px) {
  .about-inner { grid-template-columns: 1fr; gap: 3rem; }
  .about-image img { height: 340px; }
}

/* ── Villas Section ── */
#villas-section { padding: 6rem 0; }

.villa-article {
  padding: 7rem 0;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.villa-article:nth-child(even) { background: var(--white); }

.villa-header {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}
.villa-number {
  font-family: var(--serif);
  font-size: clamp(5rem, 12vw, 11rem);
  line-height: 0.85;
  color: var(--green);
  opacity: 0.18;
  font-style: italic;
  -webkit-user-select: none;
  user-select: none;
}
.villa-name {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

/* ── Slider ── */
.slider-wrap {
  position: relative;
  margin-bottom: 3rem;
  overflow: hidden;
}
.slider-track {
  display: flex;
  gap: 1.25rem;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  will-change: transform;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  touch-action: pan-y;
}
.slider-track.dragging { cursor: grabbing; transition: none; }
.slider-slide {
  flex: 0 0 calc(60% - 0.625rem);
  min-width: 0;
}
.slider-slide img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  pointer-events: none;
}
.slider-caption {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.slider-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.slider-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--text);
  background: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.slider-btn:hover { background: var(--green); border-color: var(--green); color: var(--white); }
.slider-counter {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  min-width: 60px;
}

/* ── Floor plan slides (inside slider) ── */
.slider-slide--plan img {
  object-fit: contain;
  background: #f0ece3;
  padding: 1.5rem;
}

@media (max-width: 767px) {
  .slider-slide { flex: 0 0 85%; }
  .slider-slide img { height: 260px; }
  .slider-slide--plan img { padding: 1rem; }
}

/* ── Payment terrain image ── */
.payment-terrain {
  margin-top: 3.5rem;
  text-align: left;
}

/* ── Contact ── */
#contact-section {
  padding: 9rem 0;
  background: var(--green-dark);
  color: var(--white);
}
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}
#contact-section .section-label { color: var(--gold); }
#contact-section .section-title { color: var(--white); }
.contact-text p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.65);
}
.contact-cta {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
  --delay: 0.2s;
}
.btn-large { padding: 1.2rem 3rem; font-size: 0.9rem; }
.btn-outline {
  display: inline-block;
  padding: 1rem 2.5rem;
  border: 1.5px solid rgba(255,255,255,0.35);
  color: var(--white);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: border-color 0.2s, background 0.2s;
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }

@media (max-width: 767px) {
  .contact-inner { grid-template-columns: 1fr; gap: 3rem; }
}

/* ── Image Modal ── */
.image-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.image-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.image-modal .modal-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--white);
  font-size: 3rem;
  cursor: pointer;
  line-height: 1;
  z-index: 2001;
}
.image-modal .modal-content {
  max-width: 90vw;
  max-height: 90vh;
}
.image-modal .modal-content img {
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

/* ── Footer ── */
#site-footer {
  padding: 3rem 0;
  background: #0d1a14;
  color: rgba(255,255,255,0.5);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-logo img { height: 36px; width: auto; opacity: 0.75; }
.footer-copy { font-size: 0.78rem; }
.footer-nav { display: flex; gap: 2rem; }
.footer-nav a {
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--gold); }

@media (max-width: 600px) {
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-nav { justify-content: center; flex-wrap: wrap; }
}

/* ── Mobile responsive pass ── */
@media (max-width: 767px) {
  /* Navbar */
  #navbar { padding: 1rem 1.25rem; }

  /* Section padding */
  .section-inner { padding: 0 1.25rem; }
  #hero-section  { padding: 6rem 0 4rem; }
  #about-section { padding: 5rem 0; }
  #villas-section .villa-article { padding: 4rem 0; }
  #contact-section { padding: 5rem 0; }

  /* Intro overlay title */
  .intro-title { font-size: clamp(2.2rem, 12vw, 4rem) !important; }

  /* Villa number decorative */
  .villa-number { font-size: clamp(4rem, 18vw, 7rem); }
}

@media (max-width: 480px) {
  .btn-primary, .btn-outline { width: 100%; text-align: center; }
  .contact-cta { width: 100%; }
  .slider-slide { flex: 0 0 92%; }
}

/* ── Hero Stats ── */
.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 3rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(0,0,0,0.1);
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
.hero-stat { display: flex; flex-direction: column; gap: 0.25rem; }
.stat-num {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  line-height: 1;
  color: var(--green);
}
.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
@media (max-width: 480px) {
  .hero-stats { gap: 1.5rem; }
  .stat-num { font-size: 1.5rem; }
}

/* ── Villa meta / specs ── */
.villa-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-bottom: 1.5rem;
}
.villa-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.meta-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--green);
}
.villa-price {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--green);
  margin-top: 0.5rem;
}
.villa-description {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 2.5rem;
}
.villa-header-info { display: flex; flex-direction: column; }

/* ── Amenities ── */
#amenities-section {
  padding: 8rem 0;
  background: var(--green-dark);
  color: var(--white);
}
#amenities-section .section-label { color: var(--gold); }
#amenities-section .section-title { color: var(--white); }
.amenities-header { margin-bottom: 4rem; }
.amenities-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.amenity-item {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 2rem 1.5rem;
  transition: background 0.25s, border-color 0.25s;
}
.amenity-item:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--gold);
}
.amenity-icon { width: 2rem; height: 2rem; display: block; margin-bottom: 1rem; color: var(--gold); }
.amenity-item h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--white);
}
.amenity-item p { font-size: 0.88rem; line-height: 1.65; color: rgba(255,255,255,0.6); }

@media (max-width: 1024px) { .amenities-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .amenities-grid { grid-template-columns: 1fr; } }

/* ── Payment Plan ── */
#payment-section {
  padding: 8rem 0;
  background: var(--white);
}
.payment-header { margin-bottom: 1.5rem; }
.payment-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 3.5rem;
}
.payment-steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border: 1px solid rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}
.payment-step {
  padding: 2rem 1.5rem;
  border-right: 1px solid rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.payment-step:last-child { border-right: none; }
.step-pct {
  font-family: var(--serif);
  font-size: 1.8rem;
  color: var(--green);
  line-height: 1;
}
.step-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}
.step-desc {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.payment-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}
@media (max-width: 900px) {
  .payment-steps { grid-template-columns: repeat(3, 1fr); }
  .payment-step:nth-child(3) { border-right: none; }
  .payment-step:nth-child(4) { border-top: 1px solid rgba(0,0,0,0.1); }
}
@media (max-width: 600px) {
  .payment-steps { grid-template-columns: repeat(2, 1fr); }
  .payment-step:nth-child(2n) { border-right: none; }
  .payment-step:nth-child(3) { border-right: 1px solid rgba(0,0,0,0.1); }
  .payment-step:nth-child(3), .payment-step:nth-child(4) { border-top: 1px solid rgba(0,0,0,0.1); }
}

/* ── Contact status ── */
.contact-status {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.05em;
}
