/* Daffa Tower: concrete, river teal and the colour of the hour. */
:root {
  --bg: #EEF0EE; --paper: #F7F8F6; --ink: #142226; --ink2: #4A5A5E; --line: rgba(20, 34, 38, .14);
  --teal: #0E6E6A; --teal-d: #0A5551; --stone: #D9D2C5; --brass: #C8A15A; --sun: #F08D5B;
  --focus: #0E6E6A;
  --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-inout: cubic-bezier(.65, 0, .35, 1); --ease-snap: cubic-bezier(.34, 1.56, .64, 1);
  --disp: "Kufam", "Almarai", sans-serif; --text: "Almarai", system-ui, sans-serif;
  --gut: clamp(20px, 4.5vw, 64px);
}
html { background: var(--bg); }
body { background: var(--bg); color: var(--ink); font-family: var(--text); font-size: 17px; line-height: 1.75; overflow-x: hidden; }
html[lang="en"] body { line-height: 1.6; }
::selection { background: var(--teal); color: #fff; }
.skip { position: fixed; top: -60px; inset-inline-start: 12px; z-index: 60; background: var(--teal); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* ---------- bar ---------- */
.bar { position: fixed; z-index: 30; top: 12px; inset-inline: var(--gut); display: flex; align-items: center; gap: 18px; padding: 8px 10px; padding-inline-start: 18px; background: rgba(247, 248, 246, .92); border: 1px solid var(--line); border-radius: 99px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; margin-inline-end: auto; }
.mark { width: 26px; height: 26px; color: var(--teal); }
.brand-name { font-family: var(--disp); font-weight: 600; font-size: 18px; }
.nav { display: flex; align-items: center; gap: 20px; }
.nav a { text-decoration: none; color: var(--ink2); font-size: 15px; }
.nav a:hover { color: var(--teal); }
.nav .nav-cta { background: var(--teal); color: #fff; padding: 7px 16px; border-radius: 99px; }
.nav .nav-cta:hover { background: var(--teal-d); color: #fff; }
.lang { background: none; border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; font-size: 14px; color: var(--ink); }
.back-chip { position: fixed; z-index: 30; bottom: 14px; inset-inline-end: 14px; font-size: 13px; color: var(--ink2); text-decoration: none; background: rgba(247, 248, 246, .92); border: 1px solid var(--line); padding: 6px 12px; border-radius: 99px; }
.back-chip { bottom: auto; top: 76px; }

/* ---------- type & buttons ---------- */
.kicker { color: var(--teal); font-size: 14.5px; font-weight: 700; margin: 0 0 8px; }
.title { font-family: var(--disp); font-weight: 600; font-size: clamp(1.9rem, 3.6vw, 3.2rem); line-height: 1.3; margin: 0 0 12px; }
html[lang="en"] .title { line-height: 1.12; }
.lede { color: var(--ink2); margin: 0 0 16px; max-width: 36em; }
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .1em 0 .18em; margin: -.1em 0 -.18em; }
.split .wi { display: inline-block; transform: translateY(105%); transition: transform .8s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms + 80ms); }
.on .split .wi, .split.on .wi, .rm .split .wi { transform: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 99px; font-weight: 700; font-size: 15.5px; text-decoration: none; border: 1.5px solid transparent; transition: background .22s, color .22s, transform .22s var(--ease-snap); }
.btn.primary { background: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-d); transform: translateY(-2px); }
.btn.line { background: transparent; color: var(--ink); border-color: rgba(20, 34, 38, .35); }
.btn.line:hover { border-color: var(--teal); color: var(--teal); }
.btn.wide { width: 100%; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }

/* ---------- journey ---------- */
.tour { position: relative; }
.m-pin .tour { height: calc((var(--n, 6) - 1) * 118vh + 100vh); }
.journey { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: #E6F0EE; }
.m-pin .journey { position: sticky; top: 0; }
.sky, .sky i { position: absolute; inset: 0; }
.s-day { background: linear-gradient(#B9D6E1, #DCEBEC 55%, #EEF3EF); }
.s-gold { background: linear-gradient(#EDB27F, #F6D3A6 55%, #F7E7CF); opacity: 0; }
.s-dusk { background: linear-gradient(#2B2A55 0%, #5E4677 34%, #C9716A 66%, #F0A86E 86%, #F6C990 100%); opacity: 0; }
.viewport { position: absolute; inset: 0; outline-offset: -4px; }
.m-pin .viewport { overflow: hidden; }
.track { display: flex; height: 100%; }
.m-pin .track { position: absolute; top: 0; inset-inline-start: 0; will-change: transform; }
.scene { position: relative; flex: 0 0 100vw; width: 100vw; height: 100%; overflow: hidden; }
.scene.off { visibility: hidden; }
.art { position: absolute; inset: 0; }
.ly { position: absolute; inset: 0; }
.ly svg { width: 100%; height: 100%; }
.ly.far { left: -60%; right: -60%; }
.ly.lights { opacity: 0; }
.tl { position: absolute; inset: 0; background: linear-gradient(rgba(52, 36, 92, .06), rgba(52, 36, 92, .3)); opacity: 0; pointer-events: none; }
.m-pin .ly[data-k] { will-change: transform; }

.cap { position: absolute; z-index: 2; top: 100px; inset-inline-start: var(--gut); width: min(30rem, 38vw); padding: 24px 26px 22px; background: rgba(247, 248, 246, .93); border-radius: 22px; box-shadow: 0 1px 0 var(--line); }
.cap { opacity: 0; transition: opacity .5s var(--ease-out); }
.cap.on, .rm .cap { opacity: 1; }
.cap > :not(.title) { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease-out) .2s, transform .7s var(--ease-out) .2s; }
.cap.on > :not(.title), .rm .cap > * { opacity: 1; transform: none; }
.cap-hero { width: min(36rem, 44vw); }
.cap-hero .title { font-size: clamp(2.3rem, 4.8vw, 4.2rem); }
.stat { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; color: var(--ink2); font-size: 15px; }
.stat b { font-family: var(--disp); font-weight: 600; font-size: clamp(2.2rem, 3.6vw, 3.2rem); line-height: 1; color: var(--teal); font-variant-numeric: tabular-nums; }
.hint { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink2); }
.hint i { width: 34px; height: 1px; background: var(--ink2); transform-origin: right; animation: hint 2.2s var(--ease-out) infinite; }
html[dir="ltr"] .hint i { transform-origin: left; }
@keyframes hint { 0% { transform: scaleX(0); } 60%, 100% { transform: scaleX(1); opacity: 0; } }

/* floor plan */
.plan { position: absolute; z-index: 3; margin: 0; opacity: 0; bottom: 92px; inset-inline-end: var(--gut); width: 250px; padding: 14px 14px 10px; background: rgba(247, 248, 246, .93); border-radius: 18px; }
.plan svg { width: 100%; height: auto; overflow: visible; }
.plan .rooms rect { fill: transparent; transition: fill .5s; }
.plan .rooms rect.on { fill: rgba(14, 110, 106, .16); }
.plan .walls { fill: none; stroke: var(--ink); stroke-width: 6; stroke-linecap: square; stroke-dasharray: 1; stroke-dashoffset: 1; }
.plan .rail { fill: none; stroke: var(--teal); stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 1; }
.plan .furn { fill: none; stroke: #8F9C9A; stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1; }
.plan text { font-family: var(--text); font-size: 25px; fill: var(--ink2); text-anchor: middle; }
.plan .here { fill: var(--sun); stroke: #fff; stroke-width: 4; }
.plan figcaption { font-size: 12.5px; color: var(--ink2); margin-top: 4px; }

/* steps */
.steps { position: absolute; z-index: 3; bottom: 22px; inset-inline: var(--gut); }
.steps ol { list-style: none; display: flex; gap: 6px; margin: 10px 0 0; padding: 0; flex-wrap: wrap; }
.steps button { background: rgba(247, 248, 246, .9); border: 1px solid transparent; border-radius: 99px; padding: 5px 13px; font-size: 13.5px; color: var(--ink2); transition: color .3s, border-color .3s; }
.steps button.on { color: var(--teal); border-color: var(--teal); font-weight: 700; }
.bar-line { height: 3px; background: rgba(247, 248, 246, .7); border-radius: 2px; overflow: hidden; max-width: 560px; }
.bar-line i { display: block; height: 100%; background: var(--teal); transform: scaleX(0); transform-origin: right; }
html[dir="ltr"] .bar-line i { transform-origin: left; }
.swipe-ui { display: none; }

/* ---------- snap mode (touch / narrow / reduced motion) ---------- */
.m-snap .viewport { overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.m-snap .viewport::-webkit-scrollbar { display: none; }
.m-snap .scene { scroll-snap-align: start; scroll-snap-stop: always; }
@media (max-width: 760px) {
  body { font-size: 16px; }
  .bar { top: 8px; inset-inline: 10px; padding-inline-start: 14px; gap: 10px; }
  .nav a:not(.nav-cta) { display: none; }
  .nav .nav-cta { font-size: 13.5px; padding: 6px 12px; }
  .brand-name { font-size: 16px; }
  .bc-long { display: none; }
  .back-chip { bottom: auto; top: 66px; inset-inline-end: 10px; }
  .journey .art { inset: 0 0 44% 0; }
  .journey .cap, .journey .cap-hero { top: 56%; bottom: 0; inset-inline: 0; width: auto; border-radius: 22px 22px 0 0; padding: 20px 20px 80px; background: var(--paper); box-shadow: none; overflow: hidden; }
  .journey .cap .title { font-size: clamp(1.5rem, 6.6vw, 2rem); margin-bottom: 8px; }
  .journey .cap-hero .title { font-size: clamp(1.8rem, 8.6vw, 2.4rem); }
  .journey .cap .lede { font-size: 14.5px; line-height: 1.65; margin-bottom: 10px; }
  .journey .stat b { font-size: 2rem; }
  .journey .cap-hero .stat, .journey .cap-hero .hint, .journey .cap .btn.line { display: none; }
  .plan { top: 112px; bottom: auto; inset-inline-end: 10px; width: 132px; padding: 8px; border-radius: 14px; }
  .plan figcaption, .plan .labels { display: none; }
  .steps { bottom: auto; top: 56%; inset-inline: 0; margin-top: -3px; }
  .steps ol { display: none; }
  .bar-line { max-width: none; border-radius: 0; height: 3px; background: rgba(20, 34, 38, .1); }
  .cap { --pad: 0; }
  .m-pin .tour { height: calc((var(--n, 6) - 1) * 72vh + 100vh); }
}
.m-snap .swipe-ui { display: flex; position: absolute; z-index: 4; bottom: calc(14px + env(safe-area-inset-bottom)); inset-inline: 16px; align-items: center; justify-content: space-between; gap: 10px; }
.arrow { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); display: grid; place-items: center; }
.arrow svg { width: 20px; height: 20px; }
html[dir="rtl"] .arrow svg { transform: scaleX(-1); }
.swipe-hint { font-size: 13px; color: var(--ink2); }
@media (min-width: 761px) {
  .m-snap .swipe-ui { inset-inline: auto; inset-inline-end: var(--gut); bottom: 22px; width: auto; }
  .m-snap .swipe-hint { display: none; }
}

/* ---------- units ---------- */
.units, .place, .visit { padding: 110px var(--gut); }
.sec-head { max-width: 760px; margin-bottom: 34px; }
.unit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.unit { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; }
.mini { width: 100%; height: 230px; background: #E3EBE8; padding: 28px 40px 18px; }
.unit-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.unit h3 { font-family: var(--disp); font-weight: 600; font-size: 21px; margin: 0; }
.u-area { margin: 0 0 8px; color: var(--ink2); }
.u-area b { font-family: var(--disp); font-size: 40px; color: var(--teal); font-weight: 600; }
.u-meta { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.u-meta li { font-size: 13.5px; padding: 3px 10px; border-radius: 99px; background: var(--bg); }
.u-price { margin: auto 0 2px; display: flex; flex-direction: column; }
.u-price span { font-size: 13px; color: var(--ink2); }
.u-price b { font-size: 20px; font-variant-numeric: tabular-nums; }
.u-month { font-size: 13.5px; color: var(--ink2); margin: 0 0 16px; }
.rv { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease-out), transform .8s var(--ease-out); transition-delay: calc(var(--d, 0) * 90ms); }
.rv.on, .rm .rv { opacity: 1; transform: none; }

/* ---------- place ---------- */
.place { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 5vw, 80px); background: var(--ink); color: #E8EEEC; }
.place .kicker { color: #7FD0C6; }
.place .lede, .place .pay { color: #AFC0BE; }
.place .social { display: flex; gap: 18px; }
.place .social a { color: #E8EEEC; }
.amen { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(255, 255, 255, .12); border-radius: 22px; overflow: hidden; align-self: start; }
.amen li { background: var(--ink); padding: 22px; display: grid; gap: 4px; font-size: 14.5px; color: #AFC0BE; }
.amen b { font-family: var(--disp); font-weight: 600; font-size: 18px; color: #fff; }

/* ---------- visit ---------- */
.visit { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.vform { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px, 3vw, 32px); }
.vform fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.vform legend { font-size: 14px; color: var(--ink2); margin-bottom: 8px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 42px; padding: 0 15px; border-radius: 99px; border: 1px solid rgba(20, 34, 38, .22); background: transparent; font-size: 14.5px; transition: background .2s, color .2s; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.field { display: grid; gap: 6px; font-size: 14px; color: var(--ink2); }
.field input { min-height: 48px; border-radius: 12px; border: 1px solid rgba(20, 34, 38, .25); background: #fff; padding: 0 14px; color: var(--ink); }
.err { color: #B4412A; font-size: 14px; margin: -6px 0 12px; }

/* ---------- footer ---------- */
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; padding: 30px var(--gut) 70px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink2); }
.foot-name { font-family: var(--disp); font-weight: 600; color: var(--ink); font-size: 18px; margin: 0; }
.foot-note { margin: 0 auto 0 0; }
html[dir="ltr"] .foot-note { margin: 0 0 0 auto; }
.motion-btn { background: none; border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; font-size: 13px; color: var(--ink2); }
.credit { color: var(--ink2); }

/* ---------- sheet ---------- */
.sheet[hidden] { display: none; }
.sheet { position: fixed; inset: 0; z-index: 50; display: grid; align-items: end; justify-items: center; }
.sheet-bg { position: absolute; inset: 0; background: rgba(20, 34, 38, .55); opacity: 0; transition: opacity .3s; }
.sheet-card { position: relative; width: min(560px, 100%); background: var(--paper); border-radius: 24px 24px 0 0; padding: 26px 22px 30px; transform: translateY(100%); transition: transform .42s var(--ease-out); }
.sheet.open .sheet-bg { opacity: 1; }
.sheet.open .sheet-card { transform: none; }
.sheet h3 { font-family: var(--disp); font-weight: 600; font-size: 21px; margin: 0 0 14px; }
.msg { white-space: pre-wrap; font-family: var(--text); font-size: 15px; line-height: 1.7; background: #DCF3E4; border-radius: 4px 16px 16px 16px; padding: 14px 16px; margin: 0 0 18px; max-height: 46vh; overflow: auto; }
@media (min-width: 761px) { .sheet { align-items: center; } .sheet-card { border-radius: 24px; } }

@media (max-width: 1000px) { .unit-grid { grid-template-columns: 1fr; max-width: 520px; } .place, .visit { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .units, .place, .visit { padding: 80px 20px; }
  .amen { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .mini { aspect-ratio: auto; height: 170px; padding: 18px 60px 12px; }
  .foot-note { margin: 0; }
}
@media (min-width: 761px) and (max-width: 1100px) { .cap { width: min(30rem, 52vw); } .plan { width: 200px; } }
