/* =========================================================
   DOORS. — Creative Marketing Agency
   Brand: black / off-white / white. Recognized by shape,
   layout and direction — never by color.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Brand colors (from brand sheet) */
  --black: #000000;
  --cream: #FDFDF3;
  --white: #FFFFFF;

  /* Semantic */
  --bg: var(--black);
  --ink: var(--cream);
  --ink-muted: rgba(253, 253, 243, .68);   /* ≈ 8:1 on black */
  --line: rgba(253, 253, 243, .18);
  --line-strong: rgba(253, 253, 243, .4);

  /* Type */
  --f-sans: "Archivo", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", "IBM Plex Sans Arabic", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --stretch-display: 115%;

  /* Layout */
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1680px;
  --pad-x: max(var(--gutter), calc((100vw - var(--max)) / 2));
  --section-y: clamp(96px, 13vw, 200px);
  --nav-h: 72px;

  /* Motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur-fast: .2s;
  --dur: .45s;
  --dur-slow: .9s;

  /* Layers */
  --z-cursor: 1000;
  --z-loader: 900;
  --z-nav: 100;
  --z-menu: 90;
}

html[dir="rtl"] {
  --f-sans: "IBM Plex Sans Arabic", "Archivo", system-ui, sans-serif;
  --stretch-display: 100%;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; touch-action: manipulation; }
ol, ul { list-style: none; }
::selection { background: var(--cream); color: var(--black); }

/* Arabic script must never be letter-spaced (breaks joining) */
html[dir="rtl"] * { letter-spacing: 0 !important; }

/* Film grain — static, cheap, adds depth to flat black */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* Loading lock */
.js.is-loading body { overflow: hidden; }

/* ---------- Utilities ---------- */
.mono {
  font-family: var(--f-mono);
  font-size: .75rem;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.5;
}
html[dir="rtl"] .mono { font-size: .875rem; text-transform: none; }
.label { color: var(--ink-muted); }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* Honeypot: visually removed without off-screen offsets (those cause sideways scroll in RTL) */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }
/* Latin brand marks & codes keep their order inside Arabic text */
.ltr, .sec-head__code, .loader__word, .vcard__ep, .vcard__dur, .project-modal__title {
  direction: ltr; unicode-bidi: isolate;
}
@media (max-width: 767px) { .hide-sm { display: none !important; } }

.skip-link {
  position: fixed; top: 12px; inset-inline-start: 12px; z-index: calc(var(--z-loader) + 1);
  padding: 12px 18px; background: var(--cream); color: var(--black);
  font-family: var(--f-mono); font-size: .8rem; text-transform: uppercase;
  transform: translateY(-200%); transition: transform var(--dur) var(--ease-out);
}
.skip-link:focus { transform: none; }

:focus-visible { outline: 2px solid var(--cream); outline-offset: 4px; }
main:focus, section:focus { outline: none; }

.display {
  font-size: clamp(3rem, 11vw, 10rem);
  font-weight: 800;
  font-stretch: var(--stretch-display);
  text-transform: uppercase;
  line-height: .9;
  letter-spacing: -.02em;
}
html[dir="rtl"] .display { line-height: 1.2; font-weight: 700; }

/* Masked line reveal */
.line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.line > span { display: inline-block; will-change: transform; }

.link {
  position: relative;
  display: inline-block;
  padding-block: 4px;
}
.link::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform var(--dur) var(--ease-out);
}
html[dir="rtl"] .link::after { transform-origin: left; }
.link:hover::after, .link:focus-visible::after { transform: scaleX(1); transform-origin: left; }
html[dir="rtl"] .link:hover::after { transform-origin: right; }

/* Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  padding: 12px 24px;
  border: 1px solid var(--cream);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  overflow: hidden;
  isolation: isolate;
  color: var(--cream);
  background: transparent;
  transition: color var(--dur) var(--ease-out);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--cream);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform var(--dur) var(--ease-out);
}
.btn:hover, .btn:focus-visible { color: var(--black); }
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: wait; }
.btn--lg { min-height: 60px; padding: 16px 32px; font-size: .8125rem; }
.btn__arrow { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
html[dir="rtl"] .btn__arrow { transform: scaleX(-1); }

/* ---------- Loader ---------- */
.loader { display: none; }
.js .loader {
  position: fixed;
  inset: 0;
  z-index: var(--z-loader);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  padding: var(--gutter);
  background: var(--black);
  color: var(--cream);
}
.loader-failed .loader { display: none !important; }
.loader__top, .loader__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.loader__top { color: var(--ink-muted); }
.loader__door {
  position: absolute;
  top: 50%; left: 50%;
  width: clamp(64px, 9vw, 110px);
  height: auto;
  transform: translate(-50%, -50%);
  overflow: visible;
  will-change: transform;
}
.door-base { fill: rgba(253, 253, 243, .12); }
.door-fill, .door-knob { fill: var(--cream); }
.loader__word {
  font-size: clamp(2.5rem, 8vw, 7rem);
  font-weight: 900;
  font-stretch: 125%;
  line-height: .85;
  letter-spacing: -.02em;
}
.loader__pct {
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-variant-numeric: tabular-nums;
  min-width: 4.5ch;
  text-align: end;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--nav-h);
  padding-inline: var(--pad-x);
  color: var(--white);
  mix-blend-mode: difference;
  transition: transform .6s var(--ease-out);
}
.nav.is-hidden { transform: translateY(-110%); }
.nav__logo { display: flex; align-items: center; min-height: 44px; }
.nav__logo img { width: auto; height: 20px; }
.nav__links { display: none; gap: 8px; }
.nav__links a {
  position: relative;
  display: inline-flex; align-items: center;
  min-height: 44px; padding-inline: 12px;
  font-family: var(--f-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
}
html[dir="rtl"] .nav__links a { font-size: .9375rem; text-transform: none; }
.nav__links a::after {
  content: ""; position: absolute; inset-inline: 12px; bottom: 10px; height: 1px;
  background: currentColor; transform: scaleX(0); transition: transform var(--dur) var(--ease-out);
}
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.nav__lang, .menu__lang {
  min-width: 44px; min-height: 44px; padding-inline: 10px;
  font-size: .9375rem; letter-spacing: 0; text-transform: none;
}
.nav__lang span, .menu__lang span { border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.nav__cta { display: none; border-color: var(--white); color: var(--white); }
.nav__cta::before { background: var(--white); }
.nav__cta:hover { color: var(--black); }
.nav__burger {
  position: relative;
  width: 44px; height: 44px;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
}
.nav__burger i {
  display: block; width: 26px; height: 1.5px; background: currentColor;
  transition: transform var(--dur) var(--ease-out);
}
.nav__burger[aria-expanded="true"] i:first-of-type { transform: translateY(4.25px) rotate(45deg); }
.nav__burger[aria-expanded="true"] i:last-of-type { transform: translateY(-4.25px) rotate(-45deg); }

@media (min-width: 1024px) {
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; }
  .nav__burger { display: none; }
}

/* ---------- Mobile menu ---------- */
.menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--nav-h) + 32px) var(--gutter) max(var(--gutter), env(safe-area-inset-bottom));
  background: var(--black);
  overflow-y: auto;
}
.menu[hidden] { display: none; }
.menu__list { display: flex; flex-direction: column; gap: 4px; }
.menu__link { display: block; overflow: hidden; }
.menu__link > span {
  display: flex; align-items: baseline; gap: 16px;
  padding-block: 6px;
}
.menu__link em { font-style: normal; color: var(--ink-muted); }
.menu__link b {
  font-size: clamp(2.5rem, 12vw, 5rem);
  font-weight: 800;
  font-stretch: var(--stretch-display);
  text-transform: uppercase;
  line-height: 1;
}
.menu__foot {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-top: 24px; border-top: 1px solid var(--line);
}
.menu__foot a { min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 32px;
  padding: calc(var(--nav-h) + 16px) var(--pad-x) clamp(24px, 4vw, 48px);
  overflow: hidden;
  isolation: isolate;
}
.hero__arch {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: -1;
  width: min(92vw, 720px);
  height: 88%;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  fill: none;
  stroke: rgba(253, 253, 243, .16);
  stroke-width: .8;
  overflow: visible;
}
.hero__arch path {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.hero__top {
  display: flex; justify-content: space-between; gap: 16px;
  color: var(--ink-muted);
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.hero__title {
  align-self: center;
  font-size: 12.5vw;
  font-weight: 800;
  font-stretch: var(--stretch-display);
  text-transform: uppercase;
  line-height: .88;
  letter-spacing: -.025em;
}
html[dir="rtl"] .hero__title { font-size: 16vw; line-height: 1.15; font-weight: 700; }
@media (min-width: 768px) {
  .hero__title { font-size: min(9.6vw, 10.5rem); }
  html[dir="rtl"] .hero__title { font-size: min(12vw, 10.5rem); }
  .line--indent { padding-inline-start: 10vw; }
}
.hero__bottom {
  display: flex; flex-direction: column; gap: 24px;
}
.hero__intro {
  max-width: 34ch;
  font-size: clamp(1.0625rem, 1.6vw, 1.375rem);
  line-height: 1.45;
  color: var(--ink);
}
.hero__scroll {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 44px;
  color: var(--ink-muted);
  transition: color var(--dur-fast);
}
.hero__scroll:hover { color: var(--ink); }
.hero__scroll svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5;
  animation: nudge 2.2s var(--ease-in-out) infinite;
}
@keyframes nudge { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(4px); } }
@media (min-width: 768px) {
  .hero__bottom { flex-direction: row; justify-content: space-between; align-items: flex-end; }
}

/* ---------- Marquee ---------- */
.marquee {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding-block: clamp(16px, 2.2vw, 28px);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}
html[dir="rtl"] .marquee__track { animation-name: marquee-rtl; }
.marquee__group {
  display: flex; align-items: center; flex-shrink: 0;
  gap: clamp(20px, 3vw, 48px);
  padding-inline-end: clamp(20px, 3vw, 48px);
}
.marquee__group span {
  font-size: clamp(2rem, 6vw, 5.5rem);
  font-weight: 800;
  font-stretch: var(--stretch-display);
  text-transform: uppercase;
  line-height: 1.1;
  white-space: nowrap;
}
.marquee__group span:nth-of-type(even) {
  color: transparent;
  -webkit-text-stroke: 1px var(--cream);
}
html[dir="rtl"] .marquee__group span:nth-of-type(even) { color: var(--cream); -webkit-text-stroke: 0; opacity: .5; }
.marquee__door { width: auto; height: clamp(1.4rem, 4vw, 3.6rem); aspect-ratio: 224 / 388; fill: var(--cream); flex-shrink: 0; }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes marquee-rtl { to { transform: translateX(50%); } }

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding: var(--section-y) var(--pad-x);
}
section[id] { scroll-margin-top: 0; }

.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding-top: 16px;
  margin-bottom: clamp(48px, 8vw, 112px);
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
}
.sec-head__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--cream);
}
.sec-head__title { font: inherit; color: var(--ink); }
.sec-head__title + .sec-head__code { margin-inline-start: auto; }

.split-head {
  display: grid;
  gap: 24px;
  margin-bottom: clamp(48px, 7vw, 104px);
}
.split-head__p {
  max-width: 38ch;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.5;
  color: var(--ink-muted);
}
@media (min-width: 1024px) {
  .split-head { grid-template-columns: 1fr auto; align-items: end; gap: 64px; }
}

/* ---------- About ---------- */
.about__statement {
  max-width: 24ch;
  font-size: clamp(1.75rem, 4.6vw, 4.5rem);
  font-weight: 500;
  font-stretch: 105%;
  line-height: 1.08;
  letter-spacing: -.015em;
}
html[dir="rtl"] .about__statement { line-height: 1.4; max-width: 28ch; }
.about__statement .w { transition: none; }

.about__grid {
  display: grid;
  gap: 48px;
  margin-top: clamp(64px, 10vw, 144px);
}
.about__p {
  max-width: 40ch;
  font-size: clamp(1.0625rem, 1.5vw, 1.3125rem);
  line-height: 1.55;
}
.about__mv { display: grid; gap: 40px; }
.about__mv h3 { margin-bottom: 12px; }
.about__mv p { max-width: 38ch; color: var(--ink-muted); font-size: 1.0625rem; }
@media (min-width: 768px) { .about__mv { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .about__grid { grid-template-columns: 1fr 1.2fr; gap: 8vw; } }

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: clamp(64px, 10vw, 144px);
  border-top: 1px solid var(--line);
}
.stats li {
  display: flex; flex-direction: column; gap: 8px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.stats li:nth-child(odd) { padding-inline-end: 16px; border-inline-end: 1px solid var(--line); }
.stats li:nth-child(even) { padding-inline-start: 16px; }
.stats__num {
  font-size: clamp(2.75rem, 7vw, 6.5rem);
  font-weight: 800;
  font-stretch: var(--stretch-display);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stats__label { color: var(--ink-muted); }
@media (min-width: 1024px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stats li, .stats li:nth-child(odd), .stats li:nth-child(even) {
    padding: 40px 24px; border-inline-end: 1px solid var(--line);
  }
  .stats li:first-child { padding-inline-start: 0; }
  .stats li:last-child { border-inline-end: 0; }
}

/* ---------- Services ---------- */
.svc-list { border-top: 1px solid var(--line); }
.svc { border-bottom: 1px solid var(--line); }
.svc__h { font: inherit; }
.svc__row {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 44px;
  padding: clamp(22px, 3.2vw, 44px) 8px;
  text-align: start;
  color: var(--ink);
  transition: color var(--dur) var(--ease-out);
}
.svc__row::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--cream);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .6s var(--ease-out);
}
.svc__num { color: var(--ink-muted); transition: color var(--dur); }
.svc__title {
  font-size: clamp(2.25rem, 7.5vw, 7rem);
  font-weight: 800;
  font-stretch: var(--stretch-display);
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -.02em;
  transition: transform .6s var(--ease-out);
}
html[dir="rtl"] .svc__title { font-weight: 700; line-height: 1.3; }
.svc__icon {
  position: relative; width: 28px; height: 28px;
  transition: transform .6s var(--ease-out);
}
.svc__icon::before, .svc__icon::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 100%; height: 1.5px; background: currentColor;
  transform: translate(-50%, -50%);
}
.svc__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.svc.is-open .svc__icon { transform: rotate(45deg); }

@media (hover: hover) and (pointer: fine) {
  .svc__row:hover { color: var(--black); }
  .svc__row:hover::before { transform: scaleY(1); }
  .svc__row:hover .svc__num { color: var(--black); }
  .svc__row:hover .svc__title { transform: translateX(24px); }
  html[dir="rtl"] .svc__row:hover .svc__title { transform: translateX(-24px); }
}

.svc__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .7s var(--ease-out);
}
.svc.is-open .svc__panel { grid-template-rows: 1fr; }
.svc__inner { overflow: hidden; min-height: 0; }
.svc__content {
  display: grid;
  gap: 24px;
  padding: 8px 8px 40px;
  padding-inline-start: calc(2.5rem + 24px);
}
.svc__content p { max-width: 46ch; font-size: clamp(1.0625rem, 1.4vw, 1.25rem); color: var(--ink-muted); }
.svc__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.svc__tags li {
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
@media (max-width: 767px) { .svc__content { padding-inline-start: 8px; } }
@media (min-width: 1024px) { .svc__content { grid-template-columns: 1fr 1fr; align-items: start; gap: 64px; } }

/* ---------- Brands we worked with (logo tape) ---------- */
.brands {
  position: relative;
  padding-top: var(--section-y);
  isolation: isolate;
}
/* soft glow above the heading */
.brands::before {
  content: ""; position: absolute; z-index: -1;
  left: 50%; top: 0;
  width: min(900px, 120vw); height: 70%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 20%, rgba(253, 253, 243, .09) 0%, rgba(253, 253, 243, 0) 65%);
  pointer-events: none;
}
.brands__head {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding-inline: var(--gutter);
  margin-bottom: clamp(28px, 4vw, 48px);
  text-align: center;
}
.brands__kicker { color: var(--ink-muted); font-size: clamp(1.0625rem, 1.6vw, 1.375rem); }
.brands__title {
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  font-weight: 700; font-stretch: 108%;
  letter-spacing: -.02em; line-height: 1.1;
}

.brands__tape {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(253, 253, 243, .025);
  /* logos fade out toward both ends */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
}
/* …and blur as they leave, like the tape runs under frosted glass */
.brands__tape::before, .brands__tape::after {
  content: ""; position: absolute; top: 0; bottom: 0; z-index: 2;
  width: 16%;
  -webkit-backdrop-filter: blur(5px);
          backdrop-filter: blur(5px);
  pointer-events: none;
}
.brands__tape::before {
  left: 0;
  -webkit-mask-image: linear-gradient(90deg, #000, transparent);
          mask-image: linear-gradient(90deg, #000, transparent);
}
.brands__tape::after {
  right: 0;
  -webkit-mask-image: linear-gradient(270deg, #000, transparent);
          mask-image: linear-gradient(270deg, #000, transparent);
}
.brands__track {
  display: flex;
  width: max-content;
  animation: tape 55s linear infinite;
}
html[dir="rtl"] .brands__track { animation-name: tape-rtl; }
.brands__group { display: flex; align-items: center; flex-shrink: 0; }
.brand {
  display: flex; align-items: center; justify-content: center;
  width: clamp(120px, 13vw, 190px);
  height: clamp(72px, 7vw, 96px);
  padding: 0 clamp(18px, 2vw, 30px);
}
.brand img {
  max-width: 100%; max-height: 58%;
  width: auto; height: auto;
  object-fit: contain;
  opacity: .8;
  transition: opacity .4s var(--ease-out);
}
.brand:hover img { opacity: 1; }
@keyframes tape { to { transform: translateX(-50%); } }
@keyframes tape-rtl { to { transform: translateX(50%); } }

/* ---------- Work (scatter → line → circle → arc) ---------- */
.work { position: relative; background: var(--black); }
.work__stage {
  --card-w: 46px;
  --card-h: 64px;
  position: relative;
  display: none;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  perspective: 1000px;
}
.anim .work__stage { display: block; }
@media (min-width: 768px) { .work__stage { --card-w: 80px; --card-h: 112px; } }
.work__head-wrap {
  position: absolute; top: calc(var(--nav-h) + 8px); inset-inline: 0; z-index: 3;
  padding-inline: var(--pad-x);
}
.work__head-wrap .sec-head { margin-bottom: 0; }
.work__intro {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  text-align: center; pointer-events: none;
}
.work__intro-title {
  max-width: 9ch;
  font-size: clamp(1.25rem, 3.2vw, 2.75rem);
  line-height: 1.1;
  font-weight: 600; font-stretch: 108%;
  letter-spacing: -.02em;
}
.work__intro-hint { color: var(--ink-muted); }
.work__arc-head {
  position: absolute; top: calc(var(--nav-h) + 72px); inset-inline: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding-inline: var(--gutter);
  text-align: center;
  pointer-events: none;
}
.work__title { font-size: clamp(3rem, 9vw, 8rem); }
.work__arc-p { max-width: 42ch; color: var(--ink-muted); font-size: clamp(1rem, 1.3vw, 1.125rem); }
.work__cards { position: absolute; inset: 0; z-index: 2; }

.mcard {
  position: absolute; left: 50%; top: 50%;
  width: var(--card-w); height: var(--card-h);
  margin: calc(var(--card-h) / -2) 0 0 calc(var(--card-w) / -2);
  padding: 0;
  perspective: 1000px;
  opacity: 0;
  will-change: transform, opacity;
}
.mcard__inner {
  position: relative; display: block; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .7s var(--ease-out);
}
.mcard__front {
  position: absolute; inset: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 10px 30px rgba(0,0,0,.55);
  transition: border-radius .4s var(--ease-out);
}
.mcard__front img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.05);          /* monochrome by default — brand rule */
  transition: filter .6s var(--ease-out);
}
.mcard__name {
  position: absolute; left: 4px; right: 4px; bottom: 7%;
  font-size: 9px; font-weight: 800; font-stretch: 110%;
  text-transform: uppercase; text-align: center; line-height: 1.1;
  color: var(--cream);
  text-shadow: 0 1px 6px rgba(0,0,0,.8);
  opacity: 0; transform: translateY(6px);
  transition: opacity .4s, transform .5s var(--ease-out);
  direction: ltr;
}
.mcard.is-opening .mcard__front { border-radius: 0; }
.mcard.is-opening .mcard__front img { filter: none; }
@media (hover: hover) and (pointer: fine) {
  .mcard:hover .mcard__front img { filter: none; }
  .mcard:hover:not(.is-opening) .mcard__name { opacity: 1; transform: none; }
}

/* ---------- Door handles: a seam + two knobs in the middle of every project ----------
   Sizes are percentages of the door, so they grow with it when the camera zooms in. */
.knobs { position: absolute; inset: 0; pointer-events: none; }
.knobs::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 1px; margin-left: -.5px;
  background: rgba(253, 253, 243, .9);
  box-shadow: 0 0 8px rgba(0,0,0,.6);
  transform: scaleY(0);
  transition: transform .55s var(--ease-out);
}
.knobs i {
  position: absolute; top: 50%;
  width: 6%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff 0, var(--cream) 42%, #a9a99f 100%);
  box-shadow: 0 0 0 .5px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.6);
  transform: translate(-50%, -50%) scale(0);
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.knobs i:first-child { left: 43%; }
.knobs i:last-child { left: 57%; transition-delay: .06s; }
.mcard.is-opening .knobs::before,
.work__row.is-opening .knobs::before { transform: scaleY(1); }
.mcard.is-opening .knobs i,
.work__row.is-opening .knobs i { transform: translate(-50%, -50%) scale(1); }
@media (hover: hover) and (pointer: fine) {
  .mcard:hover .knobs::before, .work__row:hover .knobs::before { transform: scaleY(1); }
  .mcard:hover .knobs i, .work__row:hover .knobs i { transform: translate(-50%, -50%) scale(1); }
}
/* The scene the camera zooms into */
.is-zooming { position: relative; z-index: 60; background: var(--black); will-change: transform; }

.work__index-wrap { padding: clamp(40px, 6vw, 80px) var(--pad-x) var(--section-y); }
.work__index-label { margin-bottom: 16px; }
.work__index { border-top: 1px solid var(--line); }
.work__index li { border-bottom: 1px solid var(--line); }
.work__row {
  position: relative;
  display: grid; grid-template-columns: 3.5rem 1fr auto; align-items: center; gap: 16px;
  width: 100%; min-height: 44px;
  padding: clamp(18px, 2.4vw, 30px) 8px;
  text-align: start;
  transition: opacity .5s var(--ease-out);
}
.work__row-idx { color: var(--ink-muted); }
.work__row-name {
  font-size: clamp(1.75rem, 4.5vw, 4rem); font-weight: 800; font-stretch: var(--stretch-display);
  text-transform: uppercase; line-height: 1; letter-spacing: -.02em;
  direction: ltr; unicode-bidi: isolate;
  transition: transform .6s var(--ease-out);
}
.work__row-cat { color: var(--ink-muted); text-align: end; }
/* Minimal preview: a small arched photo that opens from its centre like a pair of doors */
.work__row-thumb {
  position: absolute; top: 50%; inset-inline-end: 24%;
  width: 124px; aspect-ratio: 4 / 5;
  border-radius: 999px 999px 0 0; overflow: hidden;
  transform: translateY(-50%);
  clip-path: inset(0 50% 0 50%);
  transition: clip-path .7s var(--ease-out);
  pointer-events: none;
}
.work__row-thumb img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); transition: transform .7s var(--ease-out); }
.work__row.is-opening .work__row-thumb { clip-path: inset(0 0 0 0); }
.work__row.is-opening .work__row-thumb img { transform: none; }
@media (hover: hover) and (pointer: fine) {
  .work__index:hover .work__row:not(:hover) { opacity: .35; }
  .work__row:hover .work__row-name { transform: translateX(14px); }
  html[dir="rtl"] .work__row:hover .work__row-name { transform: translateX(-14px); }
  .work__row:hover .work__row-thumb { clip-path: inset(0 0 0 0); }
  .work__row:hover .work__row-thumb img { transform: none; }
}
@media (max-width: 767px) {
  .work__row { grid-template-columns: 2.5rem 1fr; }
  .work__row-cat { grid-column: 2; text-align: start; }
}

/* ---------- Project modal ---------- */
.project-modal {
  width: 100vw; height: 100vh; height: 100dvh;
  max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--black); color: var(--ink);
}
.project-modal::backdrop { background: #000; }
.project-modal.is-door[open] { animation: none; }

/* Door transition: two halves of the project photo that swing open inward */
.door-fx {
  position: fixed; inset: 0; z-index: 2000;
  pointer-events: none;
  perspective: 1800px;
}
.door-fx__frame { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform-style: preserve-3d; }
.door-fx__leaf {
  position: absolute; top: 0; width: 50%; height: 100%;
  overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  /* no will-change here: a cached layer would be rasterised at the tiny starting size and blur when zoomed */
}
.is-covered .mcard__front, .is-covered .work__row-thumb { visibility: hidden; }
.door-fx__leaf--l { left: 0; transform-origin: 0 50%; }
.door-fx__leaf--r { right: 0; transform-origin: 100% 50%; }
.door-fx__face {
  position: absolute; top: 0; left: 0;
  width: 200%; height: 100%;            /* each leaf shows its half of one full-width door face */
  direction: ltr;
}
.door-fx__leaf--r .door-fx__face { left: -100%; }
.door-fx__img {
  position: absolute; inset: 0;
  background-color: #111;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.door-fx__img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.2) 40%, rgba(0,0,0,0) 60%);
}
/* Project name + branding, split across the two leaves */
.door-fx__label {
  position: absolute; left: 0; right: 0; /* top is set in JS so it sits in view */
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center; color: var(--cream);
  text-shadow: 0 2px 24px rgba(0,0,0,.5);
}
.door-fx__label b {
  font-size: clamp(3rem, 11vw, 10rem);
  font-weight: 800; font-stretch: 115%;
  text-transform: uppercase; line-height: .9; letter-spacing: -.02em;
}
.door-fx__label em { font-style: normal; }
.door-fx .knobs::before { transform: scaleY(1); transition: none; }
.door-fx .knobs i { transform: translate(-50%, -50%) scale(1); transition: none; }
/* Shading deepens toward the hinge as a leaf turns away */
.door-fx__shade { position: absolute; inset: 0; opacity: 0; background: linear-gradient(90deg, rgba(0,0,0,.85), rgba(0,0,0,.25)); }
.door-fx__leaf--r .door-fx__shade { background: linear-gradient(270deg, rgba(0,0,0,.85), rgba(0,0,0,.25)); }
.project-modal[open] { animation: pm-in .7s var(--ease-out); display: flex; flex-direction: column; }
@keyframes pm-in { from { clip-path: inset(100% 0 0 0 round 50vw 50vw 0 0); } to { clip-path: inset(0 0 0 0 round 0); } }
.project-modal__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 12px var(--pad-x);
  border-bottom: 1px solid var(--line);
}
.project-modal__heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.project-modal__title {
  font-size: clamp(1.5rem, 3.5vw, 2.75rem); font-weight: 800; font-stretch: var(--stretch-display);
  text-transform: uppercase; line-height: 1;
}
.project-modal__body {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: clamp(16px, 3vw, 40px) var(--pad-x) 64px;
}
/* Columns live on an inner wrapper so they grow downward, not sideways */
.project-modal__grid { columns: 1; column-gap: 16px; }
@media (min-width: 768px) { .project-modal__grid { columns: 2; } }
@media (min-width: 1280px) { .project-modal__grid { columns: 3; } }
.project-modal__item { break-inside: avoid; margin-bottom: 16px; background: #0d0d0d; }
.project-modal__item img, .project-modal__item video { width: 100%; height: auto; }
.project-modal__item video { background: #000; }
/* ---------- Placeholder visuals (swap for real images) ---------- */
.ph {
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--cream);
}
.ph--5 { background: linear-gradient(135deg, #1d1d1b 0%, #000 60%); }
.ph--6 { background: linear-gradient(200deg, #e8e8df 0%, #8f8f89 55%, #2b2b29 100%); }
.ph--7 { background: repeating-linear-gradient(45deg, #0e0e0e 0 12px, #161615 12px 24px); }
.ph--8 { background: radial-gradient(80% 90% at 20% 20%, #4a4a45 0%, #0a0a0a 70%); }

/* ---------- Vlog ---------- */
.vlog { position: relative; padding-block: var(--section-y); overflow-x: clip; }
.vlog__pin { display: flex; flex-direction: column; }
.vlog__head { padding-inline: var(--pad-x); }
.vlog__head .split-head { margin-bottom: clamp(40px, 5vw, 72px); }
.vlog__viewport { padding-inline: var(--pad-x); }
.vlog__track { display: grid; gap: 48px; }
@media (min-width: 768px) { .vlog__track { grid-template-columns: 1fr 1fr; gap: 56px 24px; } }
@media (min-width: 1024px) {
  .vlog__viewport { overflow-x: auto; scrollbar-width: none; }
  .vlog__viewport::-webkit-scrollbar { display: none; }
  .vlog__track { display: flex; gap: clamp(24px, 2.5vw, 40px); width: max-content; }
  .vcard { width: clamp(420px, 36vw, 620px); flex-shrink: 0; }
  /* When JS pins the section, the track is driven by scroll */
  .vlog.is-pinned { padding-block: 0; }
  .vlog.is-pinned .vlog__pin { height: 100vh; justify-content: center; padding-top: var(--nav-h); }
  .vlog.is-pinned .vlog__viewport { overflow: visible; }
  .vlog.is-pinned .sec-head { margin-bottom: clamp(24px, 4vh, 48px); }
  .vlog.is-pinned .split-head { margin-bottom: clamp(24px, 4vh, 48px); }
  .vlog.is-pinned .display { font-size: min(6.5vw, 13vh); }
  /* Size cards by available height so they always fit the pinned viewport */
  .vlog.is-pinned .vcard { width: clamp(320px, min(36vw, calc((100vh - 26vh - 250px) * 1.6)), 620px); }
}
.vcard__btn {
  display: block; width: 100%;
  text-align: start;
}
.vcard__thumb {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.vcard__play {
  display: grid; place-items: center;
  width: clamp(64px, 6vw, 88px); aspect-ratio: 1;
  border-radius: 50%;
  background: var(--cream);
  color: var(--black);
  transition: transform .6s var(--ease-out);
}
/* Media controls are not mirrored in RTL */
.vcard__play svg { width: 36%; fill: currentColor; margin-left: 6%; }
.vcard__btn:hover .vcard__play, .vcard__btn:focus-visible .vcard__play { transform: scale(1.12); }
.vcard__dur {
  position: absolute; bottom: 14px; inset-inline-end: 14px;
  padding: 4px 10px; background: rgba(0,0,0,.7); border: 1px solid var(--line);
}
.vcard__meta { display: flex; flex-direction: column; gap: 6px; padding-top: 18px; }
.vcard__ep { color: var(--ink-muted); }
.vcard__title {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 600;
  font-stretch: 108%;
  line-height: 1.2;
}

/* ---------- Contact ---------- */
.contact__title { margin-bottom: clamp(56px, 8vw, 120px); }
.contact__grid { display: grid; gap: 64px; }
@media (min-width: 1024px) { .contact__grid { grid-template-columns: 5fr 7fr; gap: 8vw; } }
.contact__intro {
  max-width: 30ch;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.35;
  margin-bottom: 48px;
}
.contact__list { display: grid; gap: 28px; }
.contact__list dt { margin-bottom: 6px; }
.contact__list dd { font-size: 1.125rem; }
.contact__social { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.contact__social a, .contact__list dd > a { min-height: 44px; display: inline-flex; align-items: center; }

.form { display: grid; gap: 28px; }
.form__row { display: grid; gap: 28px; }
@media (min-width: 768px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--f-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-muted);
}
html[dir="rtl"] .field label { font-size: .9375rem; text-transform: none; }
.field__opt { text-transform: none; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  font-size: 1.125rem;
  color: var(--ink);
  transition: border-color var(--dur-fast);
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.field input:hover, .field select:hover, .field textarea:hover { border-bottom-color: var(--ink-muted); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--cream); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--cream); outline-offset: 4px;
}
.field.has-error input, .field.has-error textarea { border-bottom: 2px dashed var(--white); }
.field__error {
  display: flex; align-items: center; gap: 8px;
  font-size: .9375rem; color: var(--white);
}
.field__error[hidden] { display: none; }
.field__error svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; }
.select { position: relative; }
.select::after {
  content: ""; position: absolute; inset-inline-end: 4px; top: 50%;
  width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.select select { padding-inline-end: 28px; cursor: pointer; }
.select option { background: var(--black); color: var(--cream); }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding-top: 8px; }
.form__status { font-size: 1rem; max-width: 40ch; }
.form__status.is-success::before { content: "✓  "; }

/* ---------- Footer ---------- */
.footer {
  padding: 0 var(--pad-x) clamp(16px, 2vw, 32px);
  overflow: hidden;
}
.footer__row {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  padding-block: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
}
.footer__row a { min-height: 44px; display: inline-flex; align-items: center; }
.footer__mark { overflow: hidden; padding-top: clamp(24px, 4vw, 64px); }
.footer__mark img { width: 100%; height: auto; will-change: transform; }

/* ---------- Video modal ---------- */
.video-modal {
  width: min(1100px, calc(100vw - 2 * var(--gutter)));
  max-width: none;
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--black);
  color: var(--ink);
}
.video-modal::backdrop { background: rgba(0, 0, 0, .85); backdrop-filter: blur(6px); }
.video-modal[open] { animation: modal-in .5s var(--ease-out); }
@keyframes modal-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.video-modal__bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 4px 4px 20px; border-bottom: 1px solid var(--line);
}
html[dir="rtl"] .video-modal__bar { padding: 4px 20px 4px 4px; }
.video-modal__close { width: 48px; height: 48px; display: grid; place-items: center; }
.video-modal__close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.video-modal__frame { aspect-ratio: 16 / 9; display: grid; place-items: center; }
.video-modal__frame iframe { width: 100%; height: 100%; border: 0; }
.video-modal__soon { font-size: clamp(1.25rem, 3vw, 2rem); font-weight: 600; padding: 24px; text-align: center; }

/* ---------- Cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: var(--z-cursor);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur);
}
.cursor.is-visible { opacity: 1; }
.cursor[hidden] { display: none; }
.cursor__ball {
  display: grid; place-items: center;
  width: 96px; height: 96px;
  margin: -48px 0 0 -48px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--black);
  transform: scale(.1);
  transition: transform .5s var(--ease-out);
}
.cursor.is-hover .cursor__ball { transform: scale(.4); }
.cursor.is-label .cursor__ball { transform: scale(1); }
.cursor__label {
  font-family: var(--f-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  opacity: 0; transition: opacity var(--dur-fast);
}
html[dir="rtl"] .cursor__label { font-size: .9375rem; }
.cursor.is-label .cursor__label { opacity: 1; }
.cursor.is-door .cursor__ball { transform: scale(.08); }
.door-active .cursor { opacity: 0 !important; }

/* Curtain used for language switch */
.curtain {
  position: fixed; inset: 0; z-index: var(--z-loader); background: var(--black); opacity: 0;
  pointer-events: none;
}

/* ---------- Reduced motion ---------- */
/* Phones with "reduce animations" on: keep the site alive, just calmer
   (many Android battery savers switch this on without people knowing) */
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation-duration: 60s; }
  .brands__track { animation-duration: 90s; }
  .hero__scroll svg { animation: none; }
}
@media (prefers-reduced-motion: no-preference) {
  html:not(.lenis) { scroll-behavior: smooth; }
}
