/* MADA landing (welcome.html, welcome-en.html): page CSS only, on top of the tasteskill kit in /kit.
   What lives here: the client's faces, RTL care, and the inside of the visuals (the phone frames,
   the programme and translate screens, the festival photographs). */

/* the client's faces, as src/shared/fonts.css declares them (copied: a public file cannot import from src) */
/* MADA type (Ash, 16 Nov 2026):
   - Arabic text: the normal Zain.            → family "MADA Text"
   - Arabic big titles only: the long-tailed Zain (sitfa.art "ZAIN mob" cut). → "MADA Display"
   - Latin and digits: Thmanyah Sans.
   Each composite family splits by unicode-range, so one font-family stack serves both scripts. */

/* Arabic, Arabic Supplement/Extended, presentation forms */
/* (kept in sync below: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF) */

/* ---------- MADA Text: normal Zain (Arabic) */
@font-face {
  font-family: 'MADA Text';
  src: url('/mada/fonts/zain-400.woff2') format('woff2');
  font-weight: 100 500;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'MADA Text';
  src: url('/mada/fonts/zain-700.woff2') format('woff2');
  font-weight: 600 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
/* ---------- MADA Text: Thmanyah Sans (everything else) */
@font-face {
  font-family: 'MADA Text';
  src: url('/fonts/thmanyah/thmanyahsans-Regular.woff2') format('woff2');
  font-weight: 100 400;
  font-display: swap;
  unicode-range: U+0000-05FF, U+0700-074F, U+0780-086F, U+0900-FB4F, U+FE00-FE6F, U+FF00-FFFF;
}
@font-face {
  font-family: 'MADA Text';
  src: url('/fonts/thmanyah/thmanyahsans-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0000-05FF, U+0700-074F, U+0780-086F, U+0900-FB4F, U+FE00-FE6F, U+FF00-FFFF;
}
@font-face {
  font-family: 'MADA Text';
  src: url('/fonts/thmanyah/thmanyahsans-Bold.woff2') format('woff2');
  font-weight: 600 700;
  font-display: swap;
  unicode-range: U+0000-05FF, U+0700-074F, U+0780-086F, U+0900-FB4F, U+FE00-FE6F, U+FF00-FFFF;
}
@font-face {
  font-family: 'MADA Text';
  src: url('/fonts/thmanyah/thmanyahsans-Black.woff2') format('woff2');
  font-weight: 800 900;
  font-display: swap;
  unicode-range: U+0000-05FF, U+0700-074F, U+0780-086F, U+0900-FB4F, U+FE00-FE6F, U+FF00-FFFF;
}

/* ---------- MADA Display: long-tailed Zain (Arabic big titles) */
@font-face {
  font-family: 'MADA Display';
  src: url('/fonts/zain/zain-400.ttf') format('truetype');
  font-weight: 100 500;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'MADA Display';
  src: url('/fonts/zain/zain-800.ttf') format('truetype');
  font-weight: 600 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'MADA Display';
  src: url('/fonts/thmanyah/thmanyahsans-Black.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-05FF, U+0700-074F, U+0780-086F, U+0900-FB4F, U+FE00-FE6F, U+FF00-FFFF;
}

/* Plain names kept for the canvas card and any old rule that still names them */
@font-face {
  font-family: 'Thmanyah Sans';
  src: url('/fonts/thmanyah/thmanyahsans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Sans';
  src: url('/fonts/thmanyah/thmanyahsans-Bold.woff2') format('woff2');
  font-weight: 600 700;
  font-display: swap;
}
@font-face {
  font-family: 'Thmanyah Sans';
  src: url('/fonts/thmanyah/thmanyahsans-Black.woff2') format('woff2');
  font-weight: 800 900;
  font-display: swap;
}
@font-face {
  font-family: 'Zain';
  src: url('/mada/fonts/zain-400.woff2') format('woff2');
  font-weight: 100 500;
  font-display: swap;
}
@font-face {
  font-family: 'Zain';
  src: url('/mada/fonts/zain-700.woff2') format('woff2');
  font-weight: 600 900;
  font-display: swap;
}

/* the client's type (DESIGN.md): normal Zain for Arabic text, Thmanyah Sans for Latin (fonts.css
   composes both into "MADA Text"); the long-tailed Zain "MADA Display" on the Arabic h1 only */
:root {
  --font-display: "MADA Text", system-ui, sans-serif;
  --font-text: "MADA Text", system-ui, sans-serif;
  --font-mono: "MADA Text", system-ui, sans-serif;
  --ui-font: "MADA Text", system-ui, sans-serif;
  --display-weight: 500;
  --display-tracking: -0.02em;
  --display-tracking-xl: -0.02em;
  --link-ink: #A9471A;
}
:root[lang="ar"] {
  --display-weight: 700;
  --display-tracking: 0;
  --display-tracking-xl: 0;
}
:root[lang="ar"] body { line-height: 1.7; }
:root[lang="ar"] .hero h1 { font-family: "MADA Display", "MADA Text", system-ui, sans-serif; font-weight: 400; letter-spacing: 0; line-height: 1.15; }
:root[lang="ar"] :is(h2, h3, .close__word, .footer__lede, .btn, .nav__logo) { letter-spacing: 0; }
:root[lang="ar"] .close__word { font-family: "MADA Display", "MADA Text", system-ui, sans-serif; font-weight: 400; line-height: 1.1; }
:focus-visible { outline-color: var(--link-ink); }

/* the logo: the client's own symbol beside the name */
.nav__logo img { width: 40px; height: 26px; display: block; }
.nav__logo bdi { font-weight: 700; }

/* hero: the festival photograph in the cinema frame; RTL puts the box at the start (right) side */
.hero--film .hero__media img { object-position: var(--ly-pos, 50% 50%); }
[dir="rtl"] .hero__over > :first-child { justify-self: start; }
[dir="rtl"] .m-arrow { scale: -1 1; }

/* ---------------------------------------------------------------- the phone frame (MADA's own UI) */
.phone {
  --pf-bg: #F6F1EA; --pf-surface: #FFFFFF; --pf-surface-2: #EFE8DE; --pf-ink: #1C1915; --pf-muted: #675F55;
  --pf-line: rgba(28, 25, 21, .12); --pf-accent: #EE7D34; --pf-accent-ink: #A9471A;
  --u-bg: var(--pf-bg); --u-ink: var(--pf-ink); --u-muted: var(--pf-muted); --u-border: var(--pf-line); --u-accent: var(--pf-accent);
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  width: min(100%, 372px); margin-inline: auto;
  background: var(--pf-bg); color: var(--pf-ink); border: 1px solid var(--pf-line); border-radius: 40px;
  font-family: "MADA Text", system-ui, sans-serif; font-size: 14px; line-height: 1.5; text-align: start;
}
[lang="ar"] .phone { font-size: 15px; line-height: 1.6; }
.phone svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pf-top { display: flex; align-items: center; gap: 8px; height: 56px; padding-inline: 16px; padding-top: 6px; border-bottom: 1px solid var(--pf-line); flex: none; }
.pf-top img { width: 34px; height: 22px; }
.pf-top b { font-size: 17px; }
.pf-top .pf-sp { flex: 1; }
.pf-top .pf-bell { position: relative; }
.pf-top .pf-bell::after { content: ""; position: absolute; top: 1px; inset-inline-end: 1px; width: 7px; height: 7px; border-radius: 50%; background: var(--pf-accent); }
.pf-body { flex: 1 1 auto; min-height: 0; padding: 12px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.pf-composer { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--pf-surface); border: 1px solid var(--pf-line); border-radius: 16px; color: var(--pf-muted); font-size: 14px; flex: none; }
.pf-av { width: 32px; height: 32px; border-radius: 50%; background: var(--pf-ink); color: var(--pf-bg); display: grid; place-items: center; flex: none; }
.pf-av img { width: 22px; height: 14px; filter: invert(1) brightness(2); }
.pf-post { background: var(--pf-surface); border: 1px solid var(--pf-line); border-radius: 24px; padding: 12px; display: flex; flex-direction: column; gap: 10px; flex: none; }
.pf-who { display: flex; align-items: center; gap: 10px; }
.pf-who b { display: block; font-size: 15px; line-height: 1.3; }
.pf-who small { display: block; font-size: 13px; color: var(--pf-muted); }
.pf-post p { margin: 0; }
.pf-post .pf-photo { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #1C1915; }
.pf-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-acts { display: flex; gap: 18px; color: var(--pf-muted); font-size: 13px; }
.pf-acts span { display: inline-flex; align-items: center; gap: 6px; }
.pf-acts .is-on { color: var(--pf-accent-ink); }
.pf-acts .is-on svg { fill: var(--pf-accent); stroke: var(--pf-accent); }
.pf-tabs { display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; height: 64px; background: var(--pf-surface); border-top: 1px solid var(--pf-line); flex: none; padding-bottom: 4px; }
.pf-tabs span { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; color: var(--pf-muted); }
.pf-tabs .is-on { color: var(--pf-ink); }
.pf-tabs .is-on::before { content: ""; position: absolute; top: -11px; width: 28px; height: 2px; border-radius: 2px; background: var(--pf-accent); }
.pf-tabs .pf-plus { width: 44px; height: 44px; border-radius: 50%; background: var(--pf-accent); color: var(--pf-ink); display: grid; place-items: center; justify-self: center; }

/* the programme and translate screens inside the cards' panels */
.pf-screen { align-self: flex-start; border-radius: 24px 24px 0 0; border-bottom: 0; margin-top: 24px; width: min(calc(100% - 48px), 420px); }
.pf-days { display: flex; gap: 4px; padding: 4px 12px 0; border-bottom: 1px solid var(--pf-line); flex: none; }
.pf-days span { min-width: 36px; text-align: center; padding: 8px 4px 10px; font-size: 14px; color: var(--pf-muted); position: relative; }
.pf-days span small { display: block; font-size: 13px; }
.pf-days .is-on { color: var(--pf-ink); font-weight: 700; }
.pf-days .is-on::after { content: ""; position: absolute; inset: auto 6px -1px; height: 2px; border-radius: 2px; background: var(--pf-accent); }
.pf-rows { display: flex; flex-direction: column; background: var(--pf-surface); border: 1px solid var(--pf-line); border-radius: 24px; padding: 4px 12px; flex: none; }
.pf-rows li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding-block: 10px; border-bottom: 1px solid var(--pf-line); }
.pf-rows li:last-child { border-bottom: 0; }
.pf-rows .pf-thumb { width: 56px; height: 56px; border-radius: 16px; overflow: hidden; background: #1C1915; }
.pf-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-rows b { display: block; font-size: 15px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-rows small { display: block; font-size: 13px; color: var(--pf-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-rows time { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pf-tr { padding: 10px 12px; border-radius: 16px; background: var(--pf-surface-2); display: flex; flex-direction: column; gap: 6px; }
.pf-tr__lab { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--pf-accent-ink); font-weight: 700; }
.pf-tr__lab svg { width: 16px; height: 16px; }
.pf-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding-inline: 12px; border-radius: 999px; background: var(--pf-ink); color: var(--pf-bg); font-size: 13px; width: max-content; }
.pf-chip svg { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- sections */
/* the feed: words and three rows on one side, the phone on the other */
#feed .feed__phone { display: flex; align-items: center; }
#feed .rows { margin-top: var(--s-6); }
#feed .rows__name { font-weight: 700; }
/* the two cards: their panels hold the phone screens */
#tools .panel { --p-h: 420px; height: var(--p-h); padding: 0; display: flex; justify-content: center; overflow: hidden; background: var(--surface-2, #EFE8DE); }
#tools .panel--prog { background: #EFE8DE; }
#tools .panel--tr { background: #FBE4D2; }
/* the festival: the venues beside three photographs */
.fest__photos { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 3fr) minmax(0, 2fr); gap: var(--s-4); height: 100%; min-height: 520px; }
.fest__photos figure { margin: 0; border-radius: var(--r-lg, 24px); overflow: hidden; background: #000; }
.fest__photos figure:first-child { grid-column: 1 / -1; }
.fest__photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
#festival .rows { margin-top: var(--s-6); }
#festival .rows > li > p { color: var(--muted); }
.statement .mo-wh__text { max-width: none; }

/* RTL: text blocks fill their column (a max-width would push them to the right side and off the
   column's other line); the two splits keep the words on the left and the picture on the right on
   both pages, so the layout matches the English page (the words still read right to left) */
[dir="rtl"] :is(.section-head, .section-head > *, .section-head h2, .rows > li > p, .card p, .footer__lede, .t-lead) { max-width: none; }
[dir="rtl"] .footer__legal > span { flex: 1 1 auto; }
[dir="rtl"] .split-ltr { direction: ltr; }
[dir="rtl"] .split-ltr > * { direction: rtl; }

@media (max-width: 1023px) {
  .fest__photos { min-height: 0; height: auto; grid-template-rows: auto auto; }
  .fest__photos figure { aspect-ratio: 4 / 3; }
  .fest__photos figure:first-child { aspect-ratio: 16 / 9; }
}
@media (max-width: 639px) {
  #tools .panel { --p-h: 400px; }
  .pf-screen { width: calc(100% - 32px); margin-top: 16px; }
}
.pf-body p { margin: 0; }
/* Arabic paragraphs and headings in the split columns set justified, as Arabic print does, so every
   full line meets both column lines */
@media (min-width: 1024px) {
  [dir="rtl"] .split-ltr :is(h2, .section-head p, .rows > li > p) { text-align: justify; text-align-last: start; }
}
/* RTL rows from 640: the name on the start side, its line beside it on the end side, so every row
   meets the column's far line */
@media (min-width: 640px) {
  [dir="rtl"] .split-ltr .rows > li { grid-template-columns: minmax(8em, auto) minmax(0, 1fr); align-items: baseline; }
  [dir="rtl"] .split-ltr .rows > li > p { grid-column: 2; grid-row: 1; text-align: justify; text-align-last: end; }
}
[dir="rtl"] .footer__legal { justify-content: flex-end; }
[dir="rtl"] .footer__legal > span { flex: 0 1 auto; }
/* the close on the Arabic page: the words and the name on the left line, the button on the right, as on
   the English page */
[dir="rtl"] :is(.close--word, .close--word > .section-head--split) { direction: ltr; }
[dir="rtl"] :is(.close--word .section-head--split > *, .close--word > .close__word) { direction: rtl; }
[dir="rtl"] .close--word .close__word { text-align: left; }

/* SITFA card button beside log in (the 2026 orange; gold was 2025), patronage under the Ministry */
.btn.btn--card { background: var(--p-accent); border-color: var(--p-accent); color: var(--p-accent-ink); }
.btn.btn--card:hover { background: color-mix(in oklab, var(--p-accent) 86%, var(--p-ink)); border-color: color-mix(in oklab, var(--p-accent) 86%, var(--p-ink)); }
.hero__patron { color: rgba(255, 255, 255, 0.86); font-size: 14px; line-height: 1.5; margin-top: 18px; max-width: 46ch; }
.footer__patron { align-items: center; display: flex; gap: 16px; margin-block: 32px 8px; }
.footer__patron img { background: #ffffff; border-radius: 8px; flex: none; height: 90px; padding: 6px; width: auto; }
.footer__patron p { font-size: 15px; line-height: 1.5; margin: 0; max-width: 44ch; }
