/* VARIABLES & RESET */
:root {
  --accent: #a35a4d; /* Warmer, earthy accent color */
  --card: #2c2522; /* Darker, warmer card background */
  --background: #191412; /* Very dark, warm background */
  --text-main: #fcf9f7;
  --text-muted: #c0b9b3;
  --max: 1200px;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
*, *::before, *::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--text-main);
  background: var(--background);
}
a {
  color: inherit;
  text-decoration: none;
}
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}
/* HEADER SMART SCROLL EFFECT */
header {
  transition: transform 0.4s ease, opacity 0.4s ease, background 0.4s ease;
}

header.hidden {
  transform: translateY(-100%);
  opacity: 0;
}

header.visible {
  transform: translateY(0);
  opacity: 0.8; /* slightly faded when returning */
  background: rgba(0, 0, 0, 0.8); /* optional darker look */
}



/* TYPOGRAPHY */
h1 {
  font-size: 56px;
  margin: 6px 0;
  line-height: 0.95;
  color: var(--text-main);
  text-shadow: 4px 6px 0 rgba(0,0,0,0.35);
  font-family: 'Playfair Display', Georgia, serif;
}
/* HERO TEXT ANIMATIONS */
.hero-right h1,
.hero-right .lead,
.hero-right li {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s ease forwards;
}

.hero-right h1 {
  animation-delay: 0.2s;
}
.hero-right .lead {
  animation-delay: 0.5s;
}
.hero-right li:nth-child(1) {
  animation-delay: 0.8s;
}
.hero-right li:nth-child(2) {
  animation-delay: 1.0s;
}
.hero-right li:nth-child(3) {
  animation-delay: 1.2s;
}

/* animation keyframes */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* optional smoother look when page reloads */
.hero-right {
  will-change: transform, opacity;
}

.props-title {
  color: var(--text-main);
  font-size: 36px;
  margin: 6px 0 18px;
  font-family: 'Merriweather', serif;
}
.card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  color: var(--text-main);
}
.card p, p.lead, footer {
  color: var(--text-muted);
}
.contact-right h2 {
  font-family: 'Patrick Hand', cursive;
  font-size: 48px;
  margin: 6px 0;
}

/* NAVIGATION */
header {
  background: rgba(0,0,0,0.6);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--text-main);
}
.logo {
  height: 46px;
  object-fit: contain;
}
nav a {
  margin-left: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 600;
  color: #f7f0e6;
}
nav a.cta {
  background: var(--accent);
  color: white;
}

/* BUTTONS & LEADS */
p.lead {
  font-size: 18px;
  margin: 8px 0 20px;
}
.btn-row {
  display: flex;
  gap: 12px;
}
.btn {
  background: var(--accent);
  padding: 12px 18px;
  border-radius: 10px;
  color: white;
  font-weight: 700;
  transition: background 0.3s;
}
.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
}
.btn:hover:not(.ghost) {
  background: #8b4c41;
}

/* HERO */
.hero {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 18px;
  align-items: center;
  padding: 28px 0;
}
.hero-left {
  min-height: 420px;
  background-image: url('./images/front.jpg');
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}
.hero-right {
  padding: 18px 0;
}
.hero ul {
  color: var(--text-muted);
  margin-top: 18px;
  padding-left: 18px;
  list-style: disc;
}

/* PROPERTIES (full-bleed background + overlay) */
section.properties {
  padding: 36px 0;
  /* dark gradient overlay + background image */
  background:
    linear-gradient(180deg, rgba(25,20,18,0.65), rgba(25,20,18,0.85)),
    url('./images/bg-properties.jpg') center/cover no-repeat;
  background-attachment: scroll; /* change to 'fixed' for desktop parallax if desired */
  color: var(--text-main);
}

/* slightly stronger card contrast so they stand out over the photo */
.properties .card {
  background: rgba(28, 24, 22, 0.78); /* semi-opaque card */
  border: 1px solid rgba(255,255,255,0.04);
  backdrop-filter: blur(4px); /* optional; remove for older browsers */
}

.props-title {
  text-shadow: 0 6px 18px rgba(0,0,0,0.55);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
/* --- CARD INTERACTION EFFECTS --- */
.card {
  position: relative;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 35px rgba(0,0,0,0.5);
}

.card img {
  transition: transform 0.3s ease;
}

.card:hover img {
  transform: translateY(-4px); /* subtle upward motion */
}
/* PROPERTIES: smoother fade-in + small lift */
#properties {
  opacity: 0;
  transform: translateY(14px);           /* smaller travel = smoother */
  transition: opacity 720ms cubic-bezier(.16,.86,.24,1),
              transform 720ms cubic-bezier(.16,.86,.24,1);
  will-change: opacity, transform;
}

/* when in view */
#properties.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* initial state for cards (children) */
#properties .card {
  opacity: 0;
  transform: translateY(8px);
  will-change: opacity, transform;
  /* main transition; delays set dynamically in JS for precise staggering */
  transition: opacity 520ms cubic-bezier(.22,.9,.23,1),
              transform 520ms cubic-bezier(.22,.9,.23,1);
}

/* when parent has class, cards will animate to visible */
#properties.in-view .card {
  opacity: 1;
  transform: translateY(0);
}

/* small tweak for the title within the section (optional) */
#properties .props-title {
  transition: opacity 600ms cubic-bezier(.16,.86,.24,1),
              transform 600ms cubic-bezier(.16,.86,.24,1);
  opacity: 0;
  transform: translateY(10px);
}
#properties.in-view .props-title {
  opacity: 1;
  transform: translateY(0);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  #properties,
  #properties * {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}



/* --- ENLARGED PREVIEW MODAL --- */
.image-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.image-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.image-modal img {
  width: 70%;
  max-width: 550px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.image-modal.active img {
  transform: scale(1);
}

.image-modal::after {
  content: "✕";
  position: absolute;
  top: 22px;
  right: 32px;
  color: white;
  font-size: 26px;
  cursor: pointer;
  transition: transform 0.2s;
}

.image-modal::after:hover {
  transform: scale(1.15);
}
.card {
  background: var(--card);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  filter: brightness(0.98);
}
.card .meta {
  padding: 18px;
  background: #3a312e;
}

/* CONTACT */
section.contact {
  display: grid;
  grid-template-columns: 1fr 520px;
  gap: 0;
  align-items: stretch;
  padding: 0;
  min-height: 400px;
  background: linear-gradient(180deg, #191412 0%, #1c182a 100%);
}
.contact-left {
  background-image: url('./images/outro.jpg');
  background-size: cover;
  background-position: center;
}
.contact-right {
  background: linear-gradient(180deg, #574845 0%, #8b7774 100%);
  padding: 48px;
  color: white;
}
.contact-right hr {
  border: none;
  border-top: 2px solid rgba(0,0,0,0.15);
  margin: 18px 0 6px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}
.icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 24px;
}
.contact-item strong {
  font-size: 20px;
}
.address, .contact-item > div:last-child {
  color: rgba(255,255,255,0.85);
}
.address {
  margin-top: 12px;
}

/* FOOTER */
footer {
  padding: 20px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background-color: #120e0d;
}
footer div {
  padding: 10px 0;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 28px 20px;
  }
  .hero-right {
    order: 2;
    padding: 0;
  }
  .hero-left {
    order: 1;
    height: 360px;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  section.contact {
    grid-template-columns: 1fr;
  }
  .contact-left {
    height: 360px;
  }

  /* reduce overlay darkness on smaller screens so cards remain clear */
  section.properties {
    background:
      linear-gradient(180deg, rgba(25,20,18,0.55), rgba(25,20,18,0.7)),
      url('./images/background.jpg') center/cover no-repeat;
  }
}
@media (max-width: 640px) {
  h1 {
    font-size: 34px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .hero-left {
    height: 240px;
  }
  .contact-right {
    padding: 22px;
  }
  .wrap {
    padding: 0 15px;
  }
  nav a {
    margin-left: 6px;
    padding: 6px 8px;
    font-size: 14px;
  }
}
