/* ------------------------------------------------------------------
   ESSAM brand layer — loaded last on every page.
   Colour: the off-white of the logo + the burgundy of the portraits.
   Type:   IBM Plex Sans Arabic + Instrument Sans, Instrument Serif for
           English headlines (fonts aliased in brand-fonts.css).
   Motion: calm — one easing, slow reveals, nothing that loops loudly.
------------------------------------------------------------------- */
:root {
  --wine: #85170a;
  --wine-2: #9c1d0d;
  --wine-deep: #571018;
  --cream: #f6e2b7;
  --paper: #f6efe4;
  --paper-2: #ede3d3;
  --ink: #241211;
  --ink-2: #4f3732;
  --muted: #8f796b;
  --line: rgba(36, 18, 17, .12);
  --red: var(--wine);
  --dark: var(--wine-deep);
  --ease: cubic-bezier(.22, .9, .24, 1);
}
::selection { background: var(--wine); color: var(--cream); }
body { font-weight: 400; letter-spacing: 0; }

/* ---------- headlines: lighter, more air ---------- */
:is(.work-hero h1, .cs-hero h1, .sp-hero h1, .lab-intro h1, .lab-band h2, .next h2, .cta-big, .reel-group h2, .statement p) {
  font-weight: 600; letter-spacing: -.01em;
}
:is(.chapter-head h2, .case-row h3, .section-head h2, .piece h2) { font-weight: 600; letter-spacing: 0; }
.cs-intro .lead { font-weight: 400; }
.work-hero h1 em { font-weight: 300; color: var(--wine); }

/* English: editorial serif headlines */
html[lang="en"] :is(.work-hero h1, .cs-hero h1, .sp-hero h1, .lab-intro h1, .lab-band h2, .next h2, .cta-big,
  .reel-group h2, .statement p, .chapter-head h2, .case-row h3, .section-head h2, .piece h2, .cs-intro .lead) {
  font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; letter-spacing: -.015em; line-height: 1.02;
}
html[lang="en"] .cs-intro .lead { line-height: 1.22; }
html[lang="en"] .work-hero h1 em { font-style: italic; font-weight: 400; }
html[lang="en"] .case-row h3, html[lang="en"] .chapter-head h2 { line-height: 1.08; }

/* small labels: quiet, tracked */
.eyebrow, .case-row .num, .chapter-head .n, .step .latin { letter-spacing: .16em; }
.chapter-head .n { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; color: var(--wine); }

/* ---------- calm motion ---------- */
body::before { animation: none !important; opacity: .045; }
.marquee { background: none; color: var(--ink); transform: none; border-block: 1px solid var(--line); padding-block: clamp(14px, 1.6vw, 22px); }
.marquee .track { animation-duration: 70s; gap: 42px; }
.marquee span { font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: 0; }
.marquee span:nth-child(4n+1) { color: var(--ink); -webkit-text-stroke: 0; font-style: normal; }
.marquee i { color: var(--wine); font-size: 14px; }
.rv { transition-duration: 1.2s, 1.2s; }
.tiles .tile.rv:nth-child(4n+2) { transition-delay: .08s; }
.tiles .tile.rv:nth-child(4n+3) { transition-delay: .16s; }
.tiles .tile.rv:nth-child(4n+4) { transition-delay: .24s; }
.split > span, .split > em { animation-duration: 1.4s; }
.cur { border-color: rgba(133, 23, 10, .55); }
.cur.link { background: rgba(133, 23, 10, .08); }
.cur.view { background: var(--wine); border-color: var(--wine); }
.cur.view span { color: var(--cream); }
.work-hero .eyebrow::before { background: var(--wine); animation-duration: 3s; }

/* ---------- surfaces ---------- */
.site-head nav { background: rgba(246, 239, 228, .6); }
.site-head nav a[aria-current] { background: var(--wine); color: var(--cream); }
.site-head .lang-btn { background: transparent; color: var(--wine); border-color: rgba(133, 23, 10, .35); }
.site-head .lang-btn:hover { background: var(--wine); color: var(--cream); }
.lab-page .site-head .lang-btn, .site-head.on-dark:not(.scrolled) .lang-btn { color: var(--cream); border-color: rgba(246, 226, 183, .4); }
.btn { background: var(--wine); color: var(--cream); }
.btn:hover { background: var(--wine); }
.btn::before { background: var(--wine-deep); }
.filters button[aria-pressed="true"] { background: var(--wine); border-color: var(--wine); color: var(--cream); }
.cta, .site-foot { background: var(--wine-deep); }
.cta-big i { color: var(--cream); opacity: .9; }
.cta-big:hover { color: var(--cream); }
.cta .eyebrow, .lab-band .eyebrow, .lab-intro .eyebrow, .piece .num, .prompt-box figcaption, .prompt-box summary { color: #e2c592; }
.marquee + section .section-head, .section-head { border-top-color: var(--ink); }
.ba .handle::after { color: var(--wine); }
.reel-final video { box-shadow: 0 40px 80px -40px rgba(133, 23, 10, .55); }
.curtain { background: var(--wine); }

/* ---------- original Essam red: gradient + Arabic calligraphy pattern ---------- */
.cta, .site-foot, .curtain {
  background: linear-gradient(90deg, rgba(133, 23, 10, .93), rgba(87, 16, 24, .95)), url("/assets/essam-pattern-tile.webp") repeat;
  background-size: auto, 420px;
}
.site-foot { background-size: auto, 420px; color: #e7c9a4; }
.cta-mark { opacity: .12; }
/* header mark: red on light pages, off-white over dark heroes / lab */
.site-head .brand .mark { display: block; width: 26px; height: 49px; background: var(--wine);
  -webkit-mask: url("/assets/essam-mark.png") center / contain no-repeat; mask: url("/assets/essam-mark.png") center / contain no-repeat;
  transition: background .4s, transform .6s var(--ease); }
.site-head .brand:hover .mark { transform: rotate(-8deg) scale(1.08); }
.site-head .brand span:not(.mark) { color: var(--wine); transition: color .4s; }
.site-head.on-dark:not(.scrolled) .brand .mark, .lab-page .site-head .brand .mark { background: #f6e2b7; }
.site-head.on-dark:not(.scrolled) .brand span:not(.mark), .lab-page .site-head .brand span:not(.mark) { color: #f6e2b7; }

/* phones: keep the capsule on one line */
.site-head nav a, .site-head .lang-btn { white-space: nowrap; }
@media (max-width: 520px) {
  .site-head { padding: 10px 14px; gap: 10px; }
  .site-head nav { gap: 2px; }
  .site-head nav a { padding: 7px 9px; font-size: 12px; }
  .site-head .lang-btn { padding: 7px 10px; font-size: 11px; margin-inline-start: 2px; }
  .work-hero, .sp-hero, .lab-intro { padding-top: 120px; }
}

/* 3D Lab: near-black stage so the models read, red closing section like every page */
.lab-page { background: #140b0a; }
.lab-page .cta, .lab-page .site-foot {
  background: linear-gradient(90deg, rgba(133, 23, 10, .93), rgba(87, 16, 24, .95)), url("/assets/essam-pattern-tile.webp") repeat;
  background-size: auto, 420px;
}
.lab-page .site-head nav { background: rgba(20, 11, 10, .6); }
