/* =========================================================
   محمود العبادي — الموقع الرسمي
   Visual system: brand guide sections 22–25 (Oct 2026)
   ========================================================= */

@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+2010-2011, U+204F, U+2E41; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("../fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E, U+2010-2011, U+204F, U+2E41; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 300; font-style: normal; font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }

:root {
  --ivory: #F4F0E8;
  --white: #FFFFFF;
  --navy: #082037;
  --gold: #BA9653;        /* on navy only */
  --gold-deep: #7A5E2C;   /* labels / active state on light grounds */
  --navy-80: #394D5F;
  --navy-60: #6B7987;
  --line: rgba(8, 32, 55, 0.16);
  --line-strong: rgba(8, 32, 55, 0.32);
  --text-soft: rgba(8, 32, 55, 0.78);

  --margin: 80px;
  --gutter: 24px;
  --maxw: 1440px;
  --measure: 680px;
  --section: 96px;
  --header-h: 96px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --f-ar: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;
  --f-en: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
}
@media (max-width: 1279px) { :root { --margin: 48px; --gutter: 20px; } }
@media (max-width: 767px)  { :root { --margin: 24px; --gutter: 16px; --header-h: 80px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--navy);
  font-family: var(--f-ar);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.8;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
html[lang="en"] body { font-family: var(--f-en); line-height: 1.6; }
@media (max-width: 767px) { body { font-size: 16px; } }

img { max-width: 100%; height: auto; display: block; }
picture { display: block; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--navy); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.on-navy :focus-visible { outline-color: var(--gold); }

.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 100; background: var(--navy); color: var(--ivory); padding: 10px 16px; }
.skip:focus { top: 12px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type scale (web) ---------- */
.t-page { font-size: 64px; font-weight: 500; line-height: 1.2; letter-spacing: 0; }
.t-section { font-size: 44px; font-weight: 500; line-height: 1.3; }
.t-sub { font-size: 22px; font-weight: 500; line-height: 1.4; }
.t-caption { font-size: 14px; line-height: 1.6; }
.t-label { font-size: 13px; line-height: 1.4; color: var(--gold-deep); font-weight: 400; }
html[lang="en"] .t-page, html[lang="en"] .t-section { font-weight: 300; }
html[lang="en"] .t-sub { font-weight: 400; }
html[lang="en"] .t-label { text-transform: uppercase; letter-spacing: 0.12em; }
.en-line { font-family: var(--f-en); font-weight: 300; }
@media (max-width: 767px) {
  .t-page { font-size: 40px; }
  .t-section { font-size: 30px; }
  .t-sub { font-size: 19px; }
}

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--margin)); margin-inline: auto; padding-inline: var(--margin); }
.measure { max-width: var(--measure); }
.prose p + p { margin-top: 1em; }
.prose { color: var(--navy); }
.section { padding-block: var(--section); }
.section + .section { padding-top: 0; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.grid { display: grid; gap: var(--gutter); grid-template-columns: repeat(12, minmax(0, 1fr)); }
@media (max-width: 1279px) { .grid { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (max-width: 767px)  { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  background: var(--ivory);
  transition: transform 260ms var(--ease);
}
.site-header.is-hidden { transform: translateY(-100%); }
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: block; flex: none; line-height: 0; padding: 0; }
.brand img { height: 56px; width: auto; }          /* screen minimum: 56px */
.nav { display: flex; align-items: center; gap: 40px; }
.nav ul { display: flex; gap: 32px; }
.nav a { font-size: 16px; line-height: 1.4; text-decoration: none; padding-block: 8px; border-bottom: 1px solid transparent; display: inline-block; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { border-bottom-color: var(--line-strong); }
.nav a[aria-current="page"], .nav a.is-active { border-bottom-color: var(--gold-deep); color: var(--navy); }
.lang { font-family: var(--f-en); font-size: 14px; letter-spacing: 0.06em; }
html[lang="en"] .lang { font-family: var(--f-ar); letter-spacing: 0; font-size: 16px; }
.menu-btn { display: none; }
@media (max-width: 1023px) {
  .nav { display: none; }
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-width: 44px; min-height: 44px; padding: 0 4px;
    background: none; border: 0; color: var(--navy); font: inherit; font-size: 16px; cursor: pointer;
  }
  .menu-btn svg { width: 24px; height: 24px; }
}
@media (prefers-reduced-motion: reduce) { .site-header { transition: none; } }

/* full-screen mobile menu */
.menu {
  position: fixed; inset: 0; z-index: 60; background: var(--navy); color: var(--ivory);
  display: none; flex-direction: column; overflow-y: auto;
}
.menu.is-open { display: flex; }
.menu .menu-top { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; }
.menu .menu-top img { height: 56px; width: auto; }
.menu-close { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--ivory); cursor: pointer; }
.menu-close svg { width: 24px; height: 24px; }
.menu nav { padding-block: 40px 64px; }
.menu nav li + li { border-top: 1px solid rgba(244, 240, 232, 0.14); }
.menu nav a { display: flex; align-items: center; min-height: 64px; font-size: 22px; line-height: 1.4; color: var(--ivory); text-decoration: none; }
.menu nav a[aria-current="page"] { color: var(--gold); }
.menu .menu-meta { margin-top: auto; padding-bottom: 40px; font-size: 14px; color: rgba(244, 240, 232, 0.8); display: grid; gap: 4px; }
.menu .menu-meta a { color: var(--ivory); }
body.menu-open { overflow: hidden; }

/* ---------- draft banner (English review build only) ---------- */
.draft-banner { background: var(--white); border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.5; padding-block: 10px; }
.draft-banner strong { color: var(--gold-deep); font-weight: 500; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  border: 1px solid var(--navy); background: var(--navy); color: var(--ivory);
  font: inherit; font-size: 16px; line-height: 1.2; text-decoration: none; cursor: pointer; border-radius: 0;
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}
.btn:hover { background: var(--navy-80); border-color: var(--navy-80); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--navy); }
.btn--ghost:hover { background: var(--white); color: var(--navy); border-color: var(--navy); }
.text-link { font-size: 16px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.arrow { display: inline-block; }
html[dir="rtl"] .arrow { transform: scaleX(-1); }

/* ---------- images ---------- */
html.js img.fade { opacity: 0; transition: opacity 260ms var(--ease); }
html.js img.fade.is-loaded { opacity: 1; }
@media (prefers-reduced-motion: reduce) { html.js img.fade { opacity: 1; transition: none; } }

/* ---------- home ---------- */
.hero { padding-top: 8px; }
.hero-figure { background: var(--white); }
.hero-figure img { width: 100%; height: auto; }
.hero-caption {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px;
  padding-block: 16px; border-bottom: 1px solid var(--line);
}
.hero-caption .t-caption { color: var(--navy); }
.home-intro { padding-block: var(--section); }
.home-intro .tagline { max-width: 14em; }
.home-intro .tagline-en { margin-top: 12px; font-size: 22px; line-height: 1.4; color: var(--text-soft); }
.home-intro .lead { margin-top: 40px; font-size: 19px; line-height: 1.8; max-width: var(--measure); }
html[lang="en"] .home-intro .lead { line-height: 1.6; }
.home-intro .actions { margin-top: 40px; }
.block-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 40px; margin-bottom: 40px; }
.block-head p { max-width: var(--measure); color: var(--text-soft); }

/* ---------- work cards / index ---------- */
.cards { display: grid; gap: 64px var(--gutter); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1279px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px var(--gutter); } }
@media (max-width: 767px)  { .cards { grid-template-columns: minmax(0, 1fr); gap: 40px; } }
.card { position: relative; }
.card a { text-decoration: none; display: block; }
.card .frame {
  aspect-ratio: 4 / 5; background: var(--white);
  display: flex; align-items: center; justify-content: center; padding: 24px; overflow: hidden;
}
.card .frame picture, .card .frame img { width: 100%; height: 100%; }
.card .frame img { object-fit: contain; }   /* never crop letters or sculpture */
.card .meta { padding-top: 16px; display: grid; gap: 2px; }
.card .title { font-size: 19px; font-weight: 500; line-height: 1.4; }
html[lang="en"] .card .title { font-weight: 400; }
.card .sub { font-size: 14px; line-height: 1.6; color: var(--text-soft); }
.card a:hover .title { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
.card a:focus-visible { outline-offset: 6px; }
.card[hidden] { display: none; }

.filters { display: grid; gap: 16px; margin-bottom: 56px; padding-block: 24px; border-block: 1px solid var(--line); }
.filters[hidden] { display: none; }
.filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 8px; }
.filter-group .t-label { min-width: 72px; margin-inline-end: 8px; }
.chip {
  min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); background: transparent; color: var(--navy);
  font: inherit; font-size: 15px; cursor: pointer; border-radius: 0;
}
.chip:hover { background: var(--white); }
.chip[aria-pressed="true"] { background: var(--navy); color: var(--ivory); border-color: var(--navy); }
.filter-status { font-size: 14px; color: var(--text-soft); }
.empty-note { padding: 40px 0; color: var(--text-soft); }

/* ---------- breadcrumb ---------- */
.crumbs { font-size: 14px; padding-top: 24px; color: var(--text-soft); }
.crumbs a { color: var(--text-soft); }
.crumbs span[aria-hidden] { margin-inline: 8px; }

/* ---------- work page ---------- */
.work-media { margin-top: 24px; display: grid; gap: var(--gutter); }
.plate { background: var(--white); display: flex; justify-content: center; align-items: center; padding: clamp(16px, 4vw, 64px); }
.plate button { all: unset; cursor: zoom-in; display: block; max-width: 100%; }
.plate button:focus-visible { outline: 2px solid var(--navy); outline-offset: 4px; }
.plate img { max-height: min(86vh, 1400px); width: auto; max-width: 100%; margin-inline: auto; }
.plate-caption { padding-top: 12px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.work-body { padding-top: 64px; display: grid; gap: 48px var(--gutter); grid-template-columns: repeat(12, minmax(0, 1fr)); }
.work-body .work-text { grid-column: 1 / span 7; }
.work-body .work-facts { grid-column: 9 / span 4; }
@media (max-width: 1279px) { .work-body .work-text { grid-column: 1 / span 12; } .work-body .work-facts { grid-column: 1 / span 12; } }
.work-title .en-line { display: block; margin-top: 8px; font-size: 22px; line-height: 1.4; color: var(--text-soft); }
.work-text .prose { margin-top: 32px; max-width: var(--measure); }
.facts { border-top: 1px solid var(--navy); }
.facts div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.6; }
.facts dt { color: var(--gold-deep); font-size: 13px; padding-top: 2px; }
.facts dd { margin: 0; }
.facts .mono { font-family: var(--f-en); letter-spacing: 0.02em; direction: ltr; unicode-bidi: isolate; }
.work-facts .btn { margin-top: 32px; width: 100%; }
.work-notes { margin-top: 40px; display: grid; gap: 24px; max-width: var(--measure); }
.work-notes h3 { font-size: 13px; color: var(--gold-deep); font-weight: 400; line-height: 1.4; margin-bottom: 4px; }
html[lang="en"] .work-notes h3 { text-transform: uppercase; letter-spacing: 0.12em; }

/* ---------- projects ---------- */
.proj-list { border-top: 1px solid var(--navy); }
.proj-row { border-bottom: 1px solid var(--line); }
.proj-row a { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px 40px; padding-block: 32px; text-decoration: none; align-items: start; }
.proj-row a.no-img { grid-template-columns: minmax(0, 1fr); }
.proj-row .t-sub { margin-top: 4px; }
.proj-row a:hover .t-sub { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
.proj-row p { margin-top: 8px; color: var(--text-soft); max-width: var(--measure); }
.proj-row .thumb { background: var(--white); aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; padding: 12px; }
.proj-row .thumb img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 767px) { .proj-row a { grid-template-columns: minmax(0, 1fr); } .proj-row .thumb { order: -1; } }
.lead-2 { margin-top: 24px; color: var(--text-soft); }

.proj-head { padding-top: 40px; }
.proj-head .meta-line { margin-top: 16px; font-size: 16px; color: var(--text-soft); }
.proj-head .intro { margin-top: 24px; font-size: 22px; line-height: 1.6; max-width: var(--measure); }
.proj-figure { margin-top: 56px; }
.role { margin-top: 48px; padding: 32px; background: var(--white); max-width: var(--measure); }
.role h2 { margin-bottom: 8px; }
.linked { margin-top: 48px; }
.linked h2 { margin-bottom: 16px; }
.inline-list { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* ---------- exhibitions / timeline ---------- */
.ex-year { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px 40px; padding-block: 32px; border-top: 1px solid var(--line); }
.ex-year:first-of-type { border-top-color: var(--navy); }
.ex-year .yr { font-family: var(--f-en); font-weight: 300; font-size: 30px; line-height: 1.2; }
.ex-year li + li { margin-top: 24px; }
.ex-year .t-sub { font-size: 19px; }
.ex-year .where { font-size: 15px; color: var(--text-soft); }
.ex-year .rel { font-size: 14px; margin-top: 4px; }
@media (max-width: 767px) { .ex-year { grid-template-columns: minmax(0, 1fr); } }

.timeline li { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 8px 40px; padding-block: 20px; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top-color: var(--navy); }
.timeline .when { font-family: var(--f-en); font-weight: 300; font-size: 19px; line-height: 1.5; }
html[dir="rtl"] .timeline .when.ar-when { font-family: var(--f-ar); font-weight: 400; font-size: 16px; }
.timeline p { max-width: var(--measure); }
.timeline .more { font-size: 14px; margin-top: 4px; display: inline-block; }
@media (max-width: 767px) { .timeline li { grid-template-columns: minmax(0, 1fr); } }

.two-col { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px var(--gutter); }
.two-col > .side { grid-column: 1 / span 4; }
.two-col > .main { grid-column: 6 / span 7; }
@media (max-width: 1023px) { .two-col > .side, .two-col > .main { grid-column: 1 / -1; } }

.recog { display: grid; gap: var(--gutter); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.recog li { background: var(--white); padding: 32px; }
.recog p { margin-top: 8px; color: var(--text-soft); }
@media (max-width: 767px) { .recog { grid-template-columns: minmax(0, 1fr); } }

/* ---------- press ---------- */
.press-list li { padding-block: 32px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 8px 40px; }
.press-list li:first-child { border-top-color: var(--navy); }
.press-list .meta { font-size: 14px; color: var(--text-soft); margin-top: 4px; }
.press-list p.desc { margin-top: 12px; max-width: var(--measure); }
.press-list .rel { margin-top: 12px; font-size: 15px; }
@media (max-width: 767px) { .press-list li { grid-template-columns: minmax(0, 1fr); } }
.kit { background: var(--white); padding: clamp(24px, 4vw, 56px); }
.kit-grid { display: grid; gap: 40px var(--gutter); grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 32px; }
@media (max-width: 1023px) { .kit-grid { grid-template-columns: minmax(0, 1fr); } }
.sig-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.sig-tile { padding: 32px; display: flex; flex-direction: column; align-items: center; gap: 20px; border: 1px solid var(--line); }
.sig-tile img { height: 120px; width: auto; }
.sig-tile.navy { background: var(--navy); color: var(--ivory); border-color: var(--navy); }
.sig-tile.navy a { color: var(--ivory); }
.sig-tile a { font-size: 14px; }

/* ---------- digital ---------- */
.dig-items { display: grid; gap: var(--gutter); grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 24px; }
.dig-items li { background: var(--white); padding: 32px; }
.dig-items p { margin-top: 8px; color: var(--text-soft); }
@media (max-width: 1023px) { .dig-items { grid-template-columns: minmax(0, 1fr); } }
.facts-list li { padding-block: 16px; border-top: 1px solid var(--line); font-size: 19px; line-height: 1.6; }
.facts-list li:first-child { border-top-color: var(--navy); }

/* ---------- contact ---------- */
.contact-lines { display: grid; gap: 16px; margin-top: 32px; }
.contact-lines .t-label { display: block; }
.contact-lines a { font-size: 19px; }
.contact-lines .ltr { direction: ltr; unicode-bidi: isolate; font-family: var(--f-en); }
.form { background: var(--white); padding: clamp(24px, 4vw, 56px); display: grid; gap: 24px; }
.field { display: grid; gap: 8px; }
.field label, .field legend { font-size: 15px; font-weight: 500; line-height: 1.4; }
html[lang="en"] .field label { font-weight: 400; }
.field .hint { font-size: 13px; color: var(--text-soft); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  background: var(--white); color: var(--navy); border: 1px solid var(--line-strong); border-radius: 0;
  font: inherit; font-size: 16px; line-height: 1.5;
}
.field textarea { min-height: 180px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--navy); outline-offset: 0; border-color: var(--navy); }
.field .err { font-size: 14px; color: #9B2C2C; display: none; }
.field.has-error .err { display: block; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #9B2C2C; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 767px) { .form-row { grid-template-columns: minmax(0, 1fr); } }
.hp { position: absolute; inset-inline-start: -9999px; }
.form-note { font-size: 14px; color: var(--text-soft); }
.notice { padding: 16px 20px; border: 1px solid var(--gold-deep); background: var(--ivory); font-size: 15px; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: var(--ivory); margin-top: var(--section); }
.site-footer a { color: var(--ivory); }
.site-footer .wrap { padding-block: 80px 40px; }
.foot-top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px var(--gutter); }
.foot-brand { grid-column: 1 / span 4; display: grid; gap: 20px; align-content: start; }
.foot-brand img { height: 96px; width: auto; }
.foot-brand p { font-size: 15px; line-height: 1.7; color: rgba(244, 240, 232, 0.86); max-width: 30em; }
.foot-nav { grid-column: 6 / span 3; }
.foot-contact { grid-column: 10 / span 3; }
.foot-nav ul, .foot-contact ul { display: grid; gap: 4px; }
.foot-nav a, .foot-contact a { display: inline-flex; min-height: 36px; align-items: center; font-size: 15px; }
.site-footer .t-label { color: var(--gold); display: block; margin-bottom: 12px; }
.foot-bottom { margin-top: 64px; padding-top: 24px; border-top: 1px solid rgba(244, 240, 232, 0.16); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: rgba(244, 240, 232, 0.75); }
.ltr { direction: ltr; unicode-bidi: isolate; }
@media (max-width: 1023px) {
  .foot-brand { grid-column: 1 / -1; }
  .foot-nav { grid-column: 1 / span 4; }
  .foot-contact { grid-column: 5 / span 4; }
}
@media (max-width: 767px) { .foot-nav, .foot-contact { grid-column: 1 / -1; } }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 80; background: var(--navy); color: var(--ivory);
  display: none; flex-direction: column;
}
.lightbox.is-open { display: flex; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px var(--margin); min-height: 72px; }
.lb-bar .count { font-family: var(--f-en); font-size: 14px; color: rgba(244, 240, 232, 0.8); }
.lb-btn { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: none; border: 1px solid rgba(244, 240, 232, 0.3); color: var(--ivory); font: inherit; font-size: 14px; padding: 0 12px; cursor: pointer; border-radius: 0; }
.lb-btn:hover { border-color: var(--gold); }
.lb-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.lb-btn svg { width: 22px; height: 22px; }
.lb-stage { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; padding: 0 var(--margin) 16px; overflow: hidden; touch-action: pan-y; }
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lb-stage.is-actual { overflow: auto; align-items: flex-start; justify-content: flex-start; touch-action: auto; }
.lb-stage.is-actual img { max-width: none; max-height: none; }
.lb-caption { padding: 0 var(--margin) 20px; font-size: 14px; color: rgba(244, 240, 232, 0.86); min-height: 40px; }
.lb-nav { display: flex; gap: 8px; }

/* ---------- 404 ---------- */
.nf { min-height: 60vh; display: grid; align-content: center; gap: 24px; padding-block: var(--section); }

@media print {
  .site-header, .site-footer, .filters, .menu, .lightbox { display: none !important; }
  body { background: #fff; }
}

/* English lines inside Arabic pages sit on the Arabic reading edge */
html[dir="rtl"] [dir="ltr"].en-line, html[dir="rtl"] .tagline-en { text-align: right; }
[hidden] { display: none !important; }
.menu .menu-meta, .foot-contact ul, .contact-lines { justify-items: start; }

/* ---------- expanded index: project / collection selects ---------- */
.filter-selects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px var(--gutter); }
@media (max-width: 767px) { .filter-selects { grid-template-columns: minmax(0, 1fr); } }
.filter-select { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 16px; }
.filter-select select {
  min-height: 44px; width: 100%; padding-inline: 12px 36px; border: 1px solid var(--line-strong); border-radius: 0;
  background: var(--ivory) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23082037' stroke-width='1.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat;
  background-size: 18px; background-position: left 12px center; color: var(--navy); font: inherit; font-size: 15px; appearance: none; -webkit-appearance: none; cursor: pointer;
}
html[dir="ltr"] .filter-select select { padding-inline: 12px 36px; background-position: right 12px center; }
html[dir="rtl"] .filter-select select { padding-inline: 36px 12px; }
.filter-select select:hover { background-color: var(--white); }
.filter-select select:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* ---------- project page: counts, collections, works, documentation ---------- */
.proj-count { margin-top: 12px; color: var(--gold-deep); }
.proj-row .proj-count { margin-top: 12px; }
.g-toc { margin-bottom: 56px; }
.g-toc ul { display: flex; flex-wrap: wrap; gap: 8px 32px; padding-block: 16px; border-block: 1px solid var(--line); }
.g-toc li { display: flex; gap: 8px; align-items: baseline; }
.g-toc .t-caption { color: var(--text-soft); }
.w-group { scroll-margin-top: calc(var(--header-h) + 24px); }
.w-group + .w-group { margin-top: 96px; }
.w-group-head { display: grid; gap: 8px; margin-bottom: 40px; }
.w-group-head .t-caption { color: var(--gold-deep); }
.w-group-head .prose { margin-top: 8px; color: var(--text-soft); }
.w-pending { margin-top: 80px; padding-top: 24px; border-top: 1px solid var(--line); max-width: var(--measure); }
.w-pending ul { margin-top: 12px; display: grid; gap: 6px; }
.w-pending li { color: var(--text-soft); }
.coll-note { margin-top: 40px; max-width: var(--measure); padding-top: 24px; border-top: 1px solid var(--line); }
.coll-note .prose { margin-top: 12px; }
.g-block + .g-block { margin-top: 80px; }
.g-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin-bottom: 8px; }
.g-head .t-caption { color: var(--gold-deep); }
.g-note { color: var(--text-soft); margin-bottom: 24px; max-width: var(--measure); }
.g-grid { columns: 3; column-gap: var(--gutter); margin-top: 24px; }
.g-grid.g-few { columns: 2; }
@media (max-width: 1279px) { .g-grid { columns: 2; } }
@media (max-width: 767px)  { .g-grid, .g-grid.g-few { columns: 1; } }
.g-item { break-inside: avoid; margin: 0 0 var(--gutter); background: var(--white); }
.g-item button { all: unset; display: block; width: 100%; cursor: zoom-in; }
.g-item button:focus-visible { outline: 2px solid var(--navy); outline-offset: 4px; }
.g-item img { display: block; width: 100%; height: auto; }   /* full frame, never cropped */
.g-item figcaption { padding: 10px 12px 12px; background: var(--ivory); }
.meta-line .ltr { white-space: nowrap; display: inline-block; }

/* ---------- works index v3: compact head, search, single filter button ---------- */
.works-index { padding-top: 64px; padding-bottom: var(--section); }
.works-head { margin-bottom: 40px; }
.works-head .lead-long { margin-top: 24px; }
.works-head .lead-short { display: none; }
.filters { gap: 12px; margin-bottom: 48px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-bar input[type="search"] {
  flex: 1 1 260px; min-height: 44px; padding-inline: 14px; border: 1px solid var(--line-strong); border-radius: 0;
  background: var(--white); color: var(--navy); font: inherit; font-size: 15px; -webkit-appearance: none; appearance: none;
}
.filter-bar input[type="search"]:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.filter-bar input::placeholder { color: var(--text-soft); }
.btn-filter, .clear-filters, .btn-ghost {
  min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); background: transparent; color: var(--navy);
  font: inherit; font-size: 15px; cursor: pointer; border-radius: 0;
}
.btn-filter[aria-expanded="true"] { background: var(--navy); color: var(--ivory); border-color: var(--navy); }
.clear-filters { border-color: transparent; text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1px; padding-inline: 8px; }
.btn-ghost:hover, .btn-filter:hover { background: var(--white); }
.btn-filter[aria-expanded="true"]:hover { background: var(--navy); }
.filter-panel { display: grid; gap: 16px; }
.btn-filter { display: none; }
@media (max-width: 767px) {
  .works-index { padding-top: 24px; }
  .works-head { margin-bottom: 16px; }
  .works-head .lead-long { display: none; }
  .works-head .lead-short { display: block; margin-top: 8px; color: var(--text-soft); font-size: 15px; }
  .filters { margin-bottom: 24px; padding-block: 12px; }
  .btn-filter { display: inline-block; }
  .filter-bar input[type="search"] { flex: 1 1 0; min-width: 0; }
  .filter-panel:not(.open) { display: none; }
  .filter-panel.open { padding-top: 8px; }
  .filter-group .t-label { min-width: 100%; }
  .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
  .works-grid .card .frame { padding: 10px; }
  .works-grid .card .title { font-size: 15px; }
  .works-grid .card .sub { font-size: 12px; }
}

/* ---------- project pages v3: compact grids, in-place strips, collapsible groups ---------- */
.cards.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px var(--gutter); }
@media (max-width: 1279px) { .cards.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px)  { .cards.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; } }
.cards.compact .card .frame { padding: 14px; }
.cards.compact .card .title { font-size: 16px; }
.cards.compact .card .sub { font-size: 13px; }
.g-strip { margin-bottom: 40px; }
.g-strip .g-grid { margin-top: 12px; }
.g-strip .t-label { color: var(--gold-deep); }
.g-item figcaption { display: grid; gap: 4px; }
.g-works { color: var(--text-soft); }
.g-works a { color: inherit; }
.show-all { margin-top: 32px; }
.place-label { margin-top: 24px; color: var(--gold-deep); }
.plate-place { padding: 0; background: transparent; }
.plate-place img { max-height: min(80vh, 1200px); }

/* in-place strip: one swipeable row of uniform height, whole photos, no cropping */
.g-row { --h: 300px; display: flex; gap: var(--gutter); overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 12px; margin-top: 12px; scrollbar-width: thin; }
.g-row:focus-visible { outline: 2px solid var(--navy); outline-offset: 4px; }
.g-row .g-item { flex: 0 0 auto; width: calc(var(--h) * var(--r)); max-width: 86vw; margin: 0; scroll-snap-align: start; background: transparent; }
.g-row .g-item img { height: var(--h); width: 100%; object-fit: contain; background: var(--white); }
.g-row .g-item figcaption { padding: 10px 0 0; background: transparent; }
.g-strip .n { color: var(--text-soft); margin-inline-start: 4px; }
@media (max-width: 767px) { .g-row { --h: 220px; } }

/* digital page: the three themes with their images */
.dig-works { display: grid; gap: 40px var(--gutter); grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 8px; }
@media (max-width: 1023px) { .dig-works { grid-template-columns: minmax(0, 1fr); } }
.dig-works figure { background: var(--white); aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.dig-works figure button { all: unset; cursor: zoom-in; display: block; width: 100%; height: 100%; }
.dig-works figure button:focus-visible { outline: 2px solid var(--navy); outline-offset: 4px; }
.dig-works figure img { width: 100%; height: 100%; object-fit: contain; }
.dig-works h3 { margin-top: 16px; }
.dig-works p { margin-top: 8px; color: var(--text-soft); max-width: var(--measure); }

/* About page — name and definition */
.about-head{margin-bottom:72px}
.about-intro{margin-top:24px;max-width:46em;font-size:22px;line-height:1.85;color:var(--navy,#082037)}
html[lang="en"] .about-intro{font-size:20px;line-height:1.7}
@media (max-width:767px){.about-head{margin-bottom:48px}.about-intro{font-size:18px;line-height:1.85;margin-top:16px}html[lang="en"] .about-intro{font-size:17px}}

/* Digital page — single small figure inside a section */
.dig-single{margin-top:32px}
.dig-single img{width:100%;height:auto;display:block}
.dig-single figcaption{margin-top:12px}

/* About page — portrait beside name and definition */
.about-head.has-portrait{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,400px);gap:64px;align-items:center}
.about-portrait{margin:0}
.about-portrait img{width:100%;height:auto;display:block}
@media (max-width:1023px){.about-head.has-portrait{grid-template-columns:1fr;gap:40px}.about-portrait{max-width:420px}}
