/* ============================================
   IMMO VISION 17 — DESIGN SYSTEM
   Ultra Premium Real Estate
   ============================================ */

:root {
  /* ── Colors ── */
  --black:        #000000;
  --bg:           #080808;
  --surface:      #0F0F0F;
  --surface-2:    #161616;
  --surface-3:    #1E1E1E;
  --border:       rgba(255,255,255,0.08);
  --border-gold:  rgba(201,169,110,0.25);

  --gold:         #C9A96E;
  --gold-light:   #E8C98A;
  --gold-dark:    #A07840;
  --gold-glow:    rgba(201,169,110,0.15);

  --white:        #FFFFFF;
  --text-primary: #F2F2F2;
  --text-second:  #9A9A9A;
  --text-muted:   #606060;

  --red:          #FF453A;
  --green:        #32D74B;
  --blue:         #0A84FF;

  /* ── Typography ── */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body:    'Inter', 'SF Pro Display', -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --text-xs:      0.75rem;
  --text-sm:      0.875rem;
  --text-base:    1rem;
  --text-lg:      1.125rem;
  --text-xl:      1.25rem;
  --text-2xl:     1.5rem;
  --text-3xl:     2rem;
  --text-4xl:     2.75rem;
  --text-5xl:     3.75rem;
  --text-6xl:     5rem;
  --text-hero:    clamp(3rem, 8vw, 7rem);

  --weight-light:  300;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semi:   600;
  --weight-bold:   700;

  --leading-tight:  1.1;
  --leading-snug:   1.3;
  --leading-normal: 1.6;
  --leading-loose:  1.8;

  --tracking-tight:  -0.04em;
  --tracking-snug:   -0.02em;
  --tracking-normal:  0em;
  --tracking-wide:    0.08em;
  --tracking-wider:   0.15em;

  /* ── Spacing ── */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-5:   1.25rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-32:  8rem;
  --space-40:  10rem;
  --space-48:  12rem;

  /* ── Radius ── */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-2xl:  32px;
  --radius-full: 9999px;

  /* ── Shadows ── */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:   0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:   0 16px 48px rgba(0,0,0,0.6);
  --shadow-xl:   0 32px 80px rgba(0,0,0,0.7);
  --shadow-gold: 0 8px 32px rgba(201,169,110,0.2);

  /* ── Transitions ── */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast:   150ms;
  --duration-normal: 300ms;
  --duration-slow:   600ms;
  --duration-slower: 900ms;

  /* ── Z-Index ── */
  --z-base:    0;
  --z-above:   10;
  --z-nav:     100;
  --z-overlay: 200;
  --z-modal:   300;
  --z-top:     400;

  /* ── Layout ── */
  --container-sm:  640px;
  --container-md:  768px;
  --container-lg:  1024px;
  --container-xl:  1280px;
  --container-2xl: 1440px;
  --container-3xl: 1680px;
  --nav-height: 72px;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: var(--leading-normal);
  font-weight: var(--weight-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

ul, ol { list-style: none; }

/* ── Containers ── */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container-wide {
  width: 100%;
  max-width: var(--container-3xl);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container-narrow {
  width: 100%;
  max-width: var(--container-md);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

/* ── Typography Utilities ── */
.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }

.text-hero  { font-size: var(--text-hero); }
.text-6xl   { font-size: var(--text-6xl); }
.text-5xl   { font-size: var(--text-5xl); }
.text-4xl   { font-size: var(--text-4xl); }
.text-3xl   { font-size: var(--text-3xl); }
.text-2xl   { font-size: var(--text-2xl); }
.text-xl    { font-size: var(--text-xl); }
.text-lg    { font-size: var(--text-lg); }
.text-base  { font-size: var(--text-base); }
.text-sm    { font-size: var(--text-sm); }
.text-xs    { font-size: var(--text-xs); }

.weight-light  { font-weight: var(--weight-light); }
.weight-normal { font-weight: var(--weight-normal); }
.weight-medium { font-weight: var(--weight-medium); }
.weight-semi   { font-weight: var(--weight-semi); }
.weight-bold   { font-weight: var(--weight-bold); }

.leading-tight  { line-height: var(--leading-tight); }
.leading-snug   { line-height: var(--leading-snug); }
.leading-normal { line-height: var(--leading-normal); }

.tracking-tight  { letter-spacing: var(--tracking-tight); }
.tracking-snug   { letter-spacing: var(--tracking-snug); }
.tracking-wide   { letter-spacing: var(--tracking-wide); }
.tracking-wider  { letter-spacing: var(--tracking-wider); }

.text-gold    { color: var(--gold); }
.text-primary { color: var(--text-primary); }
.text-second  { color: var(--text-second); }
.text-muted   { color: var(--text-muted); }
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }

/* ── Gold Gradient Text ── */
.text-gradient {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Label / Eyebrow ── */
.label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--gold);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.btn:hover::before { opacity: 1; }

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

.btn-primary::before {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(201,169,110,0.35);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  backdrop-filter: blur(8px);
}

.btn-outline::before {
  background: rgba(255,255,255,0.05);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-second);
  padding-inline: var(--space-4);
}

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

.btn-lg {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-base);
}

.btn-sm {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-xs);
}

.btn-icon {
  padding: var(--space-3);
  border-radius: var(--radius-full);
  width: 44px;
  height: 44px;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
}

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

.card-glass {
  background: rgba(15,15,15,0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
}

/* ── Inputs ── */
.input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  color: var(--text-primary);
  font-size: var(--text-base);
  transition: all var(--duration-normal) var(--ease-out);
  outline: none;
}

.input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.input::placeholder { color: var(--text-muted); }

.input-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-second);
  margin-bottom: var(--space-2);
}

/* ── Dividers ── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
}

.divider-gold {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semi);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.badge-gold {
  background: var(--gold-glow);
  border: 1px solid var(--border-gold);
  color: var(--gold);
}

.badge-new {
  background: rgba(50,215,75,0.1);
  border: 1px solid rgba(50,215,75,0.2);
  color: var(--green);
}

.badge-exclusive {
  background: rgba(201,169,110,0.08);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
}

/* ── Flex & Grid Utilities ── */
.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.flex-wrap  { flex-wrap: wrap; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.items-end     { align-items: flex-end; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.gap-1  { gap: var(--space-1); }
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }
.gap-12 { gap: var(--space-12); }

.grid   { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Spacing ── */
.mt-auto { margin-top: auto; }
.ml-auto { margin-left: auto; }

/* ── Visibility ── */
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

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

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

@keyframes shimmer {
  from { background-position: -200% center; }
  to   { background-position: 200% center; }
}

@keyframes goldPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,169,110,0.3); }
  50%       { box-shadow: 0 0 0 12px rgba(201,169,110,0); }
}

.animate-fade-up      { animation: fadeInUp var(--duration-slow) var(--ease-out) both; }
.animate-fade         { animation: fadeIn var(--duration-slow) var(--ease-out) both; }
.animate-slide-right  { animation: slideInRight var(--duration-slow) var(--ease-out) both; }
.animate-pulse        { animation: pulse 2s ease-in-out infinite; }
.animate-spin         { animation: spin 1s linear infinite; }
.animate-gold-pulse   { animation: goldPulse 2s ease-in-out infinite; }

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Selection ── */
::selection {
  background: var(--gold-glow);
  color: var(--gold);
}

/* ── Focus ── */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  :root { --nav-height: 64px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
    --text-6xl: 3.5rem;
    --text-5xl: 3rem;
    --text-4xl: 2.25rem;
    --text-3xl: 1.75rem;
  }
  .container, .container-wide, .container-narrow {
    padding-inline: var(--space-4);
  }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  :root {
    --text-6xl: 2.75rem;
    --text-5xl: 2.5rem;
    --text-4xl: 2rem;
  }
}
