/**
 * Eterno Real Estate - Design System Variables
 *
 * Luxury Dark Theme with Gold Accents
 *
 * Usage:
 *   color: var(--color-gold-primary);
 *   font-size: var(--font-size-lg);
 *   padding: var(--spacing-4);
 */

:root {
  /* ═══════════════════════════════════════════════════════════════════════════
     COLOR SYSTEM - Luxury Dark Theme
     ═══════════════════════════════════════════════════════════════════════════ */

  /* Background Layers - Deep to Light */
  --color-bg-primary: #0a0a0a;           /* Deepest background */
  --color-bg-secondary: #111111;          /* Card backgrounds */
  --color-bg-tertiary: #1a1a1a;           /* Hover states */
  --color-bg-elevated: #222222;           /* Elevated surfaces */
  --color-bg-overlay: rgba(10, 10, 10, 0.8); /* Modal overlays */

  /* Gold System - Brand Identity */
  --color-gold-primary: #c9a55c;          /* Primary gold */
  --color-gold-light: #d4b574;            /* Light gold (hover) */
  --color-gold-dark: #a68942;             /* Dark gold (pressed) */
  --color-gold-muted: rgba(201, 165, 92, 0.15);  /* Subtle gold backgrounds */
  --color-gold-glow: rgba(201, 165, 92, 0.4);    /* Gold glow effect */
  --color-gold-gradient: linear-gradient(
    135deg,
    var(--color-gold-light) 0%,
    var(--color-gold-primary) 50%,
    var(--color-gold-dark) 100%
  );

  /* Text Colors */
  --color-text-primary: #ffffff;          /* Primary text */
  --color-text-secondary: #a0a0a0;        /* Secondary text */
  --color-text-muted: #666666;            /* Muted/disabled text */
  --color-text-gold: var(--color-gold-primary); /* Accent text */
  --color-text-inverse: #0a0a0a;          /* Text on gold backgrounds */

  /* Semantic Colors */
  --color-success: #4ade80;
  --color-success-muted: rgba(74, 222, 128, 0.15);
  --color-warning: #fbbf24;
  --color-warning-muted: rgba(251, 191, 36, 0.15);
  --color-error: #f87171;
  --color-error-muted: rgba(248, 113, 113, 0.15);
  --color-info: #60a5fa;
  --color-info-muted: rgba(96, 165, 250, 0.15);

  /* Border Colors */
  --color-border-subtle: rgba(255, 255, 255, 0.08);
  --color-border-default: rgba(255, 255, 255, 0.12);
  --color-border-strong: rgba(255, 255, 255, 0.2);
  --color-border-gold: rgba(201, 165, 92, 0.3);
  --color-border-gold-strong: var(--color-gold-primary);

  /* Legacy Support - Map to Tailwind custom colors */
  --color-primary: var(--color-bg-primary);
  --color-accent: var(--color-gold-primary);
  --color-accent-light: var(--color-gold-light);


  /* ═══════════════════════════════════════════════════════════════════════════
     TYPOGRAPHY SYSTEM
     ═══════════════════════════════════════════════════════════════════════════ */

  /* Font Families */
  --font-display: 'Playfair Display', 'Noto Serif TC', Georgia, serif;
  --font-body: 'Inter', 'Noto Sans TC', 'Noto Sans Arabic', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Font Sizes - Based on 1.25 ratio (Major Third) */
  --font-size-xs: 0.75rem;      /* 12px */
  --font-size-sm: 0.875rem;     /* 14px */
  --font-size-base: 1rem;       /* 16px */
  --font-size-lg: 1.125rem;     /* 18px */
  --font-size-xl: 1.25rem;      /* 20px */
  --font-size-2xl: 1.5rem;      /* 24px */
  --font-size-3xl: 2rem;        /* 32px */
  --font-size-4xl: 2.5rem;      /* 40px */
  --font-size-5xl: 3.5rem;      /* 56px */
  --font-size-6xl: 4.5rem;      /* 72px - Hero headlines */

  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Line Heights */
  --line-height-none: 1;
  --line-height-tight: 1.1;
  --line-height-snug: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  --line-height-loose: 2;

  /* Letter Spacing */
  --letter-spacing-tighter: -0.05em;
  --letter-spacing-tight: -0.02em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.05em;
  --letter-spacing-wider: 0.1em;
  --letter-spacing-widest: 0.2em;


  /* ═══════════════════════════════════════════════════════════════════════════
     SPACING SYSTEM - 8px Base Unit
     ═══════════════════════════════════════════════════════════════════════════ */

  --spacing-px: 1px;
  --spacing-0: 0;
  --spacing-0-5: 0.125rem;   /* 2px */
  --spacing-1: 0.25rem;      /* 4px */
  --spacing-1-5: 0.375rem;   /* 6px */
  --spacing-2: 0.5rem;       /* 8px */
  --spacing-2-5: 0.625rem;   /* 10px */
  --spacing-3: 0.75rem;      /* 12px */
  --spacing-3-5: 0.875rem;   /* 14px */
  --spacing-4: 1rem;         /* 16px */
  --spacing-5: 1.25rem;      /* 20px */
  --spacing-6: 1.5rem;       /* 24px */
  --spacing-7: 1.75rem;      /* 28px */
  --spacing-8: 2rem;         /* 32px */
  --spacing-9: 2.25rem;      /* 36px */
  --spacing-10: 2.5rem;      /* 40px */
  --spacing-11: 2.75rem;     /* 44px */
  --spacing-12: 3rem;        /* 48px */
  --spacing-14: 3.5rem;      /* 56px */
  --spacing-16: 4rem;        /* 64px */
  --spacing-20: 5rem;        /* 80px */
  --spacing-24: 6rem;        /* 96px */
  --spacing-28: 7rem;        /* 112px */
  --spacing-32: 8rem;        /* 128px */
  --spacing-36: 9rem;        /* 144px */
  --spacing-40: 10rem;       /* 160px */

  /* Semantic Spacing */
  --spacing-section: var(--spacing-24);      /* Section padding */
  --spacing-section-lg: var(--spacing-32);   /* Large section padding */
  --spacing-container: var(--spacing-6);     /* Container horizontal padding */


  /* ═══════════════════════════════════════════════════════════════════════════
     BORDER RADIUS
     ═══════════════════════════════════════════════════════════════════════════ */

  --radius-none: 0;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius-full: 9999px;


  /* ═══════════════════════════════════════════════════════════════════════════
     CONTAINER WIDTHS
     ═══════════════════════════════════════════════════════════════════════════ */

  --container-xs: 320px;
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1440px;
  --container-full: 100%;


  /* ═══════════════════════════════════════════════════════════════════════════
     SHADOW SYSTEM
     ═══════════════════════════════════════════════════════════════════════════ */

  /* Standard Shadows - for dark backgrounds */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.25);
  --shadow-2xl: 0 30px 60px rgba(0, 0, 0, 0.2);

  /* Gold Glow Effects */
  --glow-gold-xs: 0 0 5px var(--color-gold-glow);
  --glow-gold-sm: 0 0 10px var(--color-gold-glow);
  --glow-gold-md: 0 0 20px var(--color-gold-glow);
  --glow-gold-lg: 0 0 40px var(--color-gold-glow);
  --glow-gold-xl: 0 0 60px var(--color-gold-glow);

  /* Combined Shadows with Glow */
  --shadow-card: var(--shadow-lg);
  --shadow-card-hover:
    var(--shadow-xl),
    0 0 40px rgba(201, 165, 92, 0.1);
  --shadow-elevated:
    var(--shadow-2xl),
    0 0 60px rgba(201, 165, 92, 0.15);

  /* Inner Shadows */
  --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-inner-lg: inset 0 4px 8px rgba(0, 0, 0, 0.4);


  /* ═══════════════════════════════════════════════════════════════════════════
     ANIMATION & TRANSITION SYSTEM
     ═══════════════════════════════════════════════════════════════════════════ */

  /* Duration */
  --duration-fastest: 50ms;
  --duration-faster: 100ms;
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
  --duration-slower: 600ms;
  --duration-slowest: 1000ms;

  /* Easing Functions */
  --ease-linear: linear;
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-expo: cubic-bezier(0.87, 0, 0.13, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* Transition Presets */
  --transition-fast: var(--duration-fast) var(--ease-out);
  --transition-normal: var(--duration-normal) var(--ease-out);
  --transition-slow: var(--duration-slow) var(--ease-out);
  --transition-slower: var(--duration-slower) var(--ease-out-expo);

  /* Specific Transitions */
  --transition-colors: color var(--transition-normal),
                       background-color var(--transition-normal),
                       border-color var(--transition-normal);
  --transition-transform: transform var(--transition-normal) var(--ease-out-expo);
  --transition-shadow: box-shadow var(--transition-normal);
  --transition-opacity: opacity var(--transition-normal);
  --transition-all: all var(--transition-normal) var(--ease-out-expo);


  /* ═══════════════════════════════════════════════════════════════════════════
     Z-INDEX SCALE
     ═══════════════════════════════════════════════════════════════════════════ */

  --z-below: -1;
  --z-base: 0;
  --z-raised: 10;
  --z-dropdown: 20;
  --z-sticky: 30;
  --z-header: 40;
  --z-overlay: 50;
  --z-modal: 60;
  --z-popover: 70;
  --z-toast: 80;
  --z-tooltip: 90;
  --z-max: 9999;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   LANGUAGE-SPECIFIC OVERRIDES
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Chinese Typography */
:lang(zh),
[lang="zh"] {
  --font-display: 'Noto Serif TC', 'Playfair Display', Georgia, serif;
  --font-body: 'Noto Sans TC', 'Inter', system-ui, sans-serif;
}

/* Arabic Typography */
:lang(ar),
[lang="ar"] {
  --font-display: 'Noto Naskh Arabic', Georgia, serif;
  --font-body: 'Noto Sans Arabic', 'Inter', system-ui, sans-serif;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Tablet and below */
@media (max-width: 1024px) {
  :root {
    --spacing-section: var(--spacing-16);
    --spacing-section-lg: var(--spacing-20);
    --font-size-6xl: 3.5rem;  /* 56px */
    --font-size-5xl: 3rem;    /* 48px */
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --spacing-section: var(--spacing-12);
    --spacing-section-lg: var(--spacing-16);
    --spacing-container: var(--spacing-4);
    --font-size-6xl: 2.5rem;  /* 40px */
    --font-size-5xl: 2rem;    /* 32px */
    --font-size-4xl: 1.75rem; /* 28px */
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  :root {
    --spacing-section: var(--spacing-10);
    --font-size-6xl: 2rem;    /* 32px */
    --font-size-5xl: 1.75rem; /* 28px */
    --font-size-4xl: 1.5rem;  /* 24px */
    --font-size-3xl: 1.25rem; /* 20px */
  }
}


/* ═══════════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES (Optional - use alongside Tailwind)
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Gold Gradient Text */
.text-gold-gradient {
  background: var(--color-gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Gold Glow on Hover */
.hover-glow-gold {
  transition: box-shadow var(--transition-normal);
}

.hover-glow-gold:hover {
  box-shadow: var(--glow-gold-md);
}

/* Card Hover Effect */
.hover-lift {
  transition: var(--transition-all);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

/* Focus Ring */
.focus-ring-gold:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-gold-muted);
}

.focus-ring-gold:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-gold-muted);
}
