/* =================================================================
   PCC — شركة المقاولات | style.css
   ملف واحد · Mobile-first · RTL
   ================================================================= */

/* -----------------------------------------------------------------
   00. FONTS — TheSans Arabic (self-hosted)
   ----------------------------------------------------------------- */
@font-face {
  font-family: 'TheSans Arabic';
  src: url('../fonts/TheSansArabic-Plain.ttf') format('truetype');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'TheSans Arabic';
  src: url('../fonts/TheSansArabic-Plain.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'TheSans Arabic';
  src: url('../fonts/TheSansArabic-Bold.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'TheSans Arabic';
  src: url('../fonts/TheSansArabic-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'TheSans Arabic';
  src: url('../fonts/TheSansArabic-Bold.ttf') format('truetype');
  font-weight: 900; font-style: normal; font-display: swap;
}

/* الخط اللاتيني — Berlin Sans (self-hosted) */
@font-face {
  font-family: 'Berlin Sans';
  src: url('../fonts/BerlinSans-Roman.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Berlin Sans';
  src: url('../fonts/BerlinSans-DemiBold.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Berlin Sans';
  src: url('../fonts/BerlinSans-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* -----------------------------------------------------------------
   01. TOKENS
   ----------------------------------------------------------------- */
:root {
  --shell-w: 1240px;
  --base: #1C1714;
  --surface: #2E251E;
  --gold: #C9A227;
  --gold-deep: #6B5426;
  --warm: #A98763;
  --paper: #EDE7DC;
  --paper-dim: #C4BCAE;

  --font: 'TheSans Arabic', 'Segoe UI', system-ui, sans-serif;
  --font-latin: 'Berlin Sans', 'TheSans Arabic', 'Segoe UI', system-ui, sans-serif;

  --ease: cubic-bezier(.4, 0, .2, 1);
  --t-fast: .3s var(--ease);
  --t-mid: .45s var(--ease);
  --t-slow: .6s var(--ease);

  --shadow-sm: 0 2px 10px rgba(28, 23, 20, .4);
  --shadow-md: 0 12px 34px rgba(28, 23, 20, .4);

  --radius: 14px;
  --radius-sm: 8px;

  --header-h: 74px;
  --shell: 1240px;
  --pad-x: 20px;
  --sec-y: clamp(64px, 9vw, 132px);
}

/* -----------------------------------------------------------------
   02. RESET & BASE
   ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  direction: ltr; /* شريط التمرير على يمين الصفحة */
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  direction: rtl;
  font-family: var(--font);
  font-weight: 400;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.85;
  color: var(--paper);
  background: var(--base);
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img, svg { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--gold); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--warm); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

h1, h2, h3, h4 {
  margin: 0 0 .55em;
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: -.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 6vw, 4.5rem); line-height: 1.45; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.05rem, 2.2vw, 1.35rem); font-weight: 700; line-height: 1.4; }

.num { font-feature-settings: "tnum"; letter-spacing: .02em; }

.latin {
  font-family: var(--font-latin);
  font-weight: 400;
  letter-spacing: .3em;
  text-transform: uppercase;
  direction: ltr;
  text-align: right;
  font-size: .72rem;
  color: var(--warm);
}

.skip-link {
  position: absolute; top: -60px; right: 16px; z-index: 200;
  background: var(--gold); color: var(--base);
  padding: 10px 18px; border-radius: var(--radius-sm); font-weight: 700;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 12px; color: var(--base); }

/* الخاصية hidden تسبق أي display في هذا الملف */
[hidden][hidden] { display: none; }

/* -----------------------------------------------------------------
   03. LAYOUT PRIMITIVES
   ----------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.section {
  position: relative;
  padding-block: var(--sec-y);
  overflow: hidden;
}
.section--dark { background: var(--base); color: var(--paper); }
.section--surface { background: var(--surface); color: var(--paper); }
.section--light { background: var(--paper); color: var(--base); }

.section-head { max-width: 62ch; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head:has(.h2--oneline) { max-width: none; }
.section-head:has(.lede--oneline) .lede { max-width: none; }
.section-head:has(.lede--wide) { max-width: none; }
.section-head--wide { max-width: 74ch; }

.eyebrow {
  margin: 0 0 .9em;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .28em;
  color: var(--gold);
}
.section--light .eyebrow { color: var(--gold-deep); }

.lede { color: var(--paper-dim); max-width: 60ch; }
.lede--wide { max-width: none; }
.section--light .lede { color: #5A4C40; }

/* -----------------------------------------------------------------
   04. BRAND SHAPES — corner mark · spire bullets · ghost type
   ----------------------------------------------------------------- */
.corner-mark {
  position: absolute;
  top: 28px;
  inset-inline-start: 28px;
  width: 2px; height: 48px;
  background: var(--gold);
  z-index: 3;
  pointer-events: none;
}
.corner-mark::after {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: 12px;
  width: 8px; height: 8px;
  background: var(--warm);
}
.section--light .corner-mark { background: var(--gold-deep); }

.spire-list { display: grid; gap: 14px; margin-block: 22px 0; }
.spire-list li {
  position: relative;
  padding-inline-start: 26px;
  color: inherit;
}
.spire-list li::before {
  content: "";
  position: absolute;
  top: .62em;
  inset-inline-start: 4px;
  width: 0; height: 0;
  border-inline: 5px solid transparent;
  border-bottom: 8px solid var(--gold);
}
.spire-list li::after {
  content: "";
  position: absolute;
  top: calc(.62em + 10px);
  inset-inline-start: 3px;
  width: 8px; height: 2px;
  background: var(--gold-deep);
}
.section--light .spire-list li::before { border-bottom-color: var(--gold-deep); }

/* Ghost outline typography */
.ghost { position: relative; display: block; }
.ghost__layer {
  position: absolute;
  top: 12px;
  inset-inline-start: -12px;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold-deep);
  pointer-events: none;
  user-select: none;
}
.ghost__front { position: relative; color: var(--gold); }

.ghost-word {
  display: block;
  font-size: clamp(3rem, 9vw, 6.5rem);
  font-weight: 900;
  line-height: .95;
  color: transparent;
  -webkit-text-stroke: 2px var(--gold-deep);
}
.ghost-num {
  display: block;
  font-size: clamp(6rem, 18vw, 14rem);
  font-weight: 900;
  line-height: .82;
  color: transparent;
  -webkit-text-stroke: 2px var(--gold);
}

.watermark {
  position: absolute;
  inset-inline-end: -80px;
  top: 50%;
  translate: 0 -50%;
  width: 500px; max-width: 60vw;
  opacity: .05;
  pointer-events: none;
  z-index: 0;
}
.watermark--right { inset-inline-end: auto; inset-inline-start: -90px; }

.colonnade {
  position: absolute;
  inset-inline-end: -60px;
  bottom: 0;
  width: 320px;
  opacity: .06;
  pointer-events: none;
}

/* -----------------------------------------------------------------
   05. MEDIA / IMAGE PLACEHOLDERS
   ----------------------------------------------------------------- */
.media {
  position: relative;
  background: var(--surface);
  overflow: hidden;
  border-radius: var(--radius);
}
.media img { width: 100%; height: 100%; object-fit: cover; }

.media--framed { aspect-ratio: 4/5; }
.media--framed::after {
  content: "";
  position: absolute;
  inset: 0;
  translate: 16px 16px;
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  pointer-events: none;
}

/* بديل الصور الناقصة */
.ph {
  width: 100%; height: 100%;
  min-height: 120px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  padding: 16px;
  background:
    repeating-linear-gradient(135deg, rgba(169,135,99,.10) 0 9px, transparent 9px 18px),
    var(--surface);
  outline: 1px dashed rgba(201, 162, 39, .35);
  outline-offset: -10px;
  color: var(--paper-dim);
  font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
  text-align: center;
  line-height: 1.5;
}
.ph__dims { font-family: var(--font); font-size: clamp(1rem, 2.4vw, 1.5rem); font-weight: 700; color: var(--gold); letter-spacing: .04em; }
.ph__name { font-size: .68rem; letter-spacing: .08em; opacity: .75; }
.ph__note { max-width: 26ch; font-size: .68rem; opacity: .5; font-family: var(--font); }
.hero .ph { outline-offset: -28px; min-height: 100%; }
.clients-grid .ph { min-height: 130px; }

/* -----------------------------------------------------------------
   06. BUTTONS
   ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 14px 30px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.btn--primary { background: var(--gold); color: var(--base); }
.btn--primary:hover { background: var(--warm); color: var(--base); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn--ghost:hover { background: var(--gold); color: var(--base); transform: translateY(-2px); }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* -----------------------------------------------------------------
   07. HEADER
   ----------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  background: transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: background .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(28, 23, 20, .95);
  box-shadow: 0 6px 24px rgba(28, 23, 20, .4);
  border-bottom-color: var(--gold-deep);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
}

.brand { position: relative; display: block; line-height: 0; }
.brand__mark {
  width: auto;
  height: 50px;
  transition: height .35s var(--ease), filter .35s var(--ease);
}
.site-header.is-scrolled .brand__mark { height: 44px; }

.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 30px); }
.nav__link {
  position: relative;
  display: block;
  padding: 8px 2px;
  color: var(--paper);
  font-size: .95rem;
  font-weight: 400;
}
.nav__link::after {
  content: "";
  position: absolute;
  inset-block-end: 2px;
  inset-inline-start: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width var(--t-fast);
}
.nav__link:hover, .nav__link.is-active { color: var(--gold); }
.nav__link:hover::after, .nav__link.is-active::after { width: 100%; }

.burger {
  display: grid;
  gap: 5px;
  width: 46px; height: 46px;
  padding: 12px 10px;
  align-content: center;
  background: transparent;
  border: 1px solid var(--gold-deep);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.burger__bar { display: block; height: 2px; background: var(--gold); transition: transform var(--t-fast); }

/* -----------------------------------------------------------------
   08. MOBILE OVERLAY NAV
   ----------------------------------------------------------------- */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 90px var(--pad-x) 40px;
  background: var(--base);
  opacity: 0;
  transition: opacity var(--t-fast);
}
.mobile-nav.is-open { opacity: 1; }
.mobile-nav__list { display: grid; gap: 6px; }
.mobile-nav__list li {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--t-mid), transform var(--t-mid);
  transition-delay: calc(var(--i) * 60ms);
  border-bottom: 1px solid rgba(107, 84, 38, .5);
}
.mobile-nav.is-open .mobile-nav__list li { opacity: 1; transform: none; }
.mobile-nav__list a {
  display: block;
  padding: 16px 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--paper);
}
.mobile-nav__list a:hover { color: var(--gold); }
.mobile-nav__meta { margin-top: 26px; color: var(--paper-dim); font-size: .9rem; }

.mobile-nav__close {
  position: absolute;
  top: 22px;
  inset-inline-end: var(--pad-x);
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  background: transparent;
  border: 1px solid var(--gold-deep);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.mobile-nav__close span {
  position: absolute;
  width: 20px; height: 2px;
  background: var(--gold);
}
.mobile-nav__close span:first-child { transform: rotate(45deg); }
.mobile-nav__close span:last-child { transform: rotate(-45deg); }

/* -----------------------------------------------------------------
   09. HERO
   ----------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: calc(var(--header-h) + 48px) 120px;
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg, rgba(169,135,99,.10) 0 10px, transparent 10px 20px),
    var(--surface);
}
.hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(28,23,20,.55), rgba(28,23,20,.92));
}
.hero__inner { position: relative; z-index: 2; }

.hero__title { margin-bottom: .5em; color: var(--gold); }

.hero__lede {
  max-width: none;
  color: var(--paper-dim);
  font-size: clamp(1rem, 2.2vw, 1.18rem);
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 30px;
  margin-top: clamp(34px, 5vw, 56px);
}
.hero__stats li {
  position: relative;
  padding-inline-start: 30px;
  display: grid;
  gap: 2px;
}
.hero__stats li::before {
  content: "";
  position: absolute;
  inset-block: 4px;
  inset-inline-start: 0;
  width: 1px;
  background: var(--gold);
}
.hero__stats strong {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--gold);
}
.hero__stats span { font-size: .84rem; color: var(--paper-dim); }

.scroll-cue {
  position: absolute;
  inset-block-end: 26px;
  inset-inline-start: 50%;
  translate: 50% 0;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--paper-dim);
  font-size: .72rem;
  letter-spacing: .18em;
  animation: bounce 2.2s var(--ease) infinite;
}
.scroll-cue__line { width: 1px; height: 40px; background: linear-gradient(var(--gold), transparent); }
.scroll-cue:hover { color: var(--gold); }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* -----------------------------------------------------------------
   10. ABOUT
   ----------------------------------------------------------------- */
.about__grid { display: grid; gap: clamp(34px, 5vw, 64px); align-items: center; }
.about__media { margin: 0; }
.about__media .media { max-width: 460px; }

.pillars {
  display: grid;
  gap: 20px;
  margin-top: clamp(44px, 6vw, 76px);
}
.pillar {
  position: relative;
  padding: 26px 24px 24px;
  background: transparent;
  border: 1px solid var(--gold-deep);
  border-radius: var(--radius);
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.pillar:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
}
.pillar__top {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.pillar__ico { color: var(--gold-deep); transition: color var(--t-fast); }
.pillar:hover .pillar__ico { color: var(--gold); }
.pillar__idx {
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold-deep);
}
.pillar h3 { margin-bottom: .35em; }
.pillar p { color: #5A4C40; font-size: .95rem; margin: 0; }

/* -----------------------------------------------------------------
   11. معرض الصور + لايت بوكس
   ----------------------------------------------------------------- */
.gal { position: relative; padding-block: 14px; }
.gal__viewport { overflow: hidden; line-height: 0; font-size: 0; padding-block: 6px; }
.gal__track {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 16px;
  width: max-content;
  will-change: transform;
  backface-visibility: hidden;
}
.gal__track > li { flex: 0 0 auto; }
.gal__shot {
  display: block;
  width: clamp(230px, 26vw, 340px);
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
  box-shadow: 0 3px 12px rgba(28, 23, 20, .16);
  transition: box-shadow var(--t-fast);
}
.gal__shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gal__shot:hover { box-shadow: 0 6px 18px rgba(28, 23, 20, .26); }

.gal-arrow {
  position: absolute;
  top: calc(50% - 23px);
  z-index: 4;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  background: rgba(28, 23, 20, .45);
  color: var(--paper);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--t-fast);
}
.gal-arrow:hover { background: rgba(28, 23, 20, .78); }
.gal-arrow--prev { inset-inline-start: 22px; }
.gal-arrow--next { inset-inline-end: 22px; }

.lb { position: fixed; inset: 0; z-index: 220; }
.lb__backdrop { position: absolute; inset: 0; background: rgba(28, 23, 20, .94); }
.lb__stage {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 70px 14px 26px;
}
.lb__figure { margin: 0; display: grid; justify-items: center; gap: 14px; min-width: 0; }
.lb__figure img {
  max-width: 100%;
  max-height: 72vh;
  border: 1px solid var(--gold-deep);
  border-radius: 14px;
  object-fit: contain;
}
.lb__figure figcaption { color: var(--paper-dim); font-size: .9rem; text-align: center; }
.lb__close, .lb__nav {
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-deep);
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.lb__close:hover, .lb__nav:hover { background: var(--gold); color: var(--base); border-color: var(--gold); }
.lb__nav { width: 46px; height: 46px; }
.lb__close { position: absolute; top: 16px; inset-inline-end: 16px; width: 44px; height: 44px; }

/* -----------------------------------------------------------------
   12. CARDS GRID (services + infrastructure)
   ----------------------------------------------------------------- */
.cards { display: grid; grid-template-columns: 1fr; gap: 24px; }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(107, 84, 38, .45);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.card--onsurface { background: var(--base); }
.card:hover { border-color: var(--gold); transform: translateY(-6px); box-shadow: var(--shadow-md); }

.card__media { aspect-ratio: 4/3; }
.card__media img {
  transition: transform var(--t-slow);
}
.card__media::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(28, 23, 20, .12);
  transition: opacity var(--t-slow);
  z-index: 1;
}
.card:hover .card__media img { transform: scale(1.06); }
.card:hover .card__media::after { opacity: 0; }

.card__body {
  position: relative;
  padding: 22px 26px 24px;
  background: var(--surface);
  border-inline-start: 3px solid var(--gold);
}
.card--onsurface .card__body { background: var(--base); }
.card__body h3 { margin-bottom: .35em; }
.card__body p { margin: 0; color: var(--paper-dim); font-size: .92rem; }

/* بلاطات الخدمات — عربي + إنجليزي */
.cards--tiles { gap: 18px; }
.card--tile .card__media { aspect-ratio: 1/1; }
.card--tile .card__body { padding: 16px 18px 18px; text-align: center; border-inline-start-width: 2px; }
.card--tile h3 { margin-bottom: .2em; font-size: clamp(.98rem, 1.5vw, 1.08rem); }
.card__en {
  margin: 0;
  font-family: var(--font-latin);
  font-weight: 400;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  direction: ltr;
  color: var(--warm);
}
.section--light .card__en { color: var(--gold-deep); }

/* خدمات إضافية */
.srv-more { margin-top: clamp(46px, 6vw, 76px); }
.srv-more__head {
  margin-bottom: 22px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--gold-deep);
}

/* أعمالنا السابقة */
.works-slider { position: relative; }
.works__viewport { overflow: hidden; padding-block: 8px; }
.works {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 22px;
  width: max-content;
  will-change: transform;
  backface-visibility: hidden;
}
.works > .work { flex: 0 0 auto; width: 86vw; max-width: 420px; }

.slider-ctrl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 26px;
}
.slider-btn {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-deep);
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.slider-btn:hover { background: var(--gold); color: var(--base); border-color: var(--gold); }
.slider-dots { display: flex; align-items: center; gap: 10px; }
.slider-dots button {
  width: 8px; height: 8px;
  padding: 0;
  background: var(--gold-deep);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: width var(--t-fast), background var(--t-fast);
}
.slider-dots button.is-active { width: 26px; border-radius: 999px; background: var(--gold); }
.work {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid rgba(107, 84, 38, .45);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.work:hover { border-color: var(--gold); transform: translateY(-6px); box-shadow: var(--shadow-md); }
.work__media { aspect-ratio: 4/3; border-radius: 0; }
.work__media img { transition: transform var(--t-slow); }
.work:hover .work__media img { transform: scale(1.05); }
.work__body {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 24px 24px;
  border-inline-start: 3px solid var(--gold);
}
.work__idx {
  display: block;
  margin-bottom: 8px;
  font-size: 1.1rem;
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold);
}
.work__body h3 { margin-bottom: .3em; }
.work__scope { margin: 0 0 14px; color: var(--paper-dim); font-size: .92rem; }
.work__meta { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: auto; }
.work__meta li {
  padding: 5px 12px;
  border: 1px solid var(--gold-deep);
  border-radius: 999px;
  font-size: .76rem;
  color: var(--gold);
}

/* نافذة تفاصيل المشروع */
.work[role="button"] { cursor: pointer; }
.work[role="button"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.pmodal { position: fixed; inset: 0; z-index: 180; display: grid; place-items: center; padding: clamp(14px, 3vw, 40px); }
.pmodal__backdrop { position: absolute; inset: 0; background: rgba(28, 23, 20, .88); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.pmodal__panel {
  position: relative;
  display: grid;
  gap: clamp(20px, 3vw, 34px);
  width: min(1080px, 100%);
  max-height: min(88vh, 900px);
  overflow-y: auto;
  padding: clamp(22px, 3vw, 38px);
  background: var(--surface);
  border: 1px solid var(--gold-deep);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--t-fast), transform var(--t-fast);
}
.pmodal.is-open .pmodal__panel { opacity: 1; transform: none; }

.pmodal__close {
  position: sticky;
  top: 0;
  justify-self: end;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  margin-bottom: -42px;
  background: var(--base);
  color: var(--gold);
  border: 1px solid var(--gold-deep);
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  transition: background var(--t-fast), color var(--t-fast);
}
.pmodal__close:hover { background: var(--gold); color: var(--base); }

.pmodal__gallery { display: grid; gap: 12px; }
.pmodal__stage { aspect-ratio: 16/10; border-radius: 12px; }
.pmodal__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pmodal__thumbs button {
  padding: 0;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--base);
  border: 1px solid var(--gold-deep);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color var(--t-fast), opacity var(--t-fast);
  opacity: .6;
}
.pmodal__thumbs button > * { width: 100%; height: 100%; object-fit: cover; }
.pmodal__thumbs button.is-active,
.pmodal__thumbs button:hover { border-color: var(--gold); opacity: 1; }

.pmodal__body { align-self: start; }
.pmodal__idx { display: block; margin-bottom: 10px; font-size: 1.2rem; font-weight: 900; color: transparent; -webkit-text-stroke: 1px var(--gold); }
.pmodal__body h3 { font-size: clamp(1.2rem, 2.4vw, 1.7rem); margin-bottom: .4em; }
.pmodal__scope { color: var(--paper-dim); }
.pmodal__list { display: grid; gap: 12px; margin: 20px 0; }
.pmodal__list li { position: relative; padding-inline-start: 26px; color: var(--paper-dim); font-size: .94rem; }
.pmodal__list li::before {
  content: "";
  position: absolute;
  top: .7em;
  inset-inline-start: 4px;
  width: 0; height: 0;
  border-inline: 5px solid transparent;
  border-bottom: 8px solid var(--gold);
}
.pmodal__cta { margin-top: 20px; }
body.is-locked .pmodal { overscroll-behavior: contain; }

/* -----------------------------------------------------------------
   13. KNOWLEDGE GRID
   ----------------------------------------------------------------- */
.know { display: grid; grid-template-columns: 1fr; gap: 20px; }
.know__card {
  position: relative;
  padding: 30px 26px;
  background: var(--surface);
  border: 1px solid rgba(107, 84, 38, .5);
  border-radius: var(--radius);
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.know__card:hover { border-color: var(--gold); transform: translateY(-6px); }
.know__top {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.know__ico { color: var(--gold); transition: color var(--t-fast); }
.section--light .know__ico { color: var(--gold-deep); }
.know__card:hover .know__ico { color: var(--gold); }
.know__idx {
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold);
}
.know__card p { margin: 0; color: var(--paper-dim); font-size: .94rem; }

/* -----------------------------------------------------------------
   13b. السكاشن الفاتحة — كل العناصر فوق --paper
   ----------------------------------------------------------------- */
.section--light-2 { background: #E4DCCD; }
.section--light .lede,
.section--light p { color: #5A4C40; }
.section--light .spire-list li { color: #5A4C40; }

/* الكروت */
.section--light .card { background: rgba(28, 23, 20, .045); border-color: rgba(107, 84, 38, .35); }
.section--light .card__body { background: rgba(28, 23, 20, .045); }
.section--light .card--deep,
.section--light .card--deep .card__body { background: rgba(28, 23, 20, .085); }
.section--light .card:hover { border-color: var(--gold-deep); }
.section--light .card__body p { color: #5A4C40; }

/* المعرفة */
.section--light .know__card { background: transparent; border-color: rgba(107, 84, 38, .45); }
.section--light .know__card:hover { border-color: var(--gold-deep); }
.section--light .know__idx { -webkit-text-stroke-color: var(--gold-deep); }

/* الإتقان */
.section--light .ghost-word { -webkit-text-stroke-color: var(--gold-deep); }

/* الأرقام */
.section--light.counters { border-block-color: rgba(107, 84, 38, .35); }
.section--light .counter__num { color: var(--gold-deep); }
.section--light .counter span { color: #5A4C40; }

/* تواصل معنا */
.section--light .ico { border-color: var(--gold-deep); color: var(--gold-deep); }
.section--light .field input,
.section--light .field textarea { color: var(--base); border-bottom-color: rgba(107, 84, 38, .55); }
.section--light .field label { color: #6B5D4E; }
.section--light .field input:focus,
.section--light .field textarea:focus { border-bottom-color: var(--gold-deep); }
.section--light .field input:focus + label,
.section--light .field textarea:focus + label,
.section--light .field input:not(:placeholder-shown) + label,
.section--light .field textarea:not(:placeholder-shown) + label { color: var(--gold-deep); }
.section--light .form-success { background: rgba(28, 23, 20, .045); border-color: rgba(107, 84, 38, .45); }
.section--light .form-success__tick { border-color: var(--gold-deep); color: var(--gold-deep); }

/* الأزرار والأشكال فوق الفاتح */
.section--light .btn--ghost { color: var(--gold-deep); border-color: var(--gold-deep); }
.section--light .btn--ghost:hover { background: var(--gold-deep); color: var(--paper); }
.section--light .btn--primary:hover { background: var(--gold-deep); color: var(--paper); }
.section--light .colonnade { opacity: .1; }
.section--light .ph {
  background:
    repeating-linear-gradient(135deg, rgba(107, 84, 38, .10) 0 8px, transparent 8px 16px),
    #DCD3C3;
  color: #6B5D4E;
}

/* -----------------------------------------------------------------
   14. VALUES (timeline)
   ----------------------------------------------------------------- */
.values { background: var(--base); }
.values__bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(rgba(28,23,20,.85), rgba(28,23,20,.85)),
    repeating-linear-gradient(135deg, rgba(169,135,99,.10) 0 10px, transparent 10px 20px),
    var(--surface);
}
.values .shell { position: relative; z-index: 2; }

.timeline {
  position: relative;
  display: grid;
  gap: clamp(28px, 4vw, 44px);
  padding-inline-start: 34px;
}
.timeline::before {
  content: "";
  position: absolute;
  inset-block: 8px;
  inset-inline-start: 0;
  width: 1px;
  background: var(--gold-deep);
}
.timeline__item { position: relative; }
.timeline__item::before {
  content: "";
  position: absolute;
  top: .55em;
  inset-inline-start: -38px;
  width: 9px; height: 9px;
  background: var(--gold);
  transform: rotate(45deg);
}
.timeline__num {
  position: absolute;
  top: -.35em;
  inset-inline-start: -6px;
  font-size: clamp(4rem, 11vw, 7rem);
  font-weight: 900;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold-deep);
  z-index: -1;
  pointer-events: none;
}
.timeline__item h3 { position: relative; margin-bottom: .3em; color: var(--paper); }
.timeline__item p { position: relative; margin: 0; color: var(--paper-dim); max-width: 62ch; }

/* -----------------------------------------------------------------
   15. COUNTERS
   ----------------------------------------------------------------- */
.counters { padding-block: clamp(56px, 7vw, 96px); border-block: 1px solid rgba(107,84,38,.5); }
.counter-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px 20px;
  text-align: center;
}
.counter { display: grid; gap: 6px; }
.counter__num {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1;
  color: var(--gold);
}
.counter span { font-size: .86rem; color: var(--paper-dim); }

/* -----------------------------------------------------------------
   16. CLIENTS
   ----------------------------------------------------------------- */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
}
.clients-grid li { display: grid; place-items: center; }
.clients-grid img {
  width: 100%;
  max-width: 220px;
  height: clamp(130px, 15vw, 190px);
  object-fit: contain;
}
.clients-grid .ph { min-height: 130px; }

/* -----------------------------------------------------------------
   17. CONTACT
   ----------------------------------------------------------------- */
.contact__grid { position: relative; z-index: 2; display: grid; gap: clamp(40px, 5vw, 70px); align-items: start; }

.contact__list { display: grid; gap: 24px; margin-top: 34px; }
.contact__list li { display: flex; gap: 16px; align-items: flex-start; }
.contact__list h3 { margin-bottom: .15em; font-size: 1rem; }
.contact__list p { margin: 0; color: var(--paper-dim); font-size: .94rem; }
.contact__list a { white-space: nowrap; }
.section--light .contact__list p { color: #5A4C40; }

.ico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border: 1px solid var(--gold-deep);
  border-radius: var(--radius-sm);
  color: var(--gold);
}

/* Form */
.form { display: grid; grid-template-columns: 1fr; gap: 26px 20px; }
.field { position: relative; }
.field--full { grid-column: 1 / -1; }

.field input,
.field textarea {
  width: 100%;
  padding: 14px 2px 10px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--gold-deep);
  border-radius: 0;
  color: var(--paper);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--t-fast);
}
.field textarea { resize: vertical; min-height: 120px; }

.field label {
  position: absolute;
  top: 14px;
  inset-inline-start: 2px;
  color: var(--paper-dim);
  font-size: 1rem;
  pointer-events: none;
  transition: transform var(--t-fast), font-size var(--t-fast), color var(--t-fast);
  transform-origin: right top;
}
.field input:focus + label,
.field textarea:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:not(:placeholder-shown) + label {
  transform: translateY(-20px);
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--gold);
}
.field input:focus,
.field textarea:focus { border-bottom-color: var(--gold); outline: none; }

.field.has-error input,
.field.has-error textarea { border-bottom-color: #B4552F; }
.field__err {
  display: block;
  min-height: 1.2em;
  margin-top: 6px;
  font-size: .76rem;
  color: #D08155;
}

.form-success {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 40px 30px;
  border: 1px solid var(--gold-deep);
  border-radius: var(--radius);
  background: var(--surface);
}
.form-success__tick {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  margin-bottom: 6px;
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  color: var(--gold);
}
.form-success p { color: var(--paper-dim); }
.form-success .btn { margin-top: 12px; }

/* بطاقة واتساب */
.wa {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid rgba(107, 84, 38, .45);
  border-radius: var(--radius);
  background: rgba(28, 23, 20, .045);
}
.wa__logo { width: clamp(110px, 13vw, 150px); height: auto; margin-bottom: 4px; }
.wa h3 { margin: 0; font-size: clamp(1.15rem, 2.4vw, 1.5rem); }
.wa p { margin: 0; color: #5A4C40; max-width: 44ch; }
.wa .btn { margin-top: 18px; }

/* -----------------------------------------------------------------
   18. FOOTER
   ----------------------------------------------------------------- */
.footer {
  position: relative;
  padding-top: clamp(48px, 6vw, 80px);
  background: var(--base);
  border-top: 1px solid var(--gold);
}
.footer__grid { display: grid; gap: 40px; padding-bottom: 42px; }
.footer__logo { width: auto; height: 96px; margin-bottom: 18px; }
.footer__col h3 { margin-bottom: .9em; font-size: .82rem; letter-spacing: .22em; color: var(--gold); font-weight: 600; }
.footer__col p { color: var(--paper-dim); font-size: .92rem; }
.footer__links { display: grid; gap: 10px; }
.footer__links li { color: var(--paper-dim); font-size: .92rem; }
.footer__links a { color: var(--paper-dim); }
.footer__links a:hover { color: var(--gold); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px 26px;
  border-top: 1px solid var(--gold-deep);
}
.footer__bottom p { margin: 0; font-size: .8rem; color: var(--paper-dim); }

/* -----------------------------------------------------------------
   19. BACK TO TOP
   ----------------------------------------------------------------- */
.to-top {
  position: fixed;
  bottom: 22px;
  left: 22px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  background: var(--gold);
  color: var(--base);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  box-shadow: var(--shadow-sm);
  transition: opacity var(--t-fast), transform var(--t-fast), visibility var(--t-fast), background var(--t-fast);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--warm); }

/* -----------------------------------------------------------------
   20. SCROLL REVEAL
   ----------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}
.reveal.is-in { opacity: 1; transform: none; }

/* -----------------------------------------------------------------
   21. RESPONSIVE — 768 / 1024 / 1440
   ----------------------------------------------------------------- */
@media (min-width: 768px) {
  :root { --pad-x: 32px; --header-h: 88px; }

  .works > .work { width: 46vw; max-width: 420px; }

  .h2--oneline { white-space: nowrap; font-size: clamp(1.5rem, 3.4vw, 3rem); }
  .lede--oneline { white-space: nowrap; font-size: clamp(.82rem, 1.5vw, 1.05rem); }

  .brand__mark { height: 62px; }
  .site-header.is-scrolled .brand__mark { height: 52px; }

  .cards { grid-template-columns: repeat(2, 1fr); }
  .know { grid-template-columns: repeat(2, 1fr); }
  .know__card--wide { grid-column: span 2; }
  .clients-grid { grid-template-columns: repeat(3, 1fr); }
  .pillars { grid-template-columns: repeat(3, 1fr); }
  .counter-grid { grid-template-columns: repeat(4, 1fr); }
  .form { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1.2fr; }
  .timeline { padding-inline-start: 48px; }
  .about__grid { grid-template-columns: 1.1fr .9fr; }
  .about__media .media { max-width: none; margin-inline-start: auto; }
}

@media (min-width: 1024px) {
  :root { --pad-x: 40px; }

  .pmodal__panel { grid-template-columns: 1.15fr .85fr; align-items: start; }
  .pmodal__close { position: absolute; top: 16px; inset-inline-start: 16px; margin: 0; }

  .nav { display: block; }
  .burger { display: none; }

  .cards { grid-template-columns: repeat(3, 1fr); }
  .cards--tiles { grid-template-columns: repeat(3, 1fr); }
  .clients-grid { grid-template-columns: repeat(5, 1fr); }
  .works > .work { width: calc((min(100vw, var(--shell-w)) - 2 * var(--pad-x) - 44px) / 3); max-width: none; }
  .know { grid-template-columns: repeat(3, 1fr); }
  .know__card--wide { grid-column: span 2; }
  .contact__grid { grid-template-columns: 1fr 1.05fr; }
  .corner-mark { top: 40px; inset-inline-start: 40px; }
}

@media (min-width: 1440px) {
  :root { --pad-x: 56px; --sec-y: 140px; --shell-w: 1320px; }
  .shell { max-width: 1320px; }
}

/* -----------------------------------------------------------------
   22. REDUCED MOTION
   ----------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .001ms;
    animation-iteration-count: 1;
    transition-duration: .001ms;
    scroll-behavior: auto;
  }
  .reveal { opacity: 1; transform: none; }
  .scroll-cue { animation: none; }
  .mobile-nav__list li { opacity: 1; transform: none; }
}
