/* ==========================================================================
   Real Estate demo — نُخبة للتطوير العقاري
   Luxurious and calm: midnight green, champagne and ivory; Cormorant + Outfit
   (English), El Messiri + Alexandria (Arabic, 400–600). A skyline intro, then a
   full-bleed hero slider with property cards. Rules under .re-body, classes
   prefixed re-. Layout answers to the demo's width (container "demo").

   1. Fonts   2. Tokens & base   3. Buttons   4. Header   5. Hero & search
   6. Stats   7. Sections   8. Featured   9. Listings   10. Areas
   11. About   12. Contact   13. Footer   14. Modal   15. Motion
   16. Narrower widths
   ========================================================================== */

/* 1. Fonts (SIL Open Font License): Cormorant Garamond + Outfit in English,
   El Messiri + Alexandria in Arabic (400–600 only). ----------------------- */
@font-face {
	font-family: "RE Cormorant";
	font-style: italic;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/cormorant-400-700-italic-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "RE Cormorant";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/cormorant-400-700-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "RE Outfit";
	font-style: normal;
	font-weight: 300 600;
	font-display: swap;
	src: url("../fonts/outfit-300-600-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "RE Messiri";
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url("../fonts/messiri-400-600-arabic.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
	font-family: "RE Alexandria";
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url("../fonts/alexandria-400-600-arabic.woff2") format("woff2");
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}


/* 2. Tokens & base ----------------------------------------------------------- */
.re-body {
	/* Midnight green, champagne and ivory. "ink" and "gold" keep their roles. */
	--re-ink: #10201b;
	--re-ink-2: #193029;
	--re-gold: #b08a52;
	--re-gold-2: #d6b783;
	--re-ivory: #f6f2ea;
	--re-stone: #e8e0d2;
	--re-text: #1a2421;
	--re-muted: #66706b;
	--re-line: rgb(176 138 82 / 0.35);
	--re-serif: "RE Cormorant", "Cormorant Garamond", Georgia, serif;
	--re-sans: "RE Outfit", "Segoe UI", Arial, sans-serif;
	--re-enter: 1.65s; /* When the hero starts moving: just after the intro. */
	--re-dir: 1;
	--re-start: left;
	--re-ease: cubic-bezier(0.25, 0.8, 0.25, 1);

	margin: 0;
	font-family: var(--re-sans);
	font-size: 16px;
	font-weight: 300;
	line-height: 1.85;
	color: var(--re-text);
	background: var(--re-ivory);
	-webkit-font-smoothing: antialiased;
}

[dir="rtl"] .re-body {
	--re-dir: -1;
	--re-start: right;
}

/* Arabic: El Messiri for display, Alexandria for text; never lighter than 400. */
[lang="ar"] .re-body {
	--re-serif: "RE Messiri", "RE Cormorant", Tahoma, serif;
	--re-sans: "RE Alexandria", "RE Outfit", Tahoma, sans-serif;

	font-weight: 400;
}

[lang="ar"] .re-body * {
	letter-spacing: 0 !important;
	text-transform: none !important;
}

/* Later slides, and the first one when it comes back, move at once. */
.re-slide:not(:first-child),
.re-hero.is-started {
	--re-enter: 0s;
}

:where(.re-body) *,
:where(.re-body) *::before,
:where(.re-body) *::after {
	box-sizing: border-box;
}

:where(.re-body) h1,
:where(.re-body) h2,
:where(.re-body) h3,
:where(.re-body) h4,
:where(.re-body) p,
:where(.re-body) ul,
:where(.re-body) figure {
	margin: 0;
	padding: 0;
}

:where(.re-body) ul {
	list-style: none;
}

:where(.re-body) a {
	color: inherit;
	text-decoration: none;
}

:where(.re-body) button,
:where(.re-body) input,
:where(.re-body) select {
	font: inherit;
	color: inherit;
}

:where(.re-body) img,
:where(.re-body) svg {
	display: block;
}

.re-body :focus-visible {
	outline: 2px solid var(--re-gold);
	outline-offset: 3px;
}

.re-body [id] {
	scroll-margin-top: 84px;
}

.re-wrap {
	width: 100%;
	max-width: 1240px;
	margin-inline: auto;
	padding-inline: clamp(16px, 4cqi, 40px);
}

.re-photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.re-icon {
	flex: none;
	width: 1.15em;
	height: 1.15em;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.re-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.re-ltr {
	text-align: end;
}

[dir="ltr"] .re-ltr {
	text-align: start;
}

.re-body em {
	font-style: normal;
	color: var(--re-gold);
}

.re-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--re-gold);
}

.re-eyebrow::before {
	content: "";
	width: 34px;
	height: 1px;
	background: currentColor;
}

/* 3. Buttons ------------------------------------------------------------------ */
.re-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 50px;
	padding: 0 26px;
	font-weight: 500;
	white-space: nowrap;
	border: 1px solid transparent;
	border-radius: 2px;
	cursor: pointer;
	transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.3s var(--re-ease);
}

.re-btn:hover {
	transform: translateY(-2px);
}

.re-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.re-btn--gold {
	color: var(--re-ink);
	background: var(--re-gold);
}

.re-btn--gold:hover {
	background: var(--re-gold-2);
}

.re-btn--ink {
	color: var(--re-ivory);
	background: var(--re-ink);
}

.re-btn--ink:hover {
	background: var(--re-gold);
	color: var(--re-ink);
}

.re-btn--line {
	color: var(--re-ivory);
	border-color: var(--re-gold);
}

.re-btn--line:hover {
	color: var(--re-ink);
	background: var(--re-gold);
}

.re-btn--line-dark {
	color: var(--re-ink);
	border-color: var(--re-ink);
}

.re-btn--block {
	width: 100%;
}

.re-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0 0 4px;
	font-weight: 500;
	color: var(--re-gold);
	background: none;
	border: 0;
	border-bottom: 1px solid currentColor;
	cursor: pointer;
}

.re-link .re-icon {
	transition: translate 0.3s var(--re-ease);
}

.re-link:hover .re-icon {
	translate: -4px 0;
}

/* The arrow points forward: left in Arabic, right in English. */
[dir="ltr"] .re-link .re-icon,
[dir="ltr"] .re-slide .re-btn .re-icon {
	scale: -1 1;
}

[dir="ltr"] .re-link:hover .re-icon {
	translate: 4px 0;
}

/* 4. Header: transparent over the hero, navy once the page scrolls. ---------- */
.re-header {
	position: sticky;
	top: 0;
	z-index: 50;
	margin-bottom: -84px;
	color: var(--re-ivory);
	transition: background-color 0.4s, box-shadow 0.4s;
}

.re-header.is-scrolled {
	background: rgb(16 32 27 / 0.94);
	box-shadow: 0 12px 30px -20px rgb(0 0 0 / 0.7);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.re-header__in {
	display: flex;
	align-items: center;
	gap: 28px;
	min-height: 84px;
}

.re-logo {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: var(--re-gold);
}

.re-logo__mark {
	width: 38px;
	height: 38px;
}

.re-logo span {
	display: grid;
	line-height: 1.1;
}

.re-logo b {
	font-family: var(--re-serif);
	font-size: 1.7rem;
	color: var(--re-ivory);
}

.re-logo small {
	font-size: 0.75rem;
	letter-spacing: 0.05em;
	color: var(--re-gold-2);
}

.re-nav {
	display: flex;
	gap: 30px;
	margin-inline-start: auto;
	font-weight: 400;
}

.re-nav a {
	position: relative;
	padding-block: 6px;
	opacity: 0.85;
	transition: opacity 0.2s;
}

.re-nav a::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	height: 1px;
	background: var(--re-gold);
	transform: scaleX(0);
	transition: transform 0.35s var(--re-ease);
}

.re-nav a:hover {
	opacity: 1;
}

.re-nav a:hover::after {
	transform: scaleX(1);
}

.re-header__tools {
	display: flex;
	align-items: center;
	gap: 14px;
}

.re-fav-count {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px;
	color: var(--re-gold-2);
}

.re-lang {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 12px;
	font-size: 0.88rem;
	font-weight: 400;
	color: var(--re-gold-2);
	border: 1px solid var(--re-line);
	border-radius: 2px;
	transition: color 0.25s, border-color 0.25s;
}

.re-lang:hover {
	color: var(--re-ivory);
	border-color: var(--re-gold);
}

.re-lang .re-icon {
	width: 17px;
	height: 17px;
}

.re-fav-count.is-on .re-icon {
	fill: var(--re-gold);
	stroke: var(--re-gold);
}

.re-burger {
	display: none;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	color: var(--re-ivory);
	background: none;
	border: 1px solid var(--re-line);
	border-radius: 2px;
	cursor: pointer;
}

.re-burger .re-icon:last-child,
.re-burger[aria-expanded="true"] .re-icon:first-child {
	display: none;
}

.re-burger[aria-expanded="true"] .re-icon:last-child {
	display: block;
}

/* 5. Hero slider & search ---------------------------------------------------- */
/* Full-bleed homes that cross-fade with a slow push-in; the words on the start
   side, a property card on the end side. Without JavaScript only the first
   slide shows. */
.re-hero {
	position: relative;
	min-height: clamp(660px, 94vh, 960px);
	overflow: hidden;
	color: var(--re-ivory);
	background: var(--re-ink);
	isolation: isolate;
}

.re-slide {
	position: absolute;
	inset: 0;
	display: grid;
	align-items: end;
	opacity: 0;
	visibility: hidden;
	transition: opacity 1.2s var(--re-ease), visibility 1.2s;
}

.re-slide.is-active {
	z-index: 1;
	opacity: 1;
	visibility: visible;
}

.re-slide__media {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
}

.re-slide__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(to top, rgb(16 32 27 / 0.94) 6%, rgb(16 32 27 / 0.4) 52%, rgb(16 32 27 / 0.6) 100%);
}

.re-slide__media .re-photo {
	transform: scale(1.16) translateX(calc(-1.5% * var(--re-dir, 1)));
	transition: transform 8s cubic-bezier(0.2, 0.6, 0.3, 1);
}

.re-slide.is-active .re-slide__media .re-photo {
	transform: scale(1.02) translateX(0);
}

.re-slide__in {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: end;
	gap: 40px;
	padding-block: 150px 190px;
}

.re-slide__text {
	display: grid;
	justify-items: start;
	gap: 18px;
	max-width: 860px;
}

.re-kicker {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-size: 0.82rem;
	font-weight: 500;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--re-gold-2);
}

.re-kicker::before {
	content: "";
	width: 38px;
	height: 1px;
	background: currentColor;
}

[lang="ar"] .re-kicker {
	font-size: 0.95rem;
}

.re-slide__title {
	font-family: var(--re-serif);
	font-size: clamp(2.9rem, 1.4rem + 5.2cqi, 6rem);
	font-weight: 500;
	line-height: 1;
	letter-spacing: -0.01em;
}

.re-slide__title em {
	font-style: italic;
	color: var(--re-gold-2);
}

[lang="ar"] .re-slide__title {
	font-size: clamp(2.4rem, 1.2rem + 4cqi, 4.7rem);
	font-weight: 600;
	line-height: 1.45;
}

[lang="ar"] .re-slide__title em {
	font-style: normal;
}

.re-mask {
	display: block;
	overflow: hidden;
	padding-block: 0.04em 0.1em;
}

.re-mask > * {
	display: inline-block;
}

.re-hero__lead {
	max-width: 36em;
	font-size: 1.08rem;
	color: rgb(246 242 234 / 0.82);
}

/* The property card: frosted glass with a champagne edge. */
.re-slide__card {
	display: grid;
	gap: 6px;
	min-width: 280px;
	padding: 22px 24px;
	color: var(--re-ivory);
	background: rgb(16 32 27 / 0.45);
	border: 1px solid rgb(200 164 107 / 0.45);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.re-slide__card small {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.85rem;
	color: var(--re-gold-2);
}

.re-slide__card small .re-icon {
	width: 16px;
	height: 16px;
}

.re-slide__card b {
	font-family: var(--re-serif);
	font-size: 1.5rem;
	font-weight: 500;
}

.re-slide__card strong {
	font-family: var(--re-serif);
	font-size: 2rem;
	font-weight: 600;
	line-height: 1.1;
	color: var(--re-gold-2);
}

.re-slide__card .re-specs {
	margin-top: 8px;
	padding-top: 12px;
	color: rgb(246 242 234 / 0.85);
	border-top: 1px solid rgb(200 164 107 / 0.3);
}

/* The active slide's words and card arrive step by step. */
.re-slide.is-active .re-kicker,
.re-slide.is-active .re-hero__lead,
.re-slide.is-active .re-btn {
	animation: re-rise 1s var(--re-ease) both;
}

.re-slide.is-active .re-mask > * {
	animation: re-line 1.1s var(--re-ease) both;
}

.re-slide.is-active .re-slide__card {
	animation: re-card 1.1s var(--re-ease) both;
	animation-delay: calc(var(--re-enter) + 0.55s);
}

.re-slide.is-active .re-kicker {
	animation-delay: calc(var(--re-enter) + 0.05s);
}

.re-slide.is-active .re-mask:nth-child(1) > * {
	animation-delay: calc(var(--re-enter) + 0.15s);
}

.re-slide.is-active .re-mask:nth-child(2) > * {
	animation-delay: calc(var(--re-enter) + 0.3s);
}

.re-slide.is-active .re-hero__lead {
	animation-delay: calc(var(--re-enter) + 0.48s);
}

.re-slide.is-active .re-btn {
	animation-delay: calc(var(--re-enter) + 0.6s);
}

@keyframes re-card {
	from {
		opacity: 0;
		transform: translateX(calc(40px * var(--re-dir, 1)));
	}
}

/* Controls: numbered names on a champagne line, round arrows. */
.re-slider__ui {
	position: absolute;
	inset-inline: 0;
	bottom: 100px;
	z-index: 2;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	animation: re-rise 1s var(--re-ease) calc(var(--re-enter) + 0.7s) both;
}

.re-slider__tabs {
	display: flex;
	gap: 22px;
}

.re-slider__tabs button {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: baseline;
	column-gap: 10px;
	row-gap: 10px;
	width: 170px;
	padding: 4px 0;
	color: rgb(246 242 234 / 0.6);
	text-align: start;
	background: none;
	border: 0;
	cursor: pointer;
	transition: color 0.3s;
}

.re-slider__tabs b {
	font-family: var(--re-serif);
	font-size: 1.3rem;
	font-weight: 500;
}

.re-slider__tabs span {
	font-size: 0.85rem;
}

.re-slider__tabs i {
	position: relative;
	grid-column: 1 / -1;
	display: block;
	height: 1px;
	background: rgb(246 242 234 / 0.25);
}

.re-slider__tabs i::after {
	content: "";
	position: absolute;
	inset: -1px 0;
	background: var(--re-gold);
	transform: scaleX(0);
	transform-origin: var(--re-start, left);
}

.re-slider__tabs button[aria-selected="true"],
.re-slider__tabs button:hover {
	color: var(--re-ivory);
}

.re-slider__tabs button[aria-selected="true"] i::after {
	transform: scaleX(1);
}

.re-hero.is-playing .re-slider__tabs button[aria-selected="true"] i::after {
	animation: re-fill var(--re-slide-time, 6.5s) linear both;
}

.re-hero.is-paused .re-slider__tabs button[aria-selected="true"] i::after {
	animation-play-state: paused;
}

@keyframes re-fill {
	from {
		transform: scaleX(0);
	}
}

.re-slider__arrows {
	display: flex;
	gap: 10px;
}

.re-slider__arrow {
	display: grid;
	place-items: center;
	width: 54px;
	height: 54px;
	padding: 0;
	color: var(--re-ivory);
	background: transparent;
	border: 1px solid rgb(200 164 107 / 0.6);
	border-radius: 50%;
	cursor: pointer;
	transition: color 0.3s, background-color 0.3s;
}

.re-slider__arrow:hover {
	color: var(--re-ink);
	background: var(--re-gold-2);
}

[dir="rtl"] .re-slider__arrow .re-icon {
	scale: -1 1;
}

.re-body:not(.re-ready) .re-slider__ui {
	display: none;
}

/* The search floats over the foot of the slider. */
.re-finder {
	position: relative;
	z-index: 3;
	margin-top: -64px;
	animation: re-rise 1s var(--re-ease) calc(var(--re-enter) + 0.85s) both;
}

.re-search {
	display: grid;
	grid-template-columns: repeat(4, 1fr) auto;
	align-items: end;
	gap: 0;
	color: var(--re-text);
	background: var(--re-ivory);
	border-top: 3px solid var(--re-gold);
	box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.55);
}

.re-search__field {
	display: grid;
	gap: 2px;
	padding: 16px 22px;
	border-inline-end: 1px solid var(--re-stone);
}

.re-search__field span {
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--re-gold);
}

[lang="ar"] .re-search__field span {
	font-size: 0.88rem;
}

.re-search__field select {
	width: 100%;
	min-height: 36px;
	padding: 0;
	font-weight: 400;
	background: none;
	border: 0;
	cursor: pointer;
}

.re-search__go {
	min-height: 100%;
	padding: 0 34px;
	border-radius: 0;
}

/* 6. Stats ------------------------------------------------------------------- */
.re-stats {
	color: var(--re-ivory);
	background: var(--re-ink);
}

.re-stats__in {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
}

.re-stats p {
	display: grid;
	gap: 2px;
	padding: 34px 20px;
	text-align: center;
	border-inline-start: 1px solid rgb(176 138 82 / 0.25);
}

.re-stats p:first-child {
	border-inline-start: 0;
}

.re-stats b {
	font-family: var(--re-serif);
	font-size: 2.6rem;
	line-height: 1.2;
	color: var(--re-gold);
}

.re-stats span {
	font-size: 0.92rem;
	color: rgb(246 242 234 / 0.75);
}

/* 7. Sections ----------------------------------------------------------------- */
.re-section {
	padding-block: clamp(72px, 9cqi, 130px);
}

.re-section--stone {
	background: var(--re-stone);
}

.re-section--ink {
	color: var(--re-ivory);
	background: var(--re-ink);
}

.re-head {
	display: grid;
	gap: 10px;
	margin-bottom: clamp(32px, 5cqi, 56px);
}

.re-head--row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
}

.re-head--row > div:first-child {
	display: grid;
	gap: 10px;
}

.re-head h2,
.re-about h2,
.re-contact h2 {
	font-family: var(--re-serif);
	font-size: clamp(2rem, 1.2rem + 2.8cqi, 3.4rem);
	font-weight: 700;
	line-height: 1.35;
	color: var(--re-ink);
}

.re-section--ink h2,
.re-contact h2 {
	color: var(--re-ivory);
}

/* 8. Featured: one big, two stacked. ----------------------------------------- */
.re-featured {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	grid-template-rows: 1fr 1fr;
	gap: 22px;
}

.re-feature {
	position: relative;
	min-height: 300px;
	overflow: hidden;
	color: var(--re-ivory);
	background: var(--re-ink);
}

.re-feature--big {
	grid-row: span 2;
	min-height: 620px;
}

.re-feature .re-photo {
	position: absolute;
	inset: 0;
	transition: transform 1.2s var(--re-ease);
}

.re-feature:hover .re-photo {
	transform: scale(1.05);
}

.re-feature::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgb(16 32 27 / 0.95), rgb(16 32 27 / 0.6) 60%, rgb(16 32 27 / 0.15));
}

.re-feature__body {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	z-index: 1;
	display: grid;
	justify-items: start;
	gap: 6px;
	padding: 26px 28px;
}

.re-feature__where,
.re-card__where {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.9rem;
	color: var(--re-gold-2);
}

.re-feature h3 {
	font-family: var(--re-serif);
	font-size: clamp(1.4rem, 1rem + 1cqi, 2rem);
	line-height: 1.4;
}

.re-feature__price {
	font-size: 1.15rem;
	font-weight: 500;
	color: var(--re-gold);
}

.re-specs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	font-size: 0.88rem;
}

.re-specs li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.re-feature .re-specs {
	margin-bottom: 8px;
	color: rgb(246 242 234 / 0.85);
}

/* 9. Listings ------------------------------------------------------------- */
.re-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 22px;
}

.re-count {
	font-weight: 500;
	color: var(--re-muted);
}

.re-sort select {
	min-height: 46px;
	padding: 0 16px;
	background: var(--re-ivory);
	border: 1px solid var(--re-line);
	border-radius: 2px;
	cursor: pointer;
}

.re-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: -24px 0 28px;
}

.re-chips[hidden] {
	display: none;
}

.re-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	font-size: 0.88rem;
	color: var(--re-ink);
	background: var(--re-ivory);
	border: 1px solid var(--re-line);
	border-radius: 999px;
	cursor: pointer;
}

.re-chip::after {
	content: "×";
	color: var(--re-gold);
}

.re-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 26px;
}

.re-card {
	display: flex;
	flex-direction: column;
	background: var(--re-ivory);
	box-shadow: 0 1px 0 var(--re-line);
	transition: transform 0.4s var(--re-ease), box-shadow 0.4s;
}

.re-card[hidden] {
	display: none;
}

.re-card:hover {
	box-shadow: 0 30px 50px -30px rgb(16 32 27 / 0.45);
	transform: translateY(-6px);
}

.re-card__media {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.re-card__media .re-photo {
	transition: transform 1s var(--re-ease);
}

.re-card:hover .re-card__media .re-photo {
	transform: scale(1.06);
}

.re-badge {
	position: absolute;
	top: 14px;
	inset-inline-start: 14px;
	padding: 4px 12px;
	font-size: 0.8rem;
	color: var(--re-ink);
	background: var(--re-gold-2);
}

.re-fav {
	position: absolute;
	top: 12px;
	inset-inline-end: 12px;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	color: var(--re-ink);
	background: rgb(246 242 234 / 0.92);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: transform 0.25s var(--re-ease), color 0.25s;
}

.re-fav:hover {
	transform: scale(1.08);
}

.re-fav[aria-pressed="true"] {
	color: #b4231f;
}

.re-fav[aria-pressed="true"] .re-icon {
	fill: currentColor;
	animation: re-pop 0.4s var(--re-ease);
}

@keyframes re-pop {
	50% {
		transform: scale(1.35);
	}
}

.re-card__body {
	display: grid;
	flex: 1;
	gap: 8px;
	align-content: start;
	padding: 22px 22px 24px;
}

.re-card__price {
	font-family: var(--re-serif);
	font-size: 1.55rem;
	line-height: 1.3;
	color: var(--re-gold);
}

.re-card h3 {
	font-size: 1.08rem;
	font-weight: 500;
	line-height: 1.5;
	color: var(--re-ink);
}

.re-card__where {
	color: var(--re-muted);
}

.re-card .re-specs {
	padding-block: 12px;
	margin-bottom: 6px;
	color: var(--re-muted);
	border-block: 1px solid var(--re-stone);
}

.re-card .re-btn {
	margin-top: auto;
}

.re-empty {
	display: grid;
	justify-items: center;
	gap: 16px;
	padding: 48px 20px;
	font-family: var(--re-serif);
	font-size: 1.5rem;
	text-align: center;
	border: 1px dashed var(--re-line);
}

.re-empty[hidden] {
	display: none;
}

/* 10. Areas ------------------------------------------------------------------ */
.re-areas {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 14px;
}

.re-area {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 7 / 10;
	padding: 0;
	overflow: hidden;
	text-align: start;
	color: var(--re-ivory);
	background: var(--re-ink);
	border: 0;
	cursor: pointer;
}

.re-area .re-photo {
	transition: transform 1s var(--re-ease), opacity 0.5s;
	opacity: 0.85;
}

.re-area:hover .re-photo {
	opacity: 1;
	transform: scale(1.07);
}

.re-area::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgb(16 32 27 / 0.85), transparent 55%);
}

.re-area__text {
	position: absolute;
	inset-inline: 18px;
	bottom: 18px;
	z-index: 1;
	display: grid;
}

.re-area__text b {
	font-family: var(--re-serif);
	font-size: 1.5rem;
	line-height: 1.3;
}

.re-area__text small {
	color: var(--re-gold-2);
}

/* 11. About ----------------------------------------------------------------- */
.re-about {
	display: grid;
	grid-template-columns: 0.9fr 1.1fr;
	align-items: center;
	gap: clamp(32px, 6cqi, 90px);
}

.re-about__media {
	position: relative;
	aspect-ratio: 10 / 11;
	outline: 1px solid var(--re-line);
	outline-offset: 16px;
}

.re-about__media figcaption {
	position: absolute;
	bottom: -24px;
	inset-inline-end: -24px;
	display: grid;
	padding: 18px 26px;
	text-align: center;
	color: var(--re-ink);
	background: var(--re-gold);
}

.re-about__media b {
	font-family: var(--re-serif);
	font-size: 2.2rem;
	line-height: 1.2;
}

.re-about__text {
	display: grid;
	justify-items: start;
	gap: 18px;
}

.re-about__text > p:not(.re-eyebrow) {
	color: rgb(246 242 234 / 0.78);
}

.re-pillars {
	display: grid;
	gap: 18px;
	width: 100%;
	margin-top: 6px;
	padding-top: 22px;
	border-top: 1px solid rgb(176 138 82 / 0.25);
}

.re-pillars li {
	display: flex;
	gap: 16px;
}

.re-pillars .re-icon {
	width: 44px;
	height: 44px;
	padding: 10px;
	color: var(--re-gold);
	border: 1px solid var(--re-line);
}

.re-pillars span {
	color: rgb(246 242 234 / 0.7);
}

.re-pillars b {
	display: block;
	font-weight: 500;
	color: var(--re-ivory);
}

/* 12. Contact ---------------------------------------------------------------- */
.re-contact {
	position: relative;
	padding-block: clamp(80px, 10cqi, 140px);
	color: var(--re-ivory);
	isolation: isolate;
}

.re-contact__media {
	position: absolute;
	inset: 0;
	z-index: -1;
}

.re-contact__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to left, rgb(16 32 27 / 0.95) 35%, rgb(16 32 27 / 0.7));
}

[dir="ltr"] .re-contact__media::after {
	background: linear-gradient(to right, rgb(16 32 27 / 0.95) 35%, rgb(16 32 27 / 0.7));
}

.re-contact__in {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: clamp(32px, 6cqi, 80px);
}

.re-contact__text {
	display: grid;
	justify-items: start;
	gap: 16px;
}

.re-contact__text > p:not(.re-eyebrow) {
	color: rgb(246 242 234 / 0.8);
}

.re-contact__line {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.3rem;
	color: var(--re-gold-2) !important;
}

.re-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	padding: clamp(22px, 3cqi, 36px);
	color: var(--re-text);
	background: var(--re-ivory);
	border-top: 3px solid var(--re-gold);
}

.re-field {
	display: grid;
	gap: 6px;
	font-size: 0.88rem;
	font-weight: 500;
}

.re-field--full,
.re-form .re-btn,
.re-form__error,
.re-form__ok {
	grid-column: 1 / -1;
}

.re-field input,
.re-field select {
	width: 100%;
	min-height: 48px;
	padding: 0 14px;
	font-weight: 300;
	background: #fff;
	border: 1px solid var(--re-stone);
	border-radius: 2px;
	transition: border-color 0.2s;
}

.re-field input:focus,
.re-field select:focus {
	border-color: var(--re-gold);
	outline: none;
}

.re-field input[aria-invalid="true"] {
	border-color: #b4231f;
}

.re-form__error {
	padding: 10px 14px;
	font-size: 0.9rem;
	color: #b4231f;
	background: #fbeceb;
}

.re-form__ok {
	padding: 14px 16px;
	font-size: 0.95rem;
	color: var(--re-ink);
	background: #f3ead8;
	border-inline-start: 3px solid var(--re-gold);
}

/* 13. Footer ----------------------------------------------------------------- */
.re-footer {
	color: rgb(246 242 234 / 0.7);
	background: var(--re-ink);
	border-top: 1px solid rgb(176 138 82 / 0.25);
}

.re-footer__in {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 32px;
	padding-block: 64px 40px;
}

.re-footer__in > div:first-child {
	display: grid;
	align-content: start;
	gap: 16px;
}

.re-footer h4 {
	margin-bottom: 12px;
	font-family: var(--re-serif);
	font-size: 1.3rem;
	color: var(--re-gold);
}

.re-footer nav a,
.re-footer__in > div p {
	display: block;
	padding-block: 3px;
}

.re-footer nav a:hover {
	color: var(--re-gold-2);
}

.re-footer__bar {
	padding-block: 20px;
	font-size: 0.85rem;
	border-top: 1px solid rgb(176 138 82 / 0.18);
}

/* 14. Modal (position:fixed, so it stays inside the bar's preview frame) ----- */
.re-modal {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: grid;
	place-items: center;
	padding: 18px;
	background: rgb(16 32 27 / 0.7);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	animation: re-fade 0.3s;
}

.re-modal[hidden] {
	display: none;
}

.re-modal__box {
	position: relative;
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	width: min(100%, 940px);
	max-height: calc(100% - 20px);
	overflow: auto;
	background: var(--re-ivory);
	border-top: 3px solid var(--re-gold);
	animation: re-rise 0.45s var(--re-ease);
}

.re-modal__box:focus {
	outline: none;
}

.re-modal__media {
	min-height: 320px;
}

.re-modal__media .re-photo {
	height: 100%;
}

.re-modal__body {
	display: grid;
	align-content: start;
	gap: 12px;
	padding: 30px 28px;
}

.re-modal h3 {
	font-family: var(--re-serif);
	font-size: 1.8rem;
	line-height: 1.4;
	color: var(--re-ink);
}

.re-modal__price {
	font-family: var(--re-serif);
	font-size: 1.6rem;
	color: var(--re-gold);
}

.re-modal .re-specs {
	padding-block: 12px;
	color: var(--re-muted);
	border-block: 1px solid var(--re-stone);
}

.re-modal__text {
	color: var(--re-muted);
}

.re-modal__close {
	position: absolute;
	top: 12px;
	inset-inline-start: 12px;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	color: var(--re-ink);
	background: var(--re-ivory);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

@keyframes re-fade {
	from {
		opacity: 0;
	}
}

@keyframes re-rise {
	from {
		opacity: 0;
		transform: translateY(24px);
	}
}

/* 15. Motion: intro, progress line, header, reveals ------------------------- */
/* The intro: a skyline draws itself in champagne, the name fades up, then the
   two halves of the panel slide apart like doors. Pure CSS. */
.re-intro {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: grid;
	place-items: center;
	pointer-events: none;
	animation: re-gone 0s linear 2.2s both;
}

.re-intro::before,
.re-intro::after {
	content: "";
	position: absolute;
	inset-block: 0;
	width: 50.5%;
	background: var(--re-ink);
	animation: re-door 0.9s var(--re-ease) 1.3s both;
}

.re-intro::before {
	inset-inline-start: 0;
	--re-door: -100%;
}

.re-intro::after {
	inset-inline-end: 0;
	--re-door: 100%;
}

[dir="rtl"] .re-intro::before {
	--re-door: 100%;
}

[dir="rtl"] .re-intro::after {
	--re-door: -100%;
}

.re-intro__in {
	position: relative;
	z-index: 1;
	display: grid;
	justify-items: center;
	gap: 16px;
	color: var(--re-gold-2);
	animation: re-intro-fade 0.4s ease 1.15s both;
}

.re-intro__sky {
	width: min(320px, 70vw);
	fill: none;
	stroke: currentColor;
	stroke-width: 1.4;
	stroke-linejoin: round;
	stroke-dasharray: 900;
	stroke-dashoffset: 900;
	animation: re-draw 1.1s ease-out forwards;
}

.re-intro__in p {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--re-ivory);
	animation: re-rise 0.7s var(--re-ease) 0.35s both;
}

.re-intro .re-logo__mark {
	width: 34px;
	height: 34px;
	color: var(--re-gold-2);
}

.re-intro b {
	font-family: "RE Cormorant", serif;
	font-size: 2rem;
	font-weight: 500;
	letter-spacing: 0.3em;
}

[lang="ar"] .re-intro b {
	font-family: "RE Messiri", serif;
	font-weight: 600;
	letter-spacing: 0;
}

@keyframes re-door {
	to {
		transform: translateX(var(--re-door));
	}
}

@keyframes re-intro-fade {
	to {
		opacity: 0;
	}
}

@keyframes re-gone {
	to {
		visibility: hidden;
	}
}

@keyframes re-draw {
	to {
		stroke-dashoffset: 0;
	}
}

@keyframes re-line {
	from {
		transform: translateY(108%);
	}
}

/* Reading progress, where the browser can tie an animation to scrolling. */
.re-progress {
	position: fixed;
	inset-inline: 0;
	top: 0;
	z-index: 60;
	height: 2px;
	background: linear-gradient(90deg, var(--re-gold), var(--re-gold-2));
	transform: scaleX(0);
	transform-origin: var(--re-start, left);
}

@supports (animation-timeline: scroll()) {
	.re-progress {
		animation: re-progress linear both;
		animation-timeline: scroll(root);
	}
}

@keyframes re-progress {
	to {
		transform: scaleX(1);
	}
}

.re-header {
	animation: re-drop 0.9s var(--re-ease) 1.6s both;
}

@keyframes re-drop {
	from {
		opacity: 0;
		transform: translateY(-100%);
	}
}

/* Reveals: lists one after another, photos settle from a slight zoom. */
.re-ready [data-re-reveal] {
	transition: opacity 1s var(--re-ease), transform 1s var(--re-ease);
	transition-delay: calc(var(--re-i, 0) * 100ms);
}

.re-ready [data-re-reveal]:not(.is-in) {
	opacity: 0;
	transform: translateY(40px);
}

.re-ready [data-re-reveal] .re-photo {
	transition: transform 1.8s var(--re-ease);
}

.re-ready [data-re-reveal]:not(.is-in) .re-photo {
	transform: scale(1.15);
}

.re-body main {
	overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
	.re-body *,
	.re-body *::before,
	.re-body *::after {
		animation: none !important;
		transition: none !important;
	}

	.re-intro {
		display: none;
	}

	.re-ready [data-re-reveal]:not(.is-in) {
		opacity: 1;
		transform: none;
	}

	.re-ready [data-re-reveal]:not(.is-in) .re-photo {
		transform: none;
	}
}

/* 16. Narrower widths --------------------------------------------------------- */
@container demo (max-width: 1080px) {
	.re-areas {
		grid-template-columns: repeat(3, 1fr);
	}

	.re-search {
		grid-template-columns: 1fr 1fr;
	}

	.re-search__field {
		border-bottom: 1px solid var(--re-stone);
	}

	.re-search__go {
		grid-column: 1 / -1;
		min-height: 56px;
	}
}

@container demo (max-width: 900px) {
	/* The property card gives way to the words on narrow screens. */
	.re-slide__in {
		grid-template-columns: 1fr;
	}

	.re-slide__card {
		display: none;
	}

	.re-nav {
		position: absolute;
		top: 100%;
		inset-inline: 0;
		display: grid;
		gap: 0;
		padding: 6px clamp(16px, 4cqi, 40px) 20px;
		background: var(--re-ink);
		border-top: 1px solid rgb(176 138 82 / 0.25);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px);
		transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
	}

	.re-nav.is-open {
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.re-nav a {
		padding: 14px 0;
		font-size: 1.1rem;
		border-bottom: 1px solid rgb(176 138 82 / 0.18);
	}

	.re-nav a::after {
		display: none;
	}

	.re-header__tools {
		margin-inline-start: auto;
	}

	.re-burger {
		display: grid;
	}

	.re-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.re-featured {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto;
	}

	.re-feature--big {
		grid-row: auto;
		grid-column: 1 / -1;
		min-height: 440px;
	}

	.re-stats__in {
		grid-template-columns: repeat(2, 1fr);
	}

	.re-stats p:nth-child(3) {
		border-inline-start: 0;
	}

	.re-about,
	.re-contact__in {
		grid-template-columns: 1fr;
	}

	.re-about__media {
		max-width: 520px;
	}

	.re-modal__box {
		grid-template-columns: 1fr;
	}

	.re-modal__media {
		min-height: 220px;
		max-height: 260px;
	}

	.re-footer__in {
		grid-template-columns: 1fr 1fr;
	}
}

@container demo (max-width: 600px) {
	.re-header__cta {
		display: none;
	}

	/* Only the globe is left of the language link, so the header fits. */
	.re-lang {
		gap: 0;
		padding: 8px 10px;
		font-size: 0;
	}

	.re-lang .re-icon {
		width: 20px;
		height: 20px;
	}

	.re-hero {
		min-height: 760px;
	}

	.re-slide__in {
		padding-block: 120px 200px;
	}

	.re-slider__tabs {
		gap: 14px;
	}

	.re-slider__tabs button {
		width: 64px;
	}

	.re-slider__tabs span,
	.re-slider__arrows {
		display: none;
	}

	.re-finder {
		margin-top: -48px;
	}

	.re-search {
		grid-template-columns: 1fr;
	}

	.re-search__field {
		border-inline-end: 0;
	}

	.re-grid,
	.re-featured,
	.re-form,
	.re-footer__in {
		grid-template-columns: 1fr;
	}

	.re-feature,
	.re-feature--big {
		min-height: 380px;
	}

	.re-areas {
		display: flex;
		gap: 12px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		padding-bottom: 8px;
	}

	.re-areas li {
		flex: 0 0 62%;
		scroll-snap-align: start;
	}

	.re-stats b {
		font-size: 2rem;
	}

	.re-about__media figcaption {
		inset-inline-end: -8px;
	}

	.re-toolbar {
		width: 100%;
		justify-content: space-between;
	}
}

/* Arabic weights: 400–600 only: every bold part is 600 here, and the browser never
   fakes a heavier weight. (Generated from the rules above; keep it last.) */
[lang="ar"] .re-body {
	font-synthesis: none;
}

:where([lang="ar"] .re-body) :where(b, strong, h1, h2, h3, h4, h5, h6, th, optgroup) {
	font-weight: 600;
}

[lang="ar"] .re-body :is(.re-head h2, .re-about h2, .re-contact h2) {
	font-weight: 600;
}

/* Never lighter than 400 in Arabic. */
[lang="ar"] .re-body :is(.re-field input, .re-field select) {
	font-weight: 400;
}
