@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --primary-blue: #007BFF;
  --dark-grey: #2C3E50;
  --light-grey: #ECF0F1;
  --off-white: #F8F9FA;
  --secondary-blue: #1A67AD;
  --font-primary: 'Montserrat', sans-serif;
  --font-fallback: serif;
}

body {
  font-family: var(--font-primary);
  background-color: var(--off-white);
  color: var(--dark-grey);
  overflow-x: hidden;
  position: relative;
}

/* Subtle texture on body */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.05"/%3E%3C/svg%3E');
  pointer-events: none;
  z-index: -1;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 3rem; /* md:text-6xl */
  margin-bottom: 1rem;
}

h2 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  color: var(--dark-grey);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  line-height: 1.6;
  margin-bottom: 1rem;
  color: #4a5568;
}

/* Custom Cursor - Optional */
@media (pointer: fine) {
  .interactive-cursor {
    cursor: pointer; /* Simplified custom cursor */
  }
}

/* Buttons */
.btn {
  display: inline-block;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 0.25rem;
  transition: all 0.3s ease-in-out;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background-color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--secondary-blue);
  border-color: var(--secondary-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  outline: none;
}

.btn-secondary {
  color: var(--primary-blue);
  background-color: transparent;
  border: 2px solid var(--primary-blue);
}

.btn-secondary:hover, .btn-secondary:focus {
  color: #fff;
  background-color: var(--primary-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  outline: none;
}

.btn-tertiary {
  color: var(--primary-blue);
  background-color: transparent;
  border: none;
  padding: 0.5rem 0;
  position: relative;
}

.btn-tertiary::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-blue);
  transform-origin: center;
  transition: transform 0.3s ease-out;
}

.btn-tertiary:hover::after, .btn-tertiary:focus::after {
  transform: scaleX(1);
}

/* Header & Sticky Nav */
header {
  transition: all 0.3s ease-in-out;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 50;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

header.scrolled {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

/* Link Underline Hover */
.nav-link {
  position: relative;
  text-decoration: none;
  color: var(--dark-grey);
  font-weight: 500;
  transition: color 0.3s;
}

.nav-link:hover, .nav-link[aria-current="page"] {
  color: var(--primary-blue);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary-blue);
  transform-origin: center;
  transition: transform 0.3s ease-out;
}

.nav-link:hover::after, .nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background-color: var(--dark-grey);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Subtle Parallax for non-mobile */
@media (min-width: 768px) {
  .hero-bg.parallax {
    transform: translateY(var(--scroll-offset, 0px));
  }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(44, 62, 80, 0.4), rgba(44, 62, 80, 0.8));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding: 0 20px;
  max-width: 800px;
}

.hero-content h1, .hero-content p, .hero-content a {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s ease-out forwards;
}

.hero-content h1 { animation-delay: 0.2s; color: #fff; }
.hero-content p { animation-delay: 0.4s; font-size: 1.25rem; color: #f8f9fa; }
.hero-content a { animation-delay: 0.6s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll Fade Animation */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in-up {
    transition: none;
    opacity: 1;
    transform: none;
  }
  .hero-content h1, .hero-content p, .hero-content a {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .hero-bg.parallax {
    transform: none !important;
  }
}

/* Cards & Hover Effects */
.card-hover {
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.card-hover:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.icon-hover {
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.icon-hover:hover {
  transform: translateY(-3px);
}

/* Carousel */
.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel-container {
  overflow: hidden;
  position: relative;
}

/* Mobile Menu Overlay */
#mobile-menu {
  transition: opacity 0.3s ease-in-out;
}
#mobile-menu.hidden {
  opacity: 0;
  pointer-events: none;
}
#mobile-menu.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Accessibility Focus */
*:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

/* Utility to restrict image selection */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.property-img-wrapper {
  overflow: hidden;
}

.property-img-wrapper img {
  transition: transform 0.5s ease;
}

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

/* Back to Top */
#back-to-top {
  transition: opacity 0.3s, transform 0.3s;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
