/* ===== Viva Vida Preá — design tokens ===== */
:root {
  --cream: #f6f2e9;
  --sand: #ece3d1;
  --sand-dark: #d9cbaa;
  --charcoal: #262220;
  --ink: #3a332c;
  --wood: #8a5a35;
  --green: #445540;
  --green-dark: #2f3d2c;
  --white: #ffffff;
  --whatsapp: #25d366;

  --serif: "Optima", "Candara", "Century Gothic", "Noto Sans", sans-serif;
  --sans: "Optima", "Candara", "Century Gothic", "Noto Sans", sans-serif;

  --container: 1180px;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  color: var(--charcoal);
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--green);
  font-weight: 500;
  margin-bottom: 0.8em;
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); }
.btn-outline { background: transparent; border-color: currentColor; color: var(--charcoal); }
.btn-outline:hover { background: var(--charcoal); color: var(--white); }
.btn-light { background: var(--white); color: var(--charcoal); }
.btn-light:hover { background: var(--sand); }
.btn-whatsapp { background: var(--whatsapp); color: var(--white); }
.btn-whatsapp:hover { background: #1eb857; }
.btn-sm { padding: 10px 20px; font-size: 0.75rem; }
.btn-icon { width: 18px; height: 18px; flex-shrink: 0; fill: currentColor; }

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(246, 242, 233, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  color: var(--charcoal);
}
.logo svg {
  height: 34px;
  width: auto;
}
@media (min-width: 900px) {
  .logo svg { height: 40px; }
}

.main-nav {
  display: none;
}
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 34px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a.active {
  border-bottom-color: var(--green);
  color: var(--green);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-whatsapp {
  display: none;
}

.hamburger {
  width: 42px;
  height: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 4px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--charcoal);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  top: 72px;
  right: 0;
  left: 0;
  height: calc(100vh - 72px);
  height: calc(100dvh - 72px);
  background: var(--cream);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 99;
  overflow-y: auto;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
}
.mobile-nav li { border-bottom: 1px solid rgba(0,0,0,0.08); }
.mobile-nav a {
  display: block;
  padding: 18px 4px;
  font-family: var(--serif);
  font-size: 1.3rem;
}
.mobile-nav .mobile-cta { padding: 24px; }

body.nav-open { overflow: hidden; }

@media (min-width: 900px) {
  .main-nav { display: block; }
  .header-whatsapp { display: inline-flex; }
  .hamburger { display: none; }
  .mobile-nav { display: none; }
  .back-home { display: none; }
}

.back-home {
  position: fixed;
  top: 84px;
  left: 14px;
  z-index: 90;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--charcoal);
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
.back-home svg { width: 20px; height: 20px; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 560px;
  min-height: 85vh;
  max-height: 880px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  color: var(--white);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(38,34,32,0.15) 0%, rgba(38,34,32,0.15) 40%, rgba(38,34,32,0.78) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding-bottom: 60px;
  max-width: 720px;
}
.hero .eyebrow { color: var(--sand); }
.hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 6vw, 3.4rem);
}
.hero p.lead {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.9);
  max-width: 520px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }

.page-hero {
  min-height: 46vh;
}
.page-hero .hero-content { padding-bottom: 40px; }

/* ===== Sections ===== */
section { padding: 76px 0; }
.section-tight { padding: 50px 0; }
.section-alt { background: var(--sand); }
.section-dark { background: var(--green-dark); color: var(--sand); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .eyebrow { color: var(--sand-dark); }

.section-head {
  max-width: 680px;
  margin: 0 auto 40px;
  text-align: center;
}

/* ===== Property cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 760px) {
  .card-grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.property-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(38,34,32,0.08);
  display: flex;
  flex-direction: column;
}
.property-card .img-wrap { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.property-card .img-wrap > img:first-child { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.property-card:hover .img-wrap > img:first-child { transform: scale(1.05); }
.section-banner {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 220px;
  margin-bottom: 30px;
}
.section-banner img:first-child { width: 100%; height: 100%; object-fit: cover; }
.section-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(38,34,32,0) 35%, rgba(38,34,32,0.6) 100%);
}
.section-banner-logo {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  height: 64px;
  width: auto !important;
  max-width: 70%;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
  z-index: 1;
}
.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--sand);
  color: var(--wood);
  font-size: 0.85rem;
  padding: 20px;
}
.card-logo-badge {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: 34% !important;
  height: auto !important;
  max-width: 150px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
  pointer-events: none;
}

/* ===== Carousel ===== */
.carousel { position: relative; width: 100%; height: 100%; overflow: hidden; }
.carousel-track { display: flex; width: 100%; height: 100%; transition: transform 0.35s ease; }
.carousel-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; }
.carousel:hover .carousel-track img { transform: none; }
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(38,34,32,0.5);
  color: var(--white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  z-index: 2;
}
.carousel-btn:hover { background: rgba(38,34,32,0.8); }
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }
.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}
.carousel-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  padding: 0;
  border: none;
  cursor: pointer;
}
.carousel-dots .dot.active { background: var(--white); }
.house-detail .carousel { aspect-ratio: 16/10; border-radius: var(--radius); margin-bottom: 8px; }
.property-card .card-body { padding: 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.property-card h3 { margin-bottom: 2px; }
.property-card .tag {
  align-self: flex-start;
  background: var(--sand);
  color: var(--green-dark);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}
.property-card .card-actions { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; padding-top: 8px; }

/* ===== Feature split (image + text) ===== */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; gap: 60px; }
  .split.reverse .split-media { order: 2; }
}
.split-media img { border-radius: var(--radius); }
.split-text ul { padding-left: 1.1em; margin: 1em 0; }
.split-text li { margin-bottom: 0.4em; }

/* ===== House detail block ===== */
.house-detail {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px;
  margin-top: 22px;
  box-shadow: 0 12px 30px rgba(38,34,32,0.06);
}
.house-detail[hidden] { display: none; }

.spec-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  font-size: 0.92rem;
}
@media (min-width: 520px) {
  .spec-list { grid-template-columns: 1fr 1fr; }
}
.spec-list li { display: flex; gap: 8px; }
.spec-list li::before { content: "—"; color: var(--green); }

.policy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 18px 0;
}
@media (min-width: 600px) { .policy-grid { grid-template-columns: repeat(4, 1fr); } }
.policy-item {
  background: var(--sand);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  font-size: 0.8rem;
}
.policy-item .status { display: block; font-family: var(--serif); font-size: 1rem; margin-top: 4px; color: var(--wood); }

.map-placeholder {
  border: 1.5px dashed var(--sand-dark);
  border-radius: var(--radius);
  background: var(--sand);
  padding: 40px 20px;
  text-align: center;
  color: var(--ink);
  font-size: 0.85rem;
}

.todo-note {
  font-size: 0.78rem;
  color: var(--wood);
  background: #fbf0e2;
  border-left: 3px solid var(--wood);
  padding: 8px 12px;
  margin: 10px 0;
  border-radius: 3px;
}

.toggle-details {
  background: none;
  border: 1px solid var(--charcoal);
  border-radius: var(--radius);
  padding: 10px 18px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.toggle-details:hover { background: var(--charcoal); color: var(--white); }

/* ===== CTA banner ===== */
.cta-banner {
  background: var(--green);
  color: var(--white);
  text-align: center;
  padding: 70px 20px;
}
.cta-banner h2 { color: var(--white); }
.cta-banner p { color: rgba(255,255,255,0.85); max-width: 560px; margin-left: auto; margin-right: auto; }

/* ===== Footer ===== */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.75);
  padding: 60px 0 24px;
  font-size: 0.88rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.site-footer h4 { color: var(--white); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--sans); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a:hover { color: var(--white); }
.footer-logo { color: var(--white); margin-bottom: 14px; }
.footer-logo svg { display: block; height: 40px; width: auto; }
.footer-bottom {
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: 0.76rem;
  color: rgba(255,255,255,0.5);
}

/* ===== Floating WhatsApp ===== */
.float-whatsapp {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--whatsapp);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  z-index: 90;
}
.float-whatsapp svg { width: 28px; height: 28px; fill: var(--white); }

/* ===== Utilities ===== */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.small { font-size: 0.85rem; }
