/* ===========================================================================
   Premium theme layer — "Skyline".
   Loaded after site.css. Every value still resolves from the CMS colour /
   font / radius variables, so the client can restyle the whole thing from
   Dashboard → Appearance without touching this file.
   =========================================================================== */

:root{
  --ink: var(--secondary);
  --edge: color-mix(in srgb, var(--text) 14%, transparent);
  --veil: color-mix(in srgb, var(--text) 6%, transparent);
  --glow: color-mix(in srgb, var(--primary) 55%, transparent);
  --shell: color-mix(in srgb, var(--bg) 82%, transparent);
  --rise: cubic-bezier(.22,.61,.36,1);
  --sweep: cubic-bezier(.65,0,.35,1);
}

/* ---------------------------------------------------------------- typography */
body{letter-spacing:-0.006em}
h1,h2,h3,h4{letter-spacing:-0.028em;color:var(--text)}
h1{font-size:clamp(2.6rem,6.2vw,5.4rem);line-height:.98;font-weight:700}
h2{font-size:clamp(1.9rem,3.8vw,3.2rem);line-height:1.05}
h3{font-size:clamp(1.05rem,1.5vw,1.3rem);line-height:1.25}

.eyebrow{
  position:relative;padding-inline-start:2.6rem;letter-spacing:.22em;
  font-size:.7rem;font-weight:600;color:var(--muted);opacity:.9;margin-bottom:1.4rem;
}
.eyebrow::before{
  content:"";position:absolute;inset-inline-start:0;top:50%;width:1.9rem;height:1px;
  background:var(--primary);transform-origin:left center;
}
.rtl .eyebrow::before{transform-origin:right center}

.section-sub,.hero-sub,.lead{color:var(--muted);text-wrap:pretty}
.section-head{margin-bottom:3rem}

/* A quiet index number on major sections — set custom_class "numbered" */
.section.numbered > .container,
.section.numbered > .wide{position:relative}
.section.numbered .section-head::after{
  content:attr(data-index);position:absolute;top:0;inset-inline-end:0;
  font-family:var(--font-heading);font-size:.78rem;letter-spacing:.2em;
  color:var(--muted);opacity:.55;
}

/* --------------------------------------------------------------- the header */
.site-header{
  border-bottom:1px solid transparent;background:transparent;
  transition:background .4s var(--rise), border-color .4s var(--rise), backdrop-filter .4s;
}
.site-header.is-stuck{
  background:var(--shell);border-bottom-color:var(--edge);
  backdrop-filter:saturate(160%) blur(14px);-webkit-backdrop-filter:saturate(160%) blur(14px);
}
.header-inner{height:84px}
.brand-text{letter-spacing:-.03em}
.main-nav a{
  position:relative;font-size:.88rem;font-weight:500;letter-spacing:.01em;
  color:var(--text);opacity:.78;transition:opacity .25s;
}
.main-nav a:hover{opacity:1}
.main-nav a::after{
  content:"";position:absolute;left:0;right:0;bottom:-6px;height:1px;
  background:var(--primary);transform:scaleX(0);transform-origin:right center;
  transition:transform .4s var(--sweep);
}
.main-nav a:hover::after{transform:scaleX(1);transform-origin:left center}
.nav-highlight{color:var(--primary)!important;opacity:1!important}
.nav-toggle span{background:var(--text)}
.lang-switch{border-color:var(--edge)}
.currency-select{background:transparent;color:var(--text);border:1px solid var(--edge);
  border-radius:999px;padding:.34rem .7rem;font-size:.8rem}

/* --------------------------------------------------------------- buttons */
.btn{
  border-radius:999px;letter-spacing:.01em;font-weight:600;
  transition:background .3s var(--rise), color .3s var(--rise),
             border-color .3s var(--rise), transform .3s var(--rise);
}
.btn:hover{transform:translateY(-2px)}
.btn-primary{box-shadow:0 10px 30px -12px var(--glow)}
.btn-ghost{border-color:var(--edge);color:var(--text)}
.btn-ghost:hover{border-color:var(--text);background:var(--veil)}
.btn-lg{padding:1.02rem 2.2rem}
.btn-row{gap:1rem;margin-top:2.2rem}

/* --------------------------------------------------------------- the hero */
.sec-hero{overflow:hidden;isolation:isolate}
.sec-hero.bg-dark,.sec-hero.bg-image{background-color:var(--secondary)}
.sec-hero::before{
  content:"";position:absolute;inset:-20% -10% auto -10%;height:120%;z-index:-1;
  background:
    radial-gradient(60% 55% at 22% 8%,  color-mix(in srgb,var(--primary) 30%,transparent), transparent 70%),
    radial-gradient(50% 50% at 88% 78%, color-mix(in srgb,var(--accent)  22%,transparent), transparent 72%);
  opacity:.9;pointer-events:none;
  animation:drift 22s ease-in-out infinite alternate;
}
@keyframes drift{
  from{transform:translate3d(0,0,0) scale(1)}
  to{transform:translate3d(-3%,2.5%,0) scale(1.08)}
}
/* faint architectural grid behind the hero */
.sec-hero::after{
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:.5;
  background-image:
    linear-gradient(to right, color-mix(in srgb,currentColor 7%,transparent) 1px, transparent 1px),
    linear-gradient(to bottom,color-mix(in srgb,currentColor 7%,transparent) 1px, transparent 1px);
  background-size:clamp(90px,9vw,150px) clamp(90px,9vw,150px);
  mask-image:radial-gradient(75% 65% at 50% 40%,#000,transparent 100%);
  -webkit-mask-image:radial-gradient(75% 65% at 50% 40%,#000,transparent 100%);
}
.sec-hero .hero-title{max-width:16ch;text-wrap:balance}
.sec-hero .text-center .hero-title,
.sec-hero .text-center .hero-sub{margin-inline:auto}
.sec-hero .text-right .hero-title,
.sec-hero .text-right .hero-sub{margin-inline-start:auto}
.hero-sub{font-size:clamp(1rem,1.35vw,1.2rem);max-width:54ch;line-height:1.65}

/* word-by-word entrance, built by premium.js */
.hero-title .w{display:inline-block;overflow:hidden;vertical-align:bottom}
.hero-title .w > i{
  display:inline-block;font-style:inherit;transform:translateY(110%);
  transition:transform .95s var(--rise);transition-delay:var(--d,0ms);
}
.hero-title.lit .w > i{transform:none}

/* scroll cue */
.scroll-cue{
  position:absolute;bottom:2rem;left:50%;transform:translateX(-50%);
  width:1px;height:54px;background:linear-gradient(currentColor,transparent);opacity:.45;
}
.scroll-cue::after{
  content:"";position:absolute;top:0;left:-1px;width:3px;height:14px;border-radius:2px;
  background:var(--primary);animation:cue 2.4s var(--sweep) infinite;
}
@keyframes cue{0%{top:0;opacity:0}20%{opacity:1}80%{opacity:1}100%{top:40px;opacity:0}}

/* --------------------------------------------------------------- reveals */
.reveal{opacity:0;transform:translateY(26px);
  transition:opacity .9s var(--rise), transform .9s var(--rise);transition-delay:var(--d,0ms)}
.reveal.in{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){
  .reveal{opacity:1;transform:none;transition:none}
  .hero-title .w > i{transform:none;transition:none}
  .sec-hero::before{animation:none}
  .scroll-cue::after{animation:none}
}

/* --------------------------------------------------------------- cards */
.card,.feature-card,.dev-card,.quote-card,.faq-item,.panel{
  border-color:var(--edge);background:var(--surface);
}
.card{border-radius:calc(var(--radius) + 6px);box-shadow:none}
.card:hover{transform:translateY(-6px);box-shadow:0 30px 60px -32px rgba(0,0,0,.55);border-color:color-mix(in srgb,var(--primary) 45%,transparent)}
.card-media{aspect-ratio:3/2.2}
.card-media img{transition:transform 1.1s var(--rise);will-change:transform}
.card:hover .card-media img{transform:scale(1.07)}
.card-media::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(to top,color-mix(in srgb,var(--secondary) 55%,transparent),transparent 55%);
  opacity:.75;
}
.card-body{padding:1.5rem 1.4rem 1.6rem;gap:.5rem}
.card-body h3 a{color:var(--text)}
.card-eyebrow{letter-spacing:.14em;font-size:.68rem;opacity:.75}
.card-price{font-family:var(--font-heading);font-size:1.15rem}
.card-link{position:relative;color:var(--primary);display:inline-block;
  transition:transform .35s var(--rise)}
.card:hover .card-link{transform:translateX(5px)}
.rtl .card:hover .card-link{transform:translateX(-5px)}
.badge{border-radius:4px;letter-spacing:.08em;text-transform:uppercase;font-size:.66rem;backdrop-filter:blur(6px)}
.badge-status{background:color-mix(in srgb,var(--secondary) 70%,transparent)}

.feature-card{padding:2.2rem 1.8rem;border-radius:calc(var(--radius) + 6px);transition:.4s var(--rise)}
.feature-card:hover{border-color:color-mix(in srgb,var(--primary) 45%,transparent);transform:translateY(-4px)}
.feature-icon{font-size:1.7rem;opacity:.95}

.dev-card{border-radius:calc(var(--radius) + 6px);padding:2rem 1.2rem}
.dev-card h3{color:var(--text)}
.dev-initial{background:var(--veil);color:var(--primary)}

.city-card{
  min-height:260px;border-radius:calc(var(--radius) + 6px);overflow:hidden;
  justify-content:flex-end;padding:1.6rem;transition:.5s var(--rise);
}
.city-card::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(to top,rgba(0,0,0,.72),transparent 62%);
}
.city-card > *{position:relative;z-index:1}
.city-card:hover{opacity:1;transform:translateY(-5px)}
.city-name{font-size:1.25rem;letter-spacing:-.02em}

/* --------------------------------------------------------------- stats */
.stats-grid{gap:2.4rem}
.stat-value{font-size:clamp(2.6rem,5.2vw,4.2rem);letter-spacing:-.045em;font-weight:700}
.stat-label{font-weight:500;font-size:.85rem;letter-spacing:.14em;text-transform:uppercase;opacity:.75}
.bg-primary .stat-label{opacity:.9}

/* --------------------------------------------------------------- logos marquee */
.logo-strip{gap:3.5rem;flex-wrap:nowrap}
.logo-strip.marquee{display:block;overflow:hidden;width:100%;
  mask-image:linear-gradient(90deg,transparent,#000 10%,#000 90%,transparent);
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 10%,#000 90%,transparent)}
.marquee-track{display:flex;align-items:center;gap:3.5rem;width:max-content;
  animation:slide 38s linear infinite}
.logo-strip.marquee:hover .marquee-track{animation-play-state:paused}
@keyframes slide{to{transform:translateX(-50%)}}
.logo-strip img{filter:grayscale(1) brightness(1.6);opacity:.55}
.logo-text{white-space:nowrap;font-size:1.05rem;letter-spacing:.02em;opacity:.7}

/* --------------------------------------------------------------- faq / quotes */
.faq-item{border-radius:calc(var(--radius) + 2px);background:transparent;border-color:var(--edge);margin-bottom:.9rem}
.faq-item summary{padding:1.3rem 1.5rem;font-size:1.02rem;transition:color .3s}
.faq-item summary:hover{color:var(--primary)}
.faq-item[open]{background:var(--surface)}
.faq-body{padding:0 1.5rem 1.4rem;line-height:1.7}
.quote-card{padding:2.2rem;border-radius:calc(var(--radius) + 6px);font-size:1.05rem;line-height:1.65}
.quote-card::before{content:"”";display:block;font-family:var(--font-heading);font-size:3.4rem;
  line-height:.6;color:var(--primary);opacity:.55;margin-bottom:.6rem}

/* --------------------------------------------------------------- split / cta */
.split{gap:clamp(2.5rem,6vw,6rem)}
.split-media img{border-radius:calc(var(--radius) + 8px)}
.sec-cta,.section.bg-primary,.section.bg-dark{position:relative;overflow:hidden}
.cta-inner{gap:3rem}
.cta-inner h2{max-width:20ch;margin-bottom:.4rem}

/* --------------------------------------------------------------- search card */
.search-card{
  border-radius:999px;padding:.55rem .55rem .55rem 1.6rem;background:var(--surface);
  border-color:var(--edge);box-shadow:0 30px 70px -40px rgba(0,0,0,.65);
}
.search-card .btn{border-radius:999px;padding-inline:2rem}
.search-field input,.search-field select,.field{
  background:transparent;border-color:transparent;border-inline-end:1px solid var(--edge);
  border-radius:0;padding-inline-start:0;
}
.search-field label{font-size:.68rem;letter-spacing:.14em;opacity:.7}
@media(max-width:1024px){
  .search-card{border-radius:calc(var(--radius) + 8px);padding:1.4rem}
  .search-field input,.search-field select,.field{border:1px solid var(--edge);
    border-radius:calc(var(--radius) - 4px);padding-inline-start:.85rem}
}
.pull-up{margin-top:-44px}

/* --------------------------------------------------------------- banners */
.page-banner{background:var(--surface);padding:clamp(5rem,9vw,8rem) 0 clamp(3rem,5vw,4.5rem)}
.page-banner h1{max-width:18ch}
.detail-hero{padding:clamp(6rem,10vw,9rem) 0 clamp(3rem,5vw,4rem);position:relative;isolation:isolate}
.detail-hero::after{content:"";position:absolute;inset:0;z-index:-1;
  background:linear-gradient(to top,color-mix(in srgb,var(--secondary) 92%,transparent),color-mix(in srgb,var(--secondary) 55%,transparent))}
.crumbs{letter-spacing:.12em;text-transform:uppercase;font-size:.72rem}

/* --------------------------------------------------------------- footer */
.site-footer{margin-top:0;border-top:1px solid var(--edge)}
.footer-grid{padding:clamp(3.5rem,6vw,5.5rem) 20px 3rem}
.footer-col h4{font-size:.72rem;letter-spacing:.18em;opacity:.65}
.footer-col a{opacity:.8;transition:opacity .25s,padding-inline-start .3s var(--rise)}
.footer-col a:hover{opacity:1;padding-inline-start:.28rem}
.footer-brand{font-size:1.6rem;letter-spacing:-.03em}
.footer-bottom{font-size:.8rem;letter-spacing:.04em;opacity:.7}

/* --------------------------------------------------------------- misc */
::selection{background:var(--primary);color:#fff}
/* Section padding stays under CMS control (inline styles from the dashboard),
   so nothing here overrides it. */
.grid{gap:1.8rem}
@media(max-width:768px){
  .sec-hero{min-height:auto}
  .eyebrow{padding-inline-start:0}
  .eyebrow::before{display:none}
  .section.numbered .section-head::after{display:none}
}


/* ---------------------------------------------------------- dark-safe text
   site.css paints several elements in --secondary (the deep brand colour).
   On a dark palette that is the page background, so re-point them at --text.
   On a light palette --text is the normal body colour, so nothing changes
   visually and both directions keep working. */
.brand-text,.header-phone,.main-nav a,.card-body h3 a,.dev-card h3,
.filters label,.enquiry-form label,.faq-item summary,.panel h2,
.section-title,.stat-label{color:var(--text)}
.card-body h3 a:hover{color:var(--primary)}
.page-banner{border-bottom:1px solid var(--edge)}
.spec-grid li,.amenity-list li{background:var(--veil)}
.data-table th{background:var(--veil);color:var(--muted)}
.data-table th,.data-table td{border-bottom-color:var(--edge)}
.flash-info,.flash-warning{background:var(--surface);border-color:var(--edge)}
.placeholder{background:var(--veil);color:var(--muted)}
.ac-item,.ac-list{background:var(--surface);color:var(--text);border-color:var(--edge)}
/* a heading block whose fields are all empty should not reserve space */
.section-head:not(:has(*)){display:none;margin:0}
.sec-logos .section-head{margin-bottom:2.2rem}

/* mobile header: the account / browse buttons live in the drawer instead,
   otherwise the header row pushes the page sideways on small screens */
@media(max-width:768px){
  .header-actions .browse-btn,
  .header-actions .account-btn,
  .header-actions .currency-select{display:none}
  .header-inner{height:66px;gap:.75rem}
  .main-nav{inset-block-start:66px}
  .nav-mobile-extra{display:block;width:100%}
  .nav-mobile-extra > a{padding:.75rem 0;display:block;border-bottom:1px solid var(--edge)}
}
@media(min-width:769px){.nav-mobile-extra{display:none}}

/* ===========================================================================
   Brand plate — oversized wordmark hanging over the hero that shrinks up into
   the header bar as you scroll. --bp ("brand progress") runs 0 (expanded, at
   the top of the page) to 1 (collapsed into the header) and is written by
   premium.js on every scroll frame. The plate only exists on pages whose first
   section is a hero; `has-hero` is set server-side so there is no flash.
   =========================================================================== */
:root{
  --bp:0;
  --plate-drop:132px;   /* how far below the header bar the plate hangs */
  --plate-grow:3.1rem;  /* extra wordmark size while expanded */
  --plate-px:2.4rem;    /* extra horizontal padding while expanded */
  --plate-py:1.5rem;    /* extra vertical padding while expanded */
  --plate-track:.3em;   /* letter tracking while expanded */
  --plate-bg:var(--text);
  --plate-bg:color-mix(in srgb, var(--text) 97%, var(--bg));
  --plate-ink:var(--bg);
  --plate-ink:color-mix(in srgb, var(--bg) 94%, var(--text));
}
/* with scripting off the plate can never shrink, so start it collapsed */
@media (scripting: none){ body.has-hero{--bp:1} }

.brand-block{display:flex;align-items:center;flex-shrink:0}
.brand-cue{display:none}

body.has-hero .header-inner{position:relative}
body.has-hero .brand-block{
  /* out of flow: the plate grows over the hero without pushing the nav around */
  position:absolute;inset-inline-start:20px;top:50%;z-index:2;
  transform:translate3d(0, calc(-50% + (1 - var(--bp)) * var(--plate-drop)), 0);
  will-change:transform;
}
body.has-hero .brand{
  background:var(--plate-bg);
  padding:calc(.34rem + (1 - var(--bp)) * var(--plate-py))
          calc(.85rem + (1 - var(--bp)) * var(--plate-px));
  border-radius:calc(var(--radius) * var(--bp));
  box-shadow:0 24px 60px -30px rgba(0,0,0,calc(.7 * (1 - var(--bp))));
}
body.has-hero .brand-text{
  color:var(--plate-ink);
  font-weight:400;
  font-size:calc(1.35rem + (1 - var(--bp)) * var(--plate-grow));
  letter-spacing:calc(-.02em + (1 - var(--bp)) * var(--plate-track));
  line-height:1.08;
  /* the tracking adds space after the last letter — pull it back so the
     wordmark stays optically centred on the plate */
  margin-inline-end:calc((1 - var(--bp)) * -1 * var(--plate-track));
  /* A long site name must wrap rather than run off the screen: the plate is
     absolutely positioned, so an unbreakable line would widen the whole page. */
  white-space:normal;
  overflow-wrap:anywhere;
  text-wrap:balance;
}
/* hard ceiling so the plate can never be wider than the viewport */
body.has-hero .brand-block{max-width:calc(100vw - 40px)}
body.has-hero .brand{max-width:100%}
body.has-hero .brand-logo{
  height:calc(var(--logo-height) + (1 - var(--bp)) * 52px);
}

/* the round chevron that sits at the plate's edge and fades as it collapses */
body.has-hero .brand-cue{
  display:flex;align-items:center;justify-content:center;
  flex:0 0 auto;border:0;padding:0;background:none;cursor:pointer;
  width:calc((1 - var(--bp)) * 46px);height:46px;
  margin-inline-start:calc((1 - var(--bp)) * 1.1rem);
  opacity:calc(1 - var(--bp));
}
body.has-hero .brand-cue span{
  flex:0 0 46px;width:46px;height:46px;border-radius:50%;
  background:var(--plate-bg);position:relative;display:block;
  transform:scale(calc(1 - var(--bp)));transition:background .3s var(--rise)}
body.has-hero .brand-cue span::after{
  content:"";position:absolute;inset:0;margin:auto;width:9px;height:9px;
  border-inline-end:2px solid var(--plate-ink);border-bottom:2px solid var(--plate-ink);
  transform:translateY(-3px) rotate(45deg);
}
body.has-hero .brand-cue:hover span{background:var(--primary)}

@media(max-width:1024px){
  :root{--plate-drop:92px;--plate-grow:1.7rem;--plate-px:1.5rem;--plate-py:1rem;
        --plate-track:.22em}
}
@media(max-width:768px){
  /* a long site name wraps here, so the plate hangs only just below the bar
     and keeps clear of the hero text underneath it */
  :root{--plate-drop:18px;--plate-grow:.55rem;--plate-px:.7rem;--plate-py:.45rem;
        --plate-track:.16em}
  body.has-hero .brand-cue{display:none}
}
/* Arabic is a joined script — letter tracking would break the ligatures */
.rtl.has-hero .brand-text{letter-spacing:normal;margin-inline-end:0}

/* ===========================================================================
   Mobile & overflow fixes.
   A CSS grid item defaults to min-width:auto, so a single wide table or image
   inside a column stretched the whole page sideways on phones. Letting the
   columns shrink lets the scroll wrappers do their job instead.
   =========================================================================== */
.detail-layout{grid-template-columns:minmax(0,1fr) 360px}
.listing-layout{grid-template-columns:280px minmax(0,1fr)}
@media(max-width:1024px){
  .detail-layout,.listing-layout{grid-template-columns:minmax(0,1fr)}
}
.detail-layout > *,.listing-layout > *,.detail-main > *,.split > *,
.grid > *,.panel > *,.card-body > *{min-width:0}
.table-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.data-table{min-width:460px}
.rich img,.rich table,.rich iframe{max-width:100%}
.rich{overflow-wrap:anywhere}

@media(max-width:768px){
  /* nothing on a phone should need horizontal scrolling except a wide table */
  .panel,.filters,.map-embed{overflow-x:auto}
  .hero-facts{gap:1rem}
  .spec-grid{grid-template-columns:repeat(auto-fit,minmax(110px,1fr))}
  .amenity-list{grid-template-columns:1fr 1fr}
  .cta-inner{flex-direction:column;align-items:flex-start}
  .listing-toolbar{flex-direction:column;align-items:flex-start;gap:.6rem}
  .btn{min-height:44px}          /* comfortable tap target */
  .btn-sm{min-height:36px}
}

/* ===========================================================================
   Section background video.
   Set a section's "Video url" to a YouTube/Vimeo link or an uploaded .mp4 and
   it plays behind that section, muted and looping. The tint on top keeps the
   text readable and is the section's own overlay-opacity setting.
   =========================================================================== */
.sec-video-bg{
  position:absolute;inset:0;overflow:hidden;z-index:0;pointer-events:none;
  background-size:cover;background-position:center;
  /* No background colour: when the video cannot play (phones usually refuse to
     autoplay an embed) this layer must be invisible so the section falls back
     to its own background image or the theme's hero treatment. */
}
.sec-video-bg .sec-video-el{
  position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
  border:0;pointer-events:none;
}
.sec-video-bg video.sec-video-el{width:100%;height:100%;object-fit:cover}
/* an iframe keeps its 16:9 shape, so size it to cover the section instead.
   The extra scale pushes YouTube's title/channel strip outside the frame. */
.sec-video-bg iframe.sec-video-el,
.sec-video-bg .sec-video-yt{
  width:100vw;height:56.25vw;min-height:100%;min-width:177.78vh;
  transform:translate(-50%,-50%) scale(var(--video-zoom,1.35));
}
/* The player stays hidden until it reports that it is actually playing, so
   nobody sees the poster frame or YouTube's play button. Deliberately no
   transition here: a transition that is created while the tab is hidden gets
   parked at time zero and would hold the video invisible for good. */
.sec-video-bg iframe.sec-video-yt{opacity:0}
.sec-video-bg.is-playing iframe.sec-video-yt{opacity:1}
.sec-video-bg video.sec-video-el{transform:translate(-50%,-50%)}
.sec-video-tint{position:absolute;inset:0;background:#000;display:none}
.sec-video-bg.is-playing .sec-video-tint,
.sec-video-bg[style*="background-image"] .sec-video-tint,
.sec-video-bg:has(video) .sec-video-tint{display:block}
/* content sits above the video layer */
.section > .sec-content{position:relative;z-index:1}
.sec-hero:has(.sec-video-bg.is-playing)::before,
.sec-hero:has(.sec-video-bg.is-playing)::after{display:none}

@media (prefers-reduced-motion:reduce){
  /* leave the poster / background image showing instead of playing anything */
  .sec-video-bg .sec-video-el{display:none}
}

/* ===========================================================================
   Developer cards.
   Logos arrive in every shape and size, so each one sits in a fixed-ratio
   "well" and is contained inside it — wordmarks, square icons and awkward
   crops all line up. A developer with no logo gets a monogram instead of a
   stretched or borrowed image.
   =========================================================================== */
.dev-card{
  display:flex;flex-direction:column;align-items:center;gap:.45rem;
  padding:1.5rem 1.2rem 1.35rem;text-align:center;
  border:1px solid var(--edge);border-radius:calc(var(--radius) + 6px);
  background:var(--surface);
  transition:transform .35s var(--rise), border-color .35s var(--rise),
             box-shadow .35s var(--rise);
}
.dev-card:hover{
  text-decoration:none;transform:translateY(-4px);
  border-color:color-mix(in srgb,var(--primary) 45%,transparent);
  box-shadow:0 22px 44px -28px rgba(0,0,0,.55);
}
.dev-logo{
  display:flex;align-items:center;justify-content:center;
  width:100%;max-width:150px;aspect-ratio:5/3;margin-bottom:.5rem;
  padding:.7rem;border-radius:calc(var(--radius) - 2px);overflow:hidden;
  background:color-mix(in srgb,var(--text) 6%,transparent);
}
.dev-card .dev-logo img{
  width:auto;height:auto;max-width:100%;max-height:100%;
  object-fit:contain;margin:0;
  transition:transform .5s var(--rise);
}
.dev-card:hover .dev-logo img{transform:scale(1.05)}
.dev-monogram{
  font-family:var(--font-heading);font-weight:700;font-size:1.55rem;
  letter-spacing:.06em;color:var(--primary);line-height:1;
}
.dev-name{
  font-family:var(--font-heading);font-weight:600;font-size:1.02rem;
  color:var(--text);line-height:1.3;letter-spacing:-.01em;
}
.dev-verified{
  display:inline-flex;align-items:center;gap:.32rem;
  font-size:.7rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;
  color:#16a34a;
}
.dev-verified svg{width:14px;height:14px;flex:0 0 14px}
.dev-meta{font-size:.82rem;color:var(--muted)}

@media(max-width:768px){
  .dev-card{padding:1.1rem .8rem 1rem}
  .dev-logo{max-width:110px;padding:.5rem}
  .dev-name{font-size:.95rem}
}

/* ===========================================================================
   Detail-page sidebar.
   The enquiry panel was position:sticky while the map sat below it as a plain
   sibling, so scrolling slid the map underneath the pinned panel and it
   disappeared behind it. The whole column sticks instead, and only scrolls
   inside itself when it is taller than the viewport — so the map, brochure and
   WhatsApp buttons all stay reachable while the enquiry form stays in view.
   =========================================================================== */
.detail-side{display:flex;flex-direction:column;gap:1.4rem}
@media(min-width:1025px){
  .detail-side{
    position:sticky;top:90px;align-self:start;
    max-height:calc(100vh - 110px);
    overflow-y:auto;overscroll-behavior:contain;
    scrollbar-width:thin;scrollbar-gutter:stable;
  }
  /* the inner panel must not pin as well, or it overlaps its own siblings */
  .detail-side .panel.sticky{position:static;top:auto}
}
.detail-side .map-frame{height:240px}

/* ===========================================================================
   Phone header.
   The brand plate is a desktop flourish: at phone width it spanned the whole
   bar and sat on top of the language switch and the menu button, so neither
   could be tapped. On phones the brand is just the badge in the bar, and the
   language switch moves into the menu where there is room for it.
   =========================================================================== */
@media(max-width:768px){
  :root{--plate-drop:0px;--plate-grow:0rem;--plate-px:.55rem;--plate-py:.3rem;--plate-track:0em}
  body.has-hero .brand-block{position:static;transform:none;max-width:none}
  body.has-hero .brand{border-radius:calc(var(--radius) - 2px)}
  .header-actions .lang-switch{display:none}   /* it lives in the menu instead */
  .nav-toggle{position:relative;z-index:3}

  /* the bar goes solid while the menu is open, so the hero cannot show through */
  .site-header:has(.main-nav.open){background:var(--bg);border-bottom-color:var(--edge)}

  .nav-lang-row{
    display:flex;align-items:center;justify-content:space-between;gap:1rem;
    padding:.9rem 0;border-bottom:1px solid var(--edge);
  }
  .nav-lang-label{
    font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;
    font-weight:600;color:var(--muted);
  }
  .nav-lang-row .lang-switch{flex:0 0 auto}
  .nav-lang-row .lang-switch a{padding:.5rem 1.1rem;font-size:.9rem;min-height:40px;
    display:flex;align-items:center}
}
@media(min-width:769px){.nav-lang-row{display:none}}

/* ------------------------------------------------------------------
   Developer & project detail — countries, facts, video
   ------------------------------------------------------------------ */
.country-chips{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:.5rem}
.country-chips li{margin:0}
.country-chips a{display:inline-flex;align-items:center;gap:.5rem;
  padding:.45rem .85rem;border-radius:999px;text-decoration:none;
  border:1px solid var(--pm-line,rgba(0,0,0,.12));
  background:color-mix(in srgb, var(--color-primary,#1d4ed8) 5%, transparent);
  color:inherit;font-size:.92rem;line-height:1.2;transition:.18s ease}
.country-chips a:hover{border-color:var(--color-primary,#1d4ed8);
  background:color-mix(in srgb, var(--color-primary,#1d4ed8) 12%, transparent)}
.country-chips .cc{font-size:.68rem;font-weight:700;letter-spacing:.08em;
  padding:.15rem .4rem;border-radius:5px;background:var(--color-primary,#1d4ed8);color:#fff}

.fact-list{list-style:none;margin:1rem 0 0;padding:0;display:grid;gap:.6rem}
.fact-list li{display:flex;justify-content:space-between;gap:1rem;align-items:baseline;
  padding-bottom:.6rem;border-bottom:1px solid var(--pm-line,rgba(0,0,0,.08))}
.fact-list li:last-child{border-bottom:0;padding-bottom:0}
.fact-list span{opacity:.65;font-size:.85rem}
.fact-list strong{text-align:right;font-weight:600;min-width:0;overflow-wrap:anywhere}
.fact-list a{color:inherit}

.video-frame{position:relative;width:100%;aspect-ratio:16/9;border-radius:14px;
  overflow:hidden;background:#000}
.video-frame iframe,.video-frame video{position:absolute;inset:0;width:100%;height:100%;
  border:0;display:block;object-fit:cover}

.contact-list .hq{opacity:.75;font-size:.9rem;line-height:1.45}
.dev-countries{display:flex;flex-wrap:wrap;gap:.3rem;justify-content:center;margin:.1rem 0 .15rem}
.dev-countries span{font-size:.7rem;letter-spacing:.02em;padding:.15rem .5rem;border-radius:999px;
  background:color-mix(in srgb, currentColor 8%, transparent);opacity:.8;white-space:nowrap}

/* Photographer credit. Small, always legible, never in the way. */
.photo-credit{display:block;margin-top:.3rem;font-size:.68rem;line-height:1.35;
  letter-spacing:.01em;opacity:.62;font-weight:400}
.photo-credit a{color:inherit;text-decoration:none;border-bottom:1px solid transparent}
.photo-credit a:hover{opacity:1;border-bottom-color:currentColor}
.detail-hero .photo-credit{margin-top:.9rem;opacity:.5;color:#fff}
.gallery-caption .photo-credit{opacity:.75}
.unit-hero-link{display:block}

/* ------------------------------------------------------------------
   Search bar, Airbnb-style.

   One pill of segments. Hovering or focusing a segment lifts it to white
   and drops the whole bar behind it to grey, so the active cell reads as
   a raised button rather than a highlighted box. The dividers either side
   of the live cell disappear, which is the detail that sells it.
   ------------------------------------------------------------------ */
.ab-search{
  --ab-ink:#222;
  --ab-sub:#6f6f6f;
  --ab-line:rgba(0,0,0,.13);
  position:relative;display:flex;align-items:stretch;gap:0;
  padding:.35rem;border-radius:999px;background:#fff;
  border:1px solid rgba(0,0,0,.07);
  box-shadow:0 3px 12px rgba(0,0,0,.07), 0 18px 46px -18px rgba(0,0,0,.28);
  transition:background .22s ease, box-shadow .22s ease;
}
.ab-search:focus-within{box-shadow:0 3px 12px rgba(0,0,0,.09), 0 24px 56px -18px rgba(0,0,0,.34)}
/* The bar recedes so the live cell can come forward. */
.ab-search:has(.ab-cell:hover),.ab-search:has(.ab-cell:focus-within){background:#ebebeb}

.ab-cell{
  position:relative;flex:1 1 0;min-width:0;
  display:flex;flex-direction:column;justify-content:center;gap:.2rem;
  padding:.8rem 1.5rem;border-radius:999px;cursor:pointer;
  background:transparent;transition:background .22s ease, box-shadow .22s ease;
}
.ab-cell:hover{background:#fff;box-shadow:0 3px 12px rgba(0,0,0,.10)}
.ab-cell:focus-within{background:#fff;box-shadow:0 3px 16px rgba(0,0,0,.18)}

/* Hairline dividers, hidden either side of whichever cell is live. */
.ab-cell + .ab-cell::before{
  content:"";position:absolute;inset-inline-start:0;top:50%;translate:0 -50%;
  width:1px;height:2rem;background:var(--ab-line);transition:opacity .18s ease;
}
.ab-cell:hover::before,.ab-cell:hover + .ab-cell::before,
.ab-cell:focus-within::before,.ab-cell:focus-within + .ab-cell::before{opacity:0}

.ab-lab{
  font-size:.7rem;font-weight:700;line-height:1;letter-spacing:.005em;
  color:var(--ab-ink);white-space:nowrap;
}
.ab-in{
  all:unset;display:block;width:100%;font:inherit;font-size:.92rem;line-height:1.3;
  color:var(--ab-ink);cursor:pointer;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.ab-in::placeholder{color:var(--ab-sub);opacity:1}
.ab-in::-webkit-outer-spin-button,.ab-in::-webkit-inner-spin-button{appearance:none;margin:0}
.ab-in[type="number"]{-moz-appearance:textfield}
/* A select with its native arrow stripped still has to look openable. */
.ab-pick{padding-inline-end:2.3rem}
.ab-pick::after{
  content:"";position:absolute;inset-inline-end:1.35rem;top:calc(50% + .28rem);
  width:.5rem;height:.5rem;border-right:1.6px solid var(--ab-sub);
  border-bottom:1.6px solid var(--ab-sub);rotate:45deg;translate:0 -50%;
  pointer-events:none;transition:border-color .2s ease;
}
.ab-pick:hover::after,.ab-pick:focus-within::after{border-color:var(--ab-ink)}
.rtl .ab-pick::after{rotate:-45deg}

.ab-go{
  flex:0 0 auto;align-self:center;
  display:inline-flex;align-items:center;justify-content:center;gap:.45rem;
  height:3rem;padding-inline:.85rem;margin-inline-start:.2rem;
  border:0;border-radius:999px;cursor:pointer;
  background:linear-gradient(135deg,var(--primary),var(--primary-dark));
  color:#fff;font:inherit;font-size:.95rem;font-weight:600;
  box-shadow:0 6px 18px -8px color-mix(in srgb, var(--primary) 80%, transparent);
  transition:filter .2s ease, box-shadow .22s ease, padding .28s var(--rise);
}
.ab-go:hover{filter:brightness(1.07);box-shadow:0 10px 26px -8px color-mix(in srgb, var(--primary) 85%, transparent)}
.ab-go svg{width:1.15rem;height:1.15rem;flex:0 0 auto;display:block}
/* The label unfurls once someone is actually filling the form in. */
.ab-go-text{
  max-width:0;overflow:hidden;white-space:nowrap;opacity:0;
  transition:max-width .28s var(--rise), opacity .2s ease;
}
.ab-search:focus-within .ab-go{padding-inline:1.15rem}
.ab-search:focus-within .ab-go-text{max-width:7rem;opacity:1}

/* Sitting over a hero, the bar keeps its own light surface. */
.pull-up .ab-search{box-shadow:0 3px 12px rgba(0,0,0,.09), 0 28px 60px -20px rgba(0,0,0,.45)}

@media (max-width:900px){
  .ab-search{flex-direction:column;border-radius:1.75rem;padding:.45rem;gap:.1rem}
  .ab-cell{padding:.8rem 1.15rem;border-radius:1.4rem}
  .ab-cell + .ab-cell::before{
    inset-inline:1.15rem;inset-block-start:0;top:0;translate:none;
    width:auto;height:1px;
  }
  .ab-pick::after{inset-inline-end:1.15rem}
  .ab-go{width:100%;height:3.1rem;margin:.35rem 0 0;padding-inline:1.15rem}
  .ab-go-text{max-width:7rem;opacity:1}
}
@media (prefers-reduced-motion:reduce){
  .ab-search,.ab-cell,.ab-go,.ab-go-text,.ab-cell::before{transition:none}
}

/* ---- Search suggestions panel ------------------------------------ */
.ab-cell{--ab-panel-w:22rem}
.ab-panel{
  position:absolute;z-index:60;inset-inline-start:0;top:calc(100% + .7rem);
  width:max(var(--ab-panel-w), 100%);max-width:min(26rem, 92vw);
  background:#fff;border-radius:1.5rem;border:1px solid rgba(0,0,0,.06);
  box-shadow:0 8px 28px rgba(0,0,0,.12), 0 28px 64px -24px rgba(0,0,0,.4);
  padding:.9rem .5rem .6rem;cursor:default;
  animation:ab-drop .18s var(--rise) both;
}
@keyframes ab-drop{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.ab-panel{animation:none}}
/* The last cells would overflow the bar, so they hang from the right. */
.ab-cell:nth-last-child(2) .ab-panel,
.ab-cell:nth-last-child(3) .ab-panel{inset-inline-start:auto;inset-inline-end:0}

.ab-panel-head{
  margin:0 0 .5rem;padding-inline:1rem;
  font-size:.78rem;font-weight:600;color:#6f6f6f;letter-spacing:.01em;
}
.ab-list{list-style:none;margin:0;padding:0;max-height:min(24rem,60vh);overflow-y:auto}
.ab-opt{
  display:flex;align-items:center;gap:.9rem;width:100%;
  padding:.6rem 1rem;border:0;border-radius:1rem;background:transparent;
  font:inherit;text-align:start;cursor:pointer;color:#222;
  transition:background .14s ease;
}
.ab-opt:hover,.ab-opt.is-active{background:#f3f3f3}
.ab-ico{
  flex:0 0 auto;display:grid;place-items:center;width:2.9rem;height:2.9rem;
  border-radius:.8rem;background:#f1f1f1;color:#4a4a4a;
}
.ab-ico-g{width:1.35rem;height:1.35rem}
.ab-opt-txt{display:flex;flex-direction:column;gap:.1rem;min-width:0}
.ab-opt-t{font-size:.94rem;font-weight:500;line-height:1.25;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ab-opt-s{font-size:.82rem;color:#6f6f6f;line-height:1.25;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ab-empty{padding:.7rem 1rem 1rem;color:#6f6f6f;font-size:.9rem}

/* A cell with its panel open stays lifted. */
.ab-cell.is-open{background:#fff;box-shadow:0 3px 16px rgba(0,0,0,.18)}
.ab-cell.is-open::before,.ab-cell.is-open + .ab-cell::before{opacity:0}
.ab-search:has(.ab-cell.is-open){background:#ebebeb}

/* The select is kept for submitting; the button in front of it is what
   people actually see and click. */
.ab-hidden-control{
  position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;
}
.ab-face{
  all:unset;display:block;width:100%;font:inherit;font-size:.92rem;line-height:1.3;
  color:#6f6f6f;cursor:pointer;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.ab-face.is-set{color:#222}

@media (max-width:900px){
  .ab-panel{position:static;width:auto;max-width:none;box-shadow:none;border:0;
    padding:.4rem 0 0;animation:none;background:transparent}
  .ab-list{max-height:14rem}
  .ab-opt{padding-inline:.4rem}
  .ab-ico{width:2.4rem;height:2.4rem}
}

/* A section with an open panel must not clip it, and must sit above the
   section that follows. Set from search.js so it works without :has(). */
.section.ab-unclip{overflow:visible;z-index:30}

/* ---- Stats band ---------------------------------------------------
   A flat slab of brand orange with the labels painted in the dark text
   colour (from the dark-safe block above) read as muddy brown on orange.
   The fill gets a little depth, the labels get proper contrast, and the
   figures are separated by hairlines instead of by guesswork.           */
.sec-stats.bg-primary{
  background:radial-gradient(120% 140% at 50% -20%,
             #c05a12 0%, var(--primary) 46%, #8f3e08 100%);
}
.sec-stats .stats-grid{gap:0}
.sec-stats .stat{position:relative;padding:.5rem 1.6rem;text-align:center}
.sec-stats .stat + .stat::before{
  content:"";position:absolute;inset-block:.2rem;inset-inline-start:0;
  width:1px;background:var(--edge);
}
.sec-stats.bg-primary .stat + .stat::before,
.sec-stats.bg-dark .stat + .stat::before{background:rgba(255,255,255,.22)}
.sec-stats.bg-primary .stat-value,
.sec-stats.bg-dark .stat-value{color:#fff}
.sec-stats.bg-primary .stat-label{color:rgba(255,255,255,.82);opacity:1}
.sec-stats.bg-dark .stat-label{color:rgba(255,255,255,.62);opacity:1}
.sec-stats .stat-value{font-size:clamp(2.4rem,4.6vw,3.6rem)}
.sec-stats .stat-label{font-size:.74rem;letter-spacing:.16em;margin-top:.7rem}
/* The grid drops to two columns at 1024 and one at 768, so the dividers
   have to follow it — otherwise a vertical hairline floats at the start of
   the second row. */
@media (max-width:1024px){
  .sec-stats .stat:nth-child(odd)::before{display:none}
}
@media (max-width:768px){
  .sec-stats .stat{padding-block:1.4rem}
  .sec-stats .stat:nth-child(odd)::before{display:block}
  .sec-stats .stat + .stat::before{inset-block:auto;inset-inline:1.6rem;
    top:0;width:auto;height:1px}
}

/* ---- The pill on a listing page ----------------------------------
   Over the hero it floats; on an index it is the top of the content,
   so it needs air before the results begin.                          */
.unit-search{margin-bottom:1.9rem}
@media (max-width:900px){.unit-search{margin-bottom:1.4rem}}

/* ---- The wordmark plate on every page ------------------------------
   Over a hero the plate starts large and collapses as you scroll (the
   body.has-hero rules above). Elsewhere there is no hero to grow over,
   so it simply sits in that collapsed form: same badge, no animation,
   and the header reads as one design across the site.                 */
.brand{
  background:var(--plate-bg);
  padding:.34rem .85rem;
  border-radius:var(--radius);
}
.brand-text{color:var(--plate-ink);font-weight:400;letter-spacing:-.02em}
@media (max-width:768px){
  .brand{padding:.3rem .55rem;border-radius:calc(var(--radius) - 2px)}
}

/* ---- Phone tab bar -------------------------------------------------
   Five destinations pinned within thumb reach. Hidden entirely above
   the phone breakpoint, where the header nav already shows them all.  */
.tabbar{display:none}
@media (max-width:768px){
  .tabbar{
    display:grid;grid-auto-flow:column;grid-auto-columns:1fr;
    position:fixed;inset-inline:0;bottom:0;z-index:80;
    /* it passes over the dark footer, so it has to hold its own surface */
    background:color-mix(in srgb, var(--bg) 96%, transparent);
    backdrop-filter:saturate(170%) blur(16px);
    -webkit-backdrop-filter:saturate(170%) blur(16px);
    border-top:1px solid var(--edge);
    box-shadow:0 -6px 22px -14px rgba(0,0,0,.5);
    padding-bottom:env(safe-area-inset-bottom);
  }
  .tab{
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    gap:.24rem;padding:.6rem .25rem .55rem;min-height:3.6rem;
    color:var(--muted);text-decoration:none;
    -webkit-tap-highlight-color:transparent;
    transition:color .18s ease;
  }
  .tab svg{width:1.45rem;height:1.45rem;flex:0 0 auto;display:block}
  .tab span{
    font-size:.65rem;font-weight:600;letter-spacing:.005em;line-height:1;
    max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  }
  .tab.is-on{color:var(--primary)}
  .tab:active{opacity:.6}

  /* the footer must not end underneath the bar */
  .site-footer{padding-bottom:calc(4.7rem + env(safe-area-inset-bottom))}
}
/* An open menu covers the screen; a bar floating over it just gets in
   the way. */
@media (max-width:768px){
  body:has(.main-nav.open) .tabbar{display:none}
}

/* ------------------------------------------------- folding project cards
   Projects listing only (.fold-grid). The card shows photo, name and price;
   the rest is a flap that unfolds from the bottom edge on hover, on keyboard
   focus, or on the first tap where there is no hover at all.

   The flap is absolutely positioned so an open card never pushes its
   neighbours around -- it unfolds *over* whatever is below it. Everywhere
   else on the site .card-fold is an ordinary wrapper with no styling, so
   those cards are untouched. */
.fold-grid{--fold-ease:cubic-bezier(.22,.78,.26,1)}

.fold-grid .project-card{position:relative;overflow:visible;z-index:1}
.fold-grid .project-card > .card-media{
  border-radius:calc(var(--radius) + 6px) calc(var(--radius) + 6px) 0 0;
}
.fold-grid .project-card > .card-body{position:relative;padding-bottom:1.25rem}

/* the chevron that says there is more under the card */
.fold-grid .project-card > .card-body::after{
  content:"";position:absolute;inset-inline-end:1.3rem;bottom:1.15rem;
  width:9px;height:9px;border-right:2px solid var(--muted);
  border-bottom:2px solid var(--muted);transform:rotate(45deg);opacity:.5;
  /* physical borders on purpose: a chevron pointing down means the same
     thing in Arabic, so only its position flips, never its direction */
  transition:transform .45s var(--fold-ease),opacity .3s ease,border-color .3s ease;
}

.fold-grid .card-fold{
  position:absolute;inset-inline:-1px;top:calc(100% + 1px);
  perspective:900px;perspective-origin:top center;pointer-events:none;
}
.fold-grid .card-fold-in{
  background:var(--bg);border:1px solid var(--border);border-top:0;
  border-radius:0 0 calc(var(--radius) + 6px) calc(var(--radius) + 6px);
  padding:.1rem 1.4rem 1.3rem;
  transform:rotateX(-92deg);transform-origin:top center;opacity:0;
  box-shadow:0 34px 60px -34px rgba(0,0,0,.55);
  transition:transform .55s var(--fold-ease),opacity .2s linear .05s,
             border-color .4s ease;
}

/* --- unfolded ---------------------------------------------------------- */
.fold-grid .project-card:hover,
.fold-grid .project-card:focus-within,
.fold-grid .project-card.is-open{z-index:6}
.fold-grid .project-card.is-open{
  transform:translateY(-6px);
  box-shadow:0 30px 60px -32px rgba(0,0,0,.55);
  border-color:color-mix(in srgb,var(--primary) 45%,transparent);
}
.fold-grid .project-card:hover,
.fold-grid .project-card:focus-within,
.fold-grid .project-card.is-open{
  border-bottom-left-radius:0;border-bottom-right-radius:0;
}
.fold-grid .project-card:hover > .card-body::after,
.fold-grid .project-card:focus-within > .card-body::after,
.fold-grid .project-card.is-open > .card-body::after{
  transform:rotate(225deg);opacity:.9;border-color:var(--primary);
}
.fold-grid .project-card:hover .card-fold,
.fold-grid .project-card:focus-within .card-fold,
.fold-grid .project-card.is-open .card-fold{pointer-events:auto}
.fold-grid .project-card:hover .card-fold-in,
.fold-grid .project-card:focus-within .card-fold-in,
.fold-grid .project-card.is-open .card-fold-in{
  transform:rotateX(0);opacity:1;
  border-color:color-mix(in srgb,var(--primary) 45%,transparent);
}

/* A fold is decoration. Where motion is unwelcome the card is simply whole,
   exactly as it is on every other page. */
@media (prefers-reduced-motion:reduce){
  .fold-grid .card-fold{position:static;perspective:none;pointer-events:auto}
  .fold-grid .card-fold-in{
    transform:none;opacity:1;background:none;border:0;border-radius:0;
    padding:0;box-shadow:none;transition:none;
  }
  .fold-grid .project-card > .card-body{padding-bottom:1.6rem}
  .fold-grid .project-card > .card-body::after{display:none}
  .fold-grid .project-card:hover,
  .fold-grid .project-card:focus-within,
  .fold-grid .project-card.is-open{border-radius:calc(var(--radius) + 6px)}
}

/* ------------------------------------- the reel's palette on those cards
   Colours lifted from the video frame: a deep navy panel (#0f172a) with a
   warm glow in one corner, gold for the accent line and the price, and a
   white flap carrying a gold pill button. They sit close to the brand
   already -- the site's own secondary is #111827 and its primary #b45309 --
   so the listing reads as a darker, richer version of the same palette
   rather than a second identity. Change these five values to retune it. */
.fold-grid{
  --fold-ink:#0f172a;          /* the card panel */
  --fold-ink-2:#172242;        /* its lighter edge, for the gradient */
  --fold-gold:#e9a63b;         /* accent line, price, button */
  --fold-gold-lit:#f8cf6b;     /* the brighter end of every gold gradient */
  --fold-dim:#9fb0c9;          /* secondary text on the dark panel */
}

.fold-grid .project-card{border-color:color-mix(in srgb,var(--fold-ink) 70%,transparent)}
.fold-grid .project-card > .card-body{
  background:
    radial-gradient(130% 95% at 100% 0%,
      color-mix(in srgb,var(--fold-gold) 26%,transparent) 0%,
      transparent 58%),
    linear-gradient(155deg,var(--fold-ink-2) 0%,var(--fold-ink) 46%);
  color:#fff;
  /* the panel is the card's bottom now, so it carries the rounded corners --
     and gives them up when the flap takes over below it. No overflow:hidden
     here: that would clip the flap away entirely. */
  border-radius:0 0 calc(var(--radius) + 6px) calc(var(--radius) + 6px);
}
.fold-grid .project-card:hover > .card-body,
.fold-grid .project-card:focus-within > .card-body,
.fold-grid .project-card.is-open > .card-body{border-radius:0}
.rtl .fold-grid .project-card > .card-body{
  background:
    radial-gradient(130% 95% at 0% 0%,
      color-mix(in srgb,var(--fold-gold) 26%,transparent) 0%,
      transparent 58%),
    linear-gradient(205deg,var(--fold-ink-2) 0%,var(--fold-ink) 46%);
}

/* the faint ring the video has sitting behind the text */
.fold-grid .project-card > .card-body::before{
  content:"";position:absolute;inset-inline-end:-34px;bottom:-30px;
  width:118px;height:118px;border-radius:50%;pointer-events:none;
  border:1px solid color-mix(in srgb,var(--fold-gold) 22%,transparent);
  box-shadow:inset 0 0 26px color-mix(in srgb,var(--fold-gold) 10%,transparent);
  /* clipped to its own overhang rather than with overflow:hidden on the
     panel, which would take the flap with it */
  clip-path:inset(0 34px 30px 0);
}
.rtl .fold-grid .project-card > .card-body::before{clip-path:inset(0 0 30px 34px)}

.fold-grid .card-eyebrow{color:var(--fold-gold);opacity:1}
.fold-grid .card-body h3 a{color:#fff}
.fold-grid .card-body h3 a:hover{color:var(--fold-gold-lit)}
.fold-grid .card-meta{color:var(--fold-dim)}
.fold-grid .card-price{
  background:linear-gradient(100deg,var(--fold-gold-lit),var(--fold-gold));
  -webkit-background-clip:text;background-clip:text;color:transparent;
  font-size:1.2rem;
}
/* the short rule the video draws under the text */
.fold-grid .card-price::after{
  content:"";display:block;width:46px;height:1px;margin-top:.75rem;
  background:linear-gradient(to right,
    color-mix(in srgb,var(--fold-gold) 70%,transparent),transparent);
}
.rtl .fold-grid .card-price::after{background:linear-gradient(to left,
  color-mix(in srgb,var(--fold-gold) 70%,transparent),transparent)}
.fold-grid .project-card > .card-body::after{
  border-color:color-mix(in srgb,var(--fold-gold) 85%,transparent);opacity:.75;
}
.fold-grid .project-card:hover > .card-body::after,
.fold-grid .project-card:focus-within > .card-body::after,
.fold-grid .project-card.is-open > .card-body::after{
  border-color:var(--fold-gold-lit);opacity:1;
}
/* the photo meets the panel with no seam */
.fold-grid .project-card > .card-media::after{
  background:linear-gradient(to top,var(--fold-ink),transparent 62%);opacity:.9;
}

/* --- the white flap, with the video's gold pill ------------------------ */
.fold-grid .card-fold-in{
  background:#fbfcfe;border-color:color-mix(in srgb,var(--fold-ink) 18%,transparent);
  padding:1.05rem 1.4rem 1.3rem;
}
.fold-grid .card-facts{color:#55657d}
.fold-grid .card-foot{margin-top:.9rem}
.fold-grid .card-link{
  background:linear-gradient(100deg,var(--fold-gold-lit),var(--fold-gold));
  color:var(--fold-ink);font-weight:700;border-radius:999px;
  padding:.56rem 1.15rem;font-size:.86rem;text-decoration:none;
  box-shadow:0 10px 22px -12px color-mix(in srgb,var(--fold-gold) 85%,transparent);
  transition:transform .35s var(--fold-ease),box-shadow .35s var(--fold-ease),
             filter .25s ease;
}
.fold-grid .card-link:hover{
  filter:brightness(1.06);
  box-shadow:0 14px 26px -12px color-mix(in srgb,var(--fold-gold) 95%,transparent);
}
.fold-grid .card-link .arr{display:none}       /* the pill is the arrow now */
.fold-grid .project-card:hover .card-link{transform:none}
.rtl .fold-grid .project-card:hover .card-link{transform:none}
.fold-grid .save-btn{color:#8b9ab2}
.fold-grid .save-btn:hover,.fold-grid .save-btn.is-saved{color:var(--fold-gold)}

/* unfolded, the panel's border picks up the gold instead of the brand orange */
.fold-grid .project-card:hover,
.fold-grid .project-card:focus-within,
.fold-grid .project-card.is-open,
.fold-grid .project-card:hover .card-fold-in,
.fold-grid .project-card:focus-within .card-fold-in,
.fold-grid .project-card.is-open .card-fold-in{
  border-color:color-mix(in srgb,var(--fold-gold) 55%,transparent);
}
.fold-grid .project-card.is-open{
  box-shadow:0 30px 60px -30px color-mix(in srgb,var(--fold-ink) 75%,transparent);
}

@media (prefers-reduced-motion:reduce){
  .fold-grid .card-fold-in{background:none;padding:0}
  .fold-grid .card-facts{color:var(--fold-dim)}
  .fold-grid .save-btn{color:#8b9ab2}
}

/* ===========================================================================
   hero-noma -- the "step inside the property" hero
   Set custom_class "hero-noma" on a hero section to switch it on; clearing the
   class puts the section back exactly as it was. Modelled on a reference the
   client sent: a warm near-black stage, the media opening inside a framed
   panel and expanding to fill the screen, cream uppercase type held on the
   left behind a soft scrim, and a bronze call to action.
   =========================================================================== */
.hero-noma{
  --noma-ink:#171717;          /* the stage */
  --noma-bronze:#ab9475;       /* button, eyebrow, frame */
  --noma-bronze-lit:#c9b396;
  --noma-cream:#f4efe9;        /* headline */
  --noma-dim:#a79e95;          /* paragraph */
  --noma-open:cubic-bezier(.62,0,.18,1);
  color:var(--noma-cream);
  min-height:min(90svh,900px);
  display:flex;align-items:center;
}
/* .sec-hero.bg-dark sets the slate background and carries two classes, so the
   warm stage needs the same weight to win */
.sec-hero.hero-noma{background-color:var(--noma-ink)}
/* the stage is plain: no brand glow, no architectural grid */
.hero-noma::before,.hero-noma::after{display:none}
.hero-noma > .sec-content{
  width:100%;
  /* clear the wordmark plate, which hangs --plate-drop over the hero until
     the first scroll; without this it lands on the eyebrow */
  padding-top:calc(var(--plate-drop) * .78);
}

/* the plate is a cool slate slab by default -- warm it to the stage it sits
   on. :has() is the only way to reach the header from the hero; where it is
   unsupported the plate simply keeps its usual colour. */
body:has(.hero-noma){
  --plate-bg:#201c18;
  --plate-ink:#f4efe9;
}

/* --- the opening: a framed panel that expands to full bleed ------------- */
/* Full bleed is the resting state and the framed opening lives only in the
   keyframes, held in place by animation-fill-mode during the delay. Putting
   the frame in the static rule instead would leave the media boxed in for
   good on any client that never runs the animation. */
.hero-noma .sec-video-bg{
  animation:noma-open 2.5s var(--noma-open) .4s both;
}
.hero-noma .sec-video-bg video.sec-video-el{
  animation:noma-push 2.5s var(--noma-open) .4s both;
}
.hero-noma .noma-frame{
  position:absolute;inset:17% 9% 17% 45%;z-index:0;pointer-events:none;
  border:1px solid color-mix(in srgb,var(--noma-bronze) 60%,transparent);
  border-radius:14px;opacity:0;
  animation:noma-frame 2.5s var(--noma-open) .4s both;
}
@keyframes noma-open{
  from{clip-path:inset(17% 9% 17% 45% round 14px)}
  to  {clip-path:inset(0 0 0 0 round 0)}
}
@keyframes noma-push{
  from{transform:translate(-50%,-50%) scale(1.16)}
  to  {transform:translate(-50%,-50%) scale(1)}
}
@keyframes noma-frame{
  0%  {opacity:1;transform:none}
  38% {opacity:.55}
  100%{opacity:0;transform:scale(1.04)}
}
/* --- the scrim that keeps the text readable over the footage ------------ */
.hero-noma > .sec-content::before{
  content:"";position:absolute;inset:-40vh -8% -40vh -10%;z-index:-1;pointer-events:none;
  background:linear-gradient(to right,
    color-mix(in srgb,var(--noma-ink) 93%,transparent) 0%,
    color-mix(in srgb,var(--noma-ink) 74%,transparent) 40%,
    transparent 88%);
}
.rtl .hero-noma > .sec-content::before{
  background:linear-gradient(to left,
    color-mix(in srgb,var(--noma-ink) 93%,transparent) 0%,
    color-mix(in srgb,var(--noma-ink) 74%,transparent) 40%,
    transparent 88%);
}

/* --- type ---------------------------------------------------------------- */
.hero-noma .eyebrow{
  color:var(--noma-bronze);opacity:1;letter-spacing:.3em;font-size:.68rem;
  padding-inline-start:3.1rem;margin-bottom:1.8rem;
}
.hero-noma .eyebrow::before{background:var(--noma-bronze);width:2.4rem}
.hero-noma .hero-title{
  color:var(--noma-cream);
  text-transform:uppercase;font-weight:300;letter-spacing:.015em;
  font-size:clamp(1.85rem,3.6vw,3.25rem);line-height:1.1;max-width:18ch;
}
/* Arabic has no capitals, and forcing the transform only risks the renderer */
.rtl .hero-noma .hero-title{text-transform:none;font-weight:400}
.hero-noma .hero-sub{
  color:var(--noma-dim);max-width:40ch;line-height:1.85;
  font-size:clamp(.94rem,1.05vw,1.04rem);margin-top:1.6rem;
}

/* --- the two actions, stacked the way the reference has them ------------- */
/* rtl.css forces .btn-row back to a row and loads after this file, so the
   Arabic selector is spelled out here to keep the stacked order in both */
.hero-noma .btn-row,
.rtl .hero-noma .btn-row{
  flex-direction:column;align-items:flex-start;gap:1.2rem;margin-top:2.3rem;
}
.hero-noma .btn-ghost{
  order:1;background:none;border:0;border-top:1px solid
    color-mix(in srgb,var(--noma-cream) 30%,transparent);
  border-radius:0;color:var(--noma-cream);padding:.95rem 0 0;
  font-size:.72rem;font-weight:600;letter-spacing:.16em;text-transform:uppercase;
  transition:color .3s ease,border-color .3s ease;
}
.hero-noma .btn-ghost:hover{color:var(--noma-bronze-lit);border-color:var(--noma-bronze)}
.hero-noma .btn-primary{
  order:2;background:var(--noma-bronze);color:#1a1510;
  border:1px solid color-mix(in srgb,var(--noma-bronze-lit) 75%,transparent);
  border-radius:2px;padding:1.05rem 2.2rem;
  font-size:.74rem;font-weight:700;letter-spacing:.16em;text-transform:uppercase;
  box-shadow:0 20px 44px -24px #000;
  transition:background .3s ease,transform .3s var(--noma-open);
}
.hero-noma .btn-primary:hover{background:var(--noma-bronze-lit);transform:translateY(-2px)}

/* --- narrow screens: no room for a side-by-side frame -------------------- */
@media (max-width:860px){
  .hero-noma{min-height:min(88svh,760px)}
  .hero-noma .sec-video-bg{clip-path:none;animation:none}
  .hero-noma .sec-video-bg video.sec-video-el{animation:none}
  .hero-noma .noma-frame{display:none}
  .hero-noma > .sec-content{padding-top:0}
  /* the scrim runs top-to-bottom instead, which needs no mirroring -- the
     .rtl selector is repeated so it beats the horizontal one above */
  .hero-noma > .sec-content::before,
  .rtl .hero-noma > .sec-content::before{
    background:linear-gradient(to bottom,
      color-mix(in srgb,var(--noma-ink) 55%,transparent) 0%,
      color-mix(in srgb,var(--noma-ink) 88%,transparent) 55%,
      color-mix(in srgb,var(--noma-ink) 94%,transparent) 100%);
  }
}

/* --- the opening is decoration, not information -------------------------- */
@media (prefers-reduced-motion:reduce){
  .hero-noma .sec-video-bg{clip-path:none;animation:none}
  .hero-noma .sec-video-bg video.sec-video-el{animation:none}
  .hero-noma .noma-frame{display:none}
}
