:root {
  /* Colors */
  --bg-dark: #0D0D0D;
  --text-primary: #FFFFFF;
  --text-secondary: #A0A0A0;
  --accent-orange: #FF5C00;
  --accent-orange-hover: #E05200;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);

  /* Typography */
  --font-main: 'Inter', sans-serif;

  /* Spacing */
  --container-width: 1200px;
  --section-padding: 50px 20px;
}

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.text-center {
  text-align: center;
}

.text-accent {
  color: var(--accent-orange);
}

/* Typography Enhancements */
h1 {
  font-size: 3.5rem;
  letter-spacing: -2px;
  background: linear-gradient(to right, #ffffff, #a0a0a0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  /* Fallback */
}

/* Premium Button */
.btn {
  display: inline-block;
  padding: 18px 36px;
  border-radius: 50px;
  /* Pill shape for modern look */
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.1rem;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent-orange);
  color: white;
  box-shadow: 0 0 20px rgba(255, 92, 0, 0.3);
}

.btn-primary:hover {
  background: #ff7024;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 40px rgba(255, 92, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Backgrounds */
.bg-penthouse {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9)), url('../assets/bg_luxury_penthouse.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  /* Parallax effect */
}

/* Hero Tech Grid Background */
.hero-grid-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 92, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 92, 0, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
  pointer-events: none;
  z-index: 1;
}

/* Advanced Glassmorphism */
.glass-card {
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 40px;
  border-radius: 24px;
  /* More rounded */
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 92, 0, 0.4);
  background: rgba(30, 30, 30, 0.7);
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Glow Effect */
.glow-point {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 92, 0, 0.15) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

.play-btn {
  background: rgba(255, 92, 0, 0.9);
  backdrop-filter: blur(5px);
  box-shadow: 0 0 30px rgba(255, 92, 0, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.1;
  font-weight: 700;
  color: var(--text-primary);
}

/* ... existing styles ... */

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

/* Chat Simulation - High Fidelity */
.chat-interface {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #0f1115;
  /* Dark chat bg */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  position: relative;
}

.chat-header {
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 10;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid var(--accent-orange);
  position: relative;
}

.avatar::after {
  content: '';
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  background: #22c55e;
  /* Online green */
  border-radius: 50%;
  border: 2px solid #0f1115;
}

.chat-info h4 {
  font-size: 1rem;
  margin-bottom: 2px;
  color: white;
}

.chat-info span {
  font-size: 0.8rem;
  color: var(--accent-orange);
  font-weight: 500;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background-image:
    linear-gradient(rgba(13, 13, 13, 0.95), rgba(13, 13, 13, 0.95)),
    url('https://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/WhatsApp.svg/1200px-WhatsApp.svg.png');
  /* Subtle texture hint if local not avail, essentially dark */
}

/* Message Bubbles */
.message {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 12px;
  position: relative;
  font-size: 0.95rem;
  line-height: 1.4;
  animation: messageSlide 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.message.received {
  background: #262626;
  color: #e0e0e0;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.message.sent {
  background: var(--accent-orange);
  /* Brand color */
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.message-time {
  display: block;
  font-size: 0.65rem;
  margin-top: 4px;
  opacity: 0.7;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.double-tick {
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 11' fill='none'%3E%3Cpath d='M1 6L4.5 9.5L11 3' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M5 6L8.5 9.5L15 3' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  display: inline-block;
}

@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Typing Indicator Improved */
.typing-bubble {
  background: #262626;
  padding: 12px 20px;
  border-radius: 20px;
  align-self: flex-start;
  display: none;
  /* Controlled by JS */
  gap: 5px;
  width: fit-content;
  border-bottom-left-radius: 4px;
  margin-bottom: 10px;
}

.dot {
  width: 8px;
  height: 8px;
  background: #666;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) {
  animation-delay: -0.32s;
}

.dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes bounce {

  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1);
  }
}

/* CRM Integration Visualizer */
.crm-notification {
  position: absolute;
  top: 20px;
  right: -300px;
  /* Hidden initially */
  width: 280px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 92, 0, 0.3);
  border-left: 4px solid var(--accent-orange);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  z-index: 100;
  transition: right 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: 'Inter', sans-serif;
}

.crm-notification.show {
  right: 20px;
}

.crm-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.crm-icon {
  width: 20px;
  height: 20px;
  background: var(--accent-orange);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: white;
  font-weight: bold;
}

.crm-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.crm-data-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.85rem;
}

.crm-label {
  color: #888;
}

.crm-value {
  color: #eee;
  font-weight: 500;
}

.crm-tag {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
}

/* Backgrounds */
.bg-penthouse {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9)), url('../assets/bg_luxury_penthouse.png');
  background-size: cover;
  background-position: center;
  /* background-attachment: fixed; REMOVED FOR PERFORMANCE */
  transform: translateZ(0);
  /* Hardware accelerate */
}

/* Hero Tech Grid Background */
.hero-grid-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 92, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 92, 0, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
  pointer-events: none;
  z-index: 1;
  /* Optimization */
  will-change: transform;
  transform: translateZ(0);
}

/* Advanced Glassmorphism */
.glass-card {
  background: rgba(20, 20, 20, 0.6);
  /* Reduced blur radius slightly for performance, kept isolate for stacking context */
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 40px;
  border-radius: 24px;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  /* Optimization tips */
  transform: translateZ(0);
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 92, 0, 0.4);
  background: rgba(30, 30, 30, 0.7);
  will-change: transform;
}

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Featured Listings Section */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.listing-card {
  position: relative;
  background: rgba(20, 20, 20, 0.6);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  group: hover;
}

.listing-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border-color: var(--accent-orange);
}

.listing-image {
  height: 250px;
  width: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.listing-card:hover .listing-image {
  transform: scale(1.05);
}

.listing-details {
  padding: 20px;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(10px);
  position: absolute;
  bottom: 0;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.listing-price {
  color: var(--accent-orange);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.listing-title {
  color: white;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.listing-features {
  display: flex;
  gap: 15px;
  font-size: 0.8rem;
  color: #888;
}

.listing-tag {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* FAQ Section */
.faq-section {
  padding: 80px 0;
  background: #0d0d0d;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 15px;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 0;
  color: white;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: '+';
  color: var(--accent-orange);
  font-size: 1.5rem;
  font-weight: 300;
}

.faq-item.active .faq-question::after {
  content: '-';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  color: #aaa;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  /* Approximate max height */
  padding-bottom: 20px;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-33.333%);
  }

  /* 1/3 of the content (3 sets) */
}

.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  padding: 10px 0;
  /* Prevent vertical clipping */
}

.marquee-content {
  display: inline-flex;
  gap: 80px;
  /* Increased gap for better separation */
  animation: scroll 30s linear infinite;
  /* Slower for elegance */
  align-items: center;
  /* Vertical center */
}

.marquee-content img {
  height: 40px;
  /* Uniform logo height */
  width: auto;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.marquee-content:hover img {
  opacity: 1;
}