/* Javidnaman memorial + 8-9 January memorial event. Loaded only on those two pages. */
.jn {
  --jn-bg: #0a0908;
  --jn-fg: #ece6da;
  --jn-dim: #a39b8c;
  --jn-line: rgba(236, 230, 218, .14);
  --jn-red: #a8322a;
  --jn-gold: #f2a900;
  --jn-h: var(--f-serif);
  background: var(--jn-bg);
  color: var(--jn-fg);
  overflow-x: clip;
}
:root:lang(fa) .jn { --jn-h: 'Vazir', Tahoma, sans-serif; }
.page-javidnaman, .page-memorial { background: #0a0908; }
.page-javidnaman .hdr:not(.is-solid), .page-memorial .hdr:not(.is-solid) { background: linear-gradient(#0a0908cc, transparent); }

.jn-sec { position: relative; padding-block: clamp(5rem, 14vh, 9rem); }
.jn-narrow { max-width: 46rem; }
.jn-head { max-width: 52rem; margin-block-end: clamp(2rem, 6vh, 3.5rem); }
.jn-kicker { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--jn-dim); margin: 0 0 1rem; }
:root:lang(fa) .jn-kicker { letter-spacing: 0; font-size: .95rem; }
.jn-h { font-family: var(--jn-h); font-weight: 400; font-size: clamp(2.3rem, 6.4vw, 5rem); line-height: 1.02; margin: 0 0 1.2rem; letter-spacing: -.01em; text-wrap: balance; }
:root:lang(fa) .jn-h { font-weight: 700; line-height: 1.35; font-size: clamp(1.9rem, 5vw, 3.6rem); letter-spacing: 0; }
.jn-h--xl { font-size: clamp(2.8rem, 9vw, 7.2rem); }
:root:lang(fa) .jn-h--xl { font-size: clamp(2.2rem, 7vw, 5rem); }
.jn-lead { font-size: clamp(1.1rem, 1.9vw, 1.4rem); line-height: 1.6; color: var(--jn-fg); max-width: 40rem; margin: 0; }
.jn-body, .jn-read { font-size: clamp(1.08rem, 1.6vw, 1.3rem); line-height: 1.75; max-width: 40rem; margin: 0 0 1.4rem; }
:root:lang(fa) .jn-body, :root:lang(fa) .jn-read, :root:lang(fa) .jn-lead { line-height: 2; }

/* ---------- intro ---------- */
@keyframes jn-eq { to { height: 14px; } }
/* JS on: lines are revealed by the scroll timeline */
/* ---------- what happened ---------- */
/* ---------- who they were ---------- */
/* ---------- pain ---------- */
/* ---------- courage ---------- */
/* ---------- ask ---------- */
/* ---------- memory / wall ---------- */
/* ---------- call to the memorial ---------- */
.jn-source { color: var(--jn-dim); font-size: .9rem; padding-block: 2rem 4rem; }
.jn-source a { color: var(--jn-fg); }
.jn-illus { font-size: .82rem; opacity: .8; }

/* ---------- floating pill ---------- */
:root[dir="rtl"] .jn-pill .arr, :root[dir="rtl"] .jn .btn .arr { transform: scaleX(-1); }
@keyframes jn-flick { 0%, 100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(.92, 1.06) rotate(2deg); } }
/* reveal helper; JS adds .jn-ready, GSAP brings [data-up] in */
/* ---------- event page ---------- */
/* hero: a slow moving wall of portraits behind the text; a few faces light up at a time (javidnaman.js) */
.mev-hero { position: relative; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; padding-block: calc(var(--hdr-top) + 1.5rem) 3rem; overflow: hidden; isolation: isolate; }
.mev-wall { --face: clamp(64px, 7.2vw, 118px); --gap: clamp(6px, .7vw, 10px); position: absolute; inset: calc(var(--hdr-top) - 4rem) -12% -10%; z-index: -3; display: grid; align-content: start; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 88%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 88%, transparent 100%); gap: var(--gap); transform: perspective(1400px) rotateX(var(--wx, 16deg)) rotateZ(var(--wz, -5deg)) scale(1.08); transform-origin: 50% 40%; }
:root[dir="rtl"] .mev-wall { --wz: 5deg; }
.mev-wall-row { display: flex; width: max-content; animation: wallRun calc(110s + var(--r) * 17s) linear infinite; will-change: transform; }
.mev-wall-row:nth-child(even) { animation-direction: reverse; }
.mev-wall-run { display: flex; gap: var(--gap); padding-inline-end: var(--gap); flex: none; }
.mev-wall img { width: var(--face); height: var(--face); object-fit: cover; border-radius: 6px; background: #1a1814; filter: grayscale(1) brightness(.5) contrast(1.05); transition: filter 1.8s ease, box-shadow 1.8s ease, transform 1.8s ease; }
.mev-wall img.lit { filter: grayscale(.15) sepia(.2) brightness(1.02); box-shadow: 0 0 0 1px rgba(242, 169, 0, .55), 0 0 46px 4px rgba(242, 169, 0, .32); transform: scale(1.07); position: relative; z-index: 1; }
@keyframes wallRun { to { transform: translateX(-50%); } }
:root[dir="rtl"] .mev-wall-row { animation-name: wallRunRtl; }
@keyframes wallRunRtl { to { transform: translateX(50%); } }
.mev-hero.is-off .mev-wall-row { animation-play-state: paused; }
/* candle light breathing at the foot of the wall */
.mev-glow { position: absolute; inset: auto -10% -30% -10%; height: 85%; z-index: -2; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(45% 55% at var(--gx, 28%) 100%, rgba(242, 169, 0, .3), transparent 70%), radial-gradient(30% 40% at 78% 100%, rgba(218, 90, 28, .18), transparent 70%);
  animation: mevGlow 7s ease-in-out infinite; }
:root[dir="rtl"] .mev-glow { --gx: 72%; }
@keyframes mevGlow { 0%, 100% { opacity: .75; transform: scale(1); } 23% { opacity: .95; transform: scale(1.03, 1.06); } 41% { opacity: .7; } 67% { opacity: 1; transform: scale(1.02, .98); } 84% { opacity: .82; } }
.mev-shade { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, #0a0908 0%, rgba(10, 9, 8, .9) 30%, rgba(10, 9, 8, .45) 62%, rgba(10, 9, 8, .55) 100%),
    linear-gradient(to var(--jn-shade-dir, right), rgba(10, 9, 8, .88), rgba(10, 9, 8, .2) 62%, transparent); }
:root[dir="rtl"] .mev-shade { --jn-shade-dir: left; }
.mev-hero-in { position: relative; }
.mev-kicker { display: flex; align-items: center; gap: .6rem; color: var(--jn-fg); }
.mev-title { max-width: 18ch; font-size: clamp(2.4rem, min(5.2vw, 8.5svh), 4.8rem); text-wrap: balance; text-shadow: 0 2px 30px rgba(0, 0, 0, .6); }
:root:lang(fa) .mev-title { font-size: clamp(2rem, min(4.4vw, 7.5svh), 3.8rem); }
.mev-date { font-size: clamp(1.1rem, 1.9vw, 1.45rem); color: var(--jn-gold); margin: 0 0 1.2rem; }
.mev-lead { max-width: 36rem; font-size: clamp(1rem, 1.3vw, 1.18rem); }
.mev-cd { display: flex; gap: clamp(1.2rem, 3vw, 2.2rem); margin: 1.3rem 0; }
.mev-cd span { display: grid; }
.mev-cd b { font-family: var(--jn-h); font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 2.8rem); line-height: 1; font-variant-numeric: tabular-nums; }
:root:lang(fa) .mev-cd b { font-family: 'Vazir', sans-serif; font-weight: 500; }
.mev-cd small { color: var(--jn-fg); font-size: .85rem; opacity: .75; }
.mev-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: .8rem; margin: 0 0 1.6rem; }
.mev-kicker .cndl { font-size: 9px; }
.mev-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.8rem; color: var(--jn-fg); }
.mev-facts li { display: flex; gap: .6rem; align-items: center; }
.mev-facts svg { width: 1.2rem; height: 1.2rem; flex: none; }
.mev-wall-note { position: absolute; inset-block-end: 1.2rem; inset-inline-end: var(--gutter); max-width: 24rem; margin: 0; font-size: .75rem; line-height: 1.45; color: var(--jn-dim); text-align: end; }
.js .mev-hero [data-in] { animation: fadeUp .9s var(--ease) both; }
.js .mev-hero [data-in]:nth-child(2) { animation-delay: .12s; }
.js .mev-hero [data-in]:nth-child(3) { animation-delay: .24s; }
.js .mev-hero [data-in]:nth-child(4) { animation-delay: .36s; }
.js .mev-hero [data-in]:nth-child(5) { animation-delay: .48s; }
.js .mev-hero [data-in]:nth-child(n+6) { animation-delay: .6s; }
.js .mev-wall { animation: mevWallIn 2.4s var(--ease) both; }
@keyframes mevWallIn { from { opacity: 0; } }
@media (max-width: 899px) {
  .mev-hero { align-items: end; padding-block: calc(var(--hdr-top) + 26svh) 3rem; }
  .mev-wall { inset: calc(var(--hdr-top) - 2rem) -30% auto; --wx: 10deg; -webkit-mask-image: none; mask-image: none; }
  .mev-title { font-size: clamp(2rem, 8.4vw, 2.8rem); }
  :root:lang(fa) .mev-title { font-size: clamp(1.8rem, 7.4vw, 2.4rem); }
  .mev-shade { background: linear-gradient(to top, #0a0908 0%, rgba(10, 9, 8, .95) 52%, rgba(10, 9, 8, .35) 78%, rgba(10, 9, 8, .6) 100%); }
  .mev-wall-note { inset-block-end: .8rem; max-width: none; inset-inline-start: var(--gutter); text-align: start; }
  .mev-hero { padding-block-end: 4.5rem; }
  .mev-actions .jn-enter { width: 100%; }
  .mev-cd { margin: 1.2rem 0; }
}
@media (prefers-reduced-motion: reduce) { .mev-wall-row { animation: none; } }
html:not(.js) .mev-cd { display: none; }
.mev-prog-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-width: 52rem; }
.mev-prog-list li { display: grid; grid-template-columns: 3.5rem 1fr; gap: 1rem; border-top: 1px solid var(--jn-line); padding-block: 1.3rem; }
.mev-prog-list p { margin: 0; font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.65; }
.mev-n { font-family: var(--jn-h); font-size: 1.8rem; color: var(--jn-dim); line-height: 1; }
.mev-help { background: #100e0b; }
.mev-help-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.mev-help-grid li { border: 1px solid var(--jn-line); padding: 1.5rem; display: grid; align-content: start; gap: .8rem; }
.mev-help-grid h3 { font-family: var(--jn-h); font-weight: 400; font-size: 1.6rem; margin: 0; }
:root:lang(fa) .mev-help-grid h3 { font-weight: 700; font-size: 1.25rem; }
.mev-help-grid p { margin: 0; color: var(--jn-dim); line-height: 1.65; }
:root:lang(fa) .mev-help-grid p { line-height: 1.95; }
.mev-help-grid .btn { justify-self: start; }
.mev-help-grid .bi { width: 1.1em; height: 1.1em; }
.mev-prac-list { margin: 0; padding-inline-start: 1.2rem; display: grid; gap: .8rem; font-size: 1.1rem; line-height: 1.7; }

.jn-ready [data-up] { opacity: 0; transform: translateY(14px); }
