/* 1Lebanon — one typeface for three languages, one stem down the page */
:root {
  --paper: #F5F7F3;
  --white: #FFFFFF;
  --ink: #10231C;
  --cedar: #0E3B2E;
  --green: #178A5B;
  --leaf: #6FD6A4;
  --mint: #E2EEE6;
  --red: #D3222A;
  --line: #D3DAD2;
  --muted: #55665E;
  --gutter: clamp(20px, 5vw, 72px);
  --stem: 6px;
  --max: 1180px;
  --font: 'Readex Pro', 'Noto Sans Arabic', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-weight: 300; font-size: 17px; line-height: 1.6;
}
[dir="rtl"] body { line-height: 1.85; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 2px; }
.num, .ltr { direction: ltr; unicode-bidi: isolate; }
.skip { position: absolute; inset-inline-start: -9999px; top: 0; background: var(--cedar); color: #fff; padding: 10px 16px; z-index: 99; }
.skip:focus { inset-inline-start: 8px; top: 8px; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.top-in { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 12px var(--gutter); display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 3px; text-decoration: none; direction: ltr; }
.brand svg { height: 36px; width: auto; }
.brand span { font-weight: 600; font-size: 27px; letter-spacing: -0.035em; color: var(--cedar); line-height: 1; }
.nav { display: flex; gap: 26px; margin-inline-start: auto; }
.nav a { text-decoration: none; font-weight: 400; font-size: 15px; padding: 10px 0; }
.nav a:hover { color: var(--green); }
.langs { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--white); }
.langs a { text-decoration: none; font-size: 14px; font-weight: 500; min-width: 40px; text-align: center; padding: 6px 10px; border-radius: 999px; line-height: 1.3; }
.langs a[aria-current] { background: var(--cedar); color: #fff; }
.menu-btn { display: none; }

/* ---------- shared section frame: the stem and its tiers ---------- */
main { position: relative; }
.wrap { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding-inline: var(--gutter); }
.sec { padding-block: clamp(64px, 9vw, 120px); position: relative; }
.stemmed { position: relative; padding-inline-start: clamp(28px, 5vw, 76px); }
.stemmed::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--stem); background: var(--red); }
.tier {
  display: inline-block; position: relative; background: var(--green); color: #fff; font-weight: 500; font-size: 14px;
  padding: 7px 26px 7px 18px; margin-inline-start: calc(-1 * clamp(28px, 5vw, 76px) + var(--stem)); margin-bottom: 26px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 100%, 0 100%);
}
[dir="rtl"] .tier { padding: 7px 18px 7px 26px; clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%); }
h2 { font-weight: 600; font-size: clamp(30px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -0.03em; color: var(--cedar); max-width: 18ch; text-wrap: balance; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; line-height: 1.35; }
.lede { font-size: clamp(18px, 1.7vw, 21px); max-width: 60ch; margin-top: 22px; color: var(--ink); }
h3 { font-weight: 600; font-size: 20px; line-height: 1.25; color: var(--cedar); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(40px, 6vw, 84px) clamp(56px, 8vw, 104px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
h1 { font-weight: 700; font-size: clamp(40px, 5.6vw, 78px); line-height: 1; letter-spacing: -0.045em; color: var(--cedar); }
h1 span { display: block; }
h1 span:last-child { color: var(--red); }
.hero p.lede { max-width: 46ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 12px 24px; border-radius: 4px; text-decoration: none; font-weight: 500; font-size: 16px; border: 2px solid var(--cedar); cursor: pointer; font-family: inherit; }
.btn.solid { background: var(--cedar); color: #fff; }
.btn.solid:hover { background: var(--green); border-color: var(--green); }
.btn.ghost { background: transparent; color: var(--cedar); }
.btn.ghost:hover { background: var(--mint); }
.indep { margin-top: 22px; font-size: 14px; color: var(--muted); max-width: 48ch; }

/* the files demo */
.demo { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.demo-title { font-weight: 500; font-size: 15px; }
.seg { display: inline-flex; background: var(--mint); border-radius: 999px; padding: 4px; }
.seg button { font: inherit; font-weight: 500; font-size: 14px; border: 0; background: transparent; color: var(--cedar); padding: 9px 16px; min-height: 40px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--cedar); color: #fff; }
.stage { display: grid; }
.stage > * { grid-area: 1 / 1; transition: opacity .45s ease, transform .55s cubic-bezier(.2,.7,.2,1); }
.files { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-self: start; }
.file { border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; background: var(--paper); font-size: 14px; line-height: 1.45; transition: transform .55s cubic-bezier(.2,.7,.2,1), opacity .4s ease; }
.file:nth-child(odd) { transform: rotate(-1.1deg); }
.file:nth-child(even) { transform: rotate(.9deg) translateY(4px); }
.file .org { font-weight: 500; color: var(--muted); font-size: 12.5px; display: block; margin-bottom: 4px; }
.file .name { font-weight: 600; font-size: 16px; color: var(--ink); display: block; }
.file .id { font-size: 13px; color: var(--muted); display: block; margin-top: 3px; }
.file .how { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 3px; background: #F6DEDF; color: #8E1218; }
.one { opacity: 0; transform: scale(.96); pointer-events: none; border: 2px solid var(--cedar); border-radius: 8px; overflow: hidden; align-self: start; background: var(--white); }
.one-head { background: var(--cedar); color: #fff; padding: 14px 16px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.one-head b { font-weight: 600; font-size: 18px; }
.one-head .id { font-weight: 500; font-size: 14px; direction: ltr; color: var(--leaf); }
.one dl { margin: 0; }
.one .row { display: grid; grid-template-columns: 34% 1fr auto; gap: 10px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.one dt { color: var(--muted); }
.one dd { margin: 0; font-weight: 500; }
.one .src { font-size: 12px; font-weight: 500; background: var(--mint); color: var(--cedar); padding: 2px 8px; border-radius: 3px; white-space: nowrap; }
.demo.on .files { opacity: 0; pointer-events: none; }
.demo.on .file { transform: translateY(20px) scale(.9) rotate(0); }
.demo.on .one { opacity: 1; transform: none; pointer-events: auto; }
.demo-note { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* ---------- today ---------- */
.today { background: var(--cedar); color: #fff; }
.today h2 { color: #fff; }
.today .lede { color: #DCE9E1; }
.today .stemmed::before { background: var(--leaf); }
.today .tier { background: var(--leaf); color: var(--cedar); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 52px; border-top: 1px solid rgba(255,255,255,.22); }
.fact { padding: 26px 26px 0 0; border-inline-end: 1px solid rgba(255,255,255,.22); padding-inline: 0 26px; }
.fact + .fact { padding-inline-start: 26px; }
.fact:last-child { border-inline-end: 0; }
.fact b { display: block; font-weight: 600; font-size: clamp(34px, 4.2vw, 54px); letter-spacing: -0.03em; line-height: 1.05; color: var(--leaf); }
.fact p { margin-top: 10px; font-size: 16px; color: #DCE9E1; max-width: 34ch; }
.fact a { display: inline-block; margin-top: 10px; font-size: 13px; color: #A9C9B8; }

/* ---------- vision ---------- */
.vision-text { font-weight: 500; font-size: clamp(24px, 3.3vw, 42px); line-height: 1.22; letter-spacing: -0.02em; color: var(--cedar); max-width: 26ch; text-wrap: balance; }
[dir="rtl"] .vision-text { letter-spacing: 0; line-height: 1.6; }
.vision-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.promises li { padding: 18px 0; border-top: 1px solid var(--line); }
.promises li:last-child { border-bottom: 1px solid var(--line); }
.promises b { font-weight: 600; color: var(--cedar); display: block; }

/* ---------- principles ---------- */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 44px; margin-top: 52px; }
.principles li { border-top: 3px solid var(--cedar); padding-top: 16px; }
.principles p { margin-top: 8px; font-size: 16px; color: var(--muted); }

/* ---------- blueprint layers ---------- */
.blueprint { background: var(--white); border-block: 1px solid var(--line); }
.layers { margin-top: 48px; display: grid; gap: 8px; }
.layer { display: grid; grid-template-columns: 220px 1fr; gap: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--paper); }
.layer-name { padding: 18px 20px; background: var(--mint); }
.layer-name b { display: block; font-weight: 600; color: var(--cedar); font-size: 17px; line-height: 1.25; }
.layer-name span { font-size: 13.5px; color: var(--muted); display: block; margin-top: 4px; line-height: 1.4; }
.layer ul { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 20px; align-content: center; }
.layer li { background: var(--white); border: 1px solid var(--line); border-radius: 4px; padding: 6px 12px; font-size: 14.5px; font-weight: 400; }
.layer.core { border: 2px solid var(--red); }
.layer.core .layer-name { background: var(--red); }
.layer.core .layer-name b, .layer.core .layer-name span { color: #fff; }
.layers-note { margin-top: 18px; font-size: 15px; color: var(--muted); max-width: 70ch; }

/* ---------- schema ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.tabs button { font: inherit; font-weight: 500; font-size: 15px; min-height: 44px; padding: 8px 18px; border-radius: 4px; border: 1px solid var(--cedar); background: transparent; color: var(--cedar); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--cedar); color: #fff; }
.panel { margin-top: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); overflow-x: auto; }
.panel[hidden] { display: none; }
.panel-desc { padding: 16px 20px; font-size: 15.5px; color: var(--muted); border-bottom: 1px solid var(--line); max-width: none; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
th { text-align: start; font-weight: 500; color: var(--muted); font-size: 13.5px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
td { padding: 11px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td code { font-family: var(--mono); font-size: 13.5px; color: var(--cedar); direction: ltr; unicode-bidi: isolate; display: inline-block; }
td.type { font-family: var(--mono); font-size: 13px; color: var(--muted); direction: ltr; unicode-bidi: isolate; text-align: start; }
td .own { font-size: 13px; font-weight: 500; background: var(--mint); color: var(--cedar); padding: 2px 8px; border-radius: 3px; display: inline-block; }
td .key { color: var(--red); font-weight: 600; font-family: var(--font); font-size: 12px; margin-inline-start: 8px; }

/* ---------- roadmap ---------- */
.phases { margin-top: 52px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: ph; }
.phase { counter-increment: ph; border-top: 3px solid var(--cedar); padding: 20px 24px 0 0; padding-inline: 0 24px; position: relative; }
.phase::before { content: ""; position: absolute; top: -9px; inset-inline-start: 0; width: 15px; height: 15px; background: var(--red); border-radius: 50%; }
.phase .when { font-weight: 500; font-size: 14px; color: var(--green); display: block; }
.phase h3 { margin-top: 6px; }
.phase h3::before { content: counter(ph) ". "; }
.phase ul { margin-top: 12px; }
.phase li { font-size: 15px; color: var(--muted); padding: 6px 0; padding-inline-start: 16px; position: relative; }
.phase li::before { content: ""; position: absolute; inset-inline-start: 0; top: .95em; width: 8px; height: 2px; background: var(--green); }

/* ---------- evidence ---------- */
.evidence { background: var(--mint); }
.cases { margin-top: 48px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; }
.case { padding: 24px 0; border-top: 1px solid #B9CCBF; display: grid; grid-template-columns: 150px 1fr; gap: 20px; }
.case b.where { font-weight: 600; font-size: 20px; color: var(--cedar); }
.case span.what { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.case p { font-size: 16px; }
.case a { font-size: 13px; color: var(--muted); display: inline-block; margin-top: 6px; }

/* ---------- study + join ---------- */
.study-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.toc { border: 1px solid var(--line); border-radius: 8px; background: var(--white); counter-reset: toc; }
.toc li { counter-increment: toc; padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; gap: 14px; font-weight: 400; }
.toc li:last-child { border-bottom: 0; }
.toc li::before { content: counter(toc); font-weight: 600; color: var(--red); min-width: 1.2em; }
.join { background: var(--cedar); color: #fff; }
.join h2 { color: #fff; max-width: 20ch; }
.join .lede { color: #DCE9E1; }
.join .btn.solid { background: #fff; color: var(--cedar); border-color: #fff; }
.join .btn.solid:hover { background: var(--leaf); border-color: var(--leaf); }
.who { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 48px; }
.who li { border-top: 1px solid rgba(255,255,255,.3); padding-top: 14px; font-size: 15.5px; color: #DCE9E1; }
.who b { display: block; color: #fff; font-weight: 600; font-size: 17px; margin-bottom: 4px; }
.founder { margin-top: 44px; font-size: 15px; color: #A9C9B8; }

footer { padding: 40px 0 56px; font-size: 14px; color: var(--muted); }
.foot { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-start; }
.foot p { max-width: 62ch; }
.foot .slogan { font-weight: 500; color: var(--cedar); font-size: 16px; }

/* ---------- study page ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--gutter) 96px; }
.doc h1 { font-size: clamp(36px, 5vw, 60px); line-height: 1.04; }
.doc .meta { margin-top: 18px; color: var(--muted); font-size: 15px; }
.doc h2 { font-size: clamp(24px, 3vw, 32px); margin-top: 64px; max-width: none; padding-top: 18px; border-top: 3px solid var(--cedar); }
.doc h3 { margin-top: 32px; }
.doc p, .doc ul, .doc ol { margin-top: 16px; }
.doc ul { list-style: none; }
.doc ul li, .doc ol li { padding-inline-start: 20px; position: relative; margin-top: 8px; }
.doc ul li::before { content: ""; position: absolute; inset-inline-start: 0; top: .8em; width: 10px; height: 2px; background: var(--green); }
.doc ol { counter-reset: ol; }
.doc ol li { counter-increment: ol; padding-inline-start: 30px; }
.doc ol li::before { content: counter(ol) "."; position: absolute; inset-inline-start: 0; font-weight: 600; color: var(--red); }
.doc a { color: var(--green); }
.doc strong { font-weight: 600; }
.doc .tablewrap { overflow-x: auto; margin-top: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.doc td, .doc th { padding: 10px 14px; }
.doc .callout { margin-top: 24px; padding: 18px 20px; background: var(--mint); border-inline-start: var(--stem) solid var(--red); }
.doc .callout p:first-child { margin-top: 0; }
.doc .refs li { font-size: 14.5px; overflow-wrap: anywhere; }
.doc .langnote { margin-top: 20px; padding: 12px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; font-size: 15px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .vision-grid, .study-grid { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr 1fr; }
  .phases { grid-template-columns: 1fr 1fr; gap: 40px 0; }
  .cases { grid-template-columns: 1fr; }
  .who { grid-template-columns: 1fr 1fr; }
  .nav { display: none; position: absolute; top: 100%; inset-inline: 0; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-inline-start: auto; background: none; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; color: var(--cedar); }
  .top-in { gap: 12px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .facts { grid-template-columns: 1fr; }
  .fact, .fact + .fact { padding-inline: 0; border-inline-end: 0; border-bottom: 1px solid rgba(255,255,255,.22); padding-bottom: 24px; }
  .principles, .phases, .who { grid-template-columns: 1fr; }
  .layer { grid-template-columns: 1fr; }
  .case { grid-template-columns: 1fr; gap: 8px; }
  .files { grid-template-columns: 1fr 1fr; gap: 8px; }
  .file { padding: 10px; font-size: 13px; }
  .file .name { font-size: 14px; }
  .one .row { grid-template-columns: 1fr auto; }
  .one dt { grid-column: 1 / -1; font-size: 12.5px; margin-bottom: -6px; }
  .brand span { font-size: 23px; } .brand svg { height: 26px; }
  .langs a { min-width: 34px; padding: 6px 7px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage > *, .file { transition: none; }
}
