/* ==========================================
   AUREVIA ESTATES — Luxury Real Estate & Architecture
   Design System & Master Stylesheet
   ========================================== */

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

:root {
  --color-bg: #FAF8F5;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F2EFE9;
  --color-text: #1A1A1A;
  --color-text-muted: #66635B;
  --color-bronze: #A38350;
  --color-bronze-light: #C2A374;
  --color-charcoal: #1A1A1A;
  --color-border: #E2DDD5;
  --color-white: #FFFFFF;

  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;

  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-subtle: 0 10px 30px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 20px 40px rgba(26, 26, 26, 0.06);
  --shadow-hover: 0 30px 60px rgba(26, 26, 26, 0.12);

  --container-max: 1320px;
  --header-height: 85px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  color: var(--color-charcoal);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

ul {
  list-style: none;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }
}

@media (max-width: 380px) {
  .container {
    padding: 0 1rem;
  }
}

/* ==========================================
   Header & Navigation
   ========================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition-smooth);
}

.site-header.scrolled {
  height: 70px;
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 3.5vw, 1.6rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-charcoal);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-tagline {
  font-size: clamp(0.42rem, 1.5vw, 0.58rem);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-bronze);
  margin-top: -2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

@media (max-width: 1024px) {
  .nav-menu {
    gap: 1.25rem;
  }
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
  position: relative;
  padding: 0.5rem 0;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-bronze);
  transition: width 0.3s ease;
}

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

.nav-link.active {
  color: var(--color-bronze);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-charcoal);
  color: var(--color-white);
  padding: 0.75rem 1.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 0;
  transition: var(--transition-smooth);
  cursor: pointer;
  border: 1px solid var(--color-charcoal);
  white-space: nowrap;
}

.btn-primary:hover {
  background-color: var(--color-bronze);
  border-color: var(--color-bronze);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--color-charcoal);
  padding: 0.75rem 1.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 0;
  border: 1px solid var(--color-charcoal);
  transition: var(--transition-smooth);
  cursor: pointer;
  white-space: nowrap;
}

.btn-outline:hover {
  background-color: var(--color-charcoal);
  color: var(--color-white);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  cursor: pointer;
  z-index: 1001;
  flex-shrink: 0;
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-charcoal);
  transition: var(--transition-smooth);
}

.mobile-menu-toggle.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.mobile-menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 900px) {
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--color-surface);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: left 0.4s ease;
    box-shadow: var(--shadow-hover);
    z-index: 999;
  }

  .nav-menu.active {
    left: 0;
  }

  .mobile-menu-toggle {
    display: flex;
  }
}

/* ==========================================
   Hero Sections
   ========================================== */

.hero {
  position: relative;
  height: 85vh;
  min-height: 550px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?auto=format&fit=crop&w=1920&q=85') center center/cover no-repeat;
  margin-top: var(--header-height);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(26,26,26,0.3), rgba(26,26,26,0.65));
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--color-white);
  max-width: 850px;
  padding: 0 1.5rem;
}

.hero-subtitle {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--color-bronze-light);
  margin-bottom: 1.2rem;
  font-weight: 600;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  font-weight: 400;
  margin-bottom: 1.25rem;
  color: var(--color-white);
  line-height: 1.15;
}

.hero-text {
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 300;
  max-width: 600px;
  margin: 0 auto 2rem auto;
  opacity: 0.9;
}

/* Search Bar on Hero */
.hero-search-box {
  background-color: var(--color-surface);
  padding: 1.5rem;
  border-radius: 4px;
  box-shadow: var(--shadow-hover);
  margin-top: -70px;
  position: relative;
  z-index: 10;
  margin-bottom: 5rem;
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 1rem;
  align-items: center;
}

@media (max-width: 1024px) {
  .search-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .search-grid .search-btn {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .search-grid {
    grid-template-columns: 1fr;
  }
}

.search-field {
  display: flex;
  flex-direction: column;
}

.search-field label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.search-field select,
.search-field input {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: var(--color-charcoal);
  border-radius: 2px;
}

.search-btn {
  background-color: var(--color-bronze);
  color: var(--color-white);
  padding: 0.85rem 1.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition-smooth);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-btn:hover {
  background-color: var(--color-charcoal);
}

/* ==========================================
   Page Headers & Sections
   ========================================== */

.page-header {
  padding: calc(var(--header-height) + 3rem) 0 3.5rem 0;
  background-color: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  margin-bottom: 0.75rem;
}

.page-header p {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.section-padding {
  padding: 5rem 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.section-title-group span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--color-bronze);
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.section-title-group h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
}

/* ==========================================
   Property Cards & Grids
   ========================================== */

.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2.5rem;
}

@media (max-width: 768px) {
  .properties-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.property-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.property-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-bronze-light);
}

.property-card:focus-visible {
  outline: 2px solid var(--color-bronze);
  outline-offset: 4px;
}

.property-image-wrapper {
  position: relative;
  height: 270px;
  overflow: hidden;
}

.property-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.property-status-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: rgba(26, 26, 26, 0.85);
  backdrop-filter: blur(4px);
  color: var(--color-white);
  padding: 0.35rem 0.85rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  z-index: 2;
}

.property-price-badge {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background-color: var(--color-surface);
  color: var(--color-charcoal);
  padding: 0.45rem 0.9rem;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  box-shadow: var(--shadow-subtle);
  z-index: 2;
}

.property-content {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.property-location {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}

.property-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.property-title a:hover {
  color: var(--color-bronze);
}

.property-features {
  display: flex;
  gap: 1.25rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin: 0.75rem 0 1.25rem 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.property-features span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

@media (max-width: 768px) {
  .property-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.25rem;
    text-align: center;
    font-size: 0.75rem;
    white-space: nowrap;
  }
  .property-features span {
    justify-content: center;
    gap: 0.2rem;
  }
  .category-card {
    height: 280px !important;
  }
}

.property-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.property-link {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
  color: var(--color-charcoal);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.property-link:hover {
  color: var(--color-bronze);
}

/* ==========================================
   Footer
   ========================================== */

.site-footer {
  background-color: var(--color-charcoal);
  color: var(--color-white);
  padding: 5rem 0 2.5rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3.5rem;
  margin-bottom: 3.5rem;
}

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

@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-col h4 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--color-white);
  margin-bottom: 1.25rem;
  letter-spacing: 0.05em;
}

.footer-col p {
  font-size: 0.9rem;
  color: #aaa;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

.footer-links a:hover {
  color: var(--color-bronze-light);
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.newsletter-form input {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.75rem 1rem;
  color: var(--color-white);
  font-size: 0.85rem;
  flex-grow: 1;
  border-radius: 2px;
}

.newsletter-form button {
  background-color: var(--color-bronze);
  color: var(--color-white);
  padding: 0 1.25rem;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.3s ease;
  border-radius: 2px;
}

.newsletter-form button:hover {
  background-color: var(--color-white);
  color: var(--color-charcoal);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #888;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

.concept-disclaimer {
  font-style: italic;
  color: var(--color-bronze-light);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  left: 1.5rem;
  max-width: 400px;
  margin: 0 auto;
  background-color: var(--color-charcoal);
  color: var(--color-white);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-hover);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 1rem;
  transform: translateY(150%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 4px solid var(--color-bronze);
  font-size: 0.9rem;
}

.toast.show {
  transform: translateY(0);
}

/* Mobile Brand & Header Refinements */
@media (max-width: 768px) {
  form div[style*="grid-template-columns"],
  .contact-grid form div[style*="grid-template-columns"],
  div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
}

@media (max-width: 480px) {
  .brand-name {
    font-size: 1.1rem;
    letter-spacing: 0.02em;
  }
  .brand-tagline {
    font-size: 0.42rem;
    letter-spacing: 0.1em;
  }
  .header-inner {
    gap: 0.5rem;
  }
  .header-actions {
    gap: 0.5rem;
  }
  .btn-primary, .btn-outline {
    padding: 0.5rem 0.9rem;
    font-size: 0.7rem;
  }
}

/* Agents & Filters Mobile Improvements */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.agent-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: var(--transition-smooth);
  text-align: center;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.agent-card .agent-details {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.agent-card .agent-contact-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.agent-image {
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  background-color: var(--color-surface-alt);
}

.agent-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

@media (max-width: 768px) {
  .agents-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .agent-image {
    height: 320px;
  }
  /* Hide nonessential third-party floating widgets on mobile */
  [class*="widget"], [id*="widget"], [class*="floating"], [class*="chat"], [class*="feedback"] {
    display: none !important;
  }
}

.filters-container {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-subtle);
  border-radius: 4px;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 1.5rem;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.filter-group label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  font-weight: 600;
}

.filter-group select,
.filter-group input {
  width: 100%;
  padding: 0.85rem 1rem;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  font-size: 0.95rem;
  color: var(--color-charcoal);
  border-radius: 2px;
}

.filter-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

@media (min-width: 1025px) and (max-width: 1439px) {
  .filters-grid {
    grid-template-columns: repeat(2, 1fr) repeat(2, 1fr);
  }
  .filter-actions {
    grid-column: span 4;
    justify-content: flex-end;
    margin-top: 0.5rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .filters-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .filter-actions {
    grid-column: span 2;
    justify-content: flex-end;
    margin-top: 0.5rem;
  }
}

@media (max-width: 768px) {
  .filters-container {
    padding: 1.25rem;
  }
  .filters-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .filter-actions {
    display: flex;
    gap: 1rem;
    width: 100%;
    margin-top: 0.5rem;
  }
  .filter-actions button {
    flex: 1;
    padding: 0.85rem 1rem !important;
  }
}

/* Flagship Offices Section Styles */
.office-locations-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
  text-align: center;
}

@media (max-width: 768px) {
  .office-locations-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.office-card {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 2.5rem 2rem;
  border-radius: 4px;
  text-align: center;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition-smooth);
}

.office-card:hover {
  border-color: var(--color-bronze-light);
  box-shadow: var(--shadow-card);
}

.office-card h4 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  color: var(--color-charcoal);
}

.office-card p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 0.35rem;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
