/* ===== Tokens — warm vintage palette taken from the studio photo ===== */
:root {
  --sun: #FFCB56;
  --sage: #8AA086;
  --coral: #E39A6E; /* كورال فينتدج هادي (من #FF8C52) */
  --cream-btn: #FFF0C5;
  --cream: #F4EDDF;
  --cream-2: #EDE3D0;
  --paper: #FBF7EF;
  --ink: #2A231E;
  --ink-soft: #5C5048;
  --line: #DCCFB8;
  --brick: #B4532F;
  --brick-dark: #94401F;
  --mustard: #D39B34;
  --olive: #3F4A2E;
  --olive-2: #5D6A3E;
  --teal: #5E8F8B;
  --wood: #8A5A3B;

  --radius: 22px;
  --radius-lg: 32px;
  --wrap: 1180px;
  --font: "Readex Pro", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.25; margin: 0; font-weight: 600; }
p { margin: 0; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; inset-inline-start: 16px; top: -60px;
  background: var(--ink); color: var(--cream); padding: 8px 14px; border-radius: 10px; z-index: 50;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; border-radius: 8px; }

/* ===== Top bar ===== */
.topbar {
  position: fixed; top: 0; inset-inline: 0; z-index: 20;
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, color .3s;
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar.is-over {
  background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; color: #FBF4E6;
}
.topbar.is-over .nav a { color: rgba(251, 244, 230, .82); }
.topbar.is-over .nav a:hover { color: #fff; }
.topbar.is-over .lang { color: #FBF4E6; border-color: rgba(251, 244, 230, .7); }
.topbar.is-over .lang:hover { background: #FBF4E6; color: var(--ink); }
.topbar.is-over .brand { color: #FBF4E6; }
section[id] { scroll-margin-top: 68px; }
.topbar__inner { display: flex; align-items: center; gap: 24px; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 1.05rem; }
.brand__mark {
  width: 26px; height: 26px; border-radius: 8px; background: var(--olive); position: relative; flex: none;
}
.brand__mark::after {
  content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%;
  background: var(--mustard); inset-inline-end: 4px; bottom: 4px;
}

.nav { display: flex; gap: 26px; margin-inline-start: auto; }
.nav a { text-decoration: none; color: var(--ink-soft); font-size: .95rem; transition: color .2s; }
.nav a:hover { color: var(--brick); }

.lang {
  font: inherit; font-weight: 600; font-size: .85rem; cursor: pointer;
  background: transparent; color: var(--ink); border: 1.5px solid var(--ink);
  border-radius: 999px; padding: 4px 14px; min-width: 52px;
  transition: background .2s, color .2s;
}
.lang:hover { background: var(--ink); color: var(--cream); }

@media (max-width: 760px) {
  .nav { display: none; }
  .lang { margin-inline-start: auto; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 26px; border-radius: 999px;
  font: inherit; font-weight: 500; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .2s, background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn .ico { width: 20px; height: 20px; flex: none; }
/* الزرار الأساسي: أخضر زيتي فاتح #8AA086 بنص كريمي، ويغمق عند المرور */
.btn--primary { background: var(--sage); color: #FFF8E8; box-shadow: 0 8px 20px -12px rgba(40, 60, 35, .6); }
.btn--primary:hover { background: #728E6D; color: #FFF8E8; }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--cream); }
.btn--glass {
  color: var(--cream-btn); border-color: color-mix(in srgb, var(--cream-btn) 70%, transparent);
  background: rgba(251, 244, 230, .08); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.btn--glass:hover { background: var(--cream-btn); color: #2A1A10; border-color: var(--cream-btn); }
.btn--light { background: var(--cream-btn); color: #2A1A10; }
.btn--light:hover { background: var(--coral); }
.btn--outline-light { border-color: color-mix(in srgb, var(--cream) 55%, transparent); color: var(--cream); }
.btn--outline-light:hover { border-color: var(--cream); background: color-mix(in srgb, var(--cream) 10%, transparent); }

/* ===== Hero: studio photo as full-screen background ===== */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: 120px 0 clamp(72px, 12vh, 140px);
  color: #FBF4E6; background: #2A1E14;
}
/* الصورة والسبورة جوه نفس الغلاف، فبيتحركوا مع بعض بالظبط */
.hero__art {
  position: absolute; inset: 0; z-index: -2; overflow: hidden;
  animation: hero-zoom 14s ease-out both, hero-drift 40s ease-in-out 14s infinite alternate;
}
.hero__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%;
}
@keyframes hero-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
/* بعد الدخول: حركة سينمائية بطيئة جدًا كأن الكاميرا بتتنفس */
@keyframes hero-drift { from { transform: scale(1); } to { transform: scale(1.05) translate(-1%, -.6%); } }
.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(28, 18, 10, .55) 0%, rgba(28, 18, 10, .25) 28%, rgba(28, 18, 10, .55) 60%, rgba(24, 15, 8, .88) 100%),
    linear-gradient(var(--shade-dir, 270deg), rgba(26, 16, 8, .78) 0%, rgba(26, 16, 8, .5) 38%, rgba(26, 16, 8, 0) 75%);
}
html[dir="ltr"] .hero__shade { --shade-dir: 90deg; }
.hero__content { position: relative; }

.eyebrow {
  display: block;
  color: var(--cream); opacity: .88; font-size: .95rem; font-weight: 400; margin-bottom: 22px;
}
/* بالإنجليزي: حروف كابيتال صغيرة ومتباعدة. التباعد مش بيتعمل للعربي عشان مايفصلش الحروف */
html[lang="en"] .eyebrow { text-transform: uppercase; letter-spacing: .28em; font-size: .78rem; font-weight: 500; }

.hero__title {
  font-size: clamp(2.2rem, 5.4vw, 4.4rem);
  font-weight: 600; line-height: 1.3; max-width: 20ch;
  text-shadow: 0 2px 30px rgba(20, 12, 6, .35);
}
html[lang="en"] .hero__title { letter-spacing: -.025em; line-height: 1.1; max-width: 18ch; }

.hero__sub {
  margin-top: 22px; max-width: 54ch;
  font-size: clamp(1.02rem, 1.6vw, 1.22rem); color: rgba(251, 244, 230, .86); font-weight: 300;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero__scroll {
  position: absolute; bottom: 26px; inset-inline-start: 50%; translate: 50% 0;
  width: 26px; height: 42px; border: 1.5px solid rgba(251, 244, 230, .6); border-radius: 14px;
}
html[dir="ltr"] .hero__scroll { translate: -50% 0; }
.hero__scroll span {
  position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px;
  background: #FBF4E6; border-radius: 2px; animation: scroll-dot 1.8s ease-in-out infinite;
}
@keyframes scroll-dot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { .hero__art, .hero__scroll span { animation: none; } }

@media (max-width: 560px) {
  .hero { padding-bottom: 96px; }
  .hero__shade { background: linear-gradient(180deg, rgba(26, 16, 8, .55) 0%, rgba(26, 16, 8, .45) 35%, rgba(26, 16, 8, .78) 62%, rgba(22, 14, 7, .92) 100%); }
  .hero__bg { object-position: 64% 50%; }
  .hero__cta .btn { flex: 1 1 100%; }
  .hero__scroll { display: none; }
}

/* ===== Sections ===== */
.section { padding: clamp(64px, 10vw, 120px) 0; }
.section--tint { background: var(--paper); border-block: 1px solid var(--line); }
.section__head { margin-bottom: clamp(32px, 5vw, 56px); max-width: 720px; }
.section__num {
  display: inline-block; font-size: .85rem; font-weight: 600; color: var(--brick);
  letter-spacing: .1em; margin-bottom: 10px;
}
.section__num--light { color: var(--mustard); }
.section__head h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.section__intro { margin-top: 16px; color: var(--ink-soft); font-size: 1.08rem; font-weight: 300; }

/* ===== Services ===== */
.services {
  display: grid; gap: 18px;
  grid-template-columns: 1.35fr 1fr;
  grid-template-areas: "big a" "big b";
}
.svc {
  position: relative; border-radius: var(--radius); padding: clamp(24px, 3vw, 36px);
  background: var(--paper); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 12px; overflow: hidden;
}
.svc:nth-child(1) { grid-area: big; background: var(--olive); color: var(--cream); border-color: var(--olive); padding: clamp(28px, 4vw, 48px); }
.svc:nth-child(2) { grid-area: a; }
.svc:nth-child(3) { grid-area: b; }
.svc__badge {
  align-self: flex-start; font-size: .78rem; font-weight: 500; padding: 4px 12px; border-radius: 999px;
  background: var(--mustard); color: var(--ink);
}
.svc__icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--cream-2); color: var(--brick);
}
.svc:nth-child(1) .svc__icon { width: 64px; height: 64px; background: color-mix(in srgb, var(--cream) 14%, transparent); color: var(--mustard); }
.svc:nth-child(3) .svc__icon { color: var(--teal); }
.svc__icon svg { width: 55%; height: 55%; }
.svc h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
.svc:nth-child(1) h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.svc p { color: var(--ink-soft); font-weight: 300; }
.svc:nth-child(1) p { color: color-mix(in srgb, var(--cream) 82%, transparent); font-size: 1.08rem; max-width: 40ch; }
.svc ul { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.svc li {
  font-size: .86rem; padding: 5px 13px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft);
}
.svc:nth-child(1) li { border-color: color-mix(in srgb, var(--cream) 30%, transparent); color: var(--cream); }
.svc:nth-child(1) ul { margin-top: auto; padding-top: 20px; }

@media (max-width: 820px) {
  .services { grid-template-columns: 1fr; grid-template-areas: "big" "a" "b"; }
}

/* ===== Works ===== */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -16px 0 32px; }
.chip {
  font: inherit; font-size: .9rem; cursor: pointer; padding: 7px 18px; border-radius: 999px;
  border: 1.5px solid var(--line); background: transparent; color: var(--ink-soft);
  transition: all .2s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--cream); }

/* Selected work: صف كبير لكل مشروع، والصورة جوه إطار متصفح، وبتبدّل يمين وشمال */
.works { display: grid; gap: clamp(56px, 9vw, 110px); }
.proj { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.proj--flip { grid-template-columns: 1fr 1.35fr; }
.proj--flip .proj__shot { order: 2; }
.proj__shot { display: block; text-decoration: none; color: inherit; perspective: 1400px; }
.browser {
  border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 50px 80px -50px rgba(60, 38, 20, .55), 0 18px 30px -24px rgba(60, 38, 20, .35);
  transform: rotateY(-4deg) rotateX(2deg); transition: transform .6s cubic-bezier(.2,.7,.2,1), box-shadow .6s;
}
.proj--flip .browser { transform: rotateY(4deg) rotateX(2deg); }
.proj__shot:hover .browser { transform: none; box-shadow: 0 60px 90px -50px rgba(60, 38, 20, .6), 0 22px 36px -24px rgba(60, 38, 20, .4); }
.browser__bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: #F3EEE6; border-bottom: 1px solid var(--line); }
.browser__bar i { width: 10px; height: 10px; border-radius: 50%; background: #DCCFB8; }
.browser__bar i:nth-child(1) { background: #E8907A; } .browser__bar i:nth-child(2) { background: #E8C06A; } .browser__bar i:nth-child(3) { background: #8FBF8A; }
.browser__bar span {
  margin-inline: auto; padding: 3px 14px; border-radius: 8px; background: #fff; border: 1px solid var(--line);
  font-size: .76rem; color: var(--ink-soft); direction: ltr; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.browser__view { aspect-ratio: 16 / 10; overflow: hidden; background: var(--cream-2); position: relative; }
.browser__view img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: object-position 3.5s ease-in-out; }
.proj__shot:hover .browser__view img:not([data-fixed]) { object-position: bottom center; }
.browser__view img[data-fixed], .browser__view img[data-fx] { transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.fill-edge { position: absolute; inset: 0; background-repeat: no-repeat; background-position: 0 0; background-size: 40000% 40000%; }
.browser__view img { position: relative; }
.proj__info { display: flex; flex-direction: column; gap: 14px; }
.proj__num { font-size: clamp(3rem, 7vw, 5.5rem); font-weight: 200; line-height: 1; color: var(--line); letter-spacing: -.04em; }
.proj__cat { font-size: .78rem; font-weight: 500; color: var(--brick); letter-spacing: .22em; text-transform: uppercase; }
html[lang="ar"] .proj__cat { letter-spacing: 0; text-transform: none; font-size: .9rem; }
.proj__info h3 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); letter-spacing: -.02em; }
.proj__info p { color: var(--ink-soft); font-weight: 300; font-size: 1.08rem; max-width: 42ch; }
.proj__link {
  align-self: flex-start; margin-top: 6px; display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid var(--ink); color: var(--ink);
  text-decoration: none; font-weight: 500; font-size: .95rem; transition: background .2s, color .2s;
}
.proj__link:hover { background: var(--ink); color: var(--cream); }
.proj__link svg { width: 16px; height: 16px; }
html[dir="rtl"] .proj__link svg { transform: scaleX(-1); }
.work__ph {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; letter-spacing: -.01em; color: var(--cream);
}
.work__ph[data-cat="systems"] { background: radial-gradient(120% 120% at 85% 10%, var(--olive-2), var(--olive)); }
.work__ph[data-cat="web"] { background: radial-gradient(120% 120% at 85% 10%, #78A6A1, #3F6966); }
@media (max-width: 860px) {
  .proj, .proj--flip { grid-template-columns: 1fr; gap: 24px; }
  .proj--flip .proj__shot { order: 0; }
  .browser, .proj--flip .browser { transform: none; }
  .proj__num { font-size: 2.6rem; }
}

.empty {
  grid-column: 1 / -1; text-align: center; padding: 56px 20px; border-radius: var(--radius);
  border: 1.5px dashed var(--line); color: var(--ink-soft);
}

/* ===== About ===== */
.about__body { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.about__text p { font-size: clamp(1.05rem, 1.6vw, 1.2rem); font-weight: 300; color: var(--ink-soft); }
.about__text p + p { margin-top: 18px; }
.about__text p:first-child { color: var(--ink); font-weight: 400; }
.board {
  background: #2F3B2C; color: #F1E9D8; border-radius: 18px; padding: 36px 32px;
  border: 10px solid var(--wood);
  box-shadow: 0 24px 40px -26px rgba(74, 46, 24, .6);
  font-weight: 600; font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.1;
  display: flex; flex-direction: column; transform: rotate(-1.5deg);
  direction: ltr; text-align: left; font-style: italic;
}
.board::after { content: ""; display: block; margin-top: 16px; height: 4px; width: 70%; background: var(--mustard); border-radius: 4px; }
@media (max-width: 760px) { .about__body { grid-template-columns: 1fr; } .board { max-width: 340px; } }

/* ===== Interests ===== */
.section--compact { padding-top: 0; }
.interests {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(24px, 4vw, 56px); align-items: center;
  border-top: 1px solid var(--line); padding-top: clamp(40px, 6vw, 64px);
}
.interests__head h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.interests__head p { margin-top: 10px; color: var(--ink-soft); font-weight: 300; }
.interests__list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.interest {
  display: flex; gap: 14px; align-items: flex-start; padding: 20px; border-radius: var(--radius);
  background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: inherit;
  transition: border-color .2s, transform .2s;
}
a.interest:hover { border-color: var(--brick); transform: translateY(-2px); }
.interest__icon {
  flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--cream-2); color: var(--teal);
}
.interest:nth-child(2) .interest__icon { color: var(--mustard); }
.interest__icon svg { width: 24px; height: 24px; }
.interest h3 { font-size: 1.05rem; }
.interest p { color: var(--ink-soft); font-weight: 300; font-size: .92rem; }
.interest__more { display: inline-block; margin-top: 6px; font-size: .88rem; font-weight: 500; color: var(--brick); }
@media (max-width: 820px) { .interests { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .interests__list { grid-template-columns: 1fr; } }

/* ===== Contact ===== */
.contact {
  background: linear-gradient(180deg, rgba(24, 16, 10, .78), rgba(24, 16, 10, .9)), url(/img/studio-1024.webp) center / cover, #2A1E14;
  color: var(--cream); border-radius: var(--radius-lg);
  padding: clamp(36px, 7vw, 80px); text-align: center; position: relative; overflow: hidden;
}
.contact::before {
  content: ""; position: absolute; width: 340px; aspect-ratio: 1; border-radius: 50%;
  background: var(--mustard); opacity: .12; inset-inline-start: -110px; top: -140px;
}
.contact h2 { font-size: clamp(1.9rem, 4.4vw, 3.2rem); position: relative; }
.contact > p { margin: 14px auto 0; max-width: 46ch; color: color-mix(in srgb, var(--cream) 82%, transparent); font-weight: 300; font-size: 1.1rem; position: relative; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 32px; position: relative; }
.js-mail-label { direction: ltr; unicode-bidi: plaintext; }
@media (max-width: 560px) { .contact__actions .btn { flex: 1 1 100%; } }

.socials { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; position: relative; }
.socials:empty { display: none; }
.socials a { color: var(--cream); opacity: .8; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--cream) 40%, transparent); }
.socials a:hover { opacity: 1; }

/* ===== Footer ===== */
/* الفوتر: إمضاء كبير على خلفية غامقة دافية */
.footer {
  position: relative; overflow: hidden; color: color-mix(in srgb, #FBF4E6 70%, transparent);
  background: radial-gradient(90% 140% at 50% 0%, #33251A 0%, #1E1611 60%); padding: 34px 0 18px; margin-top: 40px;
}
.footer::before {
  content: ""; position: absolute; width: min(60vw, 760px); aspect-ratio: 760 / 700; top: -80px; right: -120px;
  background: url(/img/palm-shadow.svg) center / contain no-repeat; opacity: .08; filter: invert(1); transform: scaleX(-1); pointer-events: none;
}
.footer__inner { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 32px; }
.footer__brand { display: grid; gap: 4px; }
.footer__sig {
  display: block; height: 44px; aspect-ratio: 720 / 205; background: #FBF4E6;
  -webkit-mask: url(/img/signature.png) center / contain no-repeat; mask: url(/img/signature.png) center / contain no-repeat;
}
.footer__motto { margin: 0; color: var(--sun); font-size: .68rem; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; direction: ltr; }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 26px; font-size: .95rem; }
.footer__nav a, .footer__social a { color: #FBF4E6; text-decoration: none; opacity: .78; transition: opacity .2s, color .2s; }
.footer__nav a:hover, .footer__social a:hover { opacity: 1; color: var(--sun); }
.footer__social { grid-column: 2; list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 22px; font-size: .92rem; }
.footer__social:empty { display: none; }
.footer__bottom {
  grid-column: 1 / -1; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(251, 244, 230, .12);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .85rem;
}
.footer__top { color: inherit; text-decoration: none; }
.footer__top:hover { color: var(--sun); }
@media (max-width: 760px) {
  .footer__inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer__brand { justify-items: center; }
  .footer__nav, .footer__social { justify-content: center; grid-column: auto; }
}

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Built with: صف أيقونات الأدوات بلون واحد هادي */
.stack { margin-top: 56px; padding-top: 34px; border-top: 1px solid var(--line); text-align: center; }
.stack__label { color: var(--ink-soft); font-size: .78rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; margin-bottom: 26px; }
html[lang="ar"] .stack__label { letter-spacing: 0; text-transform: none; font-size: .95rem; }
.stack__list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 44px; }
.stack__list li { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); opacity: .8; font-size: .95rem; font-weight: 500; transition: opacity .2s, color .2s; }
.stack__list li:hover { opacity: 1; color: var(--ink); }
.stack__list svg { width: 26px; height: 26px; fill: currentColor; }

/* ===== Client reviews ===== */
.quotes { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.quote {
  position: relative; margin: 0; display: flex; flex-direction: column; gap: 18px;
  padding: clamp(26px, 3vw, 36px); border-radius: var(--radius);
  background: var(--paper); border: 1px solid var(--line);
}
.quote:only-child { max-width: 760px; margin-inline: auto; text-align: center; align-items: center; }
.quote__mark {
  position: absolute; inset-inline-end: 22px; top: 2px;
  font-size: 6rem; line-height: 1; color: var(--mustard); opacity: .35; font-family: Georgia, serif;
}
.quote__stars { display: flex; gap: 3px; color: var(--mustard); }
.quote__stars svg { width: 17px; height: 17px; fill: currentColor; }
.quote blockquote { margin: 0; font-size: clamp(1.02rem, 1.4vw, 1.12rem); font-weight: 300; color: var(--ink); line-height: 1.8; }
.quote:only-child blockquote { font-size: clamp(1.15rem, 2vw, 1.4rem); }
.quote figcaption { margin-top: auto; display: flex; align-items: center; gap: 12px; }
.quote__avatar {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--olive); color: var(--cream); font-weight: 600; font-size: .9rem; letter-spacing: .04em;
}
.quote figcaption strong { display: block; font-weight: 600; font-size: 1rem; }
.quote figcaption small { display: block; color: var(--ink-soft); font-size: .88rem; }
.quote:only-child figcaption { text-align: start; }
.quotes__cta { margin-top: 30px; text-align: center; }
.quotes__cta a { color: var(--ink-soft); font-size: .95rem; text-decoration: none; border-bottom: 1px solid var(--line); }
.quotes__cta a:hover { color: var(--brick); border-color: var(--brick); }

/* اسم عمرو بخط الإمضاء: الصورة شغالة كـ mask فبتاخد لون النص (فاتح فوق الصورة وغامق بعد النزول) */
.brand__sig {
  display: block; height: 34px; margin-top: 12px; aspect-ratio: 720 / 205; background: currentColor;
  -webkit-mask: url(/img/signature.png) center / contain no-repeat; mask: url(/img/signature.png) center / contain no-repeat;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* أرقام سريعة في كارت الخدمة الأساسية */
.svc__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.svc__stats div { border-radius: 16px; padding: 16px 14px; background: color-mix(in srgb, var(--cream) 9%, transparent); border: 1px solid color-mix(in srgb, var(--cream) 16%, transparent); }
.svc__stats b { display: block; font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 600; color: var(--mustard); line-height: 1.1; }
.svc__stats span { font-size: .82rem; color: color-mix(in srgb, var(--cream) 78%, transparent); }

/* How I work: قسم غامق بروح صورة الاستوديو */
.process {
  background: linear-gradient(180deg, rgba(26, 18, 12, .88), rgba(26, 18, 12, .94)), url(/img/studio-1024.webp) center / cover fixed, #1E1611;
  color: var(--cream);
}
.process .section__intro { color: color-mix(in srgb, var(--cream) 75%, transparent); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.step { position: relative; padding: 28px 24px; border-radius: var(--radius); background: color-mix(in srgb, var(--cream) 6%, transparent); border: 1px solid color-mix(in srgb, var(--cream) 12%, transparent); display: flex; flex-direction: column; gap: 12px; }
.step__num { position: absolute; top: 18px; inset-inline-end: 22px; font-size: 2.4rem; font-weight: 200; color: color-mix(in srgb, var(--cream) 18%, transparent); line-height: 1; }
.step__icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--mustard) 16%, transparent); color: var(--mustard); }
.step__icon svg { width: 24px; height: 24px; }
.step h3 { font-size: 1.2rem; }
.step p { font-size: .95rem; font-weight: 300; color: color-mix(in srgb, var(--cream) 72%, transparent); }
@media (max-width: 980px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .process { background-attachment: scroll; } }

/* الإمضاء في آخر قصة "عنّي" */
.about__sig {
  display: block; margin-top: 26px; height: 64px; aspect-ratio: 720 / 205; background: var(--ink); opacity: .85;
  -webkit-mask: url(/img/signature.png) left center / contain no-repeat; mask: url(/img/signature.png) left center / contain no-repeat;
}
html[dir="rtl"] .about__sig { -webkit-mask-position: right center; mask-position: right center; }
.contact::before { display: none; }

/* صور عمرو في قسم "عنّي": صورتين متراكبين زي صور مطبوعة */
.photos { position: relative; min-height: 560px; }
.photo { position: absolute; margin: 0; padding: 10px 10px 34px; background: #FFFDF8; border-radius: 6px; box-shadow: 0 30px 50px -30px rgba(60, 38, 20, .55), 0 8px 18px -12px rgba(60, 38, 20, .3); }
.photo img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 3px; }
.photo--a { width: 62%; top: 0; inset-inline-end: 0; transform: rotate(3deg); }
.photo--a img { object-position: 50% 62%; }
.photo--b { width: 52%; bottom: 0; inset-inline-start: 0; transform: rotate(-5deg); z-index: 1; }
.photo--b img { object-position: 55% 58%; }
.photos__tag {
  position: absolute; z-index: 2; bottom: 34px; inset-inline-end: 4%;
  background: #2F3B2C; color: #F1E9D8; font-weight: 600; font-size: .95rem; padding: 10px 16px; border-radius: 10px;
  border: 4px solid var(--wood); transform: rotate(2deg); box-shadow: 0 14px 24px -14px rgba(60, 38, 20, .6);
}
@media (max-width: 760px) { .photos { min-height: 420px; max-width: 420px; } }

/* لون التمييز #FFCB56: نص ملوّن على الخلفيات الغامقة، وخط "هايلايتر" تحت الكلمة على الخلفيات الفاتحة */
.hero__title .hl, .process .hl, .contact .hl { color: var(--sun); }
.section__head h2 .hl, .interests__head h2 .hl {
  background: linear-gradient(transparent 60%, color-mix(in srgb, var(--sun) 70%, transparent) 60%, color-mix(in srgb, var(--sun) 70%, transparent) 88%, transparent 88%);
  padding: 0 .06em; border-radius: 2px;
}
.process .section__head h2 .hl { background: none; padding: 0; }
.hero .eyebrow { color: var(--sun); opacity: 1; }
.section__num--light { color: var(--sun); }
.svc__stats b { color: var(--sun); }
.step__icon { color: var(--sun); background: color-mix(in srgb, var(--sun) 14%, transparent); }
.svc:nth-child(1) .svc__badge { background: var(--cream-btn); color: #2A1A10; }

/* ظلال نخل خفيفة على أطراف الأقسام الفاتحة، كأن شمس الصبح داخلة من فوق.
   بتتحرك ببطء شديد كأن في نسمة هوا، وبتقف لو الزائر مقفّل الحركة من جهازه */
.section:not(.process) { position: relative; isolation: isolate; overflow: hidden; }
.section:not(.process)::before,
.section:not(.process)::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: min(52vw, 760px); aspect-ratio: 760 / 700;
  background: url(/img/palm-shadow.svg) center / contain no-repeat;
  opacity: .15; mix-blend-mode: multiply;
  animation: palm-sway 14s ease-in-out infinite alternate;
}
.section:not(.process)::before { top: -60px; left: -70px; transform-origin: top left; }
.section:not(.process)::after { top: -40px; right: -90px; transform: scaleX(-1); transform-origin: 50% 0; animation-name: palm-sway-r; animation-duration: 17s; }
/* ضوء شمس دافي خفيف من فوق */
.section:not(.process):not(#contact) { background-image: radial-gradient(120% 60% at 50% -10%, rgba(255, 214, 140, .22), transparent 60%); }
.section--tint { background-image: radial-gradient(120% 60% at 50% -10%, rgba(255, 214, 140, .2), transparent 60%); }
@keyframes palm-sway { from { transform: rotate(0deg); } to { transform: rotate(2.2deg) translateY(4px); } }
@keyframes palm-sway-r { from { transform: scaleX(-1) rotate(0deg); } to { transform: scaleX(-1) rotate(1.8deg) translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .section::before, .section::after { animation: none; } }
@media (max-width: 760px) { .section:not(.process)::before, .section:not(.process)::after { width: 80vw; opacity: .11; } }

/* شريط فحص الأمان بعد الواجهة */
.scanband { background: #1E1611; color: var(--cream); padding: clamp(36px, 6vw, 60px) 0; border-bottom: 1px solid rgba(255, 203, 86, .18); }
.scanband__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 56px); align-items: center; }
.scanband__kicker { color: var(--sun); font-size: .78rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; margin-bottom: 8px; }
html[lang="ar"] .scanband__kicker { letter-spacing: 0; text-transform: none; font-size: .95rem; }
.scanband h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
.scanband h2 .hl { color: var(--sun); }
.scanband__text { margin-top: 8px; color: color-mix(in srgb, var(--cream) 72%, transparent); font-weight: 300; }
.scanband__form { display: flex; gap: 8px; padding: 7px; border-radius: 999px; background: rgba(251, 244, 230, .08); border: 1px solid rgba(251, 244, 230, .22); }
.scanband__form input { flex: 1; min-width: 0; border: 0; background: transparent; color: #fff; font: inherit; font-size: 1.02rem; padding: 0 18px; outline: none; }
.scanband__form input::placeholder { color: rgba(251, 244, 230, .45); }
.scanband__form .btn { border: 0; min-height: 48px; padding: 0 28px; }
@media (max-width: 860px) { .scanband__inner { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .scanband__form { flex-direction: column; border-radius: 22px; } .scanband__form input { min-height: 46px; } }

/* العنوان يظهر كلمة كلمة */
.hero__title .w { display: inline-block; opacity: 0; transform: translateY(.45em); filter: blur(6px); animation: word-in .8s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(var(--i) * 90ms + 250ms); }
@keyframes word-in { to { opacity: 1; transform: none; filter: none; } }
.hero .eyebrow, .hero__sub, .hero__cta { animation: fade-up .9s ease both; }
.hero .eyebrow { animation-delay: .1s; }
.hero__sub { animation-delay: 1s; }
.hero__cta { animation-delay: 1.2s; }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .hero__bg { animation: none; }
  .hero__title .w, .hero .eyebrow, .hero__sub, .hero__cta { animation: none; opacity: 1; transform: none; filter: none; }
}

/* ملمس فينتدج: حبوب ناعمة جدًا زي ورق الصور القديمة */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 100; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .14 0 0 0 0 .08 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .07; mix-blend-mode: multiply;
}

/* فيديو قسم "عنّي": كارت عريض بغلاف وزر تشغيل */
.film { margin-top: clamp(40px, 6vw, 72px); border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9; background: #1E1611; box-shadow: 0 50px 90px -50px rgba(60, 38, 20, .6), 0 18px 34px -24px rgba(60, 38, 20, .35); }
.film video { width: 100%; height: 100%; display: block; background: #000; }
.film__cover { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: #1E1611; color: #FBF4E6; font: inherit; }
.film__cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1), filter .6s; filter: brightness(.82); }
.film__cover:hover img { transform: scale(1.03); filter: brightness(.7); }
.film__play {
  position: absolute; top: 50%; left: 50%; width: clamp(64px, 9vw, 96px); aspect-ratio: 1; border-radius: 50%; translate: -50% -50%;
  display: grid; place-items: center; background: var(--sun); color: #2A1A10; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .55);
  transition: transform .4s cubic-bezier(.2, .7, .2, 1.3);
}
.film__play svg { width: 38%; height: 38%; margin-inline-start: 6%; }
.film__cover:hover .film__play, .film__cover:focus-visible .film__play { transform: scale(1.08); }
.film__label { position: absolute; inset-inline-start: clamp(18px, 3vw, 34px); bottom: clamp(16px, 3vw, 30px); font-size: clamp(.9rem, 1.6vw, 1.1rem); font-weight: 500; letter-spacing: .02em; text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
@media (prefers-reduced-motion: reduce) { .film__cover img, .film__play { transition: none; } }

/* روابط المشروع: تفاصيل المشروع + زيارة الموقع، وزر "كل الأعمال" تحت القسم */
.proj__links { display: flex; flex-wrap: wrap; gap: 10px; align-self: flex-start; }
.proj__link--ghost { border-color: var(--line); color: var(--ink-soft); }
.works__all { margin-top: clamp(40px, 6vw, 64px); display: flex; justify-content: center; }
.btn--ghost-dark { border: 1.5px solid var(--ink); color: var(--ink); background: transparent; }
.btn--ghost-dark:hover { background: var(--ink); color: var(--cream); }
html[dir="rtl"] .works__all .btn span[aria-hidden] { transform: scaleX(-1); display: inline-block; }

/* ===== اسم الزائر على السبورة ===== */
.chalk {
  position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center;
  container-type: size; transform: rotate(-.6deg);
  background: radial-gradient(120% 100% at 30% 20%, #33402E, #252F22 70%); box-shadow: inset 0 0 1.2cqw rgba(0, 0, 0, .55);
  opacity: 0; transition: opacity .5s ease;
}
.chalk.is-on { opacity: 1; }
.chalk__txt { font-family: "Kaushan Script", cursive; color: #EFE3C8; font-size: 22cqw; line-height: 1.02; text-align: center; transform: rotate(-7deg); }
.chalk__txt.is-ar { font-family: "Aref Ruqaa", serif; font-size: 20cqw; line-height: 1.3; transform: rotate(-4deg); }
.chalk__txt span { display: block; clip-path: inset(0 100% 0 0); animation: chalk .7s ease forwards; }
.chalk__txt.is-ar span { clip-path: inset(0 0 0 100%); }
.chalk__u { display: block; width: 66%; height: 4cqw; margin-top: 5cqw; background: #D9A441; border-radius: 4cqw; transform: rotate(-7deg) skewX(-20deg) scaleX(0); transform-origin: left; animation: chalk-u .5s ease forwards; }
@keyframes chalk { to { clip-path: inset(0 0 0 0); } }
@keyframes chalk-u { to { transform: rotate(-7deg) skewX(-20deg) scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .chalk__txt span, .chalk__u { animation-duration: .01s; } }

.nameboard { margin-top: 22px; }
.nameboard__open {
  font: inherit; font-size: .95rem; color: rgba(251, 244, 230, .9); background: none; border: 0; padding: 4px 0; cursor: pointer;
  border-bottom: 1px dashed rgba(251, 244, 230, .45);
}
.nameboard__open:hover { color: var(--sun); border-bottom-color: var(--sun); }
.nameboard__open span[aria-hidden] { color: var(--sun); }
.nameboard__form {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; max-width: 560px; padding: 10px 10px 10px 18px;
  background: rgba(251, 247, 239, .96); color: var(--ink); border-radius: 999px; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .6);
}
html[dir="rtl"] .nameboard__form { padding: 10px 18px 10px 10px; }
.nameboard__ask { font-weight: 500; font-size: .95rem; white-space: nowrap; }
.nameboard__form input { flex: 1 1 120px; min-width: 0; font: inherit; font-size: 1rem; border: 1.5px solid var(--line); border-radius: 999px; padding: 10px 14px; background: #fff; color: var(--ink); }
.nameboard__form input:focus { outline: none; border-color: var(--sage); }
.nameboard__form .btn { min-height: 44px; padding: 8px 20px; }
@media (max-width: 560px) { .nameboard__form { border-radius: 22px; } .nameboard__ask { white-space: normal; flex: 1 1 100%; } }

.nbsheet {
  width: min(100% - 32px, 760px); padding: 18px; border: 0; border-radius: 26px;
  background: #221911; color: #FBF4E6; box-shadow: 0 50px 100px -30px rgba(0, 0, 0, .7);
}
.nbsheet::backdrop { background: rgba(20, 13, 8, .7); backdrop-filter: blur(4px); }
.nbsheet__img { display: block; width: 100%; height: auto; border-radius: 16px; background: #2A1E14; aspect-ratio: 1200 / 630; }
.nbsheet__acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.nbsheet__x { position: absolute; top: 26px; inset-inline-end: 26px; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(0, 0, 0, .55); color: #fff; font-size: 1rem; z-index: 1; }
.btn--glass-dark { background: rgba(251, 244, 230, .08); color: #FBF4E6; border-color: rgba(251, 244, 230, .35); }
.btn--glass-dark:hover { background: rgba(251, 244, 230, .16); }

/* ===== مزيكا الخلفية ===== */
.music {
  position: fixed; z-index: 40; bottom: 22px; inset-inline-end: 22px;
  display: flex; align-items: flex-end; gap: 12px; padding: 6px; margin: 0;
  background: none; border: 0; cursor: pointer; color: #FBF4E6;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .55)) drop-shadow(0 0 1px rgba(0, 0, 0, .4));
}
.music__bars { display: flex; align-items: flex-end; gap: 3px; height: 24px; }
.music__bars i { display: block; width: 2px; height: 3px; border-radius: 2px; background: currentColor; opacity: .55; transition: height .08s linear, opacity .3s; }
.music.is-on .music__bars i { opacity: 1; }
.music svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.music .music__on { display: none; }
.music.is-on .music__on { display: block; }
.music.is-on .music__off { display: none; }
.music:focus-visible { outline: 2px solid var(--sun); outline-offset: 4px; border-radius: 8px; }
@media (max-width: 560px) { .music { bottom: 14px; inset-inline-end: 12px; gap: 8px; } .music__bars { gap: 2px; height: 20px; } }

/* ===== قسم الأعمال المختصر: كارتين في الصف وأول 6 مشاريع بس ===== */
#works { padding: clamp(56px, 7vw, 88px) 0; }
.works__head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 6px 20px; max-width: none; margin-bottom: 30px; }
.works__head .section__num, .works__head h2 { grid-column: 1; margin: 0; }
.works__head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.works__head .filters { grid-column: 2; grid-row: 1 / 3; margin: 0; }
#works .works { grid-template-columns: 1fr 1fr; gap: 44px 32px; align-items: start; }
#works .proj, #works .proj--flip { grid-template-columns: 1fr; gap: 18px; align-items: start; }
#works .proj--flip .proj__shot { order: 0; }
#works .proj__shot { width: 100%; }
#works .browser, #works .proj--flip .browser { transform: none; }
#works .proj__shot:hover .browser { transform: translateY(-4px); }
#works .browser__view { aspect-ratio: 16 / 10; height: auto; }
#works .proj__num { display: none; }
#works .proj__info { gap: 8px; }
#works .proj__info h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
#works .proj__info p { font-size: .98rem; max-width: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#works .proj__link { padding: 9px 16px; font-size: .88rem; }
#works .proj:nth-child(n+7) { display: none; }
#works .works__all { margin-top: 40px; }
@media (max-width: 760px) {
  #works .works { grid-template-columns: 1fr; gap: 36px; }
  .works__head { grid-template-columns: 1fr; }
  .works__head .filters { grid-column: 1; grid-row: auto; margin-top: 12px; }
}
