/* ============================================================
   Majed Namous — Personal Site
   Mobile first → Tablet → Desktop.

   Typography rule:
   - Majed Arabic (JH Naskh)  → Arabic headings / display only.
     NOTE: that font draws a final yaa detached — never end an Arabic
     heading with ي. Body copy is always Thmanyah, which joins correctly.
   - Thmanyah Serif Display   → all body copy, metadata, navigation,
                                and every Latin text.
   ============================================================ */

/* ---------- 1. Fonts ---------- */

@font-face {
  font-family: "Majed Arabic";
  src: url("../fonts/majed-arabic.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  size-adjust: 108%;
}
@font-face {
  font-family: "Thmanyah";
  src: url("../fonts/thmanyah-light.woff") format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Thmanyah";
  src: url("../fonts/thmanyah-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Thmanyah";
  src: url("../fonts/thmanyah-medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- 2. Tokens ---------- */

:root {
  /* neutral gray ramp — the whole palette */
  --g-0: #ffffff;
  --g-25: #fbfbfa;
  --g-50: #f7f7f5;
  --g-100: #f1f1ee;
  --g-150: #eaeae6;
  --g-200: #e2e2dd;
  --g-300: #d2d2cc;
  --g-400: #b0b1ac;
  --g-500: #8b8d8f;
  --g-600: #6d7073;
  --g-700: #4b4f52;
  --g-800: #2b2e31;
  --g-900: #16181a;
  --black: #0c0d0e;

  /* semantic — a single, unbroken page colour */
  --paper: #d4d4d4;
  --surface: var(--paper);
  --placeholder: #c6c6c6;
  --ink: var(--g-900);
  --ink-70: #3f4346;
  --ink-45: #5e6164;
  --line: rgba(22, 24, 26, 0.19);
  --line-soft: rgba(22, 24, 26, 0.12);
  --on-black: #f2f2ef;
  --on-black-55: rgba(242, 242, 239, 0.58);
  --on-black-line: rgba(242, 242, 239, 0.16);

  /* type families */
  --font-body: "Thmanyah", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-display: var(--font-body);

  /* fluid scale */
  --step--2: clamp(0.74rem, 0.7rem + 0.18vw, 0.86rem);
  --step--1: clamp(0.88rem, 0.83rem + 0.24vw, 1.02rem);
  --step-0: clamp(1.06rem, 1rem + 0.3vw, 1.24rem);
  --step-1: clamp(1.28rem, 1.12rem + 0.75vw, 1.75rem);
  --step-2: clamp(1.65rem, 1.3rem + 1.6vw, 2.75rem);
  --step-3: clamp(2.2rem, 1.55rem + 3vw, 4.2rem);
  --step-4: clamp(3.2rem, 2rem + 6vw, 8rem);

  /* rhythm */
  --gutter: clamp(1.25rem, 5vw, 3.25rem);
  --measure: 58ch;
  --section: clamp(6rem, 13vw, 12rem);
  --radius: 14px;

  /* motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --nav-h: 68px;

  /* live values written by JS */
  --sv: 0;   /* scroll velocity, roughly -30…30 */
  --px: 0;   /* pointer x, -1…1 */
  --py: 0;   /* pointer y, -1…1 */
}

@media (min-width: 900px) {
  :root { --nav-h: 80px; }
}

html[lang="ar"] {
  --font-display: "Majed Arabic", "Thmanyah", "Geeza Pro", serif;
}

/* ---------- 3. Reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 32px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

html[lang="ar"] body { line-height: 1.9; }

h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }

button {
  font: inherit; color: inherit; background: none;
  border: 0; padding: 0; cursor: pointer;
}

/* --- visual-asset protection (front-end deterrence only) ---
   Images are not hit targets, so they cannot be clicked, dragged or
   opened in a new tab directly. Hit testing falls through to the parent,
   so a wrapping <a> or <button> keeps working exactly as before. */
img, picture, svg, video {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}
/* anything with a real action stays interactive */
a, button, [role="button"], [data-action], summary, label,
input, select, textarea { pointer-events: auto; }

:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 4px; border-radius: 2px; }
::selection { background: var(--ink); color: var(--g-0); }

/* ---------- 4. Primitives ---------- */

.wrap {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--g-0);
  padding: 0.7em 1.2em;
  font-size: var(--step--1);
}
.skip:focus { inset-inline-start: 0; }

.meta {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 400;
  color: var(--ink-45);
  line-height: 1.5;
}
html[lang="en"] .meta {
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-size: var(--step--2);
}

.lead {
  font-family: var(--font-body);
  font-size: var(--step-1);
  font-weight: 300;
  line-height: 1.55;
  color: var(--ink-70);
  max-width: 34ch;
}
html[lang="ar"] .lead { line-height: 1.75; max-width: 32ch; }

.prose p {
  font-family: var(--font-body);
  font-weight: 300;
  max-width: var(--measure);
  color: var(--ink-70);
}
.prose p + p { margin-top: 1.05em; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: var(--step-0);
  color: var(--ink);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.45s var(--ease);
}
.link:hover { border-color: var(--ink); }
.link .arrow { width: 0.72em; height: 0.72em; flex: 0 0 auto; transition: transform 0.45s var(--ease); }
html[dir="rtl"] .link .arrow { transform: scaleX(-1); }
.link:hover .arrow { transform: translate(2px, -2px); }
html[dir="rtl"] .link:hover .arrow { transform: scaleX(-1) translate(2px, -2px); }

.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * 0.62); }


.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  margin-bottom: clamp(2.75rem, 6vw, 5rem);
  border-bottom: 1px solid var(--line-soft);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 300;
  line-height: 1.22;
}
html[lang="en"] .section-title { letter-spacing: -0.015em; }
html[lang="ar"] .section-title { font-weight: 400; }

/* ---------- 5. Navbar ---------- */

.nav {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 60;
  padding: 10px var(--gutter) 0;
  pointer-events: none;
}
@media (min-width: 900px) { .nav { padding-top: 18px; } }

.nav__bar {
  pointer-events: auto;
  position: relative;
  max-width: 1320px;
  margin-inline: auto;
  height: var(--nav-h);
  padding-inline: clamp(1rem, 2.2vw, 1.7rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: saturate(1.5) blur(20px);
  backdrop-filter: saturate(1.5) blur(20px);
  box-shadow: 0 1px 1px rgba(22, 24, 26, 0.02);
  overflow: hidden;
  transition: background 0.5s var(--ease), box-shadow 0.5s var(--ease),
    border-color 0.5s var(--ease);
}
.nav.is-scrolled .nav__bar {
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 1px 1px rgba(22, 24, 26, 0.03), 0 12px 36px rgba(22, 24, 26, 0.06);
  border-color: rgba(255, 255, 255, 0.7);
}

.nav__logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  color: var(--ink);
}
.nav__logo svg { height: clamp(38px, 5.6vw, 50px); width: auto; }
.nav__logo svg path { fill: currentColor; }

.nav__links { display: none; align-items: center; gap: clamp(1.2rem, 2.8vw, 2.4rem); }
@media (min-width: 900px) { .nav__links { display: flex; } }
.nav__links ul { display: flex; align-items: center; gap: inherit; }

.nav__link {
  position: relative;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 400;
  color: var(--ink-70);
  transition: color 0.35s var(--ease);
  padding-block: 5px;
}
.nav__link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: inline-start;
  transition: transform 0.45s var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--ink); }

.nav__end { display: flex; align-items: center; gap: 0.9rem; flex: 0 0 auto; }

.lang {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-family: var(--font-body);
  font-size: var(--step--2);
  letter-spacing: 0.08em;
  color: var(--ink-45);
  direction: ltr;
}
.lang__sep { color: var(--g-500); }
.lang a { transition: color 0.35s var(--ease); }
.lang a:hover { color: var(--ink); }
.lang [aria-current="true"] { color: var(--ink); }

.nav__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 32px;
  height: 32px;
  align-items: flex-end;
}
@media (min-width: 900px) { .nav__toggle { display: none; } }
.nav__toggle span {
  display: block;
  height: 1px;
  width: 22px;
  background: var(--ink);
  transition: transform 0.45s var(--ease), width 0.45s var(--ease);
}
.nav__toggle span:last-child { width: 14px; }
.nav.is-open .nav__toggle span:first-child { transform: translateY(3.5px) rotate(11deg); }
.nav.is-open .nav__toggle span:last-child { width: 22px; transform: translateY(-3.5px) rotate(-11deg); }

.nav__menu {
  pointer-events: auto;
  max-width: 1320px;
  margin: 8px auto 0;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: saturate(1.5) blur(20px);
  backdrop-filter: saturate(1.5) blur(20px);
  box-shadow: 0 14px 44px rgba(22, 24, 26, 0.08);
  overflow: hidden;
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: grid-template-rows 0.5s var(--ease), opacity 0.35s var(--ease),
    transform 0.5s var(--ease), visibility 0.5s;
}
.nav.is-open .nav__menu {
  grid-template-rows: 1fr; opacity: 1; visibility: visible; transform: none;
}
@media (min-width: 900px) { .nav__menu { display: none; } }
.nav__menu-inner { min-height: 0; padding: 0.4rem clamp(1rem, 2.2vw, 1.7rem) 1rem; }
.nav__menu li + li { border-top: 1px solid var(--line-soft); }
.nav__menu a {
  display: block;
  padding-block: 0.8rem;
  font-family: var(--font-body);
  font-size: var(--step-1);
  font-weight: 300;
  line-height: 1.3;
  color: var(--ink);
}

/* ---------- 6. Hero — quiet type, mosaic horizon ----------
   The drifting mosaic is a band at the foot of the hero, not a
   backdrop: the typography sits on clean paper, fully legible.
   ------------------------------------------------------------- */

.hero {
  --hg: clamp(0.35rem, 0.9vw, 0.75rem);
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  overflow: hidden;
}

.hero__content {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-h) + clamp(2rem, 7vh, 4.5rem));
  padding-bottom: clamp(2.5rem, 7vh, 5rem);
}

.hero__eyebrow {
  color: var(--ink-45);
  margin-bottom: clamp(1.4rem, 4vh, 2.4rem);
}

.hero__name {
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 300;
  line-height: 1;
  color: var(--ink);
}
html[lang="en"] .hero__name { letter-spacing: -0.035em; }
html[lang="ar"] .hero__name { font-weight: 400; line-height: 1.16; }

/* per-word entrance */
.hero__name .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.3em);
  animation: wordIn 1.05s var(--ease) forwards;
}
.hero__name .w:nth-child(2) { animation-delay: 0.09s; }
.hero__name .w:nth-child(3) { animation-delay: 0.18s; }
@keyframes wordIn { to { opacity: 1; transform: none; } }

.hero .lead {
  color: var(--g-700);
  max-width: 46ch;
  font-size: clamp(1.14rem, 0.98rem + 0.7vw, 1.55rem);
  opacity: 0;
  animation: wordIn 1s var(--ease) 0.42s forwards;
}
html[lang="ar"] .hero .lead { max-width: 42ch; line-height: 1.85; }

/* --- the mosaic horizon --- */

.hero__strip {
  position: relative;
  flex: 0 0 auto;
  height: clamp(200px, 32svh, 400px);
  overflow: hidden;
  background: transparent;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}

.hero__field {
  position: absolute;
  inset: -7%;
  /* decorative: force LTR flow so the loop behaves the same in both
     languages (an RTL max-content row is anchored right and drifts away) */
  direction: ltr;
  display: flex;
  flex-direction: column;
  gap: var(--hg);
  transform: rotate(-3deg) translate3d(calc(var(--px) * 16px), calc(var(--py) * 6px), 0);
  will-change: transform;
  transition: transform 1s var(--ease);
  pointer-events: none;
}

.hero__row {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: row;
  gap: var(--hg);
  width: max-content;
  animation: drift 96s linear infinite;
  backface-visibility: hidden;
}
.hero__row--b { animation-direction: reverse; animation-duration: 118s; }

/* Each row prints the same set SIX times and the loop steps by one set,
   so five spare copies always cover the band at any viewport ratio. */
@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-16.6667%, 0, 0); }
}

.hero__tile {
  flex: 0 0 auto;
  height: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--placeholder);
  filter: grayscale(0.12);
}
.hero__tile img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 7. Intro — portrait + biography ---------- */



.intro__grid { display: grid; gap: clamp(2.5rem, 6vw, 4rem); }
@media (min-width: 880px) {
  .intro__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(3rem, 7vw, 6rem);
    align-items: start;
  }
}

.intro__portrait {
  order: -1;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  max-width: 340px;
}
@media (min-width: 880px) {
  .intro__portrait { order: 0; max-width: none; position: sticky; top: calc(var(--nav-h) + 48px); }
}
.intro__portrait img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 20%;
  mix-blend-mode: multiply;
  transform: translate3d(0, calc(var(--sv) * -0.35px), 0) scale(1.02);
  transition: transform 0.5s var(--ease);
}

.intro__body > * + * { margin-top: clamp(1.5rem, 3.5vw, 2.1rem); }

.facts { border-top: 1px solid var(--line-soft); margin-top: clamp(2rem, 5vw, 2.75rem); }
.facts div {
  display: flex; justify-content: space-between; gap: 2rem;
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--line-soft);
  font-size: var(--step--1);
}
.facts dt { color: var(--ink-45); font-weight: 400; }
.facts dd { text-align: end; font-weight: 300; }

/* ---------- 8. Works — reactive mosaic ---------- */



.mosaic {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.6rem, 2vw, 1.1rem);
  perspective: 1400px;
}
@media (min-width: 720px) {
  .mosaic { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(0.8rem, 1.6vw, 1.25rem); }
}
@media (min-width: 1000px) {
  .mosaic { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(1rem, 1.6vw, 1.5rem); }
}

.tile {
  --r: 0;
  --k: 1;
  position: relative;
  display: block;
  transform:
    rotate(calc((var(--r) + var(--sv) * 0.05 * var(--k)) * 1deg))
    translate3d(0, calc(var(--sv) * -0.5px * var(--k)), 0);
  transition: transform 0.45s var(--ease), z-index 0s;
  will-change: transform;
}

.tile__frame {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--placeholder);
}
.tile__frame img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(0.12);
  transition: transform 1.1s var(--ease), filter 0.7s var(--ease);
}

.tile__year {
  display: block;
  margin-top: 0.65rem;
  font-family: var(--font-body);
  font-size: var(--step--2);
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--ink-45);
  font-variant-numeric: tabular-nums lining-nums;
  transition: color 0.4s var(--ease);
}

@media (hover: hover) and (min-width: 1000px) {
  .tile:hover { z-index: 3; transform: rotate(0deg) translate3d(0, -8px, 0) scale(1.03); }
  .tile:hover .tile__frame img { transform: scale(1.06); filter: grayscale(0); }
  .tile:hover .tile__year { color: var(--ink); }
  /* neighbours settle back while one is raised */
  .mosaic:hover .tile:not(:hover) .tile__frame img { filter: grayscale(0.4); opacity: 0.86; }
}

/* mosaic rhythm — sizes and small offsets */
.tile:nth-child(1) { --r: -1.6; --k: 1.1; }
.tile:nth-child(2) { --r: 1.2; --k: 0.8; }
.tile:nth-child(3) { --r: -0.8; --k: 1.3; }
.tile:nth-child(4) { --r: 1.8; --k: 0.9; }
.tile:nth-child(5) { --r: -1.2; --k: 1.2; }
.tile:nth-child(6) { --r: 0.9; --k: 0.7; }
.tile:nth-child(7) { --r: -1.9; --k: 1; }
.tile:nth-child(8) { --r: 1.4; --k: 1.15; }

@media (max-width: 719.98px) {
  .tile:nth-child(4n + 2) { margin-top: 1.6rem; }
  .tile:nth-child(4n + 3) { margin-top: -0.8rem; }
}
@media (min-width: 720px) and (max-width: 999.98px) {
  .tile:nth-child(8n + 1) { grid-column: span 3; }
  .tile:nth-child(8n + 2) { grid-column: span 3; }
  .tile:nth-child(8n + 3) { grid-column: span 2; margin-top: 2rem; }
  .tile:nth-child(8n + 4) { grid-column: span 4; }
  .tile:nth-child(8n + 5) { grid-column: span 4; }
  .tile:nth-child(8n + 6) { grid-column: span 2; margin-top: 2rem; }
  .tile:nth-child(8n + 7) { grid-column: span 3; }
  .tile:nth-child(8n + 8) { grid-column: span 3; }
}
@media (min-width: 1000px) {
  .tile:nth-child(8n + 1) { grid-column: span 5; }
  .tile:nth-child(8n + 2) { grid-column: span 4; margin-top: clamp(2rem, 5vw, 4.5rem); }
  .tile:nth-child(8n + 3) { grid-column: span 3; }
  .tile:nth-child(8n + 4) { grid-column: span 4; }
  .tile:nth-child(8n + 5) { grid-column: span 3; margin-top: clamp(1.5rem, 4vw, 3.5rem); }
  .tile:nth-child(8n + 6) { grid-column: span 5; }
  .tile:nth-child(8n + 7) { grid-column: span 6; }
  .tile:nth-child(8n + 8) { grid-column: span 6; margin-top: clamp(2rem, 5vw, 4rem); }
}

/* ---------- 9. Chapters (Athar, Al Majed Cottages) ----------
   One quiet pattern: mark -> story -> (optional) visit.
   ------------------------------------------------------------- */




.athar__grid { display: grid; gap: clamp(2.75rem, 7vw, 4rem); }
@media (min-width: 880px) {
  .athar__grid {
    grid-template-columns: minmax(0, 0.5fr) minmax(0, 1.5fr);
    gap: clamp(3.5rem, 9vw, 8rem);
    align-items: start;
  }
}

.athar__mark { color: var(--ink); width: clamp(92px, 13vw, 130px); }
.athar__mark--wide { width: clamp(150px, 22vw, 240px); }
.athar__mark svg { width: 100%; height: auto; }
.athar__mark svg path, .athar__mark svg rect, .athar__mark svg polygon { fill: currentColor; }

.athar__title {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 300;
  line-height: 1.25;
  margin-top: clamp(0.9rem, 2vw, 1.2rem);
}
html[lang="en"] .athar__title { letter-spacing: -0.015em; }
html[lang="ar"] .athar__title { font-weight: 400; }

.athar__story { margin-top: clamp(1.6rem, 4vw, 2.4rem); }
.athar__story p { max-width: 52ch; }
.athar__story p + p { margin-top: 1.15em; }

.athar__visit { margin-top: clamp(2.75rem, 7vw, 4rem); }

/* the one button on the site — quiet, gray, no shadow */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.85em 1.35em;
  border-radius: 10px;
  border: 1px solid var(--g-200);
  background: var(--g-150);
  color: var(--g-900);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 400;
  line-height: 1;
  transition: background 280ms var(--ease), border-color 280ms var(--ease);
}
.btn .arrow { width: 0.85em; height: 0.85em; flex: 0 0 auto; transition: transform 280ms var(--ease); }
html[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
@media (hover: hover) {
  .btn:hover { background: var(--g-200); border-color: var(--g-300); }
  .btn:hover .arrow { transform: translate(2px, -2px); }
  html[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translate(2px, -2px); }
}

/* ---------- 10. Media feature ---------- */



.media__link { display: block; }
.media__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--placeholder);
}
.media__frame img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06) translate3d(0, calc(var(--sv) * -0.5px), 0);
  transition: transform 0.9s var(--ease), filter 0.9s var(--ease);
  filter: grayscale(0.15);
}
@media (hover: hover) and (min-width: 1000px) {
  .media__link:hover .media__frame img { transform: scale(1.09); filter: grayscale(0); }
}
.media__caption {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.6rem 2rem;
  margin-top: 1.1rem; padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}
.media__title { font-family: var(--font-body); font-size: var(--step-1); font-weight: 300; }
.media__note { display: inline-flex; align-items: center; gap: 0.55em; }

/* the story behind the conversation — the Al-Aqsa car */
.media__story {
  display: grid;
  gap: clamp(1.75rem, 5vw, 2.5rem);
  margin-top: clamp(3.5rem, 8vw, 6rem);
}
@media (min-width: 880px) {
  .media__story {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2.5rem, 6vw, 4.5rem);
    align-items: center;
  }
}
.media__story-figure {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--placeholder);
}
.media__story-figure img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(0.1);
}
.media__story .prose p { max-width: 44ch; }
.media__note .arrow { width: 0.8em; height: 0.8em; }
html[dir="rtl"] .media__note .arrow { transform: scaleX(-1); }

/* ---------- 11. Contact ---------- */

.contact-hero {
  padding-top: calc(var(--nav-h) + clamp(4rem, 14vh, 7rem));
  padding-bottom: clamp(5rem, 12vh, 9rem);
}

/* mobile order: intro -> form -> details.
   desktop: intro and details stack in the left column, form on the right. */
.contact__grid { display: grid; gap: clamp(3rem, 9vw, 4.5rem); }
@media (min-width: 900px) {
  .contact__grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    column-gap: clamp(4rem, 9vw, 8rem);
    row-gap: clamp(2.5rem, 6vw, 3.5rem);
    align-items: start;
  }
  .contact__intro { grid-column: 1; grid-row: 1; }
  .contact__grid .form { grid-column: 2; grid-row: 1 / span 2; }
  .contact__details { grid-column: 1; grid-row: 2; margin-top: 0; }
}

.contact__title {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 300;
  line-height: 1.06;
}
html[lang="en"] .contact__title { letter-spacing: -0.025em; }
html[lang="ar"] .contact__title { font-weight: 400; line-height: 1.26; }

.contact__intro .lead {
  margin-top: clamp(1.6rem, 4vw, 2.2rem);
  max-width: 34ch;
}

/* --- quiet secondary details --- */
.contact__details {
  padding-top: clamp(1.5rem, 4vw, 2rem);
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 0.55rem;
}
.contact__detail {
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 300;
  color: var(--ink-70);
  direction: ltr;
  unicode-bidi: isolate;
  width: fit-content;
  border-bottom: 1px solid transparent;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}
html[dir="rtl"] .contact__detail { margin-inline-start: auto; margin-inline-end: 0; }
html[dir="rtl"] .contact__details { justify-items: start; }
.contact__detail:hover { color: var(--ink); border-color: var(--line); }

/* --- the form: no card, no box, type-led --- */
.form { display: grid; gap: clamp(2rem, 5vw, 2.75rem); }

.field { display: grid; gap: 0.7rem; }

.field > label {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 400;
  color: var(--ink-45);
}
html[lang="en"] .field > label {
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-size: var(--step--2);
}

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 0.65rem 0.1rem;
  width: 100%;
  transition: border-color 0.45s var(--ease), background 0.45s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.field textarea {
  min-height: clamp(9rem, 22vh, 13rem);
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: #6f7275; opacity: 0.75; }

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--ink-45); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.3);
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline: none; }

/* select — a drawn chevron, no system arrow */
.field__select { position: relative; }
.field__select::after {
  content: "";
  position: absolute;
  inset-inline-end: 0.15rem;
  bottom: 1.25rem;
  width: 8px;
  height: 8px;
  border-right: 1px solid var(--ink-45);
  border-bottom: 1px solid var(--ink-45);
  transform: rotate(45deg);
  pointer-events: none;
}
.field select { padding-inline-end: 2rem; cursor: pointer; }

.form__submit {
  justify-self: start;
  margin-top: clamp(0.5rem, 2vw, 1rem);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 400;
  color: var(--g-50);
  background: var(--g-900);
  padding: 1.05em 2.4em;
  border-radius: 2px;
  transition: background 0.45s var(--ease), opacity 0.3s var(--ease);
}
html[lang="en"] .form__submit { letter-spacing: 0.08em; }
.form__submit:hover { background: var(--black); }
.form__submit[disabled] { opacity: 0.5; cursor: default; }

/* status line — only ever shown for a real outcome */
.form__status {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink-70);
  padding-inline-start: 0.9rem;
  border-inline-start: 1px solid var(--line);
  max-width: 46ch;
}
.form__status:empty { display: none; }
.form__status[data-state="ok"] { color: var(--ink); border-color: var(--ink); }

/* ---------- 12. Footer ---------- */

.footer {
  background: var(--black);
  color: var(--on-black);
  padding-block: clamp(4rem, 9vw, 6.5rem) clamp(2rem, 4vw, 2.5rem);
}
.footer__top { display: grid; gap: clamp(2.5rem, 6vw, 3rem); }
@media (min-width: 780px) {
  .footer__top { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; }
}
.footer__logo { display: block; width: clamp(210px, 36vw, 300px); color: var(--on-black); }
.footer__logo svg { width: 100%; height: auto; }
.footer__logo svg path { fill: currentColor; }
.footer__tag {
  margin-top: 1.2rem; font-size: var(--step--1); font-weight: 300;
  color: var(--on-black-55); max-width: 32ch;
}
.footer__col h2 {
  font-family: var(--font-body); font-size: var(--step--2); font-weight: 400;
  color: var(--on-black-55); margin-bottom: 1.1rem;
}
html[lang="en"] .footer__col h2 { letter-spacing: 0.13em; text-transform: uppercase; }
.footer__col li + li { margin-top: 0.6rem; }
.footer__col a, .footer__col span {
  font-size: var(--step--1); font-weight: 300; color: var(--on-black);
  opacity: 0.86; transition: opacity 0.35s var(--ease);
}
.footer__col a:hover { opacity: 1; }
.footer__value { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.footer__bottom {
  margin-top: clamp(3rem, 8vw, 5rem); padding-top: 1.4rem;
  border-top: 1px solid var(--on-black-line);
  display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between;
  font-size: var(--step--2); font-weight: 300; color: var(--on-black-55);
}

/* ---------- 13. Ambient light ----------
   A very wide, very faint grey glow that drifts behind selected
   sections. CSS only, no JS, and it never becomes a visible shape.
   ------------------------------------------------------------- */

.ambient {
  position: relative;
  isolation: isolate;
  /* clip the glow without creating a scroll container, so any
     position: sticky inside the section keeps working */
  overflow: hidden;
}
@supports (overflow: clip) { .ambient { overflow: clip; } }
.ambient > * { position: relative; z-index: 1; }

.ambient::before,
.ambient::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}

.ambient::before {
  width: 78vmax;
  height: 78vmax;
  top: -30%;
  inset-inline-start: -22%;
  background: radial-gradient(circle at 50% 50%,
    rgba(242, 242, 242, 0.4) 0%,
    rgba(242, 242, 242, 0.18) 42%,
    rgba(242, 242, 242, 0) 70%);
  animation: driftA 74s ease-in-out infinite alternate;
}

.ambient::after {
  width: 62vmax;
  height: 62vmax;
  bottom: -28%;
  inset-inline-end: -18%;
  background: radial-gradient(circle at 50% 50%,
    rgba(233, 233, 233, 0.34) 0%,
    rgba(233, 233, 233, 0.14) 46%,
    rgba(233, 233, 233, 0) 72%);
  animation: driftB 96s ease-in-out infinite alternate;
}

/* a lighter touch where the section is mostly type */
.ambient--soft::before { opacity: 0.6; animation-duration: 88s; }
.ambient--soft::after { display: none; }

@keyframes driftA {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(6vw, 4vh, 0) scale(1.1); }
  100% { transform: translate3d(-3vw, 7vh, 0) scale(1.04); }
}
@keyframes driftB {
  0%   { transform: translate3d(0, 0, 0) scale(1.06); }
  50%  { transform: translate3d(-7vw, -5vh, 0) scale(1); }
  100% { transform: translate3d(4vw, -2vh, 0) scale(1.12); }
}

/* ---------- 14. Motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

.img-reveal img {
  clip-path: inset(0 0 9% 0);
  opacity: 0;
  transition: clip-path 1s var(--ease), opacity 0.8s var(--ease);
}
.img-reveal.is-in img { clip-path: inset(0 0 0 0); opacity: 1; }

/* mosaic tiles rise in sequence */
.tile { opacity: 0; }
.tile.is-in { opacity: 1; animation: tileIn 0.9s var(--ease) backwards; }
.mosaic .tile:nth-child(2n).is-in { animation-delay: 0.07s; }
.mosaic .tile:nth-child(3n).is-in { animation-delay: 0.13s; }
@keyframes tileIn {
  from { opacity: 0; transform: translate3d(0, 26px, 0) rotate(0deg) scale(0.97); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal, .img-reveal img, .tile { opacity: 1; transform: none; clip-path: none; }
  .hero__row { animation: none; }
  .ambient::before, .ambient::after { animation: none; }
  .hero__field { transform: rotate(-3deg); }
  .hero__name .w, .hero .lead { opacity: 1; transform: none; animation: none; }
}

.no-js .reveal, .no-js .img-reveal img, .no-js .tile { opacity: 1; transform: none; clip-path: none; }

/* ---------- 14. Bidi safety ---------- */

[dir="ltr"], [dir="rtl"] { unicode-bidi: isolate; }
