:root {
  --primary: #000000;
  --primary-hover: #333333;
  --accent: #666666;
  --text: #1d1d1f;
  --text-muted: #86868b;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --card: #ffffff;
  --border: #d2d2d7;
  --overlay: rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 40px -6px rgba(0, 0, 0, 0.15);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 18px;
  --radius-sm: 12px;
}

[data-theme="dark"] {
  --primary: #ffffff;
  --primary-hover: #e5e5e5;
  --accent: #a1a1a6;
  --text: #f5f5f7;
  --text-muted: #a1a1a6;
  --bg: #000000;
  --bg-alt: #1c1c1e;
  --card: #1c1c1e;
  --border: #38383a;
  --overlay: rgba(0, 0, 0, 0.7);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 40px -6px rgba(0, 0, 0, 0.4);
}

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

html,
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--primary);
  letter-spacing: -0.02em;
}

h1 {
  font-weight: 700;
}

h2 {
  font-weight: 600;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all .3s var(--ease);
  height: 64px;
  display: flex;
  align-items: center;
}

.navbar.scrolled {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-brand {
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-text {
  font-weight: 700;
}

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

.nav-link {
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--primary-hover);
}

.nav-cta {
  text-decoration: none;
  color: var(--bg);
  background: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: all .3s ease;
  border-radius: 2px;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 20px;
  background: var(--bg);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 80%);
  z-index: 1;
  pointer-events: none;
  opacity: 0.3;
}

.hero-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
  max-width: 800px;
  z-index: 2;
  width: 100%;
}

.hero-content {
  margin-bottom: 0;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5rem);
  line-height: 1.05;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #1c2c3d 0%, #64748b 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  /* Fallback */
}

.hero-subtitle {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 0;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  background: var(--primary);
  color: var(--bg);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  border: 0;
  cursor: pointer;
  transition: all .2s ease;
  font-size: 1rem;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--primary);
  background: var(--card);
  font-size: 1rem;
  transition: all .2s ease;
}

.btn-secondary:hover {
  border-color: var(--primary);
  background: var(--bg-alt);
}

.hero-image {
  order: -1;
  width: 100%;
  max-width: 650px;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  margin-top: 0;
  margin-bottom: 0;
  position: relative;
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Sections */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.25rem;
  font-weight: 400;
}

/* Listings */
.listings {
  padding: 120px 0;
  background: var(--bg-alt);
}

.modal-details {
  padding: 40px;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  background: var(--card);
  position: relative;
  min-width: 0;
  /* Prevent grid blowout */
}

.modal-details::-webkit-scrollbar {
  display: none;
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.listing-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all .3s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 0, 0, 0.05);
}

.listing-image-container {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.listing-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.listing-card:hover img {
  transform: scale(1.03);
}

.listing-info {
  padding: 1.5rem;
}

.listing-price {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.listing-address {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.listing-meta {
  display: flex;
  gap: 1rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  border-top: 1px solid var(--bg-alt);
  padding-top: 1rem;
}

.badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  color: #000;
  font-weight: 600;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

/* About */
.about {
  padding: 120px 0;
  background: var(--bg);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.about-text p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.stat h3 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat p {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.about-image {
  height: 500px;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}

/* Testimonials */
.testimonials {
  padding: 120px 0;
  background: var(--bg-alt);
  overflow: hidden;
}

.testimonial-carousel-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.testimonial-card {
  position: absolute;
  background: var(--card);
  padding: 3rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  text-align: center;
  max-width: 600px;
  width: 100%;
  transition: all 0.5s var(--ease);
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
  border: 1px solid var(--border);
}

.testimonial-card.center {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
  pointer-events: all;
  box-shadow: var(--shadow-lg);
}

.testimonial-card.left {
  opacity: 0.5;
  transform: translateX(-100%) scale(0.9);
  z-index: 1;
}

.testimonial-card.right {
  opacity: 0.5;
  transform: translateX(100%) scale(0.9);
  z-index: 1;
}

.stars {
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  letter-spacing: 2px;
}

.testimonial-text {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 2rem;
}

.testimonial-author {
  font-weight: 600;
  font-size: 1.1rem;
}

.testimonial-role {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.carousel-controls {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 10;
}

.carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: var(--text);
  font-size: 1.5rem;
}

.carousel-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.mobile-carousel {
  display: none;
}

/* Contact */
.contact {
  padding: 120px 0;
  background: var(--bg);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-alt);
  font-size: 1rem;
  transition: all 0.2s ease;
  font-family: inherit;
  color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}

.form-group label {
  display: none;
}

.contact-info {
  padding: 2rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  height: fit-content;
}

.info-item {
  margin-bottom: 2rem;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-item h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.info-item p,
.info-item a {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

/* Footer */
.footer {
  background: var(--bg-alt);
  padding: 80px 0 40px;
  border-top: 1px solid var(--border);
}

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

.footer-brand h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: var(--text-muted);
  max-width: 300px;
}

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

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  color: var(--text);
  transition: color 0.2s ease;
}

.footer-social a:hover {
  color: var(--text-muted);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Modal */
.listing-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.listing-modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  position: relative;
  z-index: 1;
  background: var(--card);
  border-radius: var(--radius);
  max-width: 1200px;
  width: 100%;
  height: 90vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.4s var(--ease);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 20;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  border: none;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modal-gallery {
  background: #000;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  /* Prevent grid blowout */
  overflow: hidden;
}

.gallery-main {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
}

.gallery-main img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: #000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-prev {
  left: 20px;
}

.gallery-next {
  right: 20px;
}

.gallery-nav:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
}

.image-counter {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.gallery-thumbnails {
  display: flex;
  gap: 8px;
  padding: 16px;
  background: #111;
  overflow-x: auto;
  scrollbar-width: none;
}

.gallery-thumbnails::-webkit-scrollbar {
  display: none;
}

.gallery-thumbnail {
  width: 80px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.gallery-thumbnail.active {
  opacity: 1;
  border-color: #fff;
}

.gallery-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.theme-toggle {
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, color 0.3s ease;
  margin-left: 1rem;
}

.theme-toggle:hover {
  background: var(--bg-alt);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke-width: 2px;
}

.modal-details {
  padding: 40px;
  overflow-y: auto;
}

.modal-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
}

.modal-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.modal-address {
  font-size: 1.25rem;
  color: var(--text-muted);
}

.modal-features-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

.modal-feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 500;
}

.remax-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.remax-branding img {
  height: 40px;
  width: auto;
}

.remax-branding p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Fullscreen Viewer */
.fullscreen-viewer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.fullscreen-viewer.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.fullscreen-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.fullscreen-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.fullscreen-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  font-size: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: #fff;
}

.fullscreen-prev {
  left: 24px;
}

.fullscreen-next {
  right: 24px;
}

.fullscreen-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.fullscreen-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 16px;
  border-radius: 20px;
}

.fullscreen-viewer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

/* Mobile */
@media (max-width: 992px) {
  .hero-wrapper {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-image {
    margin-top: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }

  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
  }

  .modal-content {
    grid-template-columns: 1fr;
    height: 100%;
    border-radius: 0;
  }

  .modal-gallery {
    height: 40vh;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 2rem;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    opacity: 0;
    pointer-events: none;
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-title {
    font-size: 2.5rem;
  }

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

  .contact-form {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }

  .desktop-carousel {
    display: none !important;
  }

  .mobile-carousel {
    display: flex !important;
  }

  .testimonial-card {
    position: relative;
    opacity: 1;
    transform: none;
    box-shadow: var(--shadow);
    margin: 0 auto;
  }

  .testimonial-card.active {
    display: block;
  }

  .testimonial-card:not(.active) {
    display: none;
  }
}

/* Premium Animations */
.reveal-text-wrapper {
  overflow: hidden;
  display: block;
}

.reveal-text {
  display: block;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.2s ease;
}

.reveal-text.visible {
  transform: translateY(0);
  opacity: 1;
}

.reveal-image-wrapper {
  overflow: hidden;
  position: relative;
}

.reveal-image {
  transform: scale(1.1);
  filter: blur(10px);
  opacity: 0;
  transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1), filter 1.5s ease, opacity 1.5s ease;
}

.reveal-image.visible {
  transform: scale(1);
  filter: blur(0);
  opacity: 1;
}

.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Chatbot Typing Indicator */
.message.typing {
  background: #f1f1f1;
  padding: 12px 16px;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 4px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: #909090;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typingBounce {

  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1);
  }
}

/* Floating Infographic Cards */
.hero-cards {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.floating-card {
  position: absolute;
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 20px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: float-card 6s ease-in-out infinite;
  pointer-events: auto;
  transition: transform 0.3s ease;
  border: 1px solid var(--border);
  min-width: 160px;
}

.floating-card:hover {
  transform: scale(1.05) !important;
}

@keyframes float-card {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.card-1 {
  top: 10%;
  right: -40px;
  animation-delay: 0s;
}

.card-2 {
  bottom: 20%;
  left: -60px;
  animation-delay: 2s;
}

.card-3 {
  bottom: -20px;
  right: 20px;
  animation-delay: 4s;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.card-icon.graph {
  background: rgba(41, 151, 255, 0.1);
  color: var(--primary);
}

.card-icon.avatar {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.card-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.card-stars {
  color: #FFD700;
  font-size: 1.2rem;
  letter-spacing: -2px;
}

/* Chatbot Widget */
.chatbot-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--bg);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-toggle:hover {
  transform: scale(1.1);
}

.chat-toggle svg {
  width: 28px;
  height: 28px;
}

.chat-window {
  width: 380px;
  height: 600px;
  max-height: calc(100vh - 120px);
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transform-origin: bottom right;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  position: absolute;
  bottom: 80px;
  right: 0;
  border: 1px solid var(--border);
}

.chatbot-widget.active .chat-window {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.chatbot-widget.active .chat-toggle {
  transform: rotate(45deg);
  background: var(--primary-hover);
  color: var(--bg);
}

.chat-header {
  background: var(--primary);
  color: var(--bg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.chat-title h3 {
  color: var(--bg);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.chat-title p {
  color: var(--bg);
  opacity: 0.8;
  font-size: 0.85rem;
}

.chat-close {
  background: transparent;
  border: none;
  color: var(--bg);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.8;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-alt);
}

.message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.message.bot {
  background: var(--card);
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  align-self: flex-start;
}

.message.user {
  background: var(--primary);
  color: var(--bg);
  border-bottom-right-radius: 4px;
  align-self: flex-end;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chat-input-area {
  padding: 16px;
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
}

.chat-input-area input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 12px 20px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input-area input:focus {
  border-color: var(--primary);
}

.chat-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--bg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.chat-send:hover {
  transform: scale(1.05);
}

@media (max-width: 480px) {
  .chat-window {
    width: calc(100vw - 48px);
    height: calc(100vh - 120px);
  }
}