/**
 * The brand faces.
 *
 * TAY for headings, Loew for everything else in English; Tajawal for Arabic
 * headings and buttons, Rubik for Arabic text (Diwan, 15 October 2026). All
 * four are bundled rather than fetched, so there is no third party in the
 * critical path and nothing to fail on a slow connection.
 *
 * TAY and Loew have no Arabic glyphs. Rather than switching stacks per
 * language, the Arabic face is named after the English one in the same stack:
 * a browser picks a face per character, so an English heading gets TAY, an
 * Arabic one gets Tajawal, and a heading with both in it gets each word in the
 * right face, on either side of the site. Rubik and Tajawal are cut to their
 * Arabic letters and say so (unicode-range): a page with no Arabic on it never
 * downloads them.
 *
 * These are the defaults. The faces are chosen on Store settings → Fonts,
 * which writes its own choice over these variables (Fonts).
 */

@font-face {
	font-family: "TAY";
	src: url("fonts/TAYBenditos.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Loew";
	src: url("fonts/Loew-Regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Loew";
	src: url("fonts/Loew-Medium.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Loew";
	src: url("fonts/Loew-Bold.woff2") format("woff2");
	font-weight: 600 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Loew";
	src: url("fonts/Loew-Black.woff2") format("woff2");
	font-weight: 800 900;
	font-style: normal;
	font-display: swap;
}

/* Rubik, its Arabic letters, every weight in one file. */
@font-face {
	font-family: "Rubik";
	src: url("fonts/Rubik-Arabic.woff2") format("woff2");
	font-weight: 300 900;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

/* Tajawal, its Arabic letters, one file to a weight. */
@font-face {
	font-family: "Tajawal";
	src: url("fonts/Tajawal-Arabic-400.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
	font-family: "Tajawal";
	src: url("fonts/Tajawal-Arabic-500.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
	font-family: "Tajawal";
	src: url("fonts/Tajawal-Arabic-700.woff2") format("woff2");
	font-weight: 600 700;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
	font-family: "Tajawal";
	src: url("fonts/Tajawal-Arabic-800.woff2") format("woff2");
	font-weight: 800 900;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
	--diwan-font-display: "TAY", "Tajawal", system-ui, sans-serif;
	--diwan-font-body: "Loew", "Rubik", system-ui, -apple-system, sans-serif;
	--diwan-font-button: "Loew", "Tajawal", system-ui, -apple-system, sans-serif;
	--diwan-font-card: "Loew", "Rubik", system-ui, -apple-system, sans-serif;
}

/*
 * Buttons take the button face unless something more particular says
 * otherwise: written with :where(), so any rule of a widget's or a page's own
 * still wins.
 */
:where(button, .button, input[type="submit"], .elementor-button, .diwan-event-register, .diwan-bundle__go) {
	font-family: var(--diwan-font-button);
}

body {
	font-family: var(--diwan-font-body);
	/*
	 * Lining figures (October 2026). Loew's own figures are old style: they
	 * rise and drop like lowercase letters, so "2026" in the footer, a price
	 * on a card or a date on an event sat at different heights from the
	 * capitals beside them and read as letters that did not belong together.
	 * Inherited by everything, Elementor's widgets included.
	 */
	font-variant-numeric: lining-nums;
}

/*
 * TAY is a capitals face: its lowercase letters are small capitals. Where it
 * is set in mixed case (a slide's heading, a card's title) every capital stood
 * a size above the rest of its word, so it is set in capitals throughout, as
 * the section headings already are. Named place by place rather than on every
 * heading: a heading given the body face (a job's title) keeps its case.
 * Arabic has no case, so this changes nothing on the Arabic side.
 */
.diwan-display,
.elementor-slide-heading,
.elementor-slide-description,
.e-loop-item .elementor-widget-theme-post-title .elementor-heading-title {
	text-transform: uppercase;
}

/* Headings carry the display face everywhere, not only inside the sections
   this plugin draws: a WooCommerce page heading is a Diwan heading too. */
h1,
h2,
h3,
h4,
.diwan-display {
	font-family: var(--diwan-font-display);
	letter-spacing: 0.01em;
}

/*
 * A heading widget that is not a heading.
 *
 * Elementor's heading widget can be set to render as a paragraph, and plenty of
 * text on this site is: a book's author, a staff recommendation. It puts all of
 * them in the site's primary face whatever the tag says, and TAY draws its
 * lowercase as small capitals, so a paragraph in it comes out shouted.
 *
 * So the tag decides. Set to p, div or span it is prose and takes the body
 * face; left as a real heading it keeps the display face like everything else.
 * Written with the tag in the selector, which is what puts it one step above
 * Elementor's own rule without an !important.
 */
.elementor-widget-heading p.elementor-heading-title,
.elementor-widget-heading div.elementor-heading-title,
.elementor-widget-heading span.elementor-heading-title {
	font-family: var(--diwan-font-body);
}

/*
 * The page's own text takes the body stack on both sides: WooCommerce's
 * basket, checkout and account pages are not drawn by Elementor's widgets,
 * and without it their Arabic fell through to whatever the system had. On
 * the English side the kit's own "Loew", Sans-serif had the same effect on a
 * book's tabs (Diwan, November 2026): an Arabic author, publisher or
 * description in the system's face rather than Rubik.
 */
body.rtl,
body:not(.rtl) {
	font-family: var(--diwan-font-body);
}

