/* Bunat Palestine — English (LTR) typography layer. Loaded on en/, tr/, fr/ and ms/ pages (the Latin-script languages), after power.css (see build.mjs).
   Display: Alexandria (the same family as the Arabic headlines, Latin cut) · Text: IBM Plex Sans.
   Latin needs tighter leading and tracking than Arabic: Arabic sets 1.22–1.45 for its tall ascenders and dots. */

html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) body { line-height: 1.62; }
html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) :is(p, li, dd, dt, label, small) { hyphens: manual; }

/* Headings: tight, confident, slightly negative tracking */
html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) :is(h1, h2, h3, h4) { line-height: 1.12; letter-spacing: -.015em; text-wrap: balance; }
html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) :is(.hm-hero__h, .px-hero__h, .px-close__h, .foot__moment-h, .hm-win__h, .hm-win__word) { line-height: 1; letter-spacing: -.03em; }
html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) :is(.hm-h2, .hm-kanaf__h, .px-giant__n, .px-poster, .h2) { line-height: 1.06; letter-spacing: -.025em; }
html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) :is(.hm-h3, .hm-t__name, .hm-log h3, .hm-card h3) { line-height: 1.18; letter-spacing: -.01em; }
/* Clamped card titles keep a roomier line so the clamp box holds exactly two lines */
html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) :is(.bp-card__t, .hm-c h3, .hm-fl__top b) { line-height: 1.3; letter-spacing: -.005em; }
html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) :is(.bp-card__t, .hm-c__body h3) { min-height: 2.6em; }
html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) .hm-hero__h .px-ln { padding-block: .04em; }

/* Kinetic headline: the tagline's second line sits a step down so the whole promise fits two lines */
html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) .hm-hero__h { font-size: clamp(44px, calc(14px + 5.2vw), 96px); }
html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) .hm-ln--sub { font-size: .74em; }
html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) .hm-ln--sub .px-brick { vertical-align: baseline; }

/* Eyebrows and small caps-like labels read better slightly tracked in Latin */
html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) :is(.hm-k, .px-eyebrow, .px-hero__eyebrow, .mega__h, .menu__h) { letter-spacing: .02em; }

/* Story lines and leads: Latin prefers a shorter measure */
html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) .px-story__lines { line-height: 1.12; letter-spacing: -.02em; }
html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) .px-story__line + .px-story__line { margin-top: .42em; }
html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) :is(.hm-hero__lead, .hm-lead, .hm-map__deck, .hm-kanaf__p, .hm-win__lede) { line-height: 1.55; }

/* The Arabic label in the English header */
html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) .nav__end .nav__lang[data-lang="ar"] { font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; letter-spacing: 0; }
html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) [lang="ar"] { font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; }

/* Never break place names like al-Mawasi at the hyphen */
.nw { white-space: nowrap; }

/* Map: the origin cities run down the left edge in both languages, so the inset map stays on the right */
html[dir="ltr"] .hm-inset { inset-inline-start: auto; inset-inline-end: 16px; }

/* Dar link: one continuous underline on the sentence, not on each fragment */
html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) .hm-kanaf__dar { text-decoration: none; }
html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) .hm-kanaf__dar span { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(246, 239, 226, .4); }

/* Latin lines are longer than the Arabic ones: let the headline lines wrap instead of overflowing on narrow screens */
html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) .hm-ln { white-space: normal; }
@media (max-width: 640px) {
  html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) .hm-hero__h { font-size: clamp(38px, 11vw, 52px); }
  html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) .hm-ln--sub { font-size: .7em; }
}

/* Safe Winter figures: numbers align with their labels (the Arabic aligns LTR numbers to its start, the right) */
html[dir="ltr"] .hm-win__figs dd { text-align: start; }

/* Small phones: "Give" and «عربي» are a little wider than «تبرع» and EN, so the bar end tightens to stay inside the nav */
@media (max-width: 440px) {
  html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) .nav__end .nav__lang[data-lang="ar"] { margin-inline: 0; padding-inline: 7px; }
  html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) .nav__end .btn--red { margin-inline-start: 0; padding-inline: 12px; }
  html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) .nav__end { gap: 0; }
}

/* اسم المنصة باللاتينية في الرأس الإنجليزي */
.brand__en { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -.01em; color: var(--ink, #17110f); white-space: nowrap; line-height: 1; }
.brand__en span { color: var(--red, #c4252f); }
@media (max-width: 640px) { .brand__en { font-size: 18px; } }
.nav__end a, .nav__login { white-space: nowrap; }
@media (max-width: 1280px) { .brand__en span { display: none; } }

/* Bahasa Melayu: "Musim Sejuk Selamat" is about twice as long as "Safe Winter", so the giant reveal word wraps instead of being clipped at the edges */
html[lang="ms"] .hm-win__word { white-space: normal; text-align: center; font-size: clamp(56px, 12vw, 190px); line-height: .95; padding-inline: 16px; }
/* Bahasa Melayu: the long "Siapkan sebuah keluarga untuk musim sejuk · $300" button may wrap on phones instead of running past its edge */
@media (max-width: 640px) { html[lang="ms"] .px-need__cta .btn { white-space: normal; text-align: center; max-width: 100%; height: auto; line-height: 1.3; padding-block: 12px; } }

/* Français: longer labels in the seasons lists ("Toutes les deux semaines", "Une journée récréative") wrap inside their column instead of running over the description */
html[lang="fr"] :is(.s-adha__item li b, .s-result__list b) { white-space: normal; line-height: 1.25; }
html[lang="fr"] .s-adha__item li { grid-template-columns: 8.4rem 1fr; }
/* Français: the long "Déposer une réclamation ou signaler un problème" hero button wraps on phones instead of widening the hero past the screen */
@media (max-width: 640px) { html[lang="fr"] .px-hero__cta .btn { white-space: normal; text-align: center; max-width: 100%; height: auto; line-height: 1.3; padding-block: 12px; } }
/* Français: a long select option ("Palestiniens de l’intérieur de la Ligne verte") must not push the form wider than the phone */
html[lang="fr"] .field { min-width: 0; }
html[lang="fr"] .field select { max-width: 100%; min-width: 0; }
/* Türkçe: long agglutinated words ("Cüzdanınızdan") are wider than the phone at the closing-banner size, so the closing headline steps down a little on phones instead of being clipped */
@media (max-width: 640px) { html[lang="tr"] body:not([data-page="campaign"], [data-page="start"]) .px-close:not(.px-close--compact, .st-close) .px-close__h { font-size: min(calc(var(--px-mega) * 1.25), 12vw); } }
/* Français: "Hiver à l’abri" is longer than "Safe Winter", so the giant reveal word wraps instead of being clipped at the edges */
html[lang="fr"] .hm-win__word { white-space: normal; text-align: center; font-size: clamp(56px, 12vw, 190px); line-height: .95; padding-inline: 16px; }

/* اللغات اللاتينية (كلماتها أطول): حبّة الرأس تتسع حتى 1290px حين تسمح الشاشة، فلا يخرج زر «تبرع» عن حافتها فوق 1280 */
@media (min-width: 1281px) {
  html:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) .nav { max-width: min(calc(100vw - 40px), 1290px); }
}
@media (max-width: 1380px) { html:is([lang="fr"], [lang="tr"]) .brand__en span { display: none; } }
