/* ============================================
   锋语别墅 - Premium Luxury Real Estate
   Design System v2.0
   ============================================ */

/* --- CSS Custom Properties (Theme System) --- */
:root {
  /* Light theme (default) */
  --color-bg: #FBF9F6;
  --color-bg-secondary: #F3EFE9;
  --color-bg-card: rgba(255, 255, 255, 0.72);
  --color-bg-card-hover: rgba(255, 255, 255, 0.92);
  --color-text: #1A1816;
  --color-text-secondary: #5C5854;
  --color-text-muted: #8A8680;
  --color-border: rgba(26, 24, 22, 0.08);
  --color-border-strong: rgba(26, 24, 22, 0.14);

  /* Brand colors */
  --color-gold: #B8963E;
  --color-gold-light: #D4B96A;
  --color-gold-dark: #8A6D2E;
  --color-green: #1A3A2A;
  --color-green-light: #2D5A3E;
  --color-cream: #F5F0EB;
  --color-charcoal: #2A2826;

  /* Accent */
  --color-accent: var(--color-gold);
  --color-accent-hover: var(--color-gold-dark);
  --color-accent-text: #FFFFFF;

  /* Glass morphism */
  --glass-bg: rgba(255, 255, 255, 0.45);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-blur: 24px;
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);

  /* Typography */
  --font-serif: 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', 'STSong', serif;
  --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.06);
  --shadow-gold: 0 8px 32px rgba(184, 150, 62, 0.18);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-spring: cubic-bezier(0.22, 0.61, 0.36, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --duration-glacial: 800ms;

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 800px;
  --nav-height: 72px;
}

/* Dark theme */
[data-theme="dark"] {
  --color-bg: #0F0D0B;
  --color-bg-secondary: #1A1816;
  --color-bg-card: rgba(26, 24, 22, 0.72);
  --color-bg-card-hover: rgba(26, 24, 22, 0.95);
  --color-text: #F5F0EB;
  --color-text-secondary: #B8B4AE;
  --color-text-muted: #7A7670;
  --color-border: rgba(245, 240, 235, 0.08);
  --color-border-strong: rgba(245, 240, 235, 0.14);

  --glass-bg: rgba(26, 24, 22, 0.55);
  --glass-border: rgba(245, 240, 235, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.4);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.5);

  --color-accent: var(--color-gold-light);
  --color-accent-hover: var(--color-gold);
}

/* ============================================
   RESET & BASE
   ============================================ */

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

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color var(--duration-slow) var(--ease-out-expo),
              color var(--duration-slow) var(--ease-out-expo);
  overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-md);
}

.section-label::before {
  content: '';
  width: 32px;
  height: 1.5px;
  background: currentColor;
  opacity: 0.5;
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */

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

.container-narrow {
  max-width: var(--max-width-narrow);
}

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

.section-alt {
  background: var(--color-bg-secondary);
  transition: background var(--duration-slow) var(--ease-out-expo);
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: all var(--duration-normal) var(--ease-out-expo);
}

.nav.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

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

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo-diamond {
  width: 8px;
  height: 8px;
  background: var(--color-gold);
  transform: rotate(45deg);
  border-radius: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
}

.nav-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color var(--duration-fast) var(--ease-out-expo);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-gold);
  transition: width var(--duration-normal) var(--ease-out-expo);
}

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

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

/* Nav actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Theme toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: all var(--duration-fast) var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
  transform: rotate(15deg);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform var(--duration-normal) var(--ease-out-expo),
              opacity var(--duration-normal) var(--ease-out-expo);
}

[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--duration-normal) var(--ease-out-expo);
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .mobile-menu-btn { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    flex-direction: column;
    padding: var(--space-xl);
    gap: var(--space-lg);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--duration-normal) var(--ease-out-expo);
    border-bottom: 1px solid var(--color-border);
  }
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--duration-normal) var(--ease-spring);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.btn:hover::after {
  transform: translateX(100%);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
  color: #FFFFFF;
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 40px rgba(184, 150, 62, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border-strong);
}

.btn-secondary:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
}

.btn-ghost:hover {
  color: var(--color-gold);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.0625rem;
}

/* ============================================
   CARDS (Glass Morphism)
   ============================================ */

.card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--duration-normal) var(--ease-out-expo);
  box-shadow: var(--glass-shadow);
}

.card:hover {
  transform: translateY(-4px);
  background: var(--color-bg-card-hover);
  box-shadow: var(--shadow-lg);
}

.card-clickable {
  cursor: pointer;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(184, 150, 62, 0.08), transparent),
    radial-gradient(ellipse 60% 80% at 80% 80%, rgba(26, 58, 42, 0.05), transparent);
  pointer-events: none;
  z-index: 0;
}

[data-theme="dark"] .hero::before {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(212, 185, 106, 0.06), transparent),
    radial-gradient(ellipse 60% 80% at 80% 80%, rgba(26, 58, 42, 0.1), transparent);
}

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-gold);
  animation: pulse 2s ease-in-out infinite;
}

.hero h1 {
  margin-bottom: var(--space-lg);
  line-height: 1.15;
}

.hero p {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2xl);
  max-width: 540px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Hero stats row */
.hero-stats {
  display: flex;
  gap: var(--space-2xl);
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.hero-stat-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-gold);
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

@media (max-width: 768px) {
  .hero-stats { gap: var(--space-lg); }
  .hero-stat-number { font-size: 1.5rem; }
}

/* ============================================
   SECTION HEADERS
   ============================================ */

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-3xl);
}

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

.section-header p {
  color: var(--color-text-secondary);
  font-size: 1.0625rem;
}

/* ============================================
   AI TOOLS GRID
   ============================================ */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.tool-card {
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out-expo);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-lg);
  position: relative;
}

.tool-card-icon.chat { background: rgba(184, 150, 62, 0.12); color: var(--color-gold); }
.tool-card-icon.valuation { background: rgba(26, 58, 42, 0.12); color: var(--color-green); }
.tool-card-icon.recommend { background: rgba(92, 88, 84, 0.1); color: var(--color-charcoal); }

[data-theme="dark"] .tool-card-icon.recommend { color: var(--color-text-secondary); }

.tool-card h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.tool-card p {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  margin-bottom: var(--space-lg);
  line-height: 1.7;
}

.tool-card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-gold);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: gap var(--duration-fast) var(--ease-out-expo);
}

.tool-card-link:hover { gap: 0.625rem; }
.tool-card-link svg { width: 16px; height: 16px; }

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

/* ============================================
   PROPERTY CARDS
   ============================================ */

.properties-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.property-card {
  overflow: hidden;
  padding: 0;
}

.property-card-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  background: var(--color-bg-secondary);
  position: relative;
  overflow: hidden;
}

.property-card-image .placeholder-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-bg-secondary), var(--color-bg));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

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

.property-card-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.property-tag {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: rgba(184, 150, 62, 0.1);
  color: var(--color-gold-dark);
}

[data-theme="dark"] .property-tag {
  color: var(--color-gold-light);
}

.property-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.375rem;
}

.property-card-location {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.property-card-meta {
  display: flex;
  gap: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.property-meta-item {
  display: flex;
  flex-direction: column;
}

.property-meta-value {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-text);
}

.property-meta-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

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

/* ============================================
   FAQ ACCORDION
   ============================================ */

.faq-list {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
  transition: border-color var(--duration-fast);
}

.faq-item:first-child {
  border-top: 1px solid var(--color-border);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  text-align: left;
  transition: color var(--duration-fast);
}

.faq-question:hover {
  color: var(--color-gold);
}

.faq-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-left: var(--space-md);
  transition: transform var(--duration-normal) var(--ease-out-expo);
  color: var(--color-text-muted);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-normal) var(--ease-out-expo),
              padding var(--duration-normal) var(--ease-out-expo);
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding-bottom: var(--space-lg);
}

.faq-answer p {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.8;
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.contact-info h2 {
  margin-bottom: var(--space-md);
}

.contact-info p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
}

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

.contact-method {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.contact-method-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(184, 150, 62, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold);
  flex-shrink: 0;
}

.contact-method-label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.contact-method-value {
  font-weight: 500;
  color: var(--color-text);
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.form-input,
.form-textarea,
.form-select {
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  transition: all var(--duration-fast) var(--ease-out-expo);
  outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(184, 150, 62, 0.12);
}

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

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%238A8680'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-submit-success {
  display: none;
  padding: var(--space-xl);
  text-align: center;
  background: rgba(26, 58, 42, 0.08);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26, 58, 42, 0.15);
}

.form-submit-success.show {
  display: block;
}

.form-submit-success-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

.form-submit-success h3 {
  font-family: var(--font-serif);
  margin-bottom: var(--space-sm);
}

.form-submit-success p {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
}

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

/* ============================================
   FOOTER
   ============================================ */

.footer {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer-text {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.footer-text a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--duration-fast);
}

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

/* ============================================
   AI CHAT WIDGET
   ============================================ */

.ai-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
}

.ai-chat-button {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-gold);
  transition: all var(--duration-normal) var(--ease-spring);
  position: relative;
}

.ai-chat-button:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 40px rgba(184, 150, 62, 0.35);
}

.ai-chat-button svg {
  width: 24px;
  height: 24px;
  color: white;
}

.ai-chat-button .chat-close-icon {
  display: none;
}

.ai-chat-button.active .chat-icon { display: none; }
.ai-chat-button.active .chat-close-icon { display: block; }

.ai-chat-pulse {
  position: absolute;
  inset: -4px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-gold);
  animation: pulse-ring 2s ease-out infinite;
}

.ai-chat-panel {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 380px;
  height: 520px;
  background: var(--color-bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.ai-chat-panel.active {
  display: flex;
}

.ai-chat-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.ai-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
}

.ai-chat-header-info h4 {
  font-size: 0.875rem;
  font-family: var(--font-sans);
  margin-bottom: 0;
}

.ai-chat-header-info span {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.ai-chat-message {
  max-width: 85%;
  animation: messageIn 0.3s var(--ease-out-expo);
}

.ai-chat-message.bot {
  align-self: flex-start;
}

.ai-chat-message.user {
  align-self: flex-end;
}

.ai-chat-message-content {
  padding: 0.625rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  line-height: 1.6;
}

.ai-chat-message.bot .ai-chat-message-content {
  background: var(--color-bg-secondary);
  color: var(--color-text);
  border-top-left-radius: 4px;
}

.ai-chat-message.user .ai-chat-message-content {
  background: var(--color-gold);
  color: white;
  border-top-right-radius: 4px;
}

.ai-chat-input-area {
  padding: var(--space-md);
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: var(--space-sm);
}

.ai-chat-input-area input {
  flex: 1;
  padding: 0.625rem 1rem;
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-full);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--duration-fast);
}

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

.ai-chat-input-area button {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-gold);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: all var(--duration-fast) var(--ease-spring);
  flex-shrink: 0;
}

.ai-chat-input-area button:hover {
  background: var(--color-gold-dark);
  transform: scale(1.05);
}

.ai-chat-suggestions {
  padding: 0 var(--space-md) var(--space-md);
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.ai-chat-suggestion {
  padding: 0.375rem 0.75rem;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out-expo);
  white-space: nowrap;
}

.ai-chat-suggestion:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

@media (max-width: 480px) {
  .ai-chat-panel {
    width: calc(100vw - 48px);
    right: -8px;
    height: 60vh;
  }
}

/* ============================================
   AI VALUATION PAGE
   ============================================ */

.valuation-page {
  padding-top: calc(var(--nav-height) + var(--space-4xl));
  padding-bottom: var(--space-4xl);
}

.valuation-hero {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.valuation-form-card {
  max-width: 680px;
  margin: 0 auto;
}

.valuation-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

@media (max-width: 600px) {
  .valuation-form-row { grid-template-columns: 1fr; }
}

.valuation-result {
  display: none;
  max-width: 680px;
  margin: var(--space-2xl) auto 0;
  animation: fadeInUp 0.5s var(--ease-out-expo);
}

.valuation-result.show {
  display: block;
}

.valuation-price-card {
  text-align: center;
  padding: var(--space-2xl);
  background: linear-gradient(135deg, rgba(184,150,62,0.08), rgba(184,150,62,0.02));
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-gold);
  margin-bottom: var(--space-xl);
}

.valuation-price-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.valuation-price-value {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-gold);
  line-height: 1.2;
}

.valuation-price-range {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  margin-top: 0.5rem;
}

.valuation-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.valuation-detail {
  text-align: center;
  padding: var(--space-lg);
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.valuation-detail-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
}

.valuation-detail-label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

@media (max-width: 600px) {
  .valuation-details { grid-template-columns: 1fr; }
}

/* ============================================
   AI RECOMMEND PAGE
   ============================================ */

.recommend-page {
  padding-top: calc(var(--nav-height) + var(--space-4xl));
  padding-bottom: var(--space-4xl);
}

.recommend-hero {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.recommend-form-card {
  max-width: 680px;
  margin: 0 auto;
}

.recommend-purpose-group {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.purpose-chip {
  padding: 0.5rem 1.25rem;
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-full);
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out-expo);
}

.purpose-chip:hover {
  border-color: var(--color-gold);
}

.purpose-chip.selected {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: white;
}

.type-chips {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.type-chip {
  padding: 0.5rem 1.25rem;
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-full);
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out-expo);
}

.type-chip:hover {
  border-color: var(--color-gold);
}

.type-chip.selected {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: white;
}

.recommend-loading {
  display: none;
  text-align: center;
  padding: var(--space-2xl);
  animation: fadeInUp 0.4s var(--ease-out-expo);
}

.recommend-loading.show {
  display: block;
}

.recommend-loading-dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.recommend-loading-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-gold);
  animation: loadingBounce 1.4s ease-in-out infinite;
}

.recommend-loading-dot:nth-child(2) { animation-delay: 0.16s; }
.recommend-loading-dot:nth-child(3) { animation-delay: 0.32s; }

.recommend-loading-text {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
}

.recommend-results {
  display: none;
  margin-top: var(--space-2xl);
  animation: fadeInUp 0.5s var(--ease-out-expo);
}

.recommend-results.show {
  display: block;
}

.recommend-result-card {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: var(--space-xl);
  align-items: center;
  margin-bottom: var(--space-lg);
}

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

.recommend-result-image {
  width: 200px;
  height: 140px;
  border-radius: var(--radius-md);
  background: var(--color-bg-secondary);
  overflow: hidden;
}

.recommend-result-image .placeholder-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  background: linear-gradient(135deg, var(--color-bg-secondary), var(--color-bg));
}

.recommend-result-info h3 {
  font-size: 1.125rem;
  margin-bottom: 0.375rem;
}

.recommend-result-location {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.recommend-result-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.recommend-score {
  text-align: center;
}

.recommend-score-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--color-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-gold);
  margin: 0 auto 0.5rem;
}

.recommend-score-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ============================================
   LOADING & STATES
   ============================================ */

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loadingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-in {
  animation: fadeInUp 0.6s var(--ease-out-expo) both;
}

/* Stagger children */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-gold { color: var(--color-gold); }
.text-muted { color: var(--color-text-muted); }
.text-secondary { color: var(--color-text-secondary); }
.text-center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

/* ============================================
   PRINT & ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
