/* ==========================================================================
   هورايزون بيلدرز للمقاولات | HORIZON BUILDERS
   نظام التصميم — اتجاه «المخطّط الهندسي»: فحمي + ذهبي + أبيض
   الألوان الرسمية من دليل الهوية: #4a4a4a · #c9a227 · #ffffff · #000000
   ========================================================================== */

:root {
  /* ألوان الهوية */
  --gold:    #c9a227;
  --gold-2:  #e2c35a;
  --gold-d:  #9e7e17;
  --gray:    #4a4a4a;
  --white:   #ffffff;
  --black:   #000000;

  /* درجات مشتقّة */
  --ink:     #141414;   /* خلفية الأقسام الداكنة */
  --ink-2:   #1d1d1d;
  --ink-3:   #2a2a2a;
  --paper:   #f4f2ed;   /* أبيض خرساني دافئ */
  --paper-2: #e9e6de;
  --text:    #1a1a1a;
  --muted:   #6b6b6b;
  --muted-d: #a3a3a3;
  --line:    rgba(0,0,0,.1);
  --line-d:  rgba(255,255,255,.1);

  --f-head: "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --f-body: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --f-lat:  "Montserrat", "Alexandria", sans-serif;

  --container: 1240px;
  --nav-h: 80px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ------------------------------- Reset --------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
body {
  font-family: var(--f-body);
  background: var(--paper);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
::selection { background: var(--gold); color: var(--black); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ----------------------------- Layout --------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section { padding: clamp(80px, 10vw, 140px) 0; position: relative; overflow: hidden; overflow: clip; }
/* overflow:clip لا ينشئ حاوية تمرير، فيبقى position:sticky عاملًا */
.section--tight { padding: clamp(48px, 6vw, 80px) 0; position: relative; }
.paper { background: var(--paper); }
.dark  { background: var(--ink); color: var(--white); }

/* ------------------------------ Type ---------------------------------- */
.h2 {
  font-family: var(--f-head);
  font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.25;
  letter-spacing: -.01em;
}
.h2 em, .hero__title em { font-style: normal; color: var(--gold); }
.paper .h2 em { color: var(--gold-d); }
.lead { font-size: clamp(1rem, 1.3vw, 1.15rem); color: var(--muted); max-width: 60ch; margin-top: 18px; }
.dark .lead { color: var(--muted-d); }

.kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--f-head); font-weight: 600; font-size: .85rem;
  color: var(--gold); margin-bottom: 20px;
}
.kicker i { width: 28px; height: 2px; background: currentColor; position: relative; }
.kicker i::after { content: ""; position: absolute; inset-inline-start: -4px; top: -3px; width: 8px; height: 8px; border: 2px solid currentColor; transform: rotate(45deg); background: var(--ink); }
.kicker--dark { color: var(--gold-d); }
.kicker--dark i::after { background: var(--paper); }

.head { max-width: 760px; margin-bottom: clamp(44px, 6vw, 72px); }
.head--row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }

/* ----------------------------- Buttons --------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px;
  font-family: var(--f-head); font-weight: 700; font-size: .98rem;
  border-radius: 2px;
  position: relative; isolation: isolate; overflow: hidden;
  transition: color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
}
.btn svg { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(-4px); }
.btn--gold { background: var(--gold); color: var(--black); }
.btn--gold::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--white); transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.btn--gold:hover::before { transform: scaleX(1); }
.btn--line { border: 1.5px solid rgba(255,255,255,.35); color: var(--white); }
.btn--line:hover { border-color: var(--gold); color: var(--gold); }
.btn--block { width: 100%; }

/* ---------------------------- Ruler (scroll) ---------------------------- */
.ruler {
  position: fixed; inset: 0 0 auto 0; height: 6px; z-index: 120;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 1px, transparent 1px 12px);
  pointer-events: none;
}
.ruler__fill {
  display: block; height: 100%; width: 100%;
  background: repeating-linear-gradient(90deg, var(--black) 0 1px, var(--gold) 1px 12px);
  transform: scaleX(0); transform-origin: right;
}

/* ------------------------------- Nav ---------------------------------- */
.nav {
  position: fixed; inset: 6px 0 auto 0; z-index: 100;
  height: var(--nav-h);
  transition: background .4s var(--ease), height .4s var(--ease), box-shadow .4s;
}
.nav.is-solid { background: rgba(20,20,20,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); height: 70px; box-shadow: 0 1px 0 var(--line-d); }
.nav__inner { height: 100%; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--white); }
.brand__mark { width: 44px; height: auto; }
.brand__txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand__en { font-family: var(--f-lat); font-weight: 700; letter-spacing: .22em; font-size: 1.05rem; }
.brand__sub { font-family: var(--f-lat); font-size: .62rem; letter-spacing: .14em; color: var(--gold); margin-top: 4px; }
.nav__menu { display: flex; gap: 4px; margin-inline-start: auto; }
.nav__link {
  position: relative; padding: 8px 14px; color: rgba(255,255,255,.78);
  font-family: var(--f-head); font-weight: 500; font-size: .93rem;
  transition: color .3s;
}
.nav__link::after {
  content: ""; position: absolute; inset-inline: 14px; bottom: 2px; height: 2px;
  background: var(--gold); transform: scaleX(0); transition: transform .35s var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--white); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__cta { min-height: 44px; padding: 0 20px; font-size: .9rem; }
.nav__burger { display: none; width: 44px; height: 44px; flex-direction: column; justify-content: center; align-items: center; gap: 6px; margin-inline-start: auto; }
.nav__burger span { width: 24px; height: 2px; background: var(--white); transition: transform .35s var(--ease), opacity .2s; }
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.drawer {
  position: fixed; inset: 0; z-index: 90; background: rgba(14,14,14,.97);
  display: grid; place-items: center;
  opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s;
}
.drawer.open { opacity: 1; visibility: visible; }
.drawer__panel { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.drawer .nav__link { font-size: 1.5rem; font-weight: 700; color: var(--white); }
.drawer .btn { margin-top: 18px; }

/* ------------------------------- Hero --------------------------------- */
.hero {
  position: relative; min-height: 100svh;
  background: var(--ink); color: var(--white);
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 90px;
  overflow: hidden;
}
.hero__photo { position: absolute; inset: 0; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1); opacity: .16; }
.hero__photo::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 60%, transparent 0%, var(--ink) 75%), linear-gradient(to top, var(--ink), transparent 40%); }
.hero__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(201,162,39,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,162,39,.07) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero__title {
  font-family: var(--f-head); font-weight: 900;
  font-size: clamp(2.7rem, 6.6vw, 5.6rem);
  line-height: 1.18; letter-spacing: -.015em;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .line > span { display: inline-block; transform: translateY(105%); animation: rise 1s var(--ease) forwards; }
.hero__title .line:nth-child(2) > span { animation-delay: .15s; }
@keyframes rise { to { transform: none; } }
.hero__lead { color: var(--muted-d); font-size: clamp(1rem, 1.3vw, 1.15rem); max-width: 52ch; margin-top: 24px; opacity: 0; animation: fade .9s .45s var(--ease) forwards; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; opacity: 0; animation: fade .9s .6s var(--ease) forwards; }
.hero .kicker { opacity: 0; animation: fade .8s .1s var(--ease) forwards; }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.hero__creds {
  display: flex; flex-wrap: wrap; margin-top: 48px;
  border-top: 1px solid var(--line-d);
  opacity: 0; animation: fade .9s .8s var(--ease) forwards;
}
.hero__creds li { padding: 16px 0; padding-inline-end: 28px; margin-inline-end: 28px; border-inline-end: 1px solid var(--line-d); display: flex; flex-direction: column; }
.hero__creds li:last-child { border: 0; margin: 0; }
.hero__creds span { font-size: .75rem; color: var(--muted-d); }
.hero__creds b { font-family: var(--f-lat); font-weight: 600; font-size: .95rem; letter-spacing: .04em; }
.hero__creds li:last-child b { font-family: var(--f-head); letter-spacing: 0; }

.hero__draw { position: relative; }
.hero__draw figcaption {
  position: absolute; bottom: -8px; inset-inline-end: 0;
  font-family: var(--f-lat); font-size: .7rem; letter-spacing: .14em; color: var(--muted-d);
  border: 1px solid var(--line-d); padding: 4px 10px;
}
.blueprint { width: 100%; height: auto; overflow: visible; direction: ltr; }
.blueprint .d {
  fill: none; stroke: rgba(255,255,255,.85); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw 1.6s var(--d, 0s) var(--ease) forwards;
}
.blueprint .thin { stroke-width: 1.1; stroke: rgba(255,255,255,.5); }
.blueprint .gold { stroke: var(--gold); }
.blueprint .dash { stroke-dasharray: 1; }
.blueprint .fl { fill: rgba(255,255,255,.06); stroke: none; opacity: 0; animation: flin .7s var(--d, 0s) var(--ease) forwards; }
.blueprint .fl--gold { fill: var(--gold); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes flin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.blueprint .hook { transform-origin: 420px 78px; animation: sway 5s 2.4s ease-in-out infinite; }
@keyframes sway { 0%,100% { transform: rotate(1.4deg); } 50% { transform: rotate(-1.4deg); } }
.blueprint text { font-family: var(--f-lat); font-size: 11px; fill: var(--muted-d); text-anchor: middle; letter-spacing: .1em; opacity: 0; animation: appear .8s 2.3s forwards; }
@keyframes appear { to { opacity: 1; } }
.blueprint .tag { text-anchor: start; fill: var(--gold); font-weight: 600; }

.hero__scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1.5px solid rgba(255,255,255,.4); border-radius: 14px;
}
.hero__scroll span { position: absolute; top: 8px; left: 50%; width: 3px; height: 8px; margin-left: -1.5px; background: var(--gold); border-radius: 2px; animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ------------------------ Caution tapes ---------------------------- */
.tapes { position: relative; height: 150px; background: var(--ink); overflow: hidden; margin-top: -1px; }
.tape {
  position: absolute; left: -5%; width: 110%; height: 52px; overflow: hidden;
  display: flex; align-items: center;
  border-block: 6px solid transparent;
  border-image: repeating-linear-gradient(45deg, var(--black) 0 12px, var(--gold) 12px 24px) 6;
}
.tape--a { top: 46px; background: var(--gold); color: var(--black); transform: rotate(-2.2deg); z-index: 2; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.tape--b { top: 50px; background: var(--ink-3); color: var(--gold); transform: rotate(2deg); }
.tape__track { display: flex; flex-shrink: 0; white-space: nowrap; animation: marquee 40s linear infinite; }
.tape--b .tape__track { animation-direction: reverse; animation-duration: 50s; }
.tape__track span { font-family: var(--f-head); font-weight: 800; font-size: 1.1rem; padding: 0 28px; display: inline-flex; align-items: center; gap: 56px; }
.tape--b .tape__track span { font-family: var(--f-lat); letter-spacing: .25em; font-size: .85rem; }
.tape__track span::after { content: ""; width: 10px; height: 10px; background: currentColor; transform: rotate(45deg); margin-inline-start: 28px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* ------------------------------- About --------------------------------- */
.about { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.about__media { position: relative; aspect-ratio: 1 / 1.05; }
.about__img { position: absolute; overflow: hidden; background: var(--paper-2); }
.about__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.about__img:hover img { transform: scale(1.05); }
.about__img--a { inset: 0 0 18% 18%; clip-path: polygon(0 0, 100% 0, 100% 100%, 12% 100%, 0 88%); }
.about__img--b { width: 50%; aspect-ratio: 1; bottom: 0; left: 0; border: 10px solid var(--paper); }
.about__img--a::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(255,255,255,.4); pointer-events: none; }
.about__stamp {
  position: absolute; top: -26px; right: -18px; width: 128px; height: 128px; border-radius: 50%;
  background: var(--gold); color: var(--black); display: grid; place-items: center;
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
}
.about__stamp svg { direction: ltr; position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 22s linear infinite; }
.about__stamp text { font-family: var(--f-lat); font-size: 9.6px; font-weight: 700; letter-spacing: .17em; fill: var(--black); }
.about__stamp b { font-family: var(--f-lat); font-size: 1.5rem; font-weight: 700; }
@keyframes spin { to { transform: rotate(360deg); } }

.values { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 40px; }
.value { background: var(--paper); padding: 22px; display: flex; gap: 14px; transition: background .3s; }
.value:hover { background: var(--white); }
.value__ic { flex: 0 0 44px; height: 44px; display: grid; place-items: center; background: var(--ink); color: var(--gold); }
.value__ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.value b { font-family: var(--f-head); font-weight: 700; font-size: 1.05rem; }
.value p { font-size: .88rem; color: var(--muted); line-height: 1.7; margin-top: 2px; }

/* ----------------------------- Services --------------------------------- */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-d); border: 1px solid var(--line-d); position: relative; }
.svc {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--ink); padding: 40px 34px 36px; min-height: 380px;
  display: flex; flex-direction: column;
  transition: background .4s;
}
.svc__bg { position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .6s var(--ease); }
.svc__bg img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.3); transform: scale(1.1); transition: transform 1.2s var(--ease); }
.svc__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,10,10,.97) 30%, rgba(10,10,10,.7)); }
.svc:hover .svc__bg { opacity: 1; }
.svc:hover .svc__bg img { transform: scale(1); }
/* زوايا ذهبية كعلامات المخطط */
.svc::before, .svc::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-color: var(--gold); border-style: solid;
  transition: width .5s var(--ease), height .5s var(--ease);
}
.svc::before { top: 14px; right: 14px; border-width: 2px 2px 0 0; }
.svc::after { bottom: 14px; left: 14px; border-width: 0 0 2px 2px; }
.svc:hover::before, .svc:hover::after { width: 46px; height: 46px; }
.svc__code { position: absolute; top: 22px; left: 26px; font-family: var(--f-lat); font-size: .72rem; letter-spacing: .18em; color: var(--muted-d); }
.svc__ic { width: 56px; height: 56px; border: 1.5px solid var(--gold); color: var(--gold); display: grid; place-items: center; margin-bottom: 30px; transition: background .4s, color .4s; }
.svc:hover .svc__ic { background: var(--gold); color: var(--black); }
.svc__ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.svc h3 { font-family: var(--f-head); font-weight: 700; font-size: 1.35rem; }
.svc p { color: var(--muted-d); font-size: .95rem; margin-top: 10px; }
.svc ul { margin-top: auto; padding-top: 22px; display: flex; flex-direction: column; gap: 6px; }
.svc li { font-size: .88rem; color: rgba(255,255,255,.75); display: flex; align-items: center; gap: 10px; }
.svc li::before { content: ""; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); flex: none; }

/* ----------------------------- Process --------------------------------- */
.process { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 100px); }
.process__visual { position: relative; }
.process__sticky { position: sticky; top: calc(var(--nav-h) + 30px); }
.bld { direction: ltr; width: 100%; max-width: 460px; height: auto; color: var(--text); background: var(--white); border: 1px solid var(--line); }
.bld .ground { stroke: var(--text); stroke-width: 2; }
.bld .floor rect { fill: transparent; stroke: rgba(0,0,0,.18); stroke-width: 1.5; stroke-dasharray: 6 5; transition: fill .6s var(--ease), stroke .6s; }
.bld .floor path { fill: transparent; stroke: rgba(0,0,0,.12); stroke-width: 1.2; transition: fill .6s, stroke .6s; }
.bld .floor.done rect { fill: var(--gray); stroke: var(--gray); stroke-dasharray: none; }
.bld .floor.done path { fill: rgba(201,162,39,.85); stroke: none; }
.bld .floor.now rect { fill: var(--gold); stroke: var(--gold); stroke-dasharray: none; }
.bld .floor.now path { fill: var(--white); stroke: none; }
.bld .floor { transform-box: fill-box; transform-origin: bottom; }
.bld .floor.now { animation: pop .6s var(--ease); }
@keyframes pop { from { transform: scaleY(.6); opacity: .4; } to { transform: none; opacity: 1; } }
.bld .pcrane path { fill: none; stroke: var(--text); stroke-width: 1.4; stroke-linejoin: round; }
.bld .pcrane .cw { fill: var(--gold); }
.bld #pcable { stroke: var(--text); stroke-width: 1.2; transition: all .7s var(--ease); }
.bld #phook { transition: transform .7s var(--ease); }
.bld #phook path { fill: none; stroke: var(--gold-d); stroke-width: 2; }
.bld .beam { fill: var(--gold); }
.bld .plabel { font-family: var(--f-lat); font-weight: 700; font-size: 12px; letter-spacing: .16em; fill: var(--text); }

.steps { counter-reset: s; }
.step {
  position: relative; padding: 32px 0 32px; padding-inline-start: 74px;
  border-top: 1px solid var(--line);
  min-height: 42vh;
  opacity: .35; transition: opacity .5s var(--ease);
}
.step:last-child { min-height: auto; }
.step.is-on { opacity: 1; }
.step__n {
  position: absolute; inset-inline-start: 0; top: 30px;
  width: 52px; height: 52px; display: grid; place-items: center;
  font-family: var(--f-lat); font-weight: 700; font-size: .95rem;
  border: 1.5px solid var(--text); transition: background .4s, color .4s, border-color .4s;
}
.step.is-on .step__n { background: var(--gold); border-color: var(--gold); color: var(--black); }
.step h3 { font-family: var(--f-head); font-weight: 800; font-size: clamp(1.3rem, 2vw, 1.7rem); }
.step p { color: var(--muted); margin-top: 10px; max-width: 46ch; }

/* ------------------------------- Work slider --------------------------------- */
.slider {
  display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 max(24px, calc((100vw - var(--container)) / 2 + 24px)) 10px;
  scrollbar-width: none; cursor: grab;
}
.slider::-webkit-scrollbar { display: none; }
.slider.is-drag { cursor: grabbing; scroll-snap-type: none; }
.work {
  position: relative; flex: 0 0 clamp(280px, 36vw, 480px); aspect-ratio: 4 / 5;
  scroll-snap-align: start; overflow: hidden; background: var(--ink-3);
}
.work img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.85) contrast(1.05); transition: filter .8s var(--ease), transform 1.2s var(--ease); user-select: none; -webkit-user-drag: none; }
.work:hover img { filter: grayscale(0); transform: scale(1.05); }
.work::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.88), transparent 55%); }
.work__body { position: absolute; inset: auto 0 0 0; padding: 28px; z-index: 1; }
.work__body span { font-family: var(--f-lat); font-size: .72rem; letter-spacing: .2em; color: var(--gold); }
.work__body h3 { font-family: var(--f-head); font-weight: 800; font-size: 1.5rem; margin-top: 6px; }
.work__body p { color: rgba(255,255,255,.7); font-size: .93rem; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .6s var(--ease), opacity .5s, margin .5s; }
.work:hover .work__body p { max-height: 80px; opacity: 1; margin-top: 6px; }
.slider-nav { display: flex; gap: 10px; }
.snav { width: 54px; height: 54px; border: 1.5px solid rgba(255,255,255,.3); display: grid; place-items: center; color: var(--white); transition: background .3s, border-color .3s, color .3s; }
.snav:hover { background: var(--gold); border-color: var(--gold); color: var(--black); }
.snav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ----------------------------- Commitments --------------------------------- */
.gold-band { background: var(--gold); color: var(--black); }
.commits { display: grid; grid-template-columns: repeat(4, 1fr); }
.commit { padding: 10px 28px; border-inline-start: 1.5px solid rgba(0,0,0,.2); }
.commit:first-child { border: 0; padding-inline-start: 0; }
.commit b { display: block; font-family: var(--f-lat); font-weight: 700; font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1.1; }
.commit span { display: block; font-family: var(--f-head); font-weight: 500; font-size: .95rem; margin-top: 8px; }

/* ----------------------------- Official docs --------------------------------- */
.docs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.doc {
  position: relative; background: var(--white); border: 1px solid var(--line);
  padding: 28px; transition: transform .4s var(--ease), box-shadow .4s var(--ease);
  background-image: linear-gradient(var(--paper-2) 1px, transparent 1px);
  background-size: 100% 34px; background-position: 0 100px;
}
.doc::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 4px; background: repeating-linear-gradient(45deg, var(--black) 0 8px, var(--gold) 8px 16px); }
.doc:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(0,0,0,.08); }
.doc header { display: flex; gap: 14px; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.doc__ic { flex: 0 0 48px; height: 48px; display: grid; place-items: center; background: var(--ink); color: var(--gold); }
.doc__ic svg { width: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.doc header small { font-size: .78rem; color: var(--muted); }
.doc header h3 { font-family: var(--f-head); font-weight: 700; font-size: 1.08rem; line-height: 1.35; }
.doc header > div { flex: 1; min-width: 0; }
.docs > *, .svc-grid > *, .quote > * { min-width: 0; }
.doc__status {
  margin-inline-start: auto; align-self: start;
  font-family: var(--f-head); font-size: .75rem; font-weight: 700; color: #1d7a3e;
  border: 1.5px solid currentColor; padding: 2px 10px; transform: rotate(-6deg);
}
.doc dl { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.doc dt { font-size: .78rem; color: var(--muted); }
.doc dd { font-family: var(--f-head); font-weight: 600; font-size: .95rem; }
.copy {
  font-family: var(--f-lat); font-weight: 700; font-size: 1.05rem; letter-spacing: .05em;
  display: inline-flex; align-items: center; gap: 8px; padding: 2px 0;
  border-bottom: 1.5px dashed var(--gold-d); position: relative;
}
.copy::after {
  content: ""; width: 14px; height: 14px; opacity: .5;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='9' y='9' width='12' height='12' rx='2'/%3E%3Cpath d='M5 15V5a2 2 0 0 1 2-2h10'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='9' y='9' width='12' height='12' rx='2'/%3E%3Cpath d='M5 15V5a2 2 0 0 1 2-2h10'/%3E%3C/svg%3E") center / contain no-repeat;
}
.copy:hover { color: var(--gold-d); }
.copy.is-copied::before {
  content: "تم النسخ ✓"; position: absolute; bottom: calc(100% + 6px); inset-inline-start: 0;
  font-family: var(--f-head); font-size: .72rem; letter-spacing: 0; white-space: nowrap;
  background: var(--ink); color: var(--gold); padding: 3px 10px;
}

/* ----------------------------- Quote / Contact --------------------------------- */
.quote { position: relative; display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.contact-list { display: flex; flex-direction: column; gap: 18px; margin-top: 36px; }
.contact-list li { display: flex; gap: 14px; align-items: center; }
.ci { flex: 0 0 46px; height: 46px; display: grid; place-items: center; border: 1.5px solid var(--line-d); color: var(--gold); }
.ci svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-list small { display: block; font-size: .78rem; color: var(--muted-d); }
.contact-list b { font-family: var(--f-head); font-weight: 600; }
.map { margin-top: 32px; border: 1px solid var(--line-d); aspect-ratio: 16 / 8; overflow: hidden; background: var(--ink-2); }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) invert(.92) contrast(.9); }

.qform {
  background: var(--paper); color: var(--text);
  padding: clamp(26px, 4vw, 44px);
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px;
  position: relative;
  box-shadow: 18px 18px 0 var(--gold);
}
.qform__head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--text); padding-bottom: 14px; margin-bottom: 4px; }
.qform__head h3 { font-family: var(--f-head); font-weight: 800; font-size: 1.5rem; }
.qform__head span { font-family: var(--f-lat); font-size: .7rem; letter-spacing: .16em; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label, .field .label { font-family: var(--f-head); font-weight: 600; font-size: .85rem; }
.field input, .field textarea {
  width: 100%; background: var(--white); border: 1.5px solid var(--line); padding: 12px 14px;
  border-radius: 0; transition: border-color .3s, box-shadow .3s; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,39,.2); }
.field input[dir="ltr"] { text-align: right; }
.field input.is-invalid { border-color: #c0392b; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 8px 16px; border: 1.5px solid var(--line); background: var(--white); font-size: .88rem; font-weight: 500; transition: all .25s; }
.chips input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--gold); }
.chips input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.qform .btn { grid-column: 1 / -1; margin-top: 6px; }
.qform .btn--gold::before { background: var(--ink); }
.qform .btn--gold:hover { color: var(--gold); }
.form-note { grid-column: 1 / -1; font-size: .9rem; color: #1d7a3e; font-weight: 600; min-height: 1em; }
.form-note:empty { display: none; }

/* ------------------------------- Footer --------------------------------- */
.footer { background: var(--black); color: var(--white); padding: 70px 0 30px; position: relative; }
.footer::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 8px; background: repeating-linear-gradient(45deg, var(--black) 0 14px, var(--gold) 14px 28px); }
.footer__top { display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; padding-bottom: 36px; border-bottom: 1px solid var(--line-d); }
.footer__brand { display: flex; align-items: center; gap: 18px; }
.footer__brand img { width: 66px; }
.footer__brand b { display: block; font-family: var(--f-lat); letter-spacing: .24em; font-size: 1.1rem; }
.footer__brand span { display: block; font-size: .88rem; color: var(--muted-d); }
.footer__brand em { display: block; font-style: normal; color: var(--gold); font-family: var(--f-head); font-weight: 600; font-size: .95rem; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.footer__nav a { color: rgba(255,255,255,.7); font-size: .93rem; transition: color .3s; }
.footer__nav a:hover { color: var(--gold); }
.footer__legal { display: flex; flex-wrap: wrap; gap: 10px 36px; padding: 24px 0; font-size: .85rem; color: var(--muted-d); border-bottom: 1px solid var(--line-d); }
.footer__legal b { font-family: var(--f-lat); color: var(--white); font-weight: 600; margin-inline-start: 6px; }
.footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 22px; font-size: .82rem; color: var(--muted-d); }
.footer__bottom [dir="ltr"] { font-family: var(--f-lat); letter-spacing: .2em; }

/* ------------------------------- WhatsApp --------------------------------- */
.wa-fab {
  position: fixed; bottom: 24px; left: 24px; z-index: 80;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: #25d366; color: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.3);
  transition: transform .3s var(--ease);
}
.wa-fab:hover { transform: scale(1.08); }
.wa-fab svg { width: 30px; height: 30px; }

/* ------------------------------- Reveal --------------------------------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .1s; } .d2 { transition-delay: .2s; } .d3 { transition-delay: .3s; }

/* ------------------------------- Responsive --------------------------------- */
@media (max-width: 1080px) {
  .nav__menu, .nav__cta { display: none; }
  .nav__burger { display: flex; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__draw { max-width: 560px; margin-inline: auto; width: 100%; order: -1; margin-bottom: -10px; }
  .svc-grid { grid-template-columns: 1fr 1fr; }
  .docs { grid-template-columns: 1fr 1fr; }
  .commits { grid-template-columns: 1fr 1fr; gap: 28px 0; }
  .commit:nth-child(3) { border: 0; padding-inline-start: 0; }
}
@media (max-width: 860px) {
  .about, .quote { grid-template-columns: 1fr; }
  .about__media { max-width: 520px; width: 100%; margin-inline: auto; }
  .process { grid-template-columns: 1fr; }
  .process__visual { position: sticky; top: 76px; z-index: 2; background: var(--paper); padding-bottom: 10px; }
  .process__sticky { position: static; }
  .bld { max-width: 170px; display: block; margin-inline: auto; }
  .step { min-height: auto; padding-block: 26px; }
}
@media (max-width: 640px) {
  .container { padding-inline: 16px; }
  .hero { padding-top: calc(var(--nav-h) + 10px); }
  .hero__draw { max-width: 360px; }
  .hero__creds li { padding-inline-end: 16px; margin-inline-end: 16px; }
  .hero__creds li:last-child { flex-basis: 100%; border-top: 1px solid var(--line-d); }
  .svc-grid, .docs { grid-template-columns: 1fr; }
  .svc { min-height: 0; }
  .values { grid-template-columns: 1fr; }
  .qform { grid-template-columns: 1fr; box-shadow: 10px 10px 0 var(--gold); }
  .commits { grid-template-columns: 1fr 1fr; }
  .commit { padding: 0 14px; }
  .commit:nth-child(odd) { border: 0; padding-inline-start: 0; }
  .about__stamp { width: 100px; height: 100px; right: -6px; }
  .about__stamp b { font-size: 1.15rem; }
  .about__stamp text { font-size: 9px; }
  .tapes { height: 120px; }
  .tape { top: 34px !important; }
  .tape--b { top: 38px !important; }
  .wa-fab { width: 52px; height: 52px; bottom: 16px; left: 16px; }
  .slider { padding-inline: 16px; }
  .work { flex-basis: 82vw; }
  .work__body p { max-height: 80px; opacity: 1; margin-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* العناصر المخفية تبقى مخفية مهما كان تنسيقها */
[hidden] { display: none !important; }

/* توقيع المطوّر — في منتصف التذييل */
.footer__credit { margin: 18px 0 0; text-align: center; font-size: .78rem; color: var(--muted-d); }
.footer__credit a { color: rgba(255,255,255,.75); transition: color .3s; }
.footer__credit a:hover { color: var(--gold); }
/* الجوال: مسافة تحت التذييل حتى لا يغطي زر واتساب العائم آخر سطر */
@media (max-width: 640px) { .footer { padding-bottom: 96px; } }
