/* ============ Aqar SaaS — design system ============ */
:root {
  --bg: #0a0f14;
  --bg-2: #0f1720;
  --surface: #131c26;
  --surface-2: #1a2633;
  --border: #22303f;
  --text: #e7eef5;
  --muted: #8ea3b5;
  --primary: #14b88a;
  --primary-2: #0d9488;
  --primary-ink: #052e26;
  --gold: #e0b64a;
  --danger: #ef4444;
  --warn: #f59e0b;
  --info: #3b82f6;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px -20px rgba(0,0,0,.6);
  --shadow-glow: 0 10px 40px -10px rgba(20,184,138,.45);
  --maxw: 1200px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, "Noto Sans Arabic", sans-serif;
}
[data-theme="light"] {
  --bg: #f4f7fa; --bg-2: #eef2f7; --surface: #ffffff; --surface-2: #f5f8fb;
  --border: #e2e8f0; --text: #0f1e2e; --muted: #5b6b7b; --shadow: 0 18px 50px -24px rgba(15,30,46,.28);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body[dir="rtl"] { font-family: "Noto Sans Arabic", var(--font); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1,h2,h3,h4 { margin: 0 0 .4em; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px;
  border: 1px solid transparent; font-weight: 600; font-size: 14px; cursor: pointer; transition: .2s ease;
  background: var(--surface-2); color: var(--text); white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #04150f; box-shadow: var(--shadow-glow); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-gold { background: linear-gradient(135deg, #eac765, var(--gold)); color: #2a1f04; }
.btn-danger { background: rgba(239,68,68,.14); color: #fca5a5; }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { padding: 9px; border-radius: 10px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.03em; }
.brand .logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--gold)); color: #04150f; font-weight: 900; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { padding: 8px 14px; border-radius: 999px; font-weight: 500; font-size: 14px; color: var(--muted); transition: .2s; }
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.chip-btn { border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  width: 40px; height: 40px; border-radius: 12px; cursor: pointer; font-size: 15px; display: grid; place-items: center; transition: .2s; }
.chip-btn:hover { color: var(--primary); border-color: var(--primary); }
.nav-burger { display: none; }
.mobile-menu { display: none; flex-direction: column; gap: 10px; padding: 8px 20px 18px; }
.mobile-menu.open { display: flex; }
.mobile-menu a:not(.btn) { padding: 12px 6px; border-bottom: 1px solid var(--border); color: var(--text); font-weight: 600; }

/* hero */
.hero { position: relative; padding: 90px 0 70px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 50% at 15% 10%, rgba(20,184,138,.22), transparent 60%),
    radial-gradient(50% 50% at 90% 20%, rgba(224,182,74,.16), transparent 55%),
    radial-gradient(60% 60% at 60% 100%, rgba(13,148,136,.16), transparent 60%); }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5vw, 58px); }
.grad-text { background: linear-gradient(120deg, var(--primary), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 540px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px rgba(20,184,138,.2); }

/* search bar */
.searchbar { margin-top: 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px; display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 8px; box-shadow: var(--shadow); }
.searchbar input, .searchbar select, .field input, .field select, .field textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; outline: none; transition: .2s; }
.searchbar input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20,184,138,.15); }

/* hero visual */
.hero-visual { position: relative; }
.hero-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.hero-card img { height: 340px; object-fit: cover; width: 100%; }
.float-card { position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 14px 16px; box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center; animation: floaty 5s ease-in-out infinite; }
.float-1 { bottom: -22px; inset-inline-start: -22px; }
.float-2 { top: -20px; inset-inline-end: -16px; animation-delay: -2.5s; }
.float-card .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #04150f; font-size: 18px; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; text-align: center; }
.stat .n { font-size: 34px; font-weight: 800; background: linear-gradient(120deg, var(--primary), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .l { color: var(--muted); font-size: 14px; }

/* sections */
.section { padding: 74px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 42px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 40px); }
.section-head p { color: var(--muted); font-size: 17px; }
.eyebrow { color: var(--primary); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }

/* property grid + cards */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: .25s ease; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); box-shadow: var(--shadow); }
.card .media { position: relative; aspect-ratio: 3/2; overflow: hidden; background: var(--surface-2); }
.card .media img { width: 100%; height: 100%; object-fit: cover; transition: .5s ease; }
.card:hover .media img { transform: scale(1.07); }
.card .tag { position: absolute; top: 12px; inset-inline-start: 12px; padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; backdrop-filter: blur(6px); }
.tag-sale { background: rgba(20,184,138,.85); color: #04150f; }
.tag-rent { background: rgba(59,130,246,.85); color: #fff; }
.tag-featured { position: absolute; top: 12px; inset-inline-end: 12px; background: rgba(224,182,74,.92); color: #2a1f04; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.card .body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.card .price { font-size: 20px; font-weight: 800; color: var(--primary); }
.card .title { font-size: 16px; margin: 6px 0 2px; }
.card .loc { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 5px; }
.card .feats { display: flex; gap: 14px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.card .feats span { display: flex; align-items: center; gap: 5px; }

/* feature cards */
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: .25s; }
.feature:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.feature .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(135deg, rgba(20,184,138,.2), rgba(224,182,74,.15)); color: var(--primary); margin-bottom: 14px; }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 30px; position: relative; transition: .25s; }
.plan.pop { border-color: var(--primary); box-shadow: var(--shadow-glow); }
.plan .pop-badge { position: absolute; top: -13px; inset-inline-start: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--gold)); color: #04150f; padding: 5px 16px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.plan .price { font-size: 44px; font-weight: 800; margin: 10px 0; }
.plan .price small { font-size: 15px; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 20px 0; }
.plan li { padding: 8px 0; display: flex; gap: 10px; color: var(--muted); font-size: 14px; }
.plan li::before { content: "✓"; color: var(--primary); font-weight: 800; }

/* cities */
.city-card { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; }
.city-card img { width: 100%; height: 100%; object-fit: cover; transition: .5s; }
.city-card:hover img { transform: scale(1.08); }
.city-card .ov { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.72), transparent 60%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; }
.city-card .ov h4 { color: #fff; font-size: 20px; margin: 0; }
.city-card .ov span { color: rgba(255,255,255,.8); font-size: 13px; }

/* footer */
.footer { border-top: 1px solid var(--border); padding: 50px 0 30px; margin-top: 40px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.footer h5 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.footer a { display: block; padding: 5px 0; color: var(--muted); font-size: 14px; }
.footer a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 30px; padding-top: 20px; text-align: center; color: var(--muted); font-size: 13px; }

/* forms / fields */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* auth */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-hero { position: relative; padding: 60px; display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(135deg, #0d3b2e, #0a2a3a); color: #fff; overflow: hidden; }
.auth-hero .hero-bg { opacity: .8; }
.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-box { width: 100%; max-width: 400px; }
.tabs { display: flex; background: var(--surface-2); border-radius: 12px; padding: 5px; margin-bottom: 22px; }
.tabs button { flex: 1; padding: 10px; border: none; background: transparent; color: var(--muted); font-weight: 600; border-radius: 8px; cursor: pointer; transition: .2s; }
.tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* toast */
.toast-wrap { position: fixed; bottom: 24px; inset-inline-end: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--surface); border: 1px solid var(--border); border-inline-start: 4px solid var(--primary);
  padding: 14px 18px; border-radius: 12px; box-shadow: var(--shadow); min-width: 260px; animation: slidein .3s ease; }
.toast.err { border-inline-start-color: var(--danger); }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* skeleton */
.skl { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%; animation: shine 1.3s infinite; border-radius: var(--radius); }
@keyframes shine { to { background-position: -200% 0; } }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; } .hero-visual { display: none; }
  .stats { grid-template-columns: repeat(2,1fr); } .grid-3, .grid-4, .plans { grid-template-columns: 1fr; }
  .searchbar { grid-template-columns: 1fr; } .footer-grid { grid-template-columns: 1fr 1fr; }
  .auth-wrap { grid-template-columns: 1fr; } .auth-hero { display: none; }
  .nav-links { display: none; } .auth-desktop { display: none; } .nav-burger { display: grid; }
  .form-row { grid-template-columns: 1fr; }
  .nav-inner { height: 62px; }
  .hero { padding: 54px 0 40px; } .section { padding: 48px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
}
