/* ============================================
   Elite Properties v4 — Common Tokens & Reset
   Mobile-first, dark theme default
   ============================================ */
:root {
  --black: #000000;
  --near-black: #1d1d1f;
  --dark-surface: #272729;
  --light-gray: #f5f5f7;
  --white: #ffffff;
  --blue: #0071e3;
  --blue-dark: #005bb5;
  --blue-bright: #2997ff;

  --text-1: rgba(255,255,255,1);
  --text-2: rgba(255,255,255,0.7);
  --text-3: rgba(255,255,255,0.48);
  --border: rgba(255,255,255,0.08);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --radius: 12px;
  --radius-pill: 980px;
  --shadow: 0 5px 30px rgba(0,0,0,0.22);
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur: 0.3s;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font); font-size: 16px; line-height: 1.47;
  color: var(--text-1); background: var(--black);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden; letter-spacing: -0.02em;
  /* Mobile: pad bottom for bottom nav */
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, select { cursor: pointer; border: none; background: none; font-family: inherit; outline: none; }
ul { list-style: none; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.03em; }

/* Section */
.section-header { padding: 0 20px; margin-bottom: 24px; }
.section-header h2 { font-size: 28px; line-height: 1.1; }

.label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--blue);
  display: block; margin-bottom: 6px;
}

.section-sub {
  font-size: 15px; color: var(--text-2); margin-top: 8px;
}

/* Theme */
.theme-light {
  background: var(--light-gray); color: var(--near-black);
  --text-1: rgba(0,0,0,0.9);
  --text-2: rgba(0,0,0,0.55);
  --text-3: rgba(0,0,0,0.35);
  --border: rgba(0,0,0,0.08);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font); font-size: 15px; font-weight: 500;
  transition: all var(--dur) var(--ease);
}
.btn:active { transform: scale(0.96); }

.btn--pill { border-radius: var(--radius-pill); padding: 10px 20px; }
.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: var(--blue-dark); }
.btn--outline { border: 1px solid var(--text-2); color: var(--text-1); }
.btn--outline:hover { background: rgba(255,255,255,0.08); }
.btn--lg { padding: 14px 28px; font-size: 17px; }
.btn--block { width: 100%; justify-content: center; }

/* Scroll reveal — CSS hides, GSAP .to() reveals */
.anim { opacity: 0; transform: translateY(24px); }

/* Preloader */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--black);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px;
}
.preloader__logo {
  font-size: 24px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--white);
}
.preloader__sub {
  font-size: 13px; color: var(--text-3); letter-spacing: 0.05em;
  margin-top: -12px;
}
.preloader__line {
  width: 120px; height: 2px; background: var(--dark-surface);
  border-radius: 2px; overflow: hidden;
}
.preloader__fill {
  width: 0; height: 100%; background: var(--blue);
  border-radius: 2px;
}

/* Bottom Sheet */
.bottom-sheet {
  position: fixed; inset: 0; z-index: 200;
  pointer-events: none;
}
.bottom-sheet.open { pointer-events: auto; }

.bottom-sheet__scrim {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0; transition: opacity 0.3s;
}
.bottom-sheet.open .bottom-sheet__scrim { opacity: 1; }

.bottom-sheet__panel {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--dark-surface);
  border-radius: 16px 16px 0 0;
  padding: 12px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}
.bottom-sheet.open .bottom-sheet__panel { transform: translateY(0); }

.bottom-sheet__handle {
  width: 36px; height: 4px; background: rgba(255,255,255,0.2);
  border-radius: 2px; margin: 0 auto 16px;
}
.bottom-sheet__panel h3 { font-size: 20px; margin-bottom: 4px; }
.bottom-sheet__panel p { font-size: 14px; color: var(--text-2); margin-bottom: 20px; }
.bottom-sheet__panel .btn { margin-bottom: 8px; padding: 14px; }

/* CTA */
.cta {
  padding: 64px 20px;
  text-align: center;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.cta__title {
  font-size: 32px; font-weight: 600; font-style: italic;
  line-height: 1.1; margin-bottom: 8px;
}
.cta__sub { font-size: 15px; color: var(--text-2); margin-bottom: 28px; }

/* Footer — hidden on mobile (drawer replaces it) */
.footer { display: none; }

/* Mobile Drawer — top-left hamburger */
.drawer-toggle {
  position: fixed; top: 12px; left: 12px; z-index: 110;
  width: 40px; height: 40px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: 50%;
}
.drawer-toggle span {
  width: 16px; height: 1.5px; background: var(--white);
  border-radius: 1px;
}

/* Back button — detail page only, separate from drawer */
.back-btn {
  position: fixed; top: 12px; left: 12px; z-index: 110;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: 50%; font-size: 18px; color: var(--white);
  transition: background 0.2s;
}
.back-btn:hover { background: rgba(0,0,0,0.7); }

/* When back button exists, push hamburger to the right */
.drawer-toggle--offset { left: 60px; }

.drawer {
  position: fixed; inset: 0; z-index: 300;
  pointer-events: none;
}
.drawer.open { pointer-events: auto; }

.drawer__scrim {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0; transition: opacity 0.3s;
}
.drawer.open .drawer__scrim { opacity: 1; }

.drawer__panel {
  position: absolute; top: 0; left: 0;
  width: 80%; max-width: 320px; height: 100%;
  background: rgba(20,20,22,0.97);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.drawer.open .drawer__panel { transform: translateX(0); }

.drawer__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px;
}
.drawer__logo { font-size: 16px; font-weight: 700; letter-spacing: 0.08em; }
.drawer__close {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--text-2);
  transition: background 0.2s;
}
.drawer__close:hover { background: rgba(255,255,255,0.15); }

.drawer__body {
  flex: 1; padding: 8px 24px;
  overflow-y: auto;
}

/* Nav links — large bold */
.drawer__nav {
  margin-bottom: 28px;
}
.drawer__nav a {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 18px; font-weight: 600; color: var(--text-1);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.drawer__nav a:hover { color: var(--blue); }
.drawer__nav a::after { content: '›'; font-size: 20px; color: var(--text-3); }

/* Secondary links — smaller */
.drawer__secondary a {
  display: block; font-size: 14px; color: var(--text-2);
  padding: 8px 0; transition: color 0.2s;
}
.drawer__secondary a:hover { color: var(--blue); }

.drawer__section-title {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-3);
  margin-top: 24px; margin-bottom: 8px;
}

.lang-switch--drawer {
  background: rgba(255,255,255,0.06);
  width: fit-content;
  margin: 8px 0 16px;
}

/* Social icons row */
.drawer__socials {
  display: flex; gap: 12px; margin-top: 16px;
}
.drawer__socials a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  padding: 0; transition: background 0.2s;
}
.drawer__socials a:hover {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}
.drawer__socials svg { width: 18px; height: 18px; fill: currentColor; }

.drawer__foot {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.drawer__foot p { font-size: 11px; color: var(--text-3); margin-bottom: 6px; }
.drawer__foot-links {
  display: flex; gap: 16px; justify-content: center;
}
.drawer__foot-links a {
  font-size: 11px; color: var(--text-3);
  transition: color 0.2s;
}
.drawer__foot-links a:hover { color: var(--text-2); }

/* ===== DESKTOP (min-width: 769px) ===== */
@media (min-width: 769px) {
  body { padding-bottom: 0; }

  .section-header { max-width: 980px; margin-left: auto; margin-right: auto; padding: 0 24px; margin-bottom: 40px; }
  .section-header h2 { font-size: 40px; }

  .cta { padding: 120px 24px; min-height: 50vh; }
  .cta__title { font-size: 56px; }

  /* Desktop: show footer, hide drawer */
  .footer {
    display: block;
    padding: 64px 24px 32px;
    border-top: 1px solid var(--border);
  }
  .footer__inner { max-width: 980px; margin: 0 auto; }

  .footer__top {
    display: flex; justify-content: space-between;
    padding-bottom: 48px; gap: 48px;
  }
  .footer__brand { max-width: 260px; }
  .footer__logo {
    font-size: 18px; font-weight: 700; letter-spacing: 0.1em;
    display: block; margin-bottom: 12px;
  }
  .footer__tagline { font-size: 14px; color: var(--text-3); line-height: 1.5; }

  .footer__cols { display: flex; gap: 64px; }
  .footer__col h4 {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--text-3); margin-bottom: 12px;
  }
  .footer__col a {
    display: block; font-size: 13px; color: var(--text-2);
    padding: 3px 0; transition: color var(--dur);
  }
  .footer__col a:hover { color: var(--blue); }

  .footer__bottom {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 24px; border-top: 1px solid var(--border);
  }
  .footer__bottom p { font-size: 11px; color: var(--text-3); }
  .footer__legal { display: flex; gap: 24px; }
  .footer__legal a { font-size: 11px; color: var(--text-3); transition: color var(--dur); }
  .footer__legal a:hover { color: var(--text-2); }
  .drawer-toggle { display: none; }
  .drawer { display: none; }
  .back-btn { display: none; }
}
