/* ============================================
   VEGAS GROUP HOMES — Design System
   Warm editorial / cream & sage / Instrument Serif + DM Sans
   ============================================ */

/* --- Google Fonts loaded in HTML <head> --- */

/* ========== CUSTOM PROPERTIES ========== */
:root {
  /* Colors */
  --color-bg:        #FDFAF5;
  --color-bg-alt:    #F5F0E8;
  --color-text:      #2C2C2C;
  --color-text-light:#5A5A5A;
  --color-accent:    #5B7F5E;   /* sage */
  --color-accent-hover:#4A6B4D;
  --color-accent-soft:rgba(91,127,94,0.10);
  --color-secondary: #C6935C;   /* warm gold */
  --color-secondary-soft:rgba(198,147,92,0.12);
  --color-muted:     #8A8A7A;
  --color-border:    #E0DAD0;
  --color-white:     #FFFFFF;
  --color-dark:      #1A1A1A;

  /* Typography */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --text-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --text-xl:   clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  --text-2xl:  clamp(2rem, 1.5rem + 2.5vw, 3rem);
  --text-3xl:  clamp(2.5rem, 1.8rem + 3.5vw, 4.5rem);
  --text-hero: clamp(3rem, 2rem + 5vw, 6rem);

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  8rem;
  --space-2xl: 12rem;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 80px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.77, 0, 0.175, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

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

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

ul, ol { list-style: none; }

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ========== SELECTION ========== */
::selection {
  background: var(--color-accent);
  color: var(--color-bg);
}

/* ========== GRAIN OVERLAY ========== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 9999;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-text);
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p + p { margin-top: 1em; }

.text-muted {
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.text-accent { color: var(--color-accent); }
.text-secondary { color: var(--color-secondary); }

.label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* ========== LAYOUT ========== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
}

.section-alt {
  background-color: var(--color-bg-alt);
}

.grid {
  display: grid;
  gap: var(--space-md);
}

.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* ========== NAVIGATION ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(253,250,245,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  transition: background 0.3s ease;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 44px;
  width: auto;
}

.nav-links {
  display: none;
  gap: var(--space-md);
  align-items: center;
}

.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-light);
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-accent);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-smooth);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  background: var(--color-accent);
  color: var(--color-white) !important;
  border-radius: 100px;
  font-weight: 600;
  font-size: var(--text-sm);
  transition: background 0.3s ease, transform 0.3s ease;
}

.nav-cta:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

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

@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .hamburger { display: none !important; }
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease-smooth);
}

.mobile-menu.open {
  transform: translateY(0);
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-text);
  transition: color 0.3s ease;
}

.mobile-menu a:hover {
  color: var(--color-accent);
}

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--nav-height) + var(--space-lg));
  padding-bottom: var(--space-lg);
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin-bottom: var(--space-sm);
}

.hero h1 span {
  display: inline-block;
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-light);
  max-width: 560px;
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.hero-image {
  position: absolute;
  top: 0;
  right: -10%;
  width: 55%;
  height: 100%;
  object-fit: cover;
  border-radius: 0 0 0 60px;
  opacity: 0.25;
  z-index: 1;
}

@media (min-width: 768px) {
  .hero-image {
    opacity: 1;
    right: 0;
    width: 48%;
    border-radius: 0 0 0 80px;
  }
  .hero-content {
    max-width: 50%;
  }
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: 100px;
  transition: all 0.4s var(--ease-smooth);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--color-accent-hover);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease-smooth);
  z-index: -1;
}

.btn-primary:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(91,127,94,0.25);
}

.btn-outline {
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  background: transparent;
}

.btn-outline:hover {
  background: var(--color-accent);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--color-secondary);
  color: var(--color-white);
}

.btn-secondary:hover {
  background: #b5843f;
  transform: translateY(-2px);
}

/* ========== CARDS ========== */
.card {
  background: var(--color-white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

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

.card-image {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.card-body {
  padding: var(--space-md);
}

.card-body h3 {
  font-size: var(--text-xl);
  margin-bottom: 0.5rem;
}

.card-body p {
  color: var(--color-text-light);
  font-size: var(--text-sm);
}

/* ========== LOCATION CARDS ========== */
.location-card {
  background: var(--color-white);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.location-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 4px 8px rgba(0,0,0,0.03),
    0 8px 24px rgba(0,0,0,0.06),
    0 24px 48px rgba(0,0,0,0.06);
}

.location-card-image {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.location-card-body {
  padding: var(--space-md);
}

.location-card-body h3 {
  font-size: var(--text-xl);
  margin-bottom: 0.5rem;
}

.location-card-body .address {
  color: var(--color-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-sm);
}

/* ========== TESTIMONIALS ========== */
.testimonial {
  background: var(--color-white);
  border-radius: 16px;
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  position: relative;
}

.testimonial::before {
  content: '\201C';
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--color-accent-soft);
  position: absolute;
  top: -0.2em;
  left: 0.3em;
  line-height: 1;
  pointer-events: none;
}

.testimonial p {
  font-size: var(--text-base);
  color: var(--color-text-light);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: var(--space-sm);
}

.testimonial-author {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.testimonial-role {
  font-size: var(--text-xs);
  color: var(--color-muted);
}

/* ========== STATS ========== */
.stat {
  text-align: center;
  padding: var(--space-md);
}

.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 0.3em;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--color-muted);
}

/* ========== SERVICES LIST ========== */
.service-item {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
}

.service-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--color-accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-size: 1.2rem;
}

.service-item h4 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: 0.2em;
}

.service-item p {
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

/* ========== SECTION HEADERS ========== */
.section-header {
  margin-bottom: var(--space-lg);
}

.section-header .label {
  margin-bottom: 0.75rem;
  display: block;
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  max-width: 600px;
  color: var(--color-text-light);
  font-size: var(--text-lg);
  line-height: 1.6;
}

.section-header.center {
  text-align: center;
}

.section-header.center p {
  margin: 0 auto;
}

/* ========== CTA BANNER ========== */
.cta-banner {
  background: var(--color-accent);
  color: var(--color-white);
  border-radius: 24px;
  padding: var(--space-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(at 20% 40%, rgba(255,255,255,0.12) 0, transparent 50%),
    radial-gradient(at 80% 60%, rgba(255,255,255,0.08) 0, transparent 50%);
  pointer-events: none;
}

.cta-banner h2 {
  color: var(--color-white);
  margin-bottom: 0.5em;
  position: relative;
}

.cta-banner p {
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--space-md);
  font-size: var(--text-lg);
  position: relative;
}

.cta-banner .btn {
  background: var(--color-white);
  color: var(--color-accent);
  position: relative;
}

.cta-banner .btn:hover {
  background: var(--color-bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* ========== FOOTER ========== */
.footer {
  background: var(--color-dark);
  color: rgba(255,255,255,0.7);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer h4 {
  color: var(--color-white);
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
}

.footer a {
  color: rgba(255,255,255,0.6);
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--color-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-about p {
  font-size: var(--text-sm);
  line-height: 1.7;
  margin-top: var(--space-sm);
}

.footer-links li + li { margin-top: 0.6rem; }
.footer-links a { font-size: var(--text-sm); }

.footer-contact p {
  font-size: var(--text-sm);
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
  text-align: center;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ========== PAGE HERO (inner pages) ========== */
.page-hero {
  padding-top: calc(var(--nav-height) + var(--space-xl));
  padding-bottom: var(--space-lg);
  position: relative;
  overflow: hidden;
}

.page-hero .label {
  margin-bottom: 0.75rem;
  display: block;
}

.page-hero h1 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-sm);
}

.page-hero p {
  font-size: var(--text-lg);
  color: var(--color-text-light);
  max-width: 600px;
  line-height: 1.6;
}

/* ========== ABOUT PAGE ========== */
.about-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: center;
}

@media (min-width: 768px) {
  .about-split {
    grid-template-columns: 1fr 1fr;
  }
}

.about-image {
  border-radius: 20px;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* ========== VALUES GRID ========== */
.value-item {
  padding: var(--space-md);
  border-radius: 16px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
}

.value-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--color-accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}

.value-item h4 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: 0.5rem;
}

.value-item p {
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

/* ========== CONTACT PAGE ========== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

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

.contact-info-card {
  background: var(--color-white);
  border-radius: 16px;
  padding: var(--space-md);
  border: 1px solid var(--color-border);
}

.contact-info-card + .contact-info-card {
  margin-top: var(--space-sm);
}

.contact-info-card h4 {
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  background: var(--color-white);
  color: var(--color-text);
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

/* ========== LOCATION DETAIL PAGE ========== */
.location-hero-image {
  width: 100%;
  aspect-ratio: 21/9;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: var(--space-lg);
}

.location-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
}

@media (min-width: 768px) {
  .location-features {
    grid-template-columns: 1fr 1fr;
  }
}

.feature-item {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  padding: var(--space-sm);
  border-radius: 12px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
}

.feature-check {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-weight: 700;
}

/* ========== ANIMATIONS (initial states handled by GSAP) ========== */

/* ========== 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;
  }
  .reveal, .stagger-item {
    opacity: 1;
    transform: none;
  }
}
