/* ==========================================================================
   Kamel Barghouti — public website design system
   A gallery at night: warm ink walls, ivory type, a little brass, and the
   photographs as the only saturated things on the page.
   Admin pages use css/styles.css and never load this file.

   1 Tokens   2 Base   3 Header & footer   4 Shared components
   5 Home     6 Page heroes & gallery      7 Photo viewer
   8 Engagement & comments   9 Photo/video detail   10 Videos
   11 Long-form pages        12 Motion preferences
   ========================================================================== */

/* 1 ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  color-scheme: dark;
  --ink: #0d0c0a;
  --ink-2: #151310;
  --ink-3: #1e1b17;
  --line: rgba(243, 236, 222, .13);
  --line-strong: rgba(243, 236, 222, .28);
  --ivory: #f5efe3;
  --text: #e8e1d4;
  --muted: #b5ab9b;
  --brass: #cdae72;
  --brass-bright: #e6cf9f;
  --heart: #f0705c;
  --danger: #f2a897;

  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --tracking-label: .16em;
  --leading-display: 1.04;

  --gutter: clamp(16px, 4vw, 56px);
  --page: 1520px;
  --header-h: 68px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --flip: 1;
}
:root:lang(ar) {
  --font-display: 'Amiri', 'Noto Naskh Arabic', 'Geeza Pro', 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Tahoma, 'Geeza Pro', Arial, sans-serif;
  --tracking-label: 0;
  --leading-display: 1.3;
}
:root:lang(he) {
  --font-display: 'Frank Ruhl Libre', 'Times New Roman', David, serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Arial, 'Noto Sans Hebrew', sans-serif;
  --tracking-label: .02em;
  --leading-display: 1.12;
}
[dir='rtl'] { --flip: -1; }

/* 2 ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
html.kb-locked { overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: clip;
}
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 {
  margin: 0;
  color: var(--ivory);
  font-family: var(--font-display);
  font-weight: 300;
  line-height: var(--leading-display);
  overflow-wrap: break-word;
}
:root:lang(ar) h1, :root:lang(ar) h2, :root:lang(ar) h3 { font-weight: 400; }
p { margin: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brass-bright); outline-offset: 3px; }
::selection { background: var(--brass); color: var(--ink); }

.icon {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--fill { fill: currentColor; stroke: none; }
.icon--dir { transform: scaleX(var(--flip)); }
.flip { display: contents; --flip: -1; }
[dir='rtl'] .flip { --flip: 1; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ivory);
  color: var(--ink);
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.eyebrow {
  color: var(--brass);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
:root:lang(ar) .eyebrow, :root:lang(he) .eyebrow { font-size: .95rem; }

/* 3 ── Header & footer ────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 12, 10, .94);
  border-block-end: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--page);
  min-height: var(--header-h);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  min-width: 0;
  color: var(--ivory);
  text-decoration: none;
}
.brand__mark { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.22rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.menu-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-inline-end: -10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ivory);
}
.menu-toggle__close, .menu-toggle[aria-expanded='true'] .menu-toggle__open { display: none; }
.menu-toggle[aria-expanded='true'] .menu-toggle__close { display: block; }
html:not(.js) .menu-toggle { display: none; }

.site-menu {
  position: fixed;
  inset: calc(var(--header-h) + 1px) 0 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 32px var(--gutter) max(32px, env(safe-area-inset-bottom));
  overflow-y: auto;
  background: var(--ink);
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s ease, visibility .25s;
}
.site-menu.is-open { visibility: visible; opacity: 1; }
html:not(.js) .site-menu { position: static; visibility: visible; opacity: 1; padding: 0; flex-flow: row wrap; }
.primary-nav { display: flex; flex-direction: column; }
.primary-nav a {
  display: flex;
  align-items: center;
  min-height: 60px;
  border-block-end: 1px solid var(--line);
  color: var(--ivory);
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 300;
  text-decoration: none;
}
.primary-nav a[aria-current='page'] { color: var(--brass-bright); }

.lang-switch { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--muted);
  font-size: .95rem;
  text-decoration: none;
  transition: color .2s;
}
.lang-switch a:hover { color: var(--ivory); }
.lang-switch a[aria-current='true'] {
  color: var(--ivory);
  text-decoration: underline;
  text-decoration-color: var(--brass);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

@media (min-width: 900px) {
  .menu-toggle { display: none; }
  .site-menu {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: clamp(20px, 3vw, 44px);
    padding: 0;
    overflow: visible;
    background: none;
    visibility: visible;
    opacity: 1;
    transition: none;
  }
  .primary-nav { flex-direction: row; gap: clamp(16px, 2.4vw, 34px); }
  .primary-nav a {
    position: relative;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: .94rem;
    font-weight: 400;
    white-space: nowrap;
    transition: color .2s;
  }
  .primary-nav a::after {
    content: '';
    position: absolute;
    inset-inline: 0;
    bottom: 8px;
    height: 1px;
    background: var(--brass);
    transform: scaleX(0);
    transition: transform .3s var(--ease);
  }
  .primary-nav a:hover, .primary-nav a[aria-current='page'] { color: var(--ivory); }
  .primary-nav a:hover::after, .primary-nav a[aria-current='page']::after { transform: scaleX(1); }
  .site-menu .lang-switch { flex-wrap: nowrap; gap: 6px; padding-inline-start: clamp(20px, 3vw, 44px); border-inline-start: 1px solid var(--line); }
  .site-menu .lang-switch a { font-size: .85rem; white-space: nowrap; }
}

.site-footer { margin-block-start: clamp(56px, 8vw, 112px); border-block-start: 1px solid var(--line); }
.site-footer__inner {
  display: grid;
  gap: 28px;
  max-width: var(--page);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) max(32px, env(safe-area-inset-bottom));
}
.site-footer__name { color: var(--ivory); font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 300; line-height: 1.2; }
.site-footer__tagline { margin-block-start: 6px; color: var(--muted); }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 0 26px; }
.site-footer__nav a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: var(--text); text-decoration: none; }
.site-footer__nav a:hover { color: var(--brass-bright); }
.site-footer__copy { color: var(--muted); font-size: .84rem; }
@media (min-width: 900px) {
  .site-footer__inner { grid-template-columns: 1fr auto; align-items: end; }
  .site-footer__nav { justify-content: flex-end; }
  .site-footer__copy { grid-column: 2; grid-row: 2; text-align: end; }
  .site-footer .lang-switch { grid-column: 1; grid-row: 2; }
}

/* 4 ── Shared components ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 10px 26px;
  border: 1px solid transparent;
  background: none;
  font-size: .95rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  transition: background-color .25s, color .25s, border-color .25s;
}
.btn .icon { width: 16px; height: 16px; }
.btn--primary { background: var(--ivory); color: var(--ink); }
.btn--primary:hover { background: var(--brass-bright); }
.btn--ghost { border-color: var(--line-strong); color: var(--ivory); }
.btn--ghost:hover { border-color: var(--brass); color: var(--brass-bright); }
.btn:disabled { opacity: .6; cursor: progress; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ivory);
  text-decoration: none;
  transition: color .2s;
}
.text-link .icon { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.text-link:hover { color: var(--brass-bright); }
.text-link:hover .icon--dir { transform: scaleX(var(--flip)) translateX(4px); }
.text-link--back { --flip: -1; color: var(--muted); font-size: .92rem; }
[dir='rtl'] .text-link--back { --flip: 1; }
.text-link--quiet { color: var(--muted); font-size: .9rem; }
.text-link--quiet .icon { width: 15px; height: 15px; }
.text-button {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brass-bright);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(13, 12, 10, .4);
  color: var(--text);
  text-decoration: none;
  transition: color .2s, border-color .2s, background-color .2s;
}
.icon-btn .icon { width: 19px; height: 19px; }
.icon-btn:hover { border-color: var(--brass); color: var(--brass-bright); }
.icon-btn.is-copied { border-color: var(--brass); background: var(--brass); color: var(--ink); }

.section { max-width: var(--page); margin-inline: auto; padding: clamp(56px, 8vw, 112px) var(--gutter) 0; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-block-end: clamp(24px, 3.4vw, 44px); }
.section__head h2 { font-size: clamp(2.1rem, 4.6vw, 3.8rem); }
.section__head p { margin-block-start: 10px; max-width: 54ch; color: var(--muted); }

.empty-state { display: grid; justify-items: center; gap: 14px; padding: clamp(56px, 10vw, 120px) var(--gutter); text-align: center; }
.empty-state h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.empty-state p { color: var(--muted); }
.empty-state .btn { margin-block-start: 12px; }
.not-found { display: grid; align-content: center; justify-items: start; gap: 18px; width: min(100% - 2 * var(--gutter), 760px); min-height: 60vh; margin-inline: auto; padding-block: 64px; }
.not-found h1 { font-size: clamp(2.3rem, 6vw, 4.4rem); }
.not-found p:not(.eyebrow) { color: var(--muted); }
.ad-slot { max-width: var(--page); margin: 32px auto 0; padding-inline: var(--gutter); }

/* Photographs fade up once decoded; the delayed animation guarantees they can
   never stay invisible if a load event is missed. */
.js .tile img, .js .rail__item img, .js .collection__media img, .js .arch img,
.js .video-poster, .js .player__poster, .js .page-hero__art {
  opacity: 0;
  animation: kb-show .01s 3s forwards;
}
.js img.is-loaded { opacity: 1; animation: none; }
.js .page-hero__art.is-loaded { opacity: .46; }
@keyframes kb-show { to { opacity: 1; } }

/* 5 ── Home ───────────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  gap: 40px;
  max-width: var(--page);
  margin-inline: auto;
  padding: clamp(36px, 7vw, 88px) var(--gutter) 0;
}
.hero__copy { display: grid; justify-items: start; align-content: center; gap: 20px; }
.hero__name { font-size: clamp(3.3rem, 8.3vw, 8rem); letter-spacing: -.015em; }
:root:lang(ar) .hero__name, :root:lang(he) .hero__name { letter-spacing: 0; }
.hero__names { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: -6px 0 0; padding: 0; list-style: none; color: var(--brass-bright); font-size: 1.15rem; }
.hero__names li:lang(ar) { font-family: 'Amiri', var(--font-display); font-size: 1.3rem; }
.hero__names li:lang(he) { font-family: 'Frank Ruhl Libre', var(--font-display); }
.hero__names li:lang(en) { font-family: 'Fraunces', var(--font-display); }
.hero__intro { max-width: 56ch; color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.14rem); line-height: 1.75; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 8px; }

.hero__arcade { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: clamp(8px, 1.4vw, 20px); }
.arch { position: relative; display: block; overflow: hidden; aspect-ratio: 5 / 10.5; border-radius: 999px 999px 0 0; background: var(--ink-3); }
.arch img { width: 100%; height: 100%; object-fit: cover; }
.arch--1 { aspect-ratio: 5 / 9; }
.arch--3 { aspect-ratio: 5 / 8; }
.arch.is-broken { background: linear-gradient(180deg, var(--ink-3), var(--ink-2)); }
.arch.is-broken img { display: none; }
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(32px, 5vw, 88px); min-height: min(calc(100svh - var(--header-h)), 860px); padding-block-start: 32px; }
}

.rail {
  display: flex;
  gap: clamp(6px, .8vw, 12px);
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail__item { position: relative; flex: none; height: clamp(230px, 30vw, 400px); aspect-ratio: var(--r); overflow: hidden; background: var(--ink-3); scroll-snap-align: start; }
.rail__item img { width: 100%; height: 100%; object-fit: cover; transition: opacity .6s ease, transform .9s var(--ease); }
.rail__item:hover img { transform: scale(1.03); }
.rail__item:focus-visible { outline-offset: -3px; }
.rail-controls { display: flex; gap: 8px; }

.collections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(168px, 47vw, 300px); gap: clamp(6px, .8vw, 12px); }
.collection { position: relative; display: block; grid-column: span var(--sm); overflow: hidden; background: var(--ink-3); color: var(--ivory); text-decoration: none; isolation: isolate; }
.collection__media { position: absolute; inset: 0; display: block; }
.collection__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: opacity .7s ease, transform 1.2s var(--ease); }
.collection__media.is-broken img { display: none; }
.collection__monogram { display: grid; place-items: center; height: 100%; color: var(--brass); font-family: var(--font-display); font-size: 4rem; font-weight: 300; }
.collection::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(8, 7, 6, .9) 0%, rgba(8, 7, 6, .42) 38%, rgba(8, 7, 6, 0) 66%);
}
.collection__caption { position: absolute; inset: auto 0 0; z-index: 2; display: grid; gap: 4px; padding: clamp(12px, 1.8vw, 26px); transition: transform .5s var(--ease); }
.collection__index { display: inline-flex; justify-self: start; align-items: center; min-height: 16px; color: var(--brass-bright); font-size: .74rem; font-variant-numeric: tabular-nums; letter-spacing: .12em; }
.collection__index .icon { width: 14px; height: 14px; }
.collection__title { font-family: var(--font-display); font-size: clamp(1.08rem, 1.9vw, 1.7rem); font-weight: 300; line-height: 1.2; overflow-wrap: anywhere; }
:root:lang(ar) .collection__title { font-size: clamp(1.25rem, 2.1vw, 1.9rem); line-height: 1.4; font-weight: 400; }
.collection:focus-visible { outline-offset: -4px; }
.collection:active .collection__media img { transform: scale(1.07); }
@media (hover: hover) {
  .collection:hover .collection__media img { transform: scale(1.09); }
  .collection:hover .collection__caption { transform: translateY(-5px); }
}
@media (min-width: 700px) {
  .collections { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: clamp(220px, 30vw, 340px); }
  .collection { grid-column: span var(--md); }
}
@media (min-width: 1100px) {
  .collections { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: clamp(280px, 25vw, 400px); }
  .collection { grid-column: span var(--lg); }
}

.statement { display: grid; justify-items: center; gap: 24px; max-width: 900px; margin-inline: auto; padding: clamp(72px, 11vw, 150px) var(--gutter) 0; text-align: center; }
.statement__portrait { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; object-position: top; }
.statement blockquote { margin: 0; color: var(--ivory); font-family: var(--font-display); font-size: clamp(1.75rem, 4vw, 3.1rem); font-weight: 300; line-height: 1.28; }
:root:lang(ar) .statement blockquote { line-height: 1.6; font-weight: 400; }

/* 6 ── Page heroes & gallery ──────────────────────────────────────────────── */
.page-hero { position: relative; overflow: hidden; }
.page-hero__inner { position: relative; display: grid; justify-items: start; gap: 12px; max-width: var(--page); margin-inline: auto; padding: clamp(32px, 6vw, 72px) var(--gutter) clamp(28px, 4vw, 52px); }
.page-hero h1 { max-width: 20ch; font-size: clamp(2.5rem, 6.6vw, 5.8rem); }
.page-hero--collection .page-hero__inner { min-height: clamp(280px, 40vw, 480px); align-content: end; }
.page-hero--collection .text-link--back { position: absolute; top: clamp(12px, 2vw, 24px); inset-inline-start: var(--gutter); color: var(--text); }
.page-hero__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; opacity: .46; transition: opacity .9s ease; }
.page-hero--collection::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, var(--ink) 2%, rgba(13, 12, 10, .55) 52%, rgba(13, 12, 10, .3)); }
.page-hero--collection .page-hero__inner { z-index: 1; }
.page-hero__stat { display: flex; align-items: baseline; gap: 8px; color: var(--muted); }
.page-hero__stat strong { color: var(--ivory); font-family: 'Fraunces', var(--font-display); font-size: 1.3rem; font-weight: 400; }

/* Justified rows: every photograph keeps its full proportions, so quote text
   is never cropped, and reading order stays newest → oldest along each row. */
.gallery {
  --row: clamp(132px, 21vw, 320px);
  --gap: clamp(4px, .6vw, 10px);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--gap);
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.gallery::after { content: ''; flex: 9999 1 0; }
.tile {
  position: relative;
  display: block;
  flex: var(--r) 1 calc(var(--r) * var(--row));
  aspect-ratio: var(--r);
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  background: var(--ink-3);
  cursor: zoom-in;
}
.tile--hidden { display: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: opacity .6s ease, transform .9s var(--ease); }
.tile--contain img { object-fit: contain; }
.tile:focus-visible { outline-offset: -3px; z-index: 1; }
.tile:active img { transform: scale(1.015); }
@media (hover: hover) { .tile:hover img { transform: scale(1.03); } }
.tile.is-broken { cursor: default; }
.tile.is-broken img { display: none; }
.tile.is-broken::after { content: ''; position: absolute; inset: 50% auto auto 50%; width: 28px; height: 1px; margin-inline-start: -14px; background: var(--line-strong); }

.load-more { display: flex; justify-content: center; padding: clamp(32px, 5vw, 56px) var(--gutter) 0; }
.load-more .btn { flex-wrap: wrap; min-width: min(100%, 300px); }
.load-more__count { color: var(--muted); font-size: .85rem; font-weight: 400; }

/* 7 ── Photo viewer ───────────────────────────────────────────────────────── */
.lb {
  --top: calc(64px + env(safe-area-inset-top));
  --bar: calc(72px + env(safe-area-inset-bottom));
  --side: clamp(8px, 5.4vw, 88px);
  --panel: 0px;
  position: fixed;
  inset: 0;
  z-index: 1000;
  color: var(--text);
  overflow: hidden;
}
.lb__backdrop { position: absolute; inset: 0; background: #070605; opacity: 0; transition: opacity .35s ease; }
.lb.is-open .lb__backdrop { opacity: calc(1 - var(--drag, 0)); }
.lb__stage {
  position: absolute;
  inset-block: var(--top) var(--bar);
  inset-inline: var(--side) calc(var(--side) + var(--panel));
  display: grid;
  place-items: center;
  container-type: size;
  touch-action: pinch-zoom;
  transition: inset .3s var(--ease);
}
.lb__img {
  grid-area: 1 / 1;
  width: min(100cqw, calc(100cqh * var(--r, 1.33)));
  height: auto;
  max-height: 100%;
  aspect-ratio: var(--r, 1.33);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  cursor: pointer;
  will-change: transform;
}
.lb__spinner {
  grid-area: 1 / 1;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-block-start-color: var(--brass-bright);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.lb__stage.is-loading .lb__spinner { opacity: 1; transition: opacity .2s .25s; animation: kb-spin 1s linear infinite; }
@keyframes kb-spin { to { transform: rotate(360deg); } }
.lb__error { grid-area: 1 / 1; color: var(--muted); text-align: center; }

.lb__top, .lb__bar, .lb__nav { transition: opacity .25s ease, transform .3s var(--ease); }
.lb:not(.is-open) .lb__top, .lb:not(.is-open) .lb__bar, .lb:not(.is-open) .lb__nav { opacity: 0; }
.lb__top {
  position: absolute;
  inset: 0 var(--panel) auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--top);
  padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left));
}
[dir='rtl'] .lb__top { inset: 0 0 auto var(--panel); }
.lb__counter { color: var(--muted); font-size: .86rem; font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.lb__tools { display: flex; gap: 8px; }
.lb__nav {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-block-start: -24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(13, 12, 10, .5);
  color: var(--ivory);
}
.lb__nav:hover { background: rgba(243, 236, 222, .14); }
.lb__nav--prev { inset-inline-start: max(6px, env(safe-area-inset-left)); --flip: -1; }
.lb__nav--next { inset-inline-end: calc(max(6px, env(safe-area-inset-right)) + var(--panel)); }
[dir='rtl'] .lb__nav--prev { --flip: 1; }
.lb.is-single .lb__nav { display: none; }
.lb__bar {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--bar);
  padding: 0 10px env(safe-area-inset-bottom);
  padding-inline-end: calc(10px + var(--panel));
}
.lb.is-immersive { --top: 0px; --bar: 0px; --side: 0px; }
.lb.is-immersive .lb__bar, .lb.is-immersive .lb__nav { opacity: 0; pointer-events: none; visibility: hidden; }
.lb.is-immersive .lb__top { opacity: .55; background: none; }
.lb.is-immersive .lb__counter { visibility: hidden; }

.lb__panel {
  position: absolute;
  inset: auto 0 0;
  max-height: 86%;
  padding: 20px clamp(16px, 4vw, 26px) max(20px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--ink-2);
  border-block-start: 1px solid var(--line);
  animation: kb-sheet .35s var(--ease);
}
@keyframes kb-sheet { from { transform: translateY(32px); opacity: 0; } }
.lb__panel-close { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 1; }
.lb__panel .comments__head { padding-inline-end: 48px; }
@media (min-width: 1000px) {
  .lb.is-panel-open { --panel: 400px; }
  .lb__panel { inset: 0 0 0 auto; width: 400px; max-height: none; padding-block-start: 24px; border-block-start: 0; border-inline-start: 1px solid var(--line); }
  [dir='rtl'] .lb__panel { inset: 0 auto 0 0; }
  @keyframes kb-sheet { from { opacity: 0; } }
}
@media (max-width: 640px) {
  .lb { --top: calc(56px + env(safe-area-inset-top)); --side: 0px; }
  .lb__nav { width: 44px; height: 44px; margin-block-start: -22px; background: none; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .85)); }
}

.zoom { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)); background: #070605; opacity: 0; transition: opacity .25s ease; cursor: zoom-out; }
.zoom.is-open { opacity: 1; }
.zoom img { width: 100%; height: 100%; object-fit: contain; }
.zoom__close { position: absolute; top: max(12px, env(safe-area-inset-top)); inset-inline-end: 12px; }

/* 8 ── Engagement & comments ──────────────────────────────────────────────── */
.engage { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.share-cluster { display: flex; align-items: center; gap: 6px; padding-inline-start: 8px; margin-inline-start: 2px; border-inline-start: 1px solid var(--line); }
.like, .engage__comments {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 44px;
  height: 44px;
  padding-inline: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 12, 10, .4);
  color: var(--text);
  font-size: .92rem;
  font-variant-numeric: tabular-nums;
  transition: color .2s, border-color .2s, background-color .2s;
}
.like:hover, .engage__comments:hover { border-color: var(--line-strong); color: var(--ivory); }
.engage__comments[aria-expanded='true'] { border-color: var(--brass); color: var(--brass-bright); }
.engage__comments .icon { width: 20px; height: 20px; }
.like__heart { position: relative; display: grid; place-items: center; }
.like__heart .icon { width: 21px; height: 21px; transition: fill .25s, stroke .25s, transform .25s var(--ease); }
.like:hover:not([aria-pressed='true']) .like__heart .icon { stroke: var(--heart); transform: scale(1.08); }
.like:active:not([aria-pressed='true']) .like__heart .icon { transform: scale(.9); }
.like[aria-pressed='true'] { border-color: rgba(240, 112, 92, .5); color: var(--ivory); cursor: default; }
.like[aria-pressed='true'] .like__heart .icon { fill: var(--heart); stroke: var(--heart); }
.like[aria-busy='true'] { cursor: progress; }
.like[aria-busy='true'] .like__heart .icon { animation: kb-breathe .9s ease-in-out infinite; }
@keyframes kb-breathe { 50% { opacity: .35; transform: scale(.92); } }
.like.is-celebrating .like__heart .icon { animation: kb-heart .55s var(--ease); }
.like.is-celebrating .like__heart::after {
  content: '';
  position: absolute;
  inset: -3px;
  border: 1px solid var(--heart);
  border-radius: 50%;
  animation: kb-ring .65s ease-out forwards;
  pointer-events: none;
}
.like.is-celebrating .like__count { animation: kb-count .4s var(--ease); }
@keyframes kb-heart { 0% { transform: scale(.7); } 45% { transform: scale(1.22); } 100% { transform: scale(1); } }
@keyframes kb-ring { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
@keyframes kb-count { from { transform: translateY(5px); opacity: 0; } }

.kb-share-menu { position: fixed; z-index: 1100; min-width: 220px; max-width: min(92vw, 320px); padding: 6px; border: 1px solid var(--line-strong); background: var(--ink-3); box-shadow: 0 18px 50px rgba(0, 0, 0, .55); }
.kb-share-item { display: flex; align-items: center; width: 100%; min-height: 46px; padding: 8px 14px; border: 0; background: none; color: var(--text); font-size: .95rem; text-align: start; text-decoration: none; }
.kb-share-item:hover, .kb-share-item:focus-visible { background: rgba(243, 236, 222, .09); color: var(--ivory); outline-offset: -2px; }
.kb-toast {
  position: fixed;
  left: 50%;
  bottom: max(88px, calc(env(safe-area-inset-bottom) + 80px));
  z-index: 1200;
  max-width: min(92vw, 440px);
  padding: 11px 20px;
  background: var(--ivory);
  color: var(--ink);
  font-size: .92rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity .2s, transform .25s var(--ease);
}
.kb-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.comments__head { display: grid; gap: 6px; margin-block-end: 20px; }
.comments__head h2 { display: flex; align-items: baseline; gap: 10px; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.comments__count { color: var(--brass); font-family: 'Fraunces', var(--font-display); font-size: 1rem; font-variant-numeric: tabular-nums; }
.comments__note { color: var(--muted); font-size: .88rem; }
.comments__list { display: grid; }
.comment { display: flex; gap: 14px; padding-block: 18px; border-block-start: 1px solid var(--line); }
.comment__avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--brass-bright); font-family: var(--font-display); font-size: 1.05rem; }
.comment__body { flex: 1; min-width: 0; }
.comment__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.comment__name { color: var(--ivory); font-weight: 600; overflow-wrap: anywhere; }
.comment__date { color: var(--muted); font-size: .8rem; }
.comment__text { margin-block-start: 5px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; text-align: start; }
.comments__empty { display: grid; justify-items: start; gap: 2px; padding-block: 20px; border-block-start: 1px solid var(--line); }
.comments__empty-title { color: var(--ivory); font-family: var(--font-display); font-size: 1.3rem; font-weight: 300; }
.comments__empty-body { color: var(--muted); }

.composer { display: grid; gap: 14px; padding-block-start: 22px; border-block-start: 1px solid var(--line); }
.composer__toggle { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; border: 1px solid var(--line-strong); background: none; color: var(--ivory); }
.composer__toggle:hover { border-color: var(--brass); color: var(--brass-bright); }
.composer__toggle .icon { width: 18px; height: 18px; }
.composer__toggle[aria-expanded='true'] { display: none; }
.comments.is-composer-collapsed .comment-form { display: none; }
.comment-form, .comment-form-body { display: grid; gap: 16px; }
.comment-form { position: relative; justify-items: start; }
.comment-form-body { width: 100%; }
.field { display: grid; gap: 6px; }
.field label { color: var(--text); font-size: .88rem; }
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--ink);
  color: var(--ivory);
  font-size: 16px;
  transition: border-color .2s;
  appearance: none;
}
.field textarea { min-height: 112px; resize: vertical; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: #8f8677; opacity: 1; }
.field input:focus, .field textarea:focus { border-color: var(--brass-bright); outline: 1px solid var(--brass-bright); outline-offset: 0; }
.field [aria-invalid='true'] { border-color: var(--danger); }
.field__error { color: var(--danger); font-size: .85rem; }
.field__error:empty { display: none; }
.field__foot { display: flex; justify-content: space-between; gap: 12px; }
.field__count { margin-inline-start: auto; color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.field__count.is-near { color: var(--brass-bright); }
.comment-feedback { display: grid; justify-items: start; gap: 4px; padding: 16px 18px; border: 1px solid var(--line-strong); border-inline-start: 2px solid var(--brass); background: var(--ink-3); }
.comment-feedback--error { border-inline-start-color: var(--danger); }
.comment-feedback__title { color: var(--ivory); font-family: var(--font-display); font-size: 1.15rem; font-weight: 400; }
.comment-feedback__message { color: var(--text); font-size: .93rem; }
.hp-field { position: absolute; inset-block-start: 0; inset-inline-start: 0; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; opacity: 0; pointer-events: none; }

/* 9 ── Photo & video detail ───────────────────────────────────────────────── */
.detail { width: min(100% - 2 * var(--gutter), 1240px); margin-inline: auto; padding-block-start: 14px; }
.photo-figure { display: grid; justify-items: center; gap: 14px; margin: 10px 0 0; }
.photo-figure__zoom { display: block; max-width: 100%; padding: 0; border: 0; background: var(--ink-3); cursor: zoom-in; aspect-ratio: var(--r); width: min(100%, calc(min(82svh, 1040px) * var(--r))); }
.photo-figure__zoom img { width: 100%; height: 100%; object-fit: contain; }
.photo-figure figcaption { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 10px; color: var(--muted); font-size: .9rem; }
.photo-figure figcaption { align-items: center; }
.photo-figure figcaption a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.detail__actions { display: flex; justify-content: center; margin-block-start: 22px; }
.detail__comments { width: min(100%, 720px); margin: clamp(40px, 6vw, 72px) auto 0; }

.watch__layout { display: grid; gap: clamp(20px, 3vw, 36px); margin-block-start: 8px; }
.watch__stage { min-width: 0; }
.player { position: relative; width: min(100%, calc(78svh * var(--r))); aspect-ratio: var(--r); margin-inline: auto; overflow: hidden; background: #000; }
.player__poster { width: 100%; height: 100%; object-fit: cover; }
.player.is-playing .player__poster { visibility: hidden; }
.player__play { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); }
.player__play:focus-visible { outline-offset: -4px; }
.player__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play-mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(245, 239, 227, .94); color: var(--ink); transition: transform .35s var(--ease), background-color .25s; }
.play-mark .icon { width: 26px; height: 26px; margin-inline-start: 3px; }
[dir='rtl'] .play-mark .icon { margin-inline: 0 3px; transform: none; }
.play-mark--lg { width: 84px; height: 84px; }
.play-mark--lg .icon { width: 32px; height: 32px; }
.player__play:hover .play-mark, .video-card:hover .play-mark, .video-feature__media:hover .play-mark { transform: scale(1.08); background: var(--brass-bright); }
.watch__info { display: grid; justify-items: start; align-content: start; gap: 14px; min-width: 0; }
.watch__info h1 { font-size: clamp(1.9rem, 4vw, 3.2rem); }
.watch__desc { max-width: 68ch; color: var(--muted); line-height: 1.75; overflow-wrap: anywhere; }
.watch .detail__actions { margin-block-start: 6px; justify-content: flex-start; }
.watch .engage { justify-content: flex-start; }
.watch .detail__comments { width: 100%; max-width: 720px; margin: 28px 0 0; }
@media (min-width: 860px) {
  .watch.is-portrait .watch__layout { grid-template-columns: auto minmax(0, 1fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
  .watch.is-portrait .watch__stage { position: sticky; top: calc(var(--header-h) + 18px); }
  .watch.is-portrait .player { width: calc(min(82svh, 860px) * var(--r)); }
}

/* 10 ── Videos ────────────────────────────────────────────────────────────── */
.video-poster { width: 100%; height: 100%; object-fit: cover; transition: opacity .6s ease, transform .9s var(--ease); }
.video-feature { display: grid; gap: clamp(20px, 3vw, 56px); align-items: center; max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }
.video-feature__media { position: relative; display: grid; place-items: center; justify-self: center; width: min(100%, calc(72svh * var(--r))); aspect-ratio: var(--r); overflow: hidden; background: var(--ink-3); }
.video-feature__media img { position: absolute; inset: 0; }
.video-feature__media .play-mark { position: relative; }
.video-feature__copy { display: grid; justify-items: start; gap: 14px; min-width: 0; }
.video-feature__copy h2 { font-size: clamp(2rem, 4.6vw, 4rem); }
.video-feature__copy h2 a { text-decoration: none; }
.video-feature__copy p:not(.eyebrow) { color: var(--muted); }
.clamp-4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.video-feature__copy .btn { margin-block-start: 8px; }
@media (min-width: 860px) {
  .video-feature { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .video-feature.is-portrait { grid-template-columns: auto minmax(0, 1fr); }
  .video-feature.is-portrait .video-feature__media { width: calc(min(74svh, 720px) * var(--r)); }
}
.video-grid {
  --row: clamp(210px, 25vw, 400px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(26px, 3vw, 44px) clamp(8px, 1vw, 16px);
  max-width: var(--page);
  margin: clamp(48px, 7vw, 96px) auto 0;
  padding-inline: var(--gutter);
}
.video-grid::after { content: ''; flex: 9999 1 0; }
.video-card { display: grid; align-content: start; gap: 10px; flex: var(--r) 1 calc(var(--r) * var(--row)); min-width: 132px; max-width: 100%; color: inherit; text-decoration: none; }
.video-card__media { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: var(--r); overflow: hidden; background: var(--ink-3); }
.video-card__media img { position: absolute; inset: 0; }
.video-card__media .play-mark { position: relative; width: 50px; height: 50px; opacity: .92; }
.video-card__media .play-mark .icon { width: 20px; height: 20px; }
.video-card:hover .video-poster { transform: scale(1.03); }
.video-card:focus-visible { outline-offset: 4px; }
.video-card__title { color: var(--ivory); font-family: var(--font-display); font-size: 1.12rem; line-height: 1.3; overflow-wrap: anywhere; }
:root:lang(ar) .video-card__title { line-height: 1.5; font-size: 1.2rem; }
.video-card__desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: .88rem; }
.is-poster-missing .play-mark { background: var(--line-strong); color: var(--ivory); }

/* 11 ── Long-form pages ───────────────────────────────────────────────────── */
.about-hero { display: grid; gap: 32px; max-width: var(--page); margin-inline: auto; padding: clamp(32px, 6vw, 80px) var(--gutter) 0; }
.about-hero__copy { display: grid; justify-items: start; align-content: center; gap: 16px; }
.about-hero h1 { font-size: clamp(3rem, 8vw, 7.2rem); }
.about-hero__role { max-width: 52ch; color: var(--brass-bright); font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.6; }
.about-hero__lead { max-width: 30ch; color: var(--ivory); font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 2.2rem); font-weight: 300; line-height: 1.35; }
.about-hero__portrait { justify-self: center; width: min(100%, 420px); aspect-ratio: 4 / 5; overflow: hidden; border-radius: 999px 999px 0 0; background: var(--ink-3); }
.about-hero__portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.about-hero__monogram { display: grid; place-items: center; height: 100%; color: var(--brass); font-family: var(--font-display); font-size: 6rem; }
@media (min-width: 900px) { .about-hero { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); align-items: end; gap: 64px; } }

.longform { display: grid; width: min(100% - 2 * var(--gutter), 1120px); margin: clamp(48px, 7vw, 96px) auto 0; }
.longform__section { display: grid; gap: 14px; padding-block: clamp(28px, 4vw, 48px); border-block-start: 1px solid var(--line); }
.longform__section h2 { font-size: clamp(1.55rem, 2.6vw, 2.2rem); }
.longform__body { display: grid; gap: 16px; max-width: 68ch; font-size: 1.05rem; line-height: 1.85; }
.longform__body a { color: var(--brass-bright); text-underline-offset: 4px; overflow-wrap: anywhere; }
.longform__note { padding-inline-start: 16px; border-inline-start: 1px solid var(--brass); color: var(--muted); font-size: .96rem; }
.longform__list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.longform__list li { position: relative; padding-inline-start: 22px; }
.longform__list li::before { content: ''; position: absolute; top: .85em; inset-inline-start: 0; width: 10px; height: 1px; background: var(--brass); }
.longform__quote { margin: 0; color: var(--ivory); font-family: var(--font-display); font-size: clamp(1.4rem, 2.5vw, 2rem); font-weight: 300; line-height: 1.45; }
.longform__meta { color: var(--muted); font-size: .9rem; }
.contact-email { font-family: var(--font-display); font-size: clamp(1.3rem, 3.4vw, 2.1rem); line-height: 1.3; }
.contact-email a { color: var(--ivory); text-decoration-color: var(--brass); text-decoration-thickness: 1px; }
@media (min-width: 860px) { .longform__section { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; } }

.about-share { display: grid; justify-items: center; gap: 20px; max-width: 720px; margin-inline: auto; padding: clamp(56px, 8vw, 96px) var(--gutter) 0; text-align: center; }
.about-share p { color: var(--ivory); font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 1.8rem); font-weight: 300; line-height: 1.45; }
.about-share__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* 12 ── Motion preferences ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .arch { animation: kb-rise 1s var(--ease) both; }
  .arch--2 { animation-delay: .12s; }
  .arch--3 { animation-delay: .24s; }
  .hero__copy > * { animation: kb-rise .9s var(--ease) both; }
  .hero__copy > :nth-child(2) { animation-delay: .06s; }
  .hero__copy > :nth-child(3) { animation-delay: .12s; }
  .hero__copy > :nth-child(4) { animation-delay: .18s; }
  .hero__copy > :nth-child(5) { animation-delay: .24s; }
  @keyframes kb-rise { from { opacity: 0; transform: translateY(18px); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}
