/* ============================================
   CoNest — Premium Real Estate
   Scroll-driven stacking cards + logo animation
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1a1a1a;
  background: #0c1829;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
}

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

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

/* --- Fixed Logo (animated element) --- */
.logo-wrapper {
  position: fixed;
  z-index: 1000;
  top: 50%;
  left: 50%;
  width: 280px;
  pointer-events: none;
  will-change: transform, width, top, left;
}

.logo-img {
  width: 100%;
  height: auto;
  display: block;
  background: none;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 76px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  will-change: transform, opacity;
}

.nav-left {
  width: 110px;
  flex-shrink: 0;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #1a1a1a;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: #c9a96e;
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: #c9a96e;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-cta {
  background: #0c1829;
  color: #fff !important;
  padding: 10px 24px;
  border-radius: 6px;
  letter-spacing: 0.03em;
  transition: background 0.3s ease, transform 0.3s ease;
}

.nav-cta::after {
  display: none;
}

.nav-cta:hover {
  background: #162a45;
  color: #fff;
  transform: translateY(-1px);
}

/* --- Sections — Stacking Cards --- */
.section {
  position: sticky;
  top: 0;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
}

.splash {
  z-index: 1;
  background: #ece9e4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero {
  z-index: 2;
  background: radial-gradient(ellipse at 30% 20%, #162a45 0%, #0c1829 60%);
  color: #ffffff;
  box-shadow: 0 -30px 80px rgba(0, 0, 0, 0.5);
  border-radius: 28px 28px 0 0;
}

.about {
  z-index: 3;
  background: #f8f6f3;
  box-shadow: 0 -30px 80px rgba(0, 0, 0, 0.12);
  border-radius: 28px 28px 0 0;
}

.properties {
  z-index: 4;
  background: radial-gradient(ellipse at 70% 80%, #162a45 0%, #0c1829 60%);
  color: #ffffff;
  box-shadow: 0 -30px 80px rgba(0, 0, 0, 0.5);
  border-radius: 28px 28px 0 0;
}

.contact {
  z-index: 5;
  background: #f8f6f3;
  box-shadow: 0 -30px 80px rgba(0, 0, 0, 0.12);
  border-radius: 28px 28px 0 0;
  display: flex;
  flex-direction: column;
}

/* --- Section Inner --- */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 140px 40px 80px;
  width: 100%;
}

/* --- Labels & Titles --- */
.label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 20px;
}

.label.gold {
  color: #c9a96e;
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  margin-bottom: 28px;
  color: inherit;
}

/* --- Scroll Hint (Splash) --- */
.scroll-hint {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.scroll-hint span {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #999;
  font-weight: 500;
}

.scroll-line {
  width: 1px;
  height: 52px;
  position: relative;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.08);
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: #999;
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%   { top: -100%; }
  50%  { top: 0; }
  100% { top: 100%; }
}

/* --- Hero Section --- */
.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 220px);
  max-width: 720px;
}

.hero-title {
  font-size: clamp(2.8rem, 6.5vw, 5rem);
  line-height: 1.08;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}

.hero-desc {
  font-size: 1.1rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.6);
  max-width: 520px;
  margin-bottom: 48px;
}

.btn-primary {
  display: inline-block;
  padding: 16px 40px;
  background: #c9a96e;
  color: #0c1829;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  width: fit-content;
}

.btn-primary:hover {
  background: #d4b87a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 169, 110, 0.3);
}

/* --- About Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  min-height: calc(100vh - 220px);
  align-content: center;
}

.about-desc {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #555;
}

.about-stats-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  width: 100%;
  justify-items: stretch;
  align-items: start;
  grid-auto-rows: minmax(0, auto);
}

.stat {
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 32px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  align-self: start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: #0c1829;
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: #555;
  letter-spacing: 0.03em;
  overflow-wrap: break-word;
}

/* --- Properties Section --- */
.properties .section-title {
  margin-bottom: 48px;
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  width: 100%;
  align-items: stretch;
}

.property-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}

.property-card:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.property-image {
  width: 100%;
  flex-shrink: 0;
  aspect-ratio: 16 / 11;
  min-height: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.6s ease;
}

.property-card:hover .property-image {
  transform: scale(1.05);
}

.property-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  min-height: 0;
}

.property-info .btn-primary {
  margin-top: auto;
  align-self: flex-start;
}

.property-info h3 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.property-location {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 16px;
}

.property-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #c9a96e;
  margin-bottom: 16px;
}

.property-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.02em;
}

.property-meta span {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}

/* --- Contact Section --- */
.contact-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-desc {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #555;
  margin-bottom: 36px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.95rem;
  color: #444;
}

.contact-item svg {
  color: #c9a96e;
  flex-shrink: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid #e0ddd8;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #1a1a1a;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #c9a96e;
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.12);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #aaa;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form .btn-primary {
  width: 100%;
  text-align: center;
  padding: 18px;
  font-size: 1rem;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid #e0ddd8;
  padding: 28px 40px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer p {
  font-size: 0.85rem;
  color: #999;
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  font-size: 0.85rem;
  color: #999;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #c9a96e;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .properties-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 768px) {
  .logo-wrapper {
    width: 200px;
  }

  .section-inner {
    padding: 120px 24px 60px;
  }

  .navbar {
    padding: 0 20px;
    height: 64px;
  }

  .nav-left {
    width: 70px;
  }

  .nav-right {
    gap: 20px;
  }

  .nav-link {
    font-size: 0.82rem;
  }

  .nav-cta {
    padding: 8px 16px;
    font-size: 0.82rem;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero-desc {
    font-size: 1rem;
  }

  .properties-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .stat {
    padding: 24px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .section {
    border-radius: 20px 20px 0 0;
  }

  .splash {
    border-radius: 0;
  }
}

@media (max-width: 480px) {
  .logo-wrapper {
    width: 160px;
  }

  .nav-right {
    gap: 12px;
  }

  .nav-link:not(.nav-cta) {
    display: none;
  }

  .section-inner {
    padding: 100px 18px 48px;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }
}
