/* ============ PRIME MASR — dark luxury 3D theme ============ */
:root {
  --bg: #0a0d14;
  --bg2: #0e1220;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-border: rgba(201, 162, 75, 0.18);
  --gold: #c9a24b;
  --gold-light: #e8cf94;
  --text: #eef1f6;
  --muted: #9aa3b2;
  --font-en-display: 'Playfair Display', serif;
  --font-en-body: 'Inter', sans-serif;
  --font-ar: 'Cairo', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-en-body);
  overflow-x: hidden;
}
html[dir="rtl"] body { font-family: var(--font-ar); }
html[dir="rtl"] .hero-title,
html[dir="rtl"] .section-title,
html[dir="rtl"] .logo-text { font-family: var(--font-ar); }

.gold { color: var(--gold); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .35s, backdrop-filter .35s, box-shadow .35s;
}
.nav.scrolled {
  background: rgba(10, 13, 20, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(201,162,75,.15);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo-mark { color: var(--gold); font-size: 20px; }
.logo-text { font-family: var(--font-en-display); font-size: 20px; letter-spacing: 3px; font-weight: 600; }
.logo-text em { font-style: normal; color: var(--gold); }
.logo-text.sm { font-size: 16px; }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 14px; letter-spacing: .5px;
  transition: color .25s;
}
.nav-links a:hover { color: var(--gold-light); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.lang-toggle {
  background: transparent; border: 1px solid var(--panel-border); color: var(--gold-light);
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: 13px;
  font-family: var(--font-ar); transition: background .25s;
}
.lang-toggle:hover { background: rgba(201,162,75,.12); }
.nav-burger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-burger span { width: 24px; height: 2px; background: var(--gold); display: block; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-block; padding: 14px 32px; border-radius: 999px;
  text-decoration: none; font-size: 15px; font-weight: 500; letter-spacing: .5px;
  border: none; cursor: pointer; transition: transform .25s, box-shadow .25s, background .25s;
}
.btn-sm { padding: 9px 20px; font-size: 13px; }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), #a87f2e);
  color: #14100a;
  box-shadow: 0 6px 24px rgba(201,162,75,.25);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(201,162,75,.4); }
.btn-ghost {
  background: transparent; color: var(--gold-light);
  border: 1px solid var(--panel-border);
}
.btn-ghost:hover { background: rgba(201,162,75,.1); transform: translateY(-2px); }
.btn-full { width: 100%; }

/* ============ HERO ============ */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
}
#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(10,13,20,.75) 100%),
    linear-gradient(to bottom, rgba(10,13,20,.35), transparent 30%, transparent 60%, var(--bg) 100%);
}
.hero-content { position: relative; z-index: 2; text-align: center; padding: 120px 24px 80px; max-width: 900px; }
.hero-kicker { color: var(--gold); letter-spacing: 6px; font-size: 13px; margin-bottom: 22px; }
.hero-title {
  font-family: var(--font-en-display);
  font-size: clamp(42px, 7vw, 84px);
  line-height: 1.08; font-weight: 600; margin-bottom: 26px;
}
.hero-sub { color: var(--muted); font-size: clamp(15px, 2vw, 19px); max-width: 640px; margin: 0 auto 38px; line-height: 1.7; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }
.hero-stats { display: flex; justify-content: center; align-items: center; gap: 36px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num { font-family: var(--font-en-display); font-size: 34px; font-weight: 700; }
.stat-label { color: var(--muted); font-size: 13px; letter-spacing: 1px; }
.stat-div { width: 1px; height: 44px; background: var(--panel-border); }

.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 26px; height: 42px; border: 1.5px solid var(--panel-border); border-radius: 999px;
}
.scroll-hint span {
  position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px;
  background: var(--gold); border-radius: 2px; animation: scrollDrop 1.8s infinite;
}
@keyframes scrollDrop { 0% { opacity: 1; transform: translateY(0);} 80% { opacity: 0; transform: translateY(16px);} 100% { opacity: 0; } }

/* ============ SECTIONS ============ */
.section { padding: 110px 0; position: relative; }
.section-alt { background: var(--bg2); }
.section-kicker { color: var(--gold); letter-spacing: 5px; font-size: 12px; text-align: center; margin-bottom: 14px; }
.section-title {
  font-family: var(--font-en-display); font-size: clamp(30px, 4.5vw, 48px);
  text-align: center; margin-bottom: 60px; font-weight: 600;
}

/* ============ LISTINGS ============ */
.listings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 34px; perspective: 1400px; }
.listing-card {
  position: relative;
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: 20px;
  overflow: hidden; transform-style: preserve-3d; transition: transform .18s ease-out, box-shadow .3s;
  will-change: transform;
}
.listing-card:hover { box-shadow: 0 30px 70px rgba(0,0,0,.55), 0 0 0 1px rgba(201,162,75,.35); }
.listing-link { position: absolute; inset: 0; z-index: 2; }
.listing-card .listing-cta { position: relative; z-index: 3; }
.listing-media { position: relative; aspect-ratio: 16/9; overflow: hidden; background: linear-gradient(135deg, #151a28, #1d2436); }
.listing-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.listing-card:hover .listing-media img { transform: scale(1.06); }
.listing-media .placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 46px; opacity: .5;
}
.listing-badge {
  position: absolute; top: 16px; inset-inline-start: 16px;
  background: rgba(10,13,20,.75); backdrop-filter: blur(8px);
  border: 1px solid var(--panel-border); color: var(--gold-light);
  padding: 6px 14px; border-radius: 999px; font-size: 12px; letter-spacing: 1px;
}
.listing-body { padding: 28px; transform: translateZ(30px); }
.listing-body h3 { font-family: var(--font-en-display); font-size: 24px; margin-bottom: 6px; }
html[dir="rtl"] .listing-body h3 { font-family: var(--font-ar); }
.listing-loc { color: var(--muted); font-size: 14px; margin-bottom: 16px; display: flex; align-items: center; gap: 6px; }
.listing-loc::before { content: '📍'; font-size: 12px; }
.listing-desc { color: var(--muted); font-size: 14.5px; line-height: 1.7; margin-bottom: 20px; }
.listing-specs { display: flex; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.spec { display: flex; flex-direction: column; gap: 2px; }
.spec b { color: var(--gold-light); font-size: 16px; font-weight: 600; }
.spec span { color: var(--muted); font-size: 12px; letter-spacing: .5px; }
.listing-feats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.feat {
  font-size: 12px; color: var(--gold-light); border: 1px solid var(--panel-border);
  padding: 5px 12px; border-radius: 999px; background: rgba(201,162,75,.06);
}

/* ============ WHY ============ */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; perspective: 1200px; }
.why-card {
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: 20px;
  padding: 42px 32px; text-align: center; transform-style: preserve-3d;
  transition: transform .18s ease-out, box-shadow .3s; will-change: transform;
}
.why-card:hover { box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.why-icon { font-size: 34px; color: var(--gold); margin-bottom: 20px; transform: translateZ(28px); }
.why-card h3 { font-size: 19px; margin-bottom: 12px; transform: translateZ(20px); }
.why-card p { color: var(--muted); font-size: 14.5px; line-height: 1.7; transform: translateZ(14px); }

/* ============ CONTACT ============ */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contact-info .section-kicker, .contact-info .section-title { text-align: start; }
.contact-info .section-title { margin-bottom: 20px; }
.contact-sub { color: var(--muted); line-height: 1.7; margin-bottom: 30px; max-width: 440px; }
.whatsapp-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #128c4b22; border: 1px solid #25d36655; color: #4be38c;
  padding: 13px 26px; border-radius: 999px; text-decoration: none; font-size: 15px;
  transition: background .25s, transform .25s;
}
.whatsapp-btn:hover { background: #128c4b3d; transform: translateY(-2px); }

.contact-form {
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: 20px;
  padding: 36px; transform-style: preserve-3d; transition: transform .18s ease-out;
}
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; letter-spacing: .5px; }
.field input, .field textarea {
  width: 100%; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px; padding: 13px 16px; color: var(--text); font-size: 15px;
  font-family: inherit; transition: border-color .25s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.form-status { margin-top: 14px; font-size: 14px; text-align: center; min-height: 20px; }
.form-status.ok { color: #4be38c; }
.form-status.err { color: #ff7a7a; }

/* ============ FOOTER ============ */
.footer { border-top: 1px solid rgba(201,162,75,.12); padding: 44px 0; background: var(--bg2); }
.footer-inner { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.footer p { color: var(--muted); font-size: 14px; }
.footer .copy { font-size: 12.5px; opacity: .7; }

/* ============ REVEAL ANIMATIONS ============ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal:nth-child(2) { transition-delay: .1s; }
.reveal:nth-child(3) { transition-delay: .2s; }
.reveal:nth-child(4) { transition-delay: .3s; }
.reveal:nth-child(5) { transition-delay: .4s; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .nav-inner { padding: 14px 18px; }
  .nav-links { display: none; }
  .nav-actions .btn { display: none; }
  .nav-burger { display: flex; padding: 10px; margin: -10px; }
  .nav { background: rgba(10,13,20,.82); backdrop-filter: blur(14px); }
  .nav.open .nav-links {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: rgba(10,13,20,.97); backdrop-filter: blur(18px);
    padding: 26px 24px; gap: 4px;
    border-bottom: 1px solid var(--panel-border);
    box-shadow: 0 30px 60px rgba(0,0,0,.5);
  }
  .nav.open .nav-links a {
    font-size: 17px; padding: 14px 6px; color: var(--text);
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .nav.open .nav-links a:last-child { border-bottom: none; }
  .contact-wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero-stats { gap: 22px; }
}

@media (max-width: 720px) {
  .container { padding: 0 18px; }
  .section { padding: 68px 0; }
  .section-title { margin-bottom: 38px; }
  .listings-grid, .why-grid { gap: 20px; }

  .hero-content { padding: 104px 18px 96px; }
  .hero-kicker { letter-spacing: 4px; font-size: 12px; margin-bottom: 16px; }
  .hero-sub { margin-bottom: 30px; }
  .hero-cta { flex-direction: column; align-items: stretch; margin-bottom: 40px; }
  .hero-cta .btn { text-align: center; padding: 16px 32px; }
  .hero-stats { gap: 16px; }
  .stat-num { font-size: 26px; }
  .stat-label { font-size: 11.5px; }
  .stat-div { height: 36px; }
  .scroll-hint { display: none; }

  .listing-body { padding: 22px 20px; }
  .listing-body h3 { font-size: 21px; }
  .listing-specs { gap: 16px; }
  .listing-card .listing-cta { display: block; text-align: center; padding: 13px 20px; font-size: 14px; }

  .why-card { padding: 32px 24px; }

  .contact-form { padding: 24px 20px; }
  .field input, .field textarea { font-size: 16px; padding: 14px 16px; } /* 16px prevents iOS auto-zoom */
  .whatsapp-btn { width: 100%; justify-content: center; }
  .btn { padding: 15px 32px; }

  .footer { padding: 34px 0; }
}

/* Touch devices: no hover-tilt, no hover zoom */
@media (hover: none) {
  .tilt { transform: none !important; }
  .listing-card:hover .listing-media img { transform: none; }
}
