/* Al Ghaf Villas — a made-up villa community off Al Qudra Road. Kaiven Studios concept. */
:root {
  --sand: #ece1cc;
  --sand-2: #e2d3b8;
  --white: #fbf8f2;
  --dune: #c9a877;
  --green: #3e5b3a;
  --deep: #1f2e22;
  --terra: #b5582f;
  --ink: #1d1b16;
  --muted: #5d574b;
  --line: rgba(29, 27, 22, .14);
  --serif: 'Young Serif', Georgia, serif;
  --sans: 'Figtree', system-ui, sans-serif;
  --ar: 'Tajawal', system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { background: var(--sand); color: var(--ink); font: 400 16px/1.6 var(--sans); }
html[lang="ar"] body, html[lang="ar"] button, html[lang="ar"] input { font-family: var(--ar); }
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; }
fieldset { border: 0; }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; }

.sec { display: flex; gap: 12px; align-items: baseline; font: 600 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--green); margin-bottom: 20px; }
.sec span:first-child { font: 400 14px/1 var(--serif); letter-spacing: 0; color: var(--terra); }
html[lang="ar"] .sec { letter-spacing: 0; font: 700 14px/1 var(--ar); }
h1, h2 { font: 400 clamp(40px, 5.8vw, 88px)/1.02 var(--serif); letter-spacing: -.015em; }
h1 em, h2 em { font-style: normal; color: var(--green); }
html[lang="ar"] h1, html[lang="ar"] h2 { font: 700 clamp(36px, 5.2vw, 76px)/1.3 var(--ar); letter-spacing: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 12px; background: var(--green); color: var(--white); font-weight: 600; font-size: 14px; text-decoration: none; transition: background .25s; }
.btn:hover, .btn:focus-visible { background: var(--deep); }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 13px; }
.btn.ghost { background: transparent; border: 1px solid currentColor; color: inherit; }
.btn.ghost:hover { background: var(--white); color: var(--ink); }
.lead { color: var(--muted); max-width: 44ch; margin-top: 18px; font-size: 17px; }
.chip { min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 99px; font-size: 14px; color: var(--muted); background: var(--white); transition: all .2s; }
.chip:hover { border-color: var(--green); color: var(--ink); }
.chip.on { background: var(--green); border-color: var(--green); color: var(--white); }

/* nav */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: 68px; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--white); transition: background .3s, color .3s; }
.nav.solid { background: rgba(236, 225, 204, .94); backdrop-filter: blur(8px); color: var(--ink); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark { width: 34px; height: 27px; }
.logo-en { font: 400 21px/1 var(--serif); }
.logo-ar { font: 700 19px/1 var(--ar); opacity: .8; }
.links { display: flex; gap: 26px; font-size: 14px; font-weight: 500; }
.links a { text-decoration: none; opacity: .85; }
.links a:hover { opacity: 1; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.lang { min-height: 40px; padding: 0 15px; border: 1px solid currentColor; border-radius: 99px; font: 700 14px/1 var(--ar); }
html[lang="ar"] .lang { font: 600 13px/1 var(--sans); }

/* 1. film */
.film { position: relative; height: 700vh; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--deep); }
#road { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(20, 28, 20, .66), rgba(20, 28, 20, .2) 50%, transparent 70%), linear-gradient(0deg, rgba(20, 28, 20, .45), transparent 35%), linear-gradient(rgba(20, 28, 20, .45), transparent 20%); }
html[dir="rtl"] .shade { transform: scaleX(-1); }
.chapter { position: absolute; z-index: 3; left: clamp(22px, 6vw, 96px); top: 50%; transform: translateY(-50%); max-width: min(640px, 54vw); color: var(--white); opacity: 0; will-change: opacity; }
html[dir="rtl"] .chapter { left: auto; right: clamp(22px, 6vw, 96px); }
.chapter .sec { color: var(--white); }
.chapter .sec span:first-child { color: var(--dune); }
.chapter h1 em, .chapter h2 em { color: var(--dune); }
.chapter .sub { margin-top: 18px; max-width: 42ch; font-size: 17px; color: rgba(251, 248, 242, .88); }
.chapter .btn { margin-top: 26px; background: var(--white); color: var(--ink); }
.chapter .btn:hover { background: var(--dune); }
.hint { position: absolute; z-index: 3; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; font: 600 11px/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--white); }
.hint i { width: 1px; height: 30px; background: var(--white); transform-origin: top; animation: line 1.8s infinite; }
@keyframes line { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
html[lang="ar"] .hint { letter-spacing: 0; font: 500 13px/1 var(--ar); }

/* 2. facts */
.facts { background: var(--deep); color: var(--white); }
.facts-row { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 32px 0; display: grid; gap: 6px; }
.fact + .fact { border-inline-start: 1px solid rgba(251, 248, 242, .16); padding-inline-start: 28px; }
.fact b { font: 400 clamp(32px, 3.8vw, 52px)/1 var(--serif); }
.fact span { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--dune); }
html[lang="ar"] .fact span { letter-spacing: 0; font-size: 14px; }

/* 3. masterplan */
.master { padding: clamp(90px, 12vw, 150px) 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 36px 0 22px; }
.only { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 6px; font-size: 14px; color: var(--muted); cursor: pointer; }
.only input { accent-color: var(--green); width: 18px; height: 18px; }
.map-wrap { display: grid; grid-template-columns: 1.7fr 1fr; gap: clamp(20px, 3vw, 36px); align-items: start; }
.map-box { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 14px; }
.map { width: 100%; height: auto; display: block; }
.map .dunes { fill: var(--sand-2); }
.map .road { fill: none; stroke: #d6c7aa; stroke-width: 9; stroke-linecap: round; }
.map .park { fill: #c8d3b2; }
.map .lake { fill: #a9c7cf; }
.map .tree { fill: var(--green); opacity: .55; }
.map .lbl { font: 600 10px var(--sans); letter-spacing: .2em; fill: var(--muted); text-anchor: middle; }
html[lang="ar"] .map .lbl { letter-spacing: 0; font: 700 12px var(--ar); }
.map .plot { stroke: var(--white); stroke-width: 1.2; cursor: pointer; transition: opacity .25s, fill .25s; }
.map .plot.free { fill: var(--green); }
.map .plot.res { fill: var(--dune); }
.map .plot.sold { fill: #b9b2a3; }
.map .plot:hover { fill: var(--terra); }
.map .plot.on { fill: var(--terra); stroke: var(--ink); stroke-width: 2; }
.map .plot.dim { opacity: .14; pointer-events: none; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 16px; padding: 10px 6px 2px; font-size: 13px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 7px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; }
.l-free { background: var(--green); } .l-res { background: var(--dune); } .l-sold { background: #b9b2a3; }
.plot-card { position: sticky; top: 90px; background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: clamp(22px, 2.6vw, 32px); }
.plot-card .k { font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--terra); }
html[lang="ar"] .plot-card .k { letter-spacing: 0; font-size: 14px; }
.plot-card h3 { font: 400 clamp(34px, 3.6vw, 48px)/1.1 var(--serif); margin-top: 6px; }
html[lang="ar"] .plot-card h3 { font: 700 36px/1.3 var(--ar); }
.plot-card h3 b { font-weight: 400; }
.status { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; font-weight: 600; }
.status i { width: 9px; height: 9px; border-radius: 50%; }
.specs { display: grid; grid-template-columns: 1fr 1fr; margin: 20px 0; border-top: 1px solid var(--line); }
.specs div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.specs div:nth-child(odd) { padding-inline-end: 10px; }
.specs dt { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
html[lang="ar"] .specs dt { letter-spacing: 0; font-size: 13px; }
.specs dd { font-weight: 600; margin-top: 2px; }
.plot-card .price { font: 400 28px/1.2 var(--serif); margin-bottom: 18px; }
.plot-card .price small { font: 500 12px var(--sans); color: var(--muted); margin-inline-end: 6px; }
.plot-card .btn { width: 100%; }
.plot-card.flash h3, .plot-card.flash .specs { animation: rise .45s cubic-bezier(.2, .7, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* 4. villas */
.villas { padding: clamp(90px, 12vw, 150px) 0; background: var(--white); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 46px; }
.card { background: var(--sand); border-radius: 20px; overflow: hidden; display: grid; }
.card .ph { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.2, .7, .2, 1), opacity .4s; }
.card:hover .ph img { transform: scale(1.04); }
.card .views { display: flex; gap: 6px; padding: 14px 22px 0; }
.card .views button { min-height: 32px; padding: 0 12px; border-radius: 99px; background: var(--white); font-size: 12px; font-weight: 600; color: var(--ink); }
.card .views button[aria-pressed="true"] { background: var(--green); color: var(--white); }
.card .body { padding: 14px 22px 24px; }
.card h3 { font: 400 30px/1.1 var(--serif); }
html[lang="ar"] .card h3 { font: 700 28px/1.3 var(--ar); }
.card .alt { font: 500 15px var(--ar); color: var(--muted); }
html[lang="ar"] .card .alt { font: 400 15px var(--serif); }
.card p.d { color: var(--muted); font-size: 15px; margin-top: 10px; }
.card ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.card li { font-size: 13px; padding: 4px 10px; border-radius: 99px; background: var(--white); }
.card .from { margin-top: 16px; font: 400 22px var(--serif); }
.card .from small { font: 500 12px var(--sans); color: var(--muted); margin-inline-end: 6px; }

/* 5. a day */
.day { position: relative; overflow: hidden; color: var(--ink); }
.sky { position: absolute; inset: 0; background: linear-gradient(#cfe3ee, #f4efe6); transition: background .2s linear; }
.sun { position: absolute; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, #fff7e0 0 38%, rgba(255, 220, 150, .55) 40%, transparent 70%); transform: translate(-50%, -50%); left: 10%; top: 70%; }
.skyline { position: absolute; left: 0; right: 0; bottom: -2px; width: 100%; height: clamp(110px, 20vw, 200px); color: var(--deep); }
.day-copy { position: relative; z-index: 1; padding: clamp(90px, 12vw, 150px) 0 clamp(140px, 18vw, 220px); }
.day.dark { color: var(--white); }
.day.dark .sec, .day.dark .lead { color: rgba(251, 248, 242, .9); }
.day.dark .sec span:first-child { color: var(--dune); }
#dTitle { min-height: 2.1em; max-width: 16ch; transition: opacity .3s; }
.lead#dText { min-height: 3.4em; color: inherit; opacity: .85; }
.time { display: flex; align-items: center; gap: 18px; margin-top: 30px; max-width: 560px; }
.time b { font: 400 28px/1 var(--serif); min-width: 112px; }
.time input { flex: 1; accent-color: var(--terra); height: 28px; }
.near { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.near li { padding: 8px 14px; border-radius: 99px; background: rgba(251, 248, 242, .75); color: var(--ink); font-size: 14px; }
.near li b { font-weight: 600; }

/* 6. visit */
.visit { padding: clamp(90px, 12vw, 150px) 0; background: var(--sand-2); }
.visit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.form { display: grid; gap: 16px; background: var(--white); padding: clamp(24px, 3vw, 40px); border-radius: 20px; }
.form label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
html[lang="ar"] .form label, html[lang="ar"] .seg legend { letter-spacing: 0; font-size: 14px; }
.form input:not([type=radio]) { min-height: 48px; padding: 0 14px; border: 1px solid var(--line); background: var(--sand); border-radius: 10px; font-size: 16px; letter-spacing: 0; text-transform: none; font-weight: 400; color: var(--ink); }
.form input:focus { outline: 2px solid var(--green); outline-offset: 0; }
.form .bad { border-color: #a33 !important; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg legend { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; width: 100%; }
.seg label { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 99px; letter-spacing: 0; text-transform: none; font-weight: 500; font-size: 14px; color: var(--ink); cursor: pointer; }
.seg input { accent-color: var(--green); }

/* 7. end */
.end { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; align-content: center; gap: 6px; padding: 80px 20px; text-align: center; background: var(--deep); color: var(--white); }
.end-mark { width: 110px; height: 88px; color: var(--dune); margin-bottom: 14px; }
.big { font: 400 clamp(54px, 12vw, 180px)/1 var(--serif); }
.big-ar { font: 700 clamp(30px, 4.5vw, 58px)/1.4 var(--ar); color: var(--dune); }
.see { font-size: 19px; color: rgba(251, 248, 242, .82); margin: 8px 0 26px; }

/* note */
.note { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(29, 27, 22, .55); backdrop-filter: blur(4px); }
.note[hidden] { display: none; }
.note-card { position: relative; width: min(440px, 100%); padding: 34px 30px 30px; background: var(--white); border-radius: 20px; }
.note-card h3 { font: 400 26px/1.2 var(--serif); padding-inline-end: 30px; }
html[lang="ar"] .note-card h3 { font: 700 24px/1.4 var(--ar); }
.note-card p { color: var(--muted); margin-top: 12px; }
.note-card .note-q { color: var(--ink); margin: 22px 0 14px; }
.note-x { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; font-size: 26px; line-height: 1; color: var(--muted); }
html[dir="rtl"] .note-x { right: auto; left: 12px; }
.credit { padding: 26px 20px; text-align: center; font-size: 12px; color: var(--muted); background: var(--sand); }

/* phones */
@media (max-width: 960px) {
  .links { display: none; }
  .map-wrap, .visit-grid { grid-template-columns: 1fr; }
  .plot-card { position: static; }
  .cards { grid-template-columns: 1fr; }
  .facts-row { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid rgba(251, 248, 242, .16); }
}
@media (max-width: 640px) {
  .nav .btn.small { display: none; }
  .chapter { top: auto; bottom: 80px; transform: none; max-width: none; right: 22px; }
  html[dir="rtl"] .chapter { left: 22px; }
  .shade { background: linear-gradient(0deg, rgba(20, 28, 20, .8), rgba(20, 28, 20, .25) 55%, rgba(20, 28, 20, .35)); }
  html[dir="rtl"] .shade { transform: none; }
  .map-box { padding: 6px; border-radius: 14px; }
  .time b { font-size: 22px; min-width: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
