/* ==========================================================================
   ثقة وعقار — Trust & Real Estate
   Visual prototype. Design language derived from the square-Kufic logo:
   angular geometry, thin navy rules, generous white.
   ========================================================================== */

:root {
  --navy:        #000C60;
  --navy-deep:   #00073A;
  --navy-soft:   #2A3585;
  --grey:        #969696;
  --grey-light:  #D8D8DA;
  --grey-faint:  #EFEFF2;
  --sand:        #B0894A;
  --sand-light:  #D9C08A;
  --paper:       #FAFAF9;
  --white:       #FFFFFF;
  --ink:         #14161C;

  --measure: 1240px;
  --gut: clamp(20px, 5vw, 64px);
  --rule: 1px solid var(--grey-light);

  --step-xs: clamp(0.78rem, 0.76rem + 0.12vw, 0.86rem);
  --step-s:  clamp(0.92rem, 0.88rem + 0.2vw, 1.02rem);
  --step-m:  clamp(1.05rem, 0.98rem + 0.35vw, 1.22rem);
  --step-l:  clamp(1.4rem, 1.2rem + 1vw, 2rem);
  --step-xl: clamp(2rem, 1.5rem + 2.4vw, 3.4rem);
  --step-2xl:clamp(2.6rem, 1.7rem + 4vw, 5.2rem);

  --ease: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  font-size: var(--step-m);
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--navy);
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.wrap { max-width: var(--measure); margin-inline: auto; padding-inline: var(--gut); }

/* --------------------------------------------------------------------------
   Shared type devices
   -------------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--step-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--sand);
  margin-bottom: 18px;
}
.eyebrow::before {
  /* A small square, echoing the logo's window motifs. Was a 26x1 rule, which
     read as an em dash before all 16 section labels. */
  content: "";
  width: 6px;
  height: 6px;
  background: var(--sand);
}

.section-title { font-size: var(--step-xl); font-weight: 600; }
.section-lede {
  max-width: 56ch;
  color: #4A4E5A;
  font-size: var(--step-m);
  margin-top: 18px;
}

.section { padding-block: clamp(72px, 10vw, 140px); }
.section--tint { background: var(--white); }

/* Angular corner motif, lifted from the logo's clipped geometry */
.clip-corner { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  font-size: var(--step-s);
  font-weight: 600;
  border: 1px solid transparent;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
  cursor: pointer;
}
.btn--solid { background: var(--navy); color: var(--white); }
.btn--solid:hover { background: var(--navy-deep); }
.btn--ghost { border-color: rgba(255,255,255,.45); color: var(--white); }
.btn--ghost:hover { background: rgba(255,255,255,.12); border-color: var(--white); }
.btn--line { border-color: var(--navy); color: var(--navy); }
.btn--line:hover { background: var(--navy); color: var(--white); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 60;
  transition: background .4s var(--ease), box-shadow .4s var(--ease);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: 84px;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gut);
}
.site-header.is-stuck {
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--grey-light);
}

.brand { display: flex; align-items: center; gap: 11px; }
.brand img { height: 42px; width: auto; transition: filter .4s var(--ease); }
.site-header:not(.is-stuck) .brand img { filter: brightness(0) invert(1); }
.brand__name {
  font-size: clamp(1.05rem, 1rem + .3vw, 1.3rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--white);
  transition: color .4s var(--ease);
  white-space: nowrap;
}
.site-header.is-stuck .brand__name { color: var(--navy); }

.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 38px); }
.nav a {
  position: relative;
  font-size: var(--step-s);
  font-weight: 500;
  color: var(--white);
  padding-block: 6px;
  transition: color .3s var(--ease);
}
.site-header.is-stuck .nav a { color: var(--ink); }
.nav a::after {
  content: "";
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 0;
  width: 0;
  height: 1.5px;
  background: var(--sand);
  transition: width .35s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { width: 100%; }

.nav__cta { padding: 11px 22px; font-size: var(--step-xs); }
.site-header.is-stuck .nav__cta { border-color: var(--navy); color: var(--navy); }
.site-header.is-stuck .nav__cta:hover { background: var(--navy); color: var(--white); }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); margin: 5px 0; transition: background .3s; }
.site-header.is-stuck .nav-toggle span { background: var(--ink); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--navy-deep);
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  filter: grayscale(.4);
  opacity: .5;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0,7,58,.96) 8%, rgba(0,7,58,.62) 48%, rgba(0,7,58,.72) 100%);
}
.hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gut);
  padding-block: clamp(120px, 16vw, 150px) clamp(56px, 7vw, 92px);
  width: 100%;
}
.hero h1 {
  color: var(--white);
  font-size: var(--step-2xl);
  font-weight: 600;
  line-height: 1.12;
  max-width: 17ch;
  letter-spacing: -0.02em;
}
.hero h1 em { font-style: normal; color: var(--sand-light); }
.hero p {
  color: rgba(255,255,255,.82);
  max-width: 46ch;
  margin-top: 26px;
  font-size: var(--step-m);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.hero__eyebrow { color: var(--sand-light); }
.hero__eyebrow::before { background: var(--sand-light); }

/* scroll cue */
.hero__cue {
  position: absolute;
  z-index: 2;
  inset-block-end: 28px;
  inset-inline-start: var(--gut);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--step-xs);
  color: rgba(255,255,255,.55);
  letter-spacing: .08em;
}
.hero__cue i { display: block; width: 1px; height: 40px; background: linear-gradient(var(--sand-light), transparent); }

/* --------------------------------------------------------------------------
   Stats band
   -------------------------------------------------------------------------- */

.stats {
  background: var(--white);
  border-block-end: var(--rule);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  max-width: var(--measure);
  margin-inline: auto;
}
.stat {
  padding: clamp(34px, 5vw, 56px) var(--gut);
  border-inline-start: var(--rule);
}
.stat:first-child { border-inline-start: 0; }
.stat__num {
  font-size: clamp(2.2rem, 1.4rem + 2.6vw, 3.6rem);
  font-weight: 600;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -0.03em;
}
.stat__num sub { font-size: .42em; font-weight: 500; color: var(--sand); vertical-align: super; margin-inline-start: 4px; }
.stat__label { margin-top: 12px; font-size: var(--step-s); color: var(--grey); }

/* --------------------------------------------------------------------------
   Section header
   -------------------------------------------------------------------------- */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: clamp(38px, 5vw, 64px);
}

/* --------------------------------------------------------------------------
   Project cards
   -------------------------------------------------------------------------- */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: clamp(20px, 2.4vw, 32px);
}

.project-card {
  position: relative;
  background: var(--white);
  border: var(--rule);
  overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px -28px rgba(0,12,96,.45);
  border-color: var(--navy-soft);
}
.project-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--grey-faint);
}
.project-card__media > img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.project-card:hover .project-card__media > * { transform: scale(1.05); }

.chip {
  position: absolute;
  z-index: 2;
  inset-block-start: 16px;
  inset-inline-start: 16px;
  padding: 7px 15px;
  font-size: var(--step-xs);
  font-weight: 600;
  letter-spacing: .02em;
  background: var(--white);
  color: var(--navy);
}
.chip--live   { background: var(--navy); color: var(--white); }
.chip--soon   { background: var(--sand); color: var(--white); }
.chip--closed { background: rgba(20,22,28,.78); color: var(--white); }

.project-card__body { padding: clamp(22px, 2.4vw, 30px); }
.project-card__loc {
  font-size: var(--step-xs);
  color: var(--grey);
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.project-card h3 { font-size: var(--step-l); font-weight: 600; }
.project-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: var(--rule);
  font-size: var(--step-s);
  color: #565A66;
}
.project-card__meta b { color: var(--navy); font-weight: 600; }

/* --------------------------------------------------------------------------
   Split feature
   -------------------------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
}
.split__media { position: relative; }
.split__media img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.split__media::after {
  content: "";
  position: absolute;
  inset-block-end: -18px;
  inset-inline-end: -18px;
  width: 46%;
  height: 46%;
  border: 1px solid var(--sand);
  z-index: -1;
}

/* --------------------------------------------------------------------------
   Services
   -------------------------------------------------------------------------- */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background: var(--grey-light);
  border: var(--rule);
}
.service {
  background: var(--white);
  padding: clamp(28px, 3.2vw, 44px);
  transition: background .4s var(--ease);
}
.service:hover { background: var(--paper); }
.service__num {
  font-size: var(--step-xs);
  font-weight: 600;
  color: var(--sand);
  letter-spacing: .1em;
}
.service h3 { margin-top: 16px; font-size: var(--step-l); }
.service p { margin-top: 12px; font-size: var(--step-s); color: #565A66; }

/* --------------------------------------------------------------------------
   Partner strip
   -------------------------------------------------------------------------- */

.partners {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(28px, 5vw, 76px);
  padding-block: clamp(30px, 4vw, 48px);
  border-block: var(--rule);
}
.partner {
  font-size: var(--step-l);
  font-weight: 600;
  color: var(--grey);
  opacity: .72;
  transition: opacity .4s var(--ease), color .4s var(--ease);
}
.partner:hover { opacity: 1; color: var(--navy); }

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */

.cta {
  position: relative;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset-block-start: -30%;
  inset-inline-end: -8%;
  width: 46%;
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.14);
  transform: rotate(45deg);
}
.cta .wrap { position: relative; z-index: 2; padding-block: clamp(64px, 8vw, 110px); }
.cta h2 { color: var(--white); font-size: var(--step-xl); max-width: 20ch; }
.cta p { color: rgba(255,255,255,.76); max-width: 48ch; margin-top: 18px; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.btn--sand { background: var(--sand); color: var(--white); }
.btn--sand:hover { background: #9C7838; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.7); font-size: var(--step-s); }
.site-footer .wrap { padding-block: clamp(52px, 6vw, 82px) 32px; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 40px;
}
.brand--footer img { height: 54px; filter: brightness(0) invert(1); }
.brand--footer .brand__name { color: var(--white); font-size: 1.35rem; }
.site-footer h4 { color: var(--white); font-size: var(--step-s); letter-spacing: .06em; margin-bottom: 16px; }
.site-footer a:hover { color: var(--sand-light); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-bottom {
  margin-top: 46px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.14);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  font-size: var(--step-xs);
  color: rgba(255,255,255,.5);
}

/* --------------------------------------------------------------------------
   Page hero (inner pages)
   -------------------------------------------------------------------------- */

.page-hero {
  background: var(--navy);
  color: var(--white);
  padding-block: clamp(140px, 16vw, 190px) clamp(56px, 7vw, 84px);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset-block-start: -40%;
  inset-inline-start: -6%;
  width: 40%;
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.12);
  transform: rotate(45deg);
}
.page-hero .wrap { position: relative; z-index: 2; }
.page-hero h1 { color: var(--white); font-size: var(--step-xl); max-width: 22ch; }
.page-hero p { color: rgba(255,255,255,.75); max-width: 52ch; margin-top: 18px; }

/* --------------------------------------------------------------------------
   Filter bar (decorative in the prototype)
   -------------------------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: clamp(30px, 4vw, 46px);
}
.filter {
  padding: 11px 24px;
  font-size: var(--step-s);
  font-weight: 500;
  border: var(--rule);
  background: var(--white);
  color: #565A66;
  cursor: pointer;
  transition: all .3s var(--ease);
}
.filter:hover { border-color: var(--navy-soft); color: var(--navy); }
.filter.is-active { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* --------------------------------------------------------------------------
   Detail page
   -------------------------------------------------------------------------- */

.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  margin-bottom: clamp(40px, 5vw, 66px);
}
.gallery img { background: var(--grey-faint); width: 100%; object-fit: cover; }
.gallery__main { aspect-ratio: 16/10; }
.gallery__side { display: grid; gap: 12px; }
.gallery__side img { aspect-ratio: 16/9; }

.detail {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(34px, 4vw, 64px);
  align-items: start;
}

.spec-table { width: 100%; border-collapse: collapse; margin-top: 26px; }
.spec-table th, .spec-table td {
  text-align: start;
  padding: 15px 0;
  border-bottom: var(--rule);
  font-size: var(--step-s);
}
.spec-table th { color: var(--grey); font-weight: 500; width: 40%; }
.spec-table td { color: var(--navy); font-weight: 600; }

.lead-card {
  position: sticky;
  top: 104px;
  background: var(--white);
  border: var(--rule);
  padding: clamp(26px, 3vw, 36px);
}
.lead-card__price { font-size: var(--step-xl); font-weight: 600; color: var(--navy); line-height: 1.1; }
.lead-card__price small { display: block; font-size: var(--step-xs); font-weight: 500; color: var(--grey); margin-bottom: 8px; letter-spacing: .06em; }

.field { margin-top: 16px; }
.field label { display: block; font-size: var(--step-xs); color: var(--grey); margin-bottom: 7px; letter-spacing: .04em; }
.field input, .field textarea {
  width: 100%;
  padding: 13px 15px;
  font: inherit;
  font-size: var(--step-s);
  border: var(--rule);
  background: var(--paper);
  color: var(--ink);
  transition: border-color .3s var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--navy); }
.lead-card .btn { width: 100%; justify-content: center; margin-top: 22px; }
.lead-card__note { margin-top: 14px; font-size: var(--step-xs); color: var(--grey); text-align: center; }

.whats {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; margin-top: 10px; padding: 14px;
  border: 1px solid #1EA55A; color: #1EA55A; font-weight: 600; font-size: var(--step-s);
  transition: background .3s var(--ease), color .3s var(--ease);
}
.whats:hover { background: #1EA55A; color: var(--white); }

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.figure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
}
.figure-grid img { aspect-ratio: 3/4; object-fit: cover; width: 100%; }

.timeline { border-inline-start: var(--rule); padding-inline-start: 28px; display: grid; gap: 34px; }
.timeline__item { position: relative; }
.timeline__item::before {
  content: "";
  position: absolute;
  inset-inline-start: -33px;
  inset-block-start: 9px;
  width: 9px; height: 9px;
  background: var(--sand);
}
.timeline h3 { font-size: var(--step-m); }
.timeline p { margin-top: 6px; font-size: var(--step-s); color: #565A66; }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(28px, 4vw, 56px); }
.contact-item { padding-block: 22px; border-bottom: var(--rule); }
.contact-item span { display: block; font-size: var(--step-xs); color: var(--grey); letter-spacing: .06em; margin-bottom: 6px; }
.contact-item a, .contact-item strong { font-size: var(--step-l); font-weight: 600; color: var(--navy); direction: ltr; display: inline-block; }

/* --------------------------------------------------------------------------
   Scroll reveal
   -------------------------------------------------------------------------- */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .detail { grid-template-columns: 1fr; }
  .lead-card { position: static; }
  .gallery { grid-template-columns: 1fr; }
  .gallery__side { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav { display: none; }
  .nav-toggle { display: block; }
  .nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    position: absolute;
    inset-block-start: 84px;
    inset-inline: 0;
    background: var(--white);
    padding: 22px var(--gut) 30px;
    box-shadow: 0 18px 30px -22px rgba(0,0,0,.4);
  }
  .nav.is-open a { color: var(--ink); width: 100%; padding-block: 11px; border-bottom: var(--rule); }
  .nav.is-open .nav__cta { border-color: var(--navy); color: var(--navy); margin-top: 14px; }
  .stat { border-inline-start: 0; border-block-end: var(--rule); }
}

@media (max-width: 760px) {
  .hero__cue { display: none; }
}
