:root {
  --black: #000;
  --ash: #141312;
  --rubble: #34322f;
  --stone: #8f8a83;
  --dust: #d6d2cb;
  --bone: #ece9e4;
  --blood: #b0161d;
  --ember: #d8232a;
  --line: rgba(255,255,255,.08);
  --display: "Reem Kufi", "Readex Pro", sans-serif;
  --body: "Readex Pro", Tahoma, sans-serif;
  --section: clamp(80px, 12vw, 150px);
  --gutter: clamp(16px, 5vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--black);
  color: var(--dust);
  font-family: var(--body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.8;
  overflow-x: hidden;
}
/* grain, under the content */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#cracks { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; transition: opacity .6s; }
body.past-hero #cracks { opacity: .45; }
main, .topbar { position: relative; z-index: 1; }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Top menu (right side) ---------- */
.topbar {
  position: fixed; top: 0; right: 0; left: 0;
  z-index: 40;
  display: flex; justify-content: flex-start;
  padding: 14px 16px;
  border-bottom: 1px solid transparent;
  transition: background-color .3s, border-color .3s;
}
.topbar.scrolled {
  background: rgba(0,0,0,.78);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom-color: var(--line);
}
.mainnav { display: flex; gap: 4px; }
.mainnav a {
  text-decoration: none;
  padding: 9px 16px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--dust);
  transition: color .2s, box-shadow .2s;
}
.mainnav a:hover { color: #fff; box-shadow: inset 0 -2px var(--stone); }
.mainnav a.nav-future { color: #fff; box-shadow: inset 0 -2px var(--ember); }
.menu-toggle { display: none; }

@media (max-width: 860px) {
  .menu-toggle {
    display: flex; align-items: center; gap: 10px;
    min-height: 44px;
    font: 500 1rem var(--body);
    color: var(--bone);
    background: rgba(0,0,0,.7);
    border: 1px solid var(--rubble);
    padding: 0 16px;
    cursor: pointer;
  }
  .burger, .burger::before, .burger::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
  .burger::before, .burger::after { content: ""; position: absolute; right: 0; }
  .burger::before { top: -6px; } .burger::after { top: 6px; }
  .mainnav {
    position: absolute; top: 64px; right: 16px; left: 16px;
    flex-direction: column; gap: 0;
    display: none;
    background: rgba(10,10,10,.97);
    border: 1px solid var(--rubble);
  }
  .mainnav.open { display: flex; }
  .mainnav a { border-top: 1px solid var(--rubble); padding: 15px 18px; }
  .mainnav a:first-child { border-top: 0; }
  .mainnav a:hover, .mainnav a.nav-future { box-shadow: inset -3px 0 var(--ember); }
}

/* ---------- Floating Telegram buttons ---------- */
.tg-side {
  position: fixed; top: 50%; z-index: 30;
  width: 44px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 14px 0 18px;
  background: rgba(20,19,18,.92);
  color: var(--bone);
  text-decoration: none;
  transform: translateY(-50%);
  transition: background-color .2s, opacity .4s;
}
.tg-side:hover { background: var(--blood); }
.tg-side svg { width: 24px; height: 24px; fill: var(--ember); flex: none; transition: fill .2s; }
.tg-side:hover svg { fill: #fff; }
.tg-side span { writing-mode: vertical-rl; font-size: .85rem; font-weight: 500; line-height: 1; white-space: nowrap; }
.tg-side--right { right: 0; border-left: 3px solid var(--ember); }
.tg-side--left { left: 0; border-right: 3px solid var(--ember); }
.tg-side--left span { transform: rotate(180deg); }
body.at-report .tg-side { opacity: 0; pointer-events: none; }
@media (max-width: 860px) {
  .tg-side--right { display: none; }
  .tg-side--left {
    top: auto; left: auto; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
    transform: none; width: auto; height: 50px; padding: 0 18px 0 16px;
    flex-direction: row; gap: 10px;
    border: 0; border-radius: 25px;
    background: var(--blood); color: #fff;
    box-shadow: 0 8px 24px -8px rgba(0,0,0,.8);
    opacity: 0; pointer-events: none;
  }
  .tg-side--left svg { fill: #fff; width: 22px; height: 22px; }
  .tg-side--left span { writing-mode: horizontal-tb; transform: none; font-size: .95rem; }
  body.past-hero .tg-side--left { opacity: 1; pointer-events: auto; }
  body.past-hero.at-report .tg-side--left { opacity: 0; pointer-events: none; }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px clamp(16px, 8vw, 120px) 96px;
  position: relative;
}
.hero-lead {
  margin: 0 0 28px;
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  font-weight: 400;
  color: var(--dust);
  max-width: 40ch;
}
.hero-text { position: relative; width: fit-content; max-width: 16ch; font-size: clamp(2.6rem, 7.4vw, 7rem); }
.piece {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.32;
  text-wrap: balance;
  color: var(--bone);
  transition: transform 1s cubic-bezier(.2,.8,.2,1);
}
.piece-a { clip-path: polygon(0 0, 100% 0, 100% 38%, 86% 43%, 72% 52%, 63% 49%, 55% 44%, 43% 51%, 31% 63%, 14% 58%, 0 55%); }
.piece-b { position: absolute; inset: 0; clip-path: polygon(0 55%, 14% 58%, 31% 63%, 43% 51%, 55% 44%, 63% 49%, 72% 52%, 86% 43%, 100% 38%, 100% 100%, 0 100%); }
.hero-crack { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero-crack polyline {
  fill: none; stroke: var(--ember); stroke-width: 3; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset .7s ease-in;
}
.hero.broken .hero-crack polyline { stroke-dashoffset: 0; }
.hero.broken .piece-a { transform: translate(.04em, -.035em) rotate(-.5deg); transition-delay: .65s; }
.hero.broken .piece-b { transform: translate(-.06em, .06em) rotate(.9deg); transition-delay: .65s; }
@media (max-width: 560px) {
  .hero { padding: clamp(96px, 14vh, 140px) 20px 96px; }
  .hero-text { font-size: clamp(2.6rem, 11vw, 7rem); max-width: 14ch; }
}

.scroll-cue {
  position: absolute; bottom: 28px; right: 50%; transform: translateX(50%);
  text-decoration: none; font-size: .9rem; color: var(--stone);
  padding-bottom: 46px;
}
.scroll-cue::after {
  content: ""; position: absolute; bottom: 0; right: 50%;
  width: 1px; height: 38px; background: var(--stone);
}

/* ---------- Section titles ---------- */
.section-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.2vw, 3.4rem);
  line-height: 1.35;
  text-wrap: balance;
  color: var(--bone);
  max-width: 1100px;
  margin: 0 auto 56px;
  padding: 0 var(--gutter);
}
.section-title::before, .report-lead::before {
  content: ""; display: block;
  width: 48px; height: 3px; margin-bottom: 18px;
  background: var(--ember);
}

/* ---------- Timeline ---------- */
.history { padding: var(--section) 0; }
.timeline { position: relative; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.tl-path { position: absolute; top: 0; left: 0; width: 100%; overflow: visible; pointer-events: none; }
.tl-path path { fill: none; stroke-linecap: round; }
.tl-track { stroke: #2a2927; stroke-width: 2; stroke-dasharray: 1 7; }
.tl-draw { stroke: var(--ember); stroke-width: 3; }
.tl-list { list-style: none; margin: 0; padding: 0; position: relative; }

.tl-item { position: relative; display: flex; align-items: center; min-height: 360px; padding: 28px 0; }
.tl-item.side-a { justify-content: flex-end; --nx: 74%; }
.tl-item.side-b { justify-content: flex-start; --nx: 26%; }
.tl-node {
  position: absolute; top: 50%; left: var(--nx);
  width: 14px; height: 14px; margin: -7px 0 0 -7px;
  background: var(--black); border: 2px solid var(--stone);
  transform: rotate(45deg);
  transition: background-color .4s, border-color .4s;
  z-index: 2;
}
.tl-item.on .tl-node { background: var(--ember); border-color: var(--ember); }

.tl-card {
  width: min(46%, 470px);
  background: rgba(20,19,18,.94);
  border: 1px solid var(--line);
  border-top: 3px solid transparent;
  opacity: .55;
  transform: translateY(16px);
  transition: opacity .6s, transform .6s cubic-bezier(.2,.8,.2,1), border-color .6s;
}
.tl-item.on .tl-card { opacity: 1; transform: none; border-top-color: var(--ember); }
.tl-imgs { position: relative; display: grid; gap: 2px; grid-template-columns: 1fr; aspect-ratio: 16 / 10; overflow: hidden; }
.tl-imgs.n2, .tl-imgs.n4 { grid-template-columns: 1fr 1fr; }
.tl-imgs.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.tl-imgs.n3 .tl-img:first-child { grid-row: 1 / -1; }
.tl-imgs::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.6), transparent 45%); pointer-events: none; }
.tl-img { width: 100%; height: 100%; min-height: 0; object-fit: cover; display: block; background: var(--rubble); filter: grayscale(1) contrast(1.12) brightness(.92); transition: filter .8s; }
.tl-item.on .tl-img { filter: grayscale(.55) contrast(1.1) brightness(.95); }
.tl-body { padding: 0 22px 22px; }
.tl-year {
  font-family: var(--display); font-weight: 700; font-size: 2rem; line-height: 1;
  color: var(--bone);
  unicode-bidi: isolate; direction: ltr;
  font-variant-numeric: lining-nums tabular-nums;
}
.tl-body > .tl-year { display: inline-block; position: relative; z-index: 1; margin-top: -.55em; background: #000; padding: .2em .4em .15em; border-bottom: 2px solid var(--ember); }
.tl-card:not(:has(.tl-imgs)) .tl-body { padding-top: 22px; }
.tl-card:not(:has(.tl-imgs)) .tl-body > .tl-year { margin-top: 0; }
.tl-title { font: 500 1.125rem/1.7 var(--body); margin: 14px 0 0; color: var(--bone); }
.tl-sub { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--rubble); }
.tl-sub .tl-year { font-size: 1.35rem; color: var(--stone); }
.tl-sub .tl-title { font-size: 1rem; margin-top: 6px; color: var(--dust); }

@media (max-width: 760px) {
  .tl-item, .tl-item.side-a, .tl-item.side-b { justify-content: flex-start; min-height: 0; padding: 14px 40px 14px 0; --nx: calc(100% - 14px); }
  .tl-card { width: 100%; }
  .tl-body > .tl-year { font-size: 1.75rem; }
}

/* ---------- Videos ---------- */
.yousef { padding: var(--section) 0; }
.vgrid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  max-width: 1100px; margin: 0 auto; padding: 0 var(--gutter);
  direction: ltr; /* parts run 1 → 9 from left to right */
}
.vtile {
  position: relative; aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  background: var(--ash) center / cover no-repeat;
  color: var(--dust); cursor: pointer; padding: 0;
  font: inherit;
  overflow: hidden;
  transition: border-color .25s;
}
.vtile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,0) 60%); }
.vtile:hover { border-color: var(--ember); }
.vtile-num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; line-height: 1;
  font-size: clamp(3rem, 14vw, 7rem);
  color: transparent; -webkit-text-stroke: 1px var(--stone);
  transition: -webkit-text-stroke-color .25s;
}
.vtile:hover .vtile-num { -webkit-text-stroke-color: var(--ember); }
/* with a thumbnail: darken it and show the number solid in the corner */
.vtile.has-poster { filter: grayscale(.6); transition: filter .3s, border-color .25s; }
.vtile.has-poster:hover { filter: none; }
.vtile.has-poster::before { background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,.25)); }
.vtile.has-poster .vtile-num {
  inset: auto 10px auto auto; top: 8px; display: block;
  font-size: clamp(1.8rem, 6vw, 3.2rem);
  color: #fff; -webkit-text-stroke: 0;
  text-shadow: 0 2px 10px rgba(0,0,0,.8);
}
.vtile.has-poster:hover .vtile-num { color: var(--ember); }
.vtile-play { position: absolute; bottom: 12px; left: 12px; width: 36px; height: 36px; border: 1.5px solid var(--dust); border-radius: 50%; transition: border-color .25s, background-color .25s; }
.vtile-play::after { content: ""; position: absolute; top: 50%; left: 50%; margin: -6px 0 0 -3px; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent var(--dust); }
.vtile:hover .vtile-play { border-color: var(--ember); background: var(--ember); }
.vtile:hover .vtile-play::after { border-left-color: #fff; }
@media (max-width: 560px) {
  .vgrid { gap: 4px; }
  .vtile-play { width: 28px; height: 28px; bottom: 8px; left: 8px; }
  .vtile-play::after { margin: -5px 0 0 -3px; border-width: 5px 0 5px 8px; }
}

/* ---------- Player ---------- */
.player { width: min(960px, calc(100% - 32px)); padding: 0; border: 1px solid var(--rubble); background: var(--black); color: var(--dust); }
.player::backdrop { background: rgba(0,0,0,.85); }
.player-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--rubble); }
.player-head h3 { margin: 0; font: 500 1.1rem var(--body); }
.player-close { font: 500 .95rem var(--body); color: var(--dust); background: none; border: 1px solid var(--rubble); padding: 6px 14px; min-height: 40px; cursor: pointer; }
.player-close:hover { border-color: var(--ember); }
.player-media { aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--ash); }
.player-media video, .player-media iframe { width: 100%; height: 100%; border: 0; display: block; }

/* YouTube wrapped in our own controls; the shield blocks clicks to youtube.com */
.ytw { position: relative; width: 100%; height: 100%; background: #000; direction: ltr; }
.ytw iframe { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.yt-shield { position: absolute; inset: 0 0 46px; cursor: pointer; display: grid; place-items: center; background: rgba(0,0,0,.35); transition: background-color .25s; }
.ytw.playing .yt-shield { background: transparent; }
.yt-big { width: 72px; height: 72px; border-radius: 50%; background: rgba(176,22,29,.92); position: relative; transition: opacity .25s; }
.yt-big::after { content: ""; position: absolute; top: 50%; left: 50%; margin: -13px 0 0 -8px; border-style: solid; border-width: 13px 0 13px 22px; border-color: transparent transparent transparent #fff; }
.ytw.playing .yt-big { opacity: 0; }
.yt-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 46px; display: flex; align-items: center; gap: 12px; padding: 0 12px; background: #0b0b0b; border-top: 1px solid var(--rubble); }
.yt-btn { flex: none; width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; color: var(--bone); }
.yt-pp::before { content: ""; position: absolute; top: 50%; left: 50%; margin: -8px 0 0 -5px; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent currentColor; }
.ytw.playing .yt-pp::before { margin: -8px 0 0 -6px; width: 4px; height: 16px; border: solid currentColor; border-width: 0 4px; }
.yt-fs::before { content: ""; position: absolute; inset: 9px; border: 2px solid currentColor; }
.yt-seek { flex: 1; accent-color: var(--ember); min-width: 0; }
.yt-time { flex: none; font-size: .8rem; color: var(--stone); font-variant-numeric: tabular-nums; }
/* autoplay was blocked: let the first tap reach YouTube's own play button */
.ytw.needs-tap iframe { pointer-events: auto; }
.ytw.needs-tap .yt-shield { display: none; }
.ytw:fullscreen { display: flex; }
.ytw:fullscreen .yt-shield { inset: 0 0 46px; }

/* ---------- Closing ---------- */
.report {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--section) var(--gutter) calc(var(--section) + 20px);
}
.report-lead { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 4.6vw, 3.6rem); line-height: 1.35; text-wrap: balance; color: var(--bone); margin: 0 0 20px; max-width: 20ch; }
.report-body { font-size: clamp(1.15rem, 2vw, 1.45rem); color: var(--bone); max-width: 40ch; margin: 0 0 40px; }
/* message rises in when reached (only if JS runs) */
.js .report > * { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s cubic-bezier(.2,.8,.2,1); }
.js .report.shown > * { opacity: 1; transform: none; }
.js .report.shown > :nth-child(2) { transition-delay: .2s; }
.js .report.shown > :nth-child(3) { transition-delay: .4s; }

.report-cta {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 18px;
  width: min(560px, 100%); min-height: 84px;
  padding: 16px 22px 16px 26px;
  background: var(--blood); color: #fff; text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 20px 40px -20px rgba(216,35,42,.6);
  transition: background-color .25s;
}
.report-cta:hover { background: var(--ember); }
.report-cta-icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #fff; }
.report-cta-icon svg { width: 26px; height: 26px; fill: var(--blood); margin-left: -2px; }
.report-cta-text { flex: 1; font: 600 clamp(1.15rem, 3.4vw, 1.4rem)/1.4 var(--body); }
.report-cta-arrow { font-size: 1.6rem; line-height: 1; transition: transform .25s; }
.report-cta:hover .report-cta-arrow { transform: translateX(-6px); }
.report-cta::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.2) 50%, transparent 70%);
  transform: translateX(110%);
  pointer-events: none;
}
.report.shown .report-cta::after { animation: sheen 1.2s ease-in-out 1s 2; }
@keyframes sheen { from { transform: translateX(110%); } to { transform: translateX(-110%); } }
@media (max-width: 560px) {
  .report-cta { gap: 14px; padding: 14px 16px; min-height: 76px; }
  .report-cta-icon { width: 44px; height: 44px; }
  .report-cta-icon svg { width: 22px; height: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .piece, .hero-crack polyline, .tl-card, .tl-node, .tl-img, .report > * { transition: none !important; }
  .tl-card { transform: none !important; }
  .js .report > * { opacity: 1; transform: none; }
  .report-cta::after { animation: none !important; }
}
