/* =========================================================
   Marouane Kamali — Studio
   Editorial / Atelier aesthetic. Light only.
   ========================================================= */

:root {
  /* palette */
  --paper:        #F2EDE4;
  --paper-2:      #E9E2D4;
  --paper-3:      #DDD4C0;
  --ink:          #1A1612;
  --ink-2:        #3A332A;
  --ink-mute:     #6E665A;
  --rule:         #C9C0AC;
  --accent:       #E5462A;
  --accent-deep:  #B43818;
  --olive:        #5C5638;

  /* typography */
  --serif:  'Fraunces', 'Instrument Serif', 'Cormorant Garamond', Georgia, serif;
  --sans:   'Manrope', 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono:   'JetBrains Mono', 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --arab-display:    'Reem Kufi', 'El Messiri', 'Tajawal', sans-serif;     /* geometric kufic — big impact */
  --arab-display-2:  'El Messiri', 'Reem Kufi', 'Cairo', serif;             /* flowing display — section heads */
  --arab-editorial:  'Amiri', 'Reem Kufi', Georgia, serif;                  /* classical naskh — pulls & accents */
  --arab-body:       'IBM Plex Sans Arabic', 'Tajawal', 'Cairo', sans-serif;

  /* spatial */
  --gutter: clamp(20px, 4vw, 56px);
  --rule-w: 1px;
  --max:   1640px;

  /* motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html[dir="rtl"] body {
  font-family: var(--arab-body);
  font-size: 18px;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--ink); color: var(--paper); }

/* =========================================================
   Grain overlay — subtle paper texture, fixed across page
   ========================================================= */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.06;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Soft warm gradient under everything for depth */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(60% 40% at 80% 0%,  rgba(229,70,42,0.05), transparent 70%),
    radial-gradient(50% 50% at 0% 100%, rgba(92,86,56,0.08), transparent 65%),
    linear-gradient(180deg, var(--paper), var(--paper-2));
}

/* =========================================================
   Custom cursor (desktop only)
   ========================================================= */
@media (hover: hover) and (pointer: fine) {
  html { cursor: none; }
  a, button, [data-cursor] { cursor: none; }

  .cursor {
    position: fixed;
    top: 0; left: 0;
    width: 14px; height: 14px;
    border: 1.5px solid var(--ink);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width .25s var(--ease), height .25s var(--ease),
                background .2s var(--ease), border-color .2s var(--ease);
    mix-blend-mode: multiply;
  }
  .cursor.is-hover {
    width: 48px; height: 48px;
    background: var(--accent);
    border-color: var(--accent);
  }
  .cursor.is-hover-light {
    width: 32px; height: 32px;
    background: var(--ink);
  }
}
@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}

/* =========================================================
   Layout shell
   ========================================================= */
.shell {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

/* Side rails — vertical mono labels */
.rail {
  position: fixed;
  top: 0; bottom: 0;
  width: var(--gutter);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
  pointer-events: none;
}
.rail--left  { left: 0; }
.rail--right { right: 0; }

.rail__text {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  writing-mode: vertical-rl;
  white-space: nowrap;
  pointer-events: auto;
}
.rail--left .rail__text { transform: rotate(180deg); }
html[dir="rtl"] .rail--left .rail__text { transform: none; }
html[dir="rtl"] .rail--right .rail__text { transform: rotate(180deg); }

@media (max-width: 900px) {
  .rail { display: none; }
}

/* =========================================================
   Top bar
   ========================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.topbar__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 18px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.01em;
}
html[dir="rtl"] .brand { font-family: var(--arab-display); font-weight: 600; }
.brand__mark {
  width: 22px; height: 22px;
  border: 1.4px solid var(--ink);
  border-radius: 50%;
  position: relative;
  display: inline-block;
}
.brand__mark::after {
  content: "";
  position: absolute; inset: 4px;
  background: var(--accent);
  border-radius: 50%;
}

.nav {
  display: flex; gap: 28px; justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
html[dir="rtl"] .nav { font-family: var(--arab-body); letter-spacing: 0; font-size: 14px; text-transform: none; font-weight: 600; }

.nav a {
  position: relative;
  padding: 6px 0;
  color: var(--ink-2);
  transition: color .25s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

@media (max-width: 800px) {
  .nav { display: none; }
}

.lang-switch {
  display: flex; align-items: center; gap: 2px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 4px;
  background: var(--paper);
}
.lang-switch a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--ink-mute);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a.is-active {
  background: var(--ink);
  color: var(--paper);
}

/* =========================================================
   Section scaffolding
   ========================================================= */
.section {
  position: relative;
  padding: clamp(80px, 12vw, 160px) 0;
}

.section__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-bottom: clamp(40px, 6vw, 80px);
  position: relative;
}
@media (min-width: 900px) {
  .section__head {
    grid-template-columns: 1.05fr 1fr;
    align-items: end;
  }
}

.section__index {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(72px, 14vw, 200px);
  line-height: 0.85;
  color: var(--accent);
  letter-spacing: -0.02em;
  user-select: none;
}
html[dir="rtl"] .section__index { font-family: var(--arab-display); font-style: normal; font-weight: 700; }

.section__kicker {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 18px;
}
html[dir="rtl"] .section__kicker { font-family: var(--arab-body); letter-spacing: 0; font-size: 14px; text-transform: none; font-weight: 600; }

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  margin: 0;
}
.display em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
html[dir="rtl"] .display {
  font-family: var(--arab-display-2);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
}
html[dir="rtl"] .display em { font-style: normal; font-weight: 700; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  padding: clamp(60px, 9vw, 130px) 0 clamp(40px, 6vw, 80px);
  overflow: hidden;
}

.hero__eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 36px;
}
.hero__eyebrow::before {
  content: "";
  width: 32px; height: 1px; background: var(--accent);
}
html[dir="rtl"] .hero__eyebrow { font-family: var(--arab-body); letter-spacing: 0; font-size: 14px; text-transform: none; font-weight: 600; }

.hero__name {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  font-size: clamp(80px, 17vw, 260px);
  line-height: 0.86;
  letter-spacing: -0.045em;
  margin: 0;
}
html[dir="rtl"] .hero__name {
  font-family: var(--arab-display);
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.08;
}
.hero__name span { display: block; }
.hero__name .ital {
  font-style: italic;
  color: var(--accent);
  padding-left: 2vw;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
html[dir="rtl"] .hero__name .ital { font-style: normal; padding-left: 0; padding-right: 2vw; }

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: clamp(40px, 6vw, 70px);
}
@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: 1.15fr 1fr;
    gap: 60px;
    align-items: end;
  }
}

.hero__lede {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.32;
  letter-spacing: -0.012em;
  max-width: 38ch;
  font-variation-settings: "opsz" 36;
}
.hero__lede em {
  font-style: italic;
  color: var(--accent);
}
html[dir="rtl"] .hero__lede {
  font-family: var(--arab-body);
  font-weight: 500;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.65;
  letter-spacing: 0;
}
html[dir="rtl"] .hero__lede em { font-style: normal; font-weight: 700; }

.hero__meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 32px;
  font-family: var(--mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  border-top: 1px solid var(--rule);
  padding-top: 26px;
}
html[dir="rtl"] .hero__meta { font-family: var(--arab-body); font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 500; }

.hero__meta dt { color: var(--ink-mute); margin: 0; }
.hero__meta dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.1em;
}
.hero__meta dd .dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: #2C8A3D;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 0 4px rgba(44,138,61,0.18);
}
html[dir="rtl"] .hero__meta dd .dot { margin-right: 0; margin-left: 8px; }

.hero__ctas {
  margin-top: 36px;
  display: flex; flex-wrap: wrap; gap: 14px;
}

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease);
  position: relative;
}
html[dir="rtl"] .btn { font-family: var(--arab-body); letter-spacing: 0; font-size: 14px; text-transform: none; font-weight: 600; }
.btn:hover { transform: translateY(-2px); background: var(--accent); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn__arrow {
  display: inline-block;
  transition: transform .35s var(--ease);
}
.btn:hover .btn__arrow { transform: translateX(4px); }
html[dir="rtl"] .btn:hover .btn__arrow { transform: translateX(-4px); }

/* Hero decorative card — small atelier "stamp" */
.hero__stamp {
  position: absolute;
  top: 12%;
  right: calc(var(--gutter) + 20px);
  width: 130px; height: 130px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  text-align: center;
  background: radial-gradient(circle at 30% 30%, var(--paper), var(--paper-2));
  animation: spin 30s linear infinite;
  box-shadow: 0 18px 40px -20px rgba(26,22,18,0.25);
}
.hero__stamp span {
  display: inline-block;
  transform: rotate(0);
}
.hero__stamp::before {
  content: "★";
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  font-size: 18px;
  color: var(--accent);
  animation: spin 30s linear infinite reverse;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@media (max-width: 900px) {
  .hero__stamp { display: none; }
}

/* =========================================================
   Marquee
   ========================================================= */
.marquee {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 22px 0;
  background: var(--ink);
  color: var(--paper);
}
.marquee__track {
  display: flex;
  gap: 56px;
  white-space: nowrap;
  animation: scroll 40s linear infinite;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 4.6vw, 64px);
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
html[dir="rtl"] .marquee__track {
  font-family: var(--arab-display);
  font-style: normal;
  font-weight: 700;
  animation-direction: reverse;
  letter-spacing: 0;
}
.marquee__track > span { display: inline-block; }
.marquee__track .star {
  color: var(--accent);
  font-style: normal;
  margin: 0 8px;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =========================================================
   Manifesto
   ========================================================= */
.manifesto__body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 40px;
}
@media (min-width: 900px) {
  .manifesto__body {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 48px;
  }
}
.manifesto__col p {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0;
}
html[dir="rtl"] .manifesto__col p { font-size: 17.5px; line-height: 1.85; }
.manifesto__col--lead p {
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
  line-height: 1.4;
  color: var(--ink);
}
html[dir="rtl"] .manifesto__col--lead p {
  font-family: var(--arab-editorial);
  font-style: normal;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.7;
}

.pull {
  margin-top: clamp(60px, 8vw, 120px);
  padding: 60px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(28px, 4vw, 54px);
  line-height: 1.2;
  letter-spacing: -0.018em;
  color: var(--ink);
  text-align: center;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  position: relative;
}
html[dir="rtl"] .pull {
  font-family: var(--arab-editorial);
  font-style: normal;
  font-weight: 700;
  line-height: 1.7;
  letter-spacing: 0;
}
html[dir="rtl"] .pull::before, html[dir="rtl"] .pull::after { content: "❉"; }
.pull::before, .pull::after {
  content: "✺";
  display: block;
  font-size: 18px;
  color: var(--accent);
  margin: 0 auto 22px;
  font-style: normal;
}
.pull::after { margin: 22px auto 0; }

/* =========================================================
   Disciplines
   ========================================================= */
.disciplines {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.discipline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 50px 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
  transition: background .5s var(--ease);
}
@media (min-width: 900px) {
  .discipline {
    grid-template-columns: 90px 1.3fr 2fr 1fr;
    gap: 40px;
    align-items: start;
    padding: 64px 16px;
  }
}
.discipline:hover { background: var(--paper-2); }
.discipline:hover .discipline__title em { letter-spacing: 0; }

.discipline__num {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
}
html[dir="rtl"] .discipline__num { font-family: var(--arab-body); font-size: 18px; letter-spacing: 0; font-weight: 600; }

.discipline__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0;
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
.discipline__title em {
  font-style: italic;
  color: var(--accent);
  display: inline-block;
  letter-spacing: -0.015em;
  transition: letter-spacing .6s var(--ease);
}
html[dir="rtl"] .discipline__title {
  font-family: var(--arab-display);
  font-weight: 700;
  letter-spacing: -0.003em;
  line-height: 1.25;
}
html[dir="rtl"] .discipline__title em { font-style: normal; font-weight: 700; }

.discipline__lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
  max-width: 50ch;
}
html[dir="rtl"] .discipline__lede { font-size: 18px; line-height: 1.85; }

.discipline__list {
  list-style: none;
  margin: 0; padding: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
html[dir="rtl"] .discipline__list { font-family: var(--arab-body); font-size: 16px; letter-spacing: 0; font-weight: 500; }
.discipline__list li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--rule);
}
.discipline__list li::before {
  content: "→";
  color: var(--accent);
  font-family: var(--mono);
}
html[dir="rtl"] .discipline__list li::before { content: "←"; }

/* =========================================================
   Selected work
   ========================================================= */
.work__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px 32px;
}
@media (min-width: 900px) {
  .work__grid {
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 10px;
  }
}

.work__item {
  position: relative;
  display: block;
  overflow: hidden;
}
.work__media {
  position: relative;
  overflow: hidden;
  background: var(--paper-3);
}
.work__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(26,22,18,0.18));
  opacity: 0;
  transition: opacity .6s var(--ease);
}
.work__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease), filter .6s var(--ease);
  filter: saturate(0.92) contrast(1.02);
}
.work__item:hover .work__media img { transform: scale(1.05); filter: saturate(1) contrast(1.05); }
.work__item:hover .work__media::after { opacity: 1; }

.work__caption {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
  padding: 18px 4px 0;
  border-top: 1px solid var(--rule);
  margin-top: 18px;
}
.work__title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.012em;
  margin: 0;
  max-width: 28ch;
}
html[dir="rtl"] .work__title { font-family: var(--arab-display); font-weight: 600; letter-spacing: 0; line-height: 1.4; }
.work__meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  white-space: nowrap;
}
html[dir="rtl"] .work__meta { font-family: var(--arab-body); font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 500; }

@media (min-width: 900px) {
  .work__item--a { grid-column: span 7; grid-row: span 38; }
  .work__item--b { grid-column: span 5; grid-row: span 30; align-self: end; }
  .work__item--c { grid-column: span 5; grid-row: span 28; }
  .work__item--d { grid-column: span 7; grid-row: span 36; }
  .work__item--e { grid-column: span 6; grid-row: span 32; }
  .work__item--f { grid-column: span 6; grid-row: span 26; align-self: start; padding-top: 60px; }
  .work__item .work__media { height: 100%; min-height: 280px; }
}

/* =========================================================
   Selected Work — editorial spreads
   ========================================================= */
.work-list {
  display: flex;
  flex-direction: column;
  gap: clamp(60px, 9vw, 140px);
  border-top: 1px solid var(--rule);
  padding-top: clamp(60px, 8vw, 120px);
}

.work-piece {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  position: relative;
}
@media (min-width: 980px) {
  .work-piece {
    grid-template-columns: 1.18fr 1fr;
    gap: 60px;
    align-items: center;
  }
  .work-piece--b { direction: rtl; }
  .work-piece--b > * { direction: ltr; }
  html[dir="rtl"] .work-piece--b { direction: ltr; }
  html[dir="rtl"] .work-piece--b > * { direction: rtl; }
}

/* Media — site screenshot in a paper "frame" */
.work-piece__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 11;
  background: var(--paper-3);
  overflow: hidden;
  border-radius: 4px;
  box-shadow:
    0 1px 0 rgba(26,22,18,0.18),
    0 30px 60px -28px rgba(26,22,18,0.35),
    0 12px 24px -16px rgba(26,22,18,0.20);
  isolation: isolate;
}
.work-piece__media::before {
  /* fake browser chrome bar */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 28px;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  border-bottom: 1px solid var(--rule);
  z-index: 2;
}
.work-piece__media::after {
  /* three-dot row inside the chrome */
  content: "● ● ●";
  position: absolute;
  top: 8px; left: 14px;
  font-size: 8px;
  letter-spacing: 4px;
  color: var(--ink-mute);
  z-index: 3;
}
html[dir="rtl"] .work-piece__media::after { left: auto; right: 14px; }

.work-piece__shot {
  position: absolute;
  inset: 28px 0 0 0;
  overflow: hidden;
  background: var(--paper-2);
}
.work-piece__shot img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 1.2s var(--ease), filter .8s var(--ease);
  filter: saturate(0.96) contrast(1.02);
}
.work-piece__media:hover .work-piece__shot img {
  transform: scale(1.04);
  filter: saturate(1.05) contrast(1.04);
}

.work-piece__visit {
  position: absolute;
  bottom: 18px; left: 18px;
  z-index: 4;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), background .35s var(--ease);
}
html[dir="rtl"] .work-piece__visit {
  font-family: var(--arab-body);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
  left: auto; right: 18px;
}
.work-piece__media:hover .work-piece__visit {
  opacity: 1;
  transform: none;
  background: var(--accent);
}

/* WIP — diagonal hatch overlay & coral border */
.work-piece.is-wip .work-piece__media {
  outline: 1px dashed var(--accent);
  outline-offset: -1px;
}
.work-piece.is-wip .work-piece__shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(229,70,42,0.08) 0 2px,
    transparent 2px 14px
  );
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* Body */
.work-piece__body { position: relative; }

.work-piece__top {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px;
}

.work-piece__num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 5px 12px;
}
html[dir="rtl"] .work-piece__num {
  font-family: var(--arab-body);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
}

.work-piece__status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}
html[dir="rtl"] .work-piece__status {
  font-family: var(--arab-body);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
}
.work-piece__status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  display: inline-block;
}
.work-piece__status--live {
  background: rgba(44,138,61,0.10);
  color: #1F6E2F;
}
.work-piece__status--live .dot {
  background: #2C8A3D;
  box-shadow: 0 0 0 4px rgba(44,138,61,0.18);
  animation: pulse 2.6s var(--ease) infinite;
}
.work-piece__status--wip {
  background: rgba(229,70,42,0.10);
  color: var(--accent-deep);
}
.work-piece__status--wip .dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(229,70,42,0.18);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(44,138,61,0.18); }
  50%      { box-shadow: 0 0 0 7px rgba(44,138,61,0.04); }
}

.work-piece__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5.2vw, 72px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
html[dir="rtl"] .work-piece__title {
  font-family: var(--arab-display);
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.1;
}

.work-piece__kicker {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.4;
  letter-spacing: -0.012em;
  color: var(--accent);
  margin: 0 0 22px;
  font-variation-settings: "opsz" 36, "SOFT" 100;
  max-width: 38ch;
}
html[dir="rtl"] .work-piece__kicker {
  font-family: var(--arab-editorial);
  font-style: italic;
  font-weight: 700;
  line-height: 1.6;
}

.work-piece__desc {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 26px;
  max-width: 52ch;
}
html[dir="rtl"] .work-piece__desc {
  font-size: 17px;
  line-height: 1.85;
}

.work-piece__tags {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.work-piece__tags li {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-2);
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
html[dir="rtl"] .work-piece__tags li {
  font-family: var(--arab-body);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}
.work-piece:hover .work-piece__tags li {
  background: var(--paper-2);
  border-color: var(--rule);
}

.work-piece__link {
  display: inline-flex; align-items: baseline; gap: 12px;
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 28px);
  letter-spacing: -0.012em;
  font-style: italic;
  font-weight: 300;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 100;
  position: relative;
}
html[dir="rtl"] .work-piece__link {
  font-family: var(--arab-editorial);
  font-style: italic;
  font-weight: 700;
}
.work-piece__link .host {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: color .35s var(--ease), background-size .5s var(--ease);
  padding-bottom: 2px;
}
.work-piece__link:hover .host {
  color: var(--accent);
  background-size: 100% 2px;
}
.work-piece__link .arrow {
  font-style: normal;
  display: inline-block;
  transition: transform .4s var(--ease);
}
.work-piece__link:hover .arrow {
  transform: translate(4px, -4px);
}
html[dir="rtl"] .work-piece__link:hover .arrow {
  transform: translate(-4px, -4px);
}

/* keep the old empty placeholder rule available but unused */
.work__empty {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: clamp(80px, 12vw, 160px) 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}
.work__empty-mark {
  font-size: 22px;
  color: var(--accent);
  letter-spacing: 0.4em;
  display: inline-block;
}
.work__empty p {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.4;
  letter-spacing: -0.012em;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  color: var(--ink-2);
  max-width: 32ch;
  margin: 0;
}
html[dir="rtl"] .work__empty p {
  font-family: var(--arab-display);
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.6;
}

/* =========================================================
   Process
   ========================================================= */
.process__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
}
@media (min-width: 900px) {
  .process__list { grid-template-columns: repeat(4, 1fr); border-top: 0; }
}

.process__step {
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 18px;
  align-items: start;
}
@media (min-width: 900px) {
  .process__step {
    grid-template-columns: 1fr;
    padding: 40px 28px;
    border: 0;
    border-left: 1px solid var(--rule);
    min-height: 320px;
  }
  .process__step:first-child { border-left: 0; }
  html[dir="rtl"] .process__step { border-left: 0; border-right: 1px solid var(--rule); }
  html[dir="rtl"] .process__step:first-child { border-right: 0; }
}

.process__num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(48px, 5vw, 72px);
  line-height: 0.9;
  color: var(--accent);
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
html[dir="rtl"] .process__num { font-family: var(--arab-display); font-style: normal; font-weight: 700; letter-spacing: 0; }

.process__step h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 14px 0 10px;
  font-variation-settings: "opsz" 36;
}
html[dir="rtl"] .process__step h3 { font-family: var(--arab-display); font-weight: 600; letter-spacing: 0; line-height: 1.4; }
.process__step p {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0;
}
html[dir="rtl"] .process__step p { font-size: 16.5px; line-height: 1.85; }

/* =========================================================
   Contact
   ========================================================= */
.contact__lede {
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.4;
  font-style: italic;
  font-variation-settings: "opsz" 36;
  color: var(--ink-2);
  max-width: 50ch;
  margin: 24px 0 56px;
}
html[dir="rtl"] .contact__lede { font-family: var(--arab-body); font-style: normal; font-weight: 500; font-size: clamp(18px,2vw,22px); line-height: 1.85; }

.contact__email-line {
  display: inline-flex; align-items: center; gap: 14px;
  margin-bottom: 56px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
html[dir="rtl"] .contact__email-line { font-family: var(--arab-body); font-size: 14px; letter-spacing: 0; text-transform: none; font-weight: 500; }
.contact__email-line::before, .contact__email-line::after {
  content: ""; width: 32px; height: 1px; background: var(--rule);
}

.contact__email {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(40px, 7vw, 96px);
  line-height: 1;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  color: var(--ink);
  position: relative;
  display: inline-block;
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .6s var(--ease), color .6s var(--ease);
}
html[dir="rtl"] .contact__email {
  font-family: var(--arab-editorial);
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
}
.contact__email:hover { color: var(--accent); }
.contact__email-wrap { margin-bottom: 64px; }

.contact__form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin-top: 32px;
}
@media (min-width: 900px) {
  .contact__form {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: flex; flex-direction: column;
  padding: 22px 4px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
@media (min-width: 900px) {
  .field--name  { border-right: 1px solid var(--rule); }
  html[dir="rtl"] .field--name { border-right: 0; border-left: 1px solid var(--rule); }
  .field--msg   { grid-column: 1 / -1; }
  .field--submit { grid-column: 1 / -1; padding: 0; border: 0; }
}

.field label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 12px;
}
html[dir="rtl"] .field label { font-family: var(--arab-body); font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 600; }

.field input,
.field textarea {
  border: 0;
  background: transparent;
  outline: none;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.4;
  padding: 0;
  resize: vertical;
  font-variation-settings: "opsz" 36;
}
html[dir="rtl"] .field input, html[dir="rtl"] .field textarea { font-family: var(--arab-body); font-weight: 500; font-size: 20px; }
.field textarea { min-height: 140px; }
.field input::placeholder, .field textarea::placeholder {
  color: var(--ink-mute);
  font-style: italic;
}
html[dir="rtl"] .field input::placeholder, html[dir="rtl"] .field textarea::placeholder { font-style: normal; }

.field--submit button {
  width: 100%;
  padding: 32px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  display: inline-flex; align-items: center; justify-content: center; gap: 18px;
  transition: background .35s var(--ease), color .35s var(--ease);
}
html[dir="rtl"] .field--submit button { font-family: var(--arab-body); font-size: 16px; letter-spacing: 0; text-transform: none; font-weight: 600; }
.field--submit button:hover { background: var(--accent); }
.field--submit button .arrow { transition: transform .35s var(--ease); }
.field--submit button:hover .arrow { transform: translateX(8px); }
html[dir="rtl"] .field--submit button:hover .arrow { transform: translateX(-8px); }

.form-success {
  margin-top: 24px;
  padding: 18px 22px;
  border: 1px solid var(--olive);
  background: rgba(92,86,56,0.06);
  color: var(--olive);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.05em;
}
html[dir="rtl"] .form-success { font-family: var(--arab-body); font-size: 15px; letter-spacing: 0; font-weight: 500; }

/* =========================================================
   Footer
   ========================================================= */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(80px, 10vw, 140px) 0 40px;
  margin-top: 80px;
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: "MK";
  position: absolute;
  bottom: -0.25em;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(180px, 36vw, 540px);
  line-height: 0.85;
  color: rgba(229,70,42,0.18);
  letter-spacing: -0.04em;
  pointer-events: none;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
html[dir="rtl"] .footer::before {
  content: "م ك";
  font-family: var(--arab-display);
  font-style: normal;
  font-weight: 700;
  font-size: clamp(160px, 32vw, 480px);
}

.footer__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 900px) {
  .footer__inner {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 80px;
  }
}

.footer__big {
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.2;
  font-style: italic;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 144, "SOFT" 80;
  max-width: 22ch;
}
html[dir="rtl"] .footer__big {
  font-family: var(--arab-editorial);
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.6;
}

.footer__col h4 {
  font-family: var(--mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(242,237,228,0.55);
  margin: 0 0 18px;
  font-weight: 500;
}
html[dir="rtl"] .footer__col h4 { font-family: var(--arab-body); font-size: 14px; letter-spacing: 0; text-transform: none; font-weight: 600; }
.footer__col ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
  font-size: 16px;
}
.footer__col a { color: var(--paper); position: relative; }
.footer__col a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.footer__col a:hover::after { transform: scaleX(1); }

.footer__bar {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 60px;
  margin-top: 80px;
  border-top: 1px solid rgba(242,237,228,0.16);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242,237,228,0.55);
}
html[dir="rtl"] .footer__bar { font-family: var(--arab-body); font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 500; }

/* =========================================================
   Reveal animations
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

.stagger > * { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.stagger.is-in > * { opacity: 1; transform: none; }
.stagger.is-in > *:nth-child(1) { transition-delay: 0.05s; }
.stagger.is-in > *:nth-child(2) { transition-delay: 0.15s; }
.stagger.is-in > *:nth-child(3) { transition-delay: 0.25s; }
.stagger.is-in > *:nth-child(4) { transition-delay: 0.35s; }
.stagger.is-in > *:nth-child(5) { transition-delay: 0.45s; }
.stagger.is-in > *:nth-child(6) { transition-delay: 0.55s; }

/* Hero load-in */
.hero__eyebrow,
.hero__name span,
.hero__lede,
.hero__meta,
.hero__ctas,
.hero__stamp {
  animation: rise 1.1s var(--ease) both;
}
.hero__eyebrow      { animation-delay: 0.05s; }
.hero__name span:nth-child(1) { animation-delay: 0.15s; }
.hero__name span:nth-child(2) { animation-delay: 0.30s; }
.hero__lede         { animation-delay: 0.45s; }
.hero__meta         { animation-delay: 0.55s; }
.hero__ctas         { animation-delay: 0.65s; }
.hero__stamp        { animation-delay: 0.85s, 0s; animation-duration: 1.1s, 30s; animation-name: rise, spin; animation-timing-function: var(--ease), linear; animation-iteration-count: 1, infinite; animation-fill-mode: both, none; }

@keyframes rise {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee__track { animation: none; }
  .hero__stamp { animation: none; }
}
