:root {
  --bg: #071116;
  --bg-deep: #0b202b;
  --panel-line: #29363b;
  --ink: #f2eee6;
  --ink-dim: #a9a59e;
  --ink-faint: #888;
  --accent: #c9a97a;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, Segoe UI, Arial, sans-serif;
  --font-arabic: 'Cairo', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* Smooth native cross-fade between page navigations (progressive enhancement; no-op if unsupported) */
@view-transition { navigation: auto; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.7;
}
html[dir="rtl"] body { font-family: var(--font-arabic); }

.container { max-width: 1300px; margin: 0 auto; padding: 0 5vw; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, .serif { font-family: var(--font-serif); font-weight: 400; }

/* ── MOTION ── */
* { transition-timing-function: cubic-bezier(.25,.8,.25,1); }
a, button, .btn, .line-btn, .social-icon, .lang-switch a, .filter-tabs a, .gallery-item img, .teaser-card, .moments-item img {
  transition: color .25s, background-color .25s, border-color .25s, transform .35s, box-shadow .35s, opacity .35s;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Reveal-on-scroll (JS adds .reveal on load, .is-visible when in view) */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ── NAV (overlay on hero) ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 30px 5vw; display: flex; align-items: center; justify-content: space-between;
  background: transparent; border-bottom: 1px solid transparent;
  transition: background-color .35s, border-color .35s, padding .35s, backdrop-filter .35s;
}
.site-header.scrolled,
body:not(:has(.hero)) .site-header {
  background: rgba(7, 17, 22, .88); backdrop-filter: blur(10px);
  border-bottom-color: var(--panel-line); padding-top: 16px; padding-bottom: 16px;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 20px; }
.brand { font-family: var(--font-serif); font-size: 22px; line-height: 1.1; color: var(--ink); }
.brand .ar-name { display: block; font-family: var(--font-arabic); font-size: 13px; margin-top: 4px; color: var(--ink-dim); direction: rtl; }
.main-nav { display: flex; gap: 22px; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
.main-nav a { position: relative; padding-bottom: 3px; }
.main-nav a:after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--accent); transition: right .3s ease;
}
.main-nav a:hover { color: var(--accent); }
.main-nav a:hover:after { right: 0; }
.header-tools { display: flex; align-items: center; gap: 16px; }
.header-socials { gap: 12px; }
.social-icon { color: var(--ink-dim); display: inline-flex; transition: color .25s, transform .25s; }
.social-icon:hover { color: var(--accent); transform: translateY(-2px); }
.lang-switch { display: flex; gap: 8px; font-size: 11px; }
.lang-switch a { padding: 3px 7px; border: 1px solid #ffffff33; border-radius: 3px; color: var(--ink-dim); }
.lang-switch a.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.nav-toggle { display: none; background: none; border: none; color: var(--ink); font-size: 1.5rem; cursor: pointer; }

/* ── HERO ── */
.hero {
  position: relative; min-height: 86vh; overflow: hidden;
  display: flex; align-items: flex-end;
  background: var(--bg-deep) center/cover no-repeat;
  animation: heroZoom 16s ease-out forwards;
}
@keyframes heroZoom {
  from { background-size: 104%; }
  to   { background-size: 116%; }
}
@media (prefers-reduced-motion: reduce) { .hero { animation: none; } }
.hero.no-image {
  background:
    linear-gradient(115deg, transparent 0 28%, #264b5f 28.5% 43%, transparent 43.5%),
    linear-gradient(45deg, transparent 0 39%, #8d7b64 39.5% 56%, transparent 56.5%),
    linear-gradient(145deg, transparent 0 62%, #14364a 62.5% 77%, transparent 77.5%),
    #081a22;
}
.hero:after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--bg) 0%, transparent 40%), linear-gradient(100deg, #061017ee 0%, #061017aa 40%, transparent 75%);
}
.hero-inner { position: relative; z-index: 2; padding: 0 5vw 90px; max-width: 780px; }
.eyebrow { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 22px; }
.hero h1 { font-size: clamp(52px, 8vw, 92px); line-height: .85; font-weight: 400; color: var(--ink); }
.hero .ar-name { font-family: var(--font-arabic); font-size: clamp(22px, 3vw, 34px); direction: rtl; margin: 18px 0; color: var(--ink); }
.hero .tagline { font-size: 16px; color: var(--ink-dim); max-width: 520px; margin-bottom: 34px; }

.hero-inner > * { opacity: 0; transform: translateY(22px); animation: heroFadeUp .8s ease forwards; }
.hero-inner > .eyebrow  { animation-delay: .15s; }
.hero-inner > h1        { animation-delay: .3s; }
.hero-inner > .ar-name  { animation-delay: .45s; }
.hero-inner > .tagline  { animation-delay: .6s; }
.hero-inner > .line-btn { animation-delay: .75s; }
@keyframes heroFadeUp { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .hero-inner > * { animation: none; opacity: 1; transform: none; } }

.line-btn {
  display: inline-flex; align-items: center; gap: 16px; font-size: 11px;
  text-transform: uppercase; letter-spacing: .12em; border: none; background: none; cursor: pointer;
  color: var(--ink); font-family: var(--font-sans);
}
.line-btn:after { content: "→"; font-size: 17px; transition: transform .2s; }
html[dir="rtl"] .line-btn:after { content: "←"; }
.line-btn:hover:after { transform: translateX(4px); }
html[dir="rtl"] .line-btn:hover:after { transform: translateX(-4px); }

/* ── TWO-COLUMN BODY (about / practice) ── */
.split-body { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--panel-line); }
.split-body > div { padding: 80px 5vw; }
.split-body > div:first-child { border-right: 1px solid var(--panel-line); }
html[dir="rtl"] .split-body > div:first-child { border-right: none; border-left: 1px solid var(--panel-line); }
.split-body h2 { font-size: clamp(30px, 3.4vw, 46px); margin: 0 0 20px; }
.split-body p { color: var(--ink-dim); font-size: 15px; line-height: 1.9; max-width: 480px; margin-bottom: 28px; }

/* ── WORKS / GALLERY ── */
.works { padding: 80px 5vw; border-top: 1px solid var(--panel-line); }
.works-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 34px; gap: 20px; flex-wrap: wrap; }
.works-head h2 { font-size: clamp(30px, 3.4vw, 44px); }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery-item {
  background: #0c1a21; border: 1px solid var(--panel-line); overflow: hidden;
  transition: transform .4s, box-shadow .4s, border-color .4s;
}
.gallery-item:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0,0,0,.35); border-color: var(--accent); }
.gallery-item img { width: 100%; height: 260px; object-fit: contain; background: #0c1a21; display: block; transition: transform .6s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item figcaption { padding: 16px 18px; }
.gallery-item .work-title { font-family: var(--font-serif); font-size: 19px; display: block; margin-bottom: 5px; }
.gallery-item .work-desc { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); }
.gallery .empty { color: var(--ink-faint); }

/* ── CV / EXHIBITIONS & COLLECTIONS ── */
.cv-section { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--panel-line); }
.cv-section > div { padding: 80px 5vw; }
.cv-section > div:first-child { border-right: 1px solid var(--panel-line); }
html[dir="rtl"] .cv-section > div:first-child { border-right: none; border-left: 1px solid var(--panel-line); }
.cv-section h2 { font-size: clamp(28px, 3vw, 40px); margin: 0 0 24px; }
.cv-section p { color: var(--ink-dim); font-size: 15px; line-height: 1.9; max-width: 480px; margin-bottom: 20px; }
.cv-article-image { max-width: 480px; margin-bottom: 20px; overflow: hidden; background: #0c1a21; border: 1px solid var(--panel-line); }
.cv-article-image img { width: 100%; height: 220px; object-fit: contain; display: block; }
.cv-list { list-style: none; display: flex; flex-direction: column; gap: 14px; max-width: 520px; }
.cv-list li {
  font-size: 14px; line-height: 1.6; color: var(--ink-dim); padding-top: 12px;
  border-top: 1px solid var(--panel-line);
}

/* ── GALLERY SLIDER ── */
.gallery-slider { position: relative; height: 62vh; min-height: 380px; max-height: 620px; overflow: hidden; }
.slider-track { position: relative; width: 100%; height: 100%; }
.slide {
  position: absolute; inset: 0; background-position: center; background-size: cover;
  opacity: 0; transform: scale(1.06); transition: opacity 1s ease, transform 6s ease;
  display: flex; align-items: flex-end;
}
.slide.is-active { opacity: 1; transform: scale(1); z-index: 1; }
.slide:after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(4,9,12,.85) 0%, rgba(4,9,12,.15) 55%, transparent 100%);
}
.slide-caption { position: relative; z-index: 2; padding: 40px 5vw; color: var(--ink); }
.slide-title { font-family: var(--font-serif); font-size: clamp(22px, 3vw, 32px); display: block; }
.slide-desc { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-dim); display: block; margin-top: 6px; }
.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35);
  background: rgba(4,9,12,.35); color: var(--ink); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.slider-arrow:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.slider-prev { left: 20px; } .slider-next { right: 20px; }
.slider-dots { position: absolute; bottom: 20px; right: 5vw; z-index: 3; display: flex; gap: 8px; }
.slider-dot { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--ink); background: transparent; cursor: pointer; padding: 0; }
.slider-dot.is-active { background: var(--ink); }
@media (max-width: 720px) {
  .gallery-slider { height: 46vh; min-height: 280px; }
  .slider-arrow { width: 36px; height: 36px; font-size: 14px; }
}

/* ── INNER PAGES ── */
.page-header { padding: 160px 5vw 50px; border-bottom: 1px solid var(--panel-line); }
.page-header h1 { font-size: clamp(38px, 5vw, 56px); margin-top: 10px; }
.filter-bar { padding: 24px 5vw; border-bottom: 1px solid var(--panel-line); }
.filter-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-tabs a {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 8px 16px;
  border: 1px solid var(--panel-line); border-radius: 20px; color: var(--ink-dim);
}
.filter-tabs a.active, .filter-tabs a:hover { border-color: var(--accent); color: var(--ink); }

/* ── ARTICLE / EVENT DETAIL ── */
.back-link { margin-bottom: 20px; }
.article-featured img, .event-featured img { width: 100%; max-height: 520px; object-fit: contain; background: var(--bg-deep); display: block; }
.article-body { padding: 60px 5vw; max-width: 820px; font-size: 16px; line-height: 1.9; color: var(--ink-dim); }
.article-body h1, .article-body h2, .article-body h3 { color: var(--ink); font-family: var(--font-serif); margin: 30px 0 14px; }
.article-body p { margin-bottom: 18px; }
.article-body img { max-width: 100%; border-radius: 2px; margin: 20px 0; }
.article-body a { color: var(--accent); text-decoration: underline; }
.article-body ul, .article-body ol { margin: 0 0 18px 24px; }
.event-meta { display: flex; gap: 30px; flex-wrap: wrap; margin: 20px 0; color: var(--ink-dim); font-size: 14px; }
.event-meta strong { color: var(--ink); display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.event-body { padding: 40px 5vw 20px; max-width: 820px; color: var(--ink-dim); line-height: 1.9; }
.event-body img { max-width: 100%; border-radius: 2px; margin: 16px 0; }
.event-body h1, .event-body h2, .event-body h3 { color: var(--ink); font-family: var(--font-serif); margin: 20px 0 10px; }
.event-body a { color: var(--accent); text-decoration: underline; }
.event-schedule {
  margin: 30px auto 0; max-width: 820px; padding: 24px 28px;
  background: var(--bg-deep); border-inline-start: 3px solid var(--accent);
}
.event-schedule-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 10px; }
.event-schedule p { color: var(--ink); line-height: 1.9; font-size: 15px; }

/* ── VIDEOS ── */
.video-thumb {
  position: relative; width: 100%; height: 200px; background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.video-thumb:after { content: ""; position: absolute; inset: 0; background: rgba(4,9,12,.25); transition: background .25s; }
.video-card:hover .video-thumb:after { background: rgba(4,9,12,.05); }
.video-play {
  position: relative; z-index: 2; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%; background: rgba(4,9,12,.55);
  transition: transform .25s, background .25s;
}
.video-card:hover .video-play, .video-embed:hover .video-play { transform: scale(1.08); background: rgba(4,9,12,.75); }
.video-iframe-wrap { position: relative; width: 100%; padding-top: 56.25%; background: #000; }
.video-iframe-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video-embed {
  position: relative; width: 100%; padding-top: 56.25%; background-size: cover; background-position: center;
  background-color: var(--bg-deep); cursor: pointer;
}
.video-embed .video-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.video-embed:hover .video-play { transform: translate(-50%, -50%) scale(1.08); }
.video-embed-desc { color: var(--ink-dim); font-size: 14px; line-height: 1.8; margin-top: 18px; }

/* ── TEASERS (events / articles on homepage) ── */
.teaser-section { padding: 80px 5vw; border-top: 1px solid var(--panel-line); }
.teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.teaser-card {
  display: block; background: #0c1a21; border: 1px solid var(--panel-line); overflow: hidden;
  transition: transform .4s, box-shadow .4s, border-color .4s;
}
.teaser-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0,0,0,.35); border-color: var(--accent); }
.teaser-card img { width: 100%; height: 200px; object-fit: contain; background: #0c1a21; display: block; transition: transform .6s ease; }
.teaser-card:hover img { transform: scale(1.06); }
.teaser-body { padding: 18px 20px; }
.teaser-date { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.teaser-card h3 { font-size: 20px; margin-top: 8px; }
.teaser-card p { color: var(--ink-dim); font-size: 13px; margin-top: 8px; }

/* ── MOMENTS (exhibitions / studio photo strip) ── */
.moments { padding: 80px 5vw; border-top: 1px solid var(--panel-line); }
.moments h2 { font-size: clamp(28px, 3vw, 40px); margin: 8px 0 34px; }
.moments-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.moments-item {
  border: 1px solid var(--panel-line); overflow: hidden; background: #0c1a21;
  transition: transform .4s, box-shadow .4s, border-color .4s;
}
.moments-item:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0,0,0,.35); border-color: var(--accent); }
.moments-item img { width: 100%; height: 230px; object-fit: contain; background: #0c1a21; display: block; filter: saturate(0.9); transition: transform .6s ease, filter .4s; }
.moments-item:hover img { transform: scale(1.06); filter: saturate(1.05); }
.moments > .line-btn { margin-top: 30px; }

/* ── QUOTE ── */
.quote { padding: 100px 5vw; text-align: center; background: var(--bg-deep); }
.quote p { font: italic 34px/1.4 var(--font-serif); max-width: 720px; margin: 0 auto; color: var(--ink); }
.quote .author { margin-top: 22px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-dim); }

/* ── ABOUT (legacy anchor target kept for nav) ── */
.about { display: none; }

/* ── CONTACT ── */
.contact { padding: 90px 5vw; border-top: 1px solid var(--panel-line); }
.contact h2 { font-size: clamp(30px, 3.4vw, 44px); margin-bottom: 30px; text-align: center; }
.contact-form { max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.contact-form input, .contact-form textarea {
  padding: 12px 14px; border: 1px solid var(--panel-line); background: #0c1a21; color: var(--ink);
  font-family: inherit; font-size: 14px; border-radius: 2px;
}
.contact-form .btn { align-self: center; margin-top: 8px; }
.contact .success { text-align: center; color: #8fc99a; margin-bottom: 20px; }
.contact-details { text-align: center; margin-top: 26px; color: var(--ink-dim); font-size: 14px; }

.btn {
  display: inline-block; padding: 13px 32px; background: var(--ink); color: var(--bg);
  border-radius: 2px; border: none; font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer; transition: background .25s, color .25s, transform .25s, box-shadow .25s;
}
.btn:hover { background: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(201,169,122,.25); }
.btn:active { transform: translateY(0); }

/* ── FOOTER ── */
.site-footer { padding: 30px 5vw; border-top: 1px solid var(--panel-line); color: var(--ink-faint); font-size: 11px; letter-spacing: .05em; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.social-links { display: flex; gap: 16px; }
.social-links a:hover { color: var(--accent); }

/* ── LIGHTBOX ── */
[data-lightbox] { cursor: zoom-in; }
.lb-overlay {
  position: fixed; inset: 0; z-index: 1000; background: rgba(4, 9, 12, .96);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .35s ease;
}
.lb-overlay.is-open { opacity: 1; visibility: visible; }
.lb-stage { position: relative; width: min(90vw, 1100px); max-height: 88vh; display: flex; flex-direction: column; align-items: center; }
.lb-img-wrap { max-height: 76vh; display: flex; align-items: center; justify-content: center; width: 100%; }
.lb-img { max-width: 100%; max-height: 76vh; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,.5); opacity: 0; transition: opacity .3s ease; }
.lb-caption { text-align: center; margin-top: 18px; color: var(--ink); display: none; }
.lb-caption .lb-title { font-family: var(--font-serif); font-size: 20px; display: block; }
.lb-caption .lb-desc { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-dim); display: block; margin-top: 4px; }
.lb-counter { margin-top: 10px; font-size: 11px; letter-spacing: .1em; color: var(--ink-faint); }
.lb-close {
  position: absolute; top: 22px; right: 28px; z-index: 2; background: none; border: none;
  color: var(--ink); font-size: 34px; line-height: 1; cursor: pointer; opacity: .8;
}
.lb-close:hover { opacity: 1; color: var(--accent); }
.lb-nav {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--panel-line);
  background: rgba(255,255,255,.04); color: var(--ink); font-size: 20px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.lb-nav:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.lb-prev { left: 24px; }
.lb-next { right: 24px; }
@media (max-width: 720px) {
  .lb-nav { width: 42px; height: 42px; font-size: 16px; }
  .lb-prev { left: 10px; } .lb-next { right: 10px; }
  .lb-close { top: 14px; right: 16px; font-size: 28px; }
}

.not-found { text-align: center; padding: 160px 0; color: var(--ink); }
.not-found h1 { font-size: 4rem; }

@media (max-width: 850px) {
  .main-nav {
    position: fixed; inset: 0 0 0 auto; top: 0; height: 100vh; width: min(78vw, 340px);
    background: rgba(7,17,22,.98); backdrop-filter: blur(14px);
    flex-direction: column; align-items: flex-start; gap: 0; padding: 110px 32px 40px;
    transform: translateX(100%); transition: transform .4s ease; display: flex !important;
    border-left: 1px solid var(--panel-line); z-index: 90;
  }
  html[dir="rtl"] .main-nav { inset: 0 auto 0 0; border-left: none; border-right: 1px solid var(--panel-line); transform: translateX(-100%); }
  .main-nav.open, html[dir="rtl"] .main-nav.open { transform: translateX(0); }
  .main-nav a { width: 100%; padding: 16px 0; font-size: 15px; border-bottom: 1px solid var(--panel-line); }
  .main-nav a:after { display: none; }
  .nav-toggle { display: block; position: relative; z-index: 95; }
  .nav-toggle.open { color: var(--accent); }

  .split-body, .cv-section { grid-template-columns: 1fr; }
  .split-body > div:first-child, .cv-section > div:first-child { border-right: none; border-left: none; border-bottom: 1px solid var(--panel-line); }
  .gallery-grid, .moments-grid, .teaser-grid { grid-template-columns: repeat(2, 1fr); }
}
