/**
 * Mataam theme — "Charcoal & Sumac".
 *
 * Direction: a late-night grill house, not a fine-dining brochure. The palette
 * comes off the equipment rather than a mood board — charcoal from the grill,
 * sumac from the spice tin, olive from the za'atar, brass from the serving
 * tray, and warm paper from the laffa the food is wrapped in.
 *
 * The signature is the perforated tear edge. A kitchen ticket is the one
 * artifact this whole system produces, so it is the device the site is built
 * around, used on the hero card and the footer only. Everything else stays
 * quiet so it lands.
 *
 * Layout uses logical properties throughout, so the Arabic (RTL) build mirrors
 * correctly without a separate stylesheet.
 */

/* ---------------------------------------------------------------- Fonts */

@font-face {
	font-family: "Cairo";
	src: url("../fonts/cairo-latin-900.woff2") format("woff2");
	font-weight: 900;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

@font-face {
	font-family: "Cairo";
	src: url("../fonts/cairo-arabic-900.woff2") format("woff2");
	font-weight: 900;
	font-display: swap;
	unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
	font-family: "Cairo";
	src: url("../fonts/cairo-latin-700.woff2") format("woff2");
	font-weight: 700;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC;
}

@font-face {
	font-family: "Cairo";
	src: url("../fonts/cairo-arabic-700.woff2") format("woff2");
	font-weight: 700;
	font-display: swap;
	unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
	font-family: "PlexAr";
	src: url("../fonts/plexar-latin-400.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC;
}

@font-face {
	font-family: "PlexAr";
	src: url("../fonts/plexar-arabic-400.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
	unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
	font-family: "PlexAr";
	src: url("../fonts/plexar-latin-600.woff2") format("woff2");
	font-weight: 600;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC;
}

@font-face {
	font-family: "PlexAr";
	src: url("../fonts/plexar-arabic-600.woff2") format("woff2");
	font-weight: 600;
	font-display: swap;
	unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

/* ---------------------------------------------------------------- Tokens */

:root {
	--ink: #17130e;
	--ink-soft: #2a231b;
	--paper: #faf6ef;
	--paper-dim: #f1ebe0;
	--sumac: #8e2420;
	--zaatar: #46573a;
	--brass: #be8a3d;
	--ash: #6d655a;
	--line: #ded5c6;

	--display: "Cairo", "Segoe UI", system-ui, sans-serif;
	--body: "PlexAr", "Segoe UI", system-ui, sans-serif;

	--gap: clamp(1rem, 3vw, 2rem);
	--radius: 4px;
	--wrap: 1180px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--body);
	font-size: 1rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: var(--sumac); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

:focus-visible {
	outline: 2px solid var(--sumac);
	outline-offset: 2px;
	border-radius: 2px;
}

h1, h2, h3, h4 {
	font-family: var(--display);
	font-weight: 900;
	line-height: 1.08;
	letter-spacing: -0.02em;
	margin: 0 0 0.4em;
	text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }

.wrap {
	width: min(var(--wrap), 100% - 2 * var(--gap));
	margin-inline: auto;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip-path: inset(50%);
	white-space: nowrap;
}

.skip {
	position: absolute;
	inset-inline-start: -9999px;
	top: 0;
	z-index: 999;
	background: var(--ink);
	color: var(--paper);
	padding: 12px 20px;
	text-decoration: none;
}

.skip:focus { inset-inline-start: 0; }

/* ---------------------------------------------------------------- Signature: tear */

.tear {
	display: block;
	height: 10px;
	background-image: radial-gradient(circle at 5px 0, transparent 5px, var(--paper) 5px);
	background-size: 14px 10px;
	background-repeat: repeat-x;
}

.tear--bottom { transform: rotate(180deg); }

/* ---------------------------------------------------------------- Buttons */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 22px;
	border: 2px solid transparent;
	border-radius: var(--radius);
	font-family: var(--display);
	font-weight: 700;
	font-size: 0.92rem;
	letter-spacing: 0.01em;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.btn--go { background: var(--sumac); border-color: var(--sumac); color: var(--paper); }
.btn--go:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.btn--ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.btn--big { padding: 15px 30px; font-size: 1rem; }

/* ---------------------------------------------------------------- Header */

.masthead {
	background: var(--ink);
	color: var(--paper);
	position: relative;
	z-index: 40;
}

.masthead__inner {
	display: flex;
	align-items: center;
	gap: var(--gap);
	min-height: 74px;
	padding-block: 12px;
}

.brand { flex-shrink: 0; }

.brand__name {
	font-family: var(--display);
	font-weight: 900;
	font-size: 1.42rem;
	letter-spacing: -0.03em;
	color: var(--paper);
	text-decoration: none;
}

.brand__name:hover { color: var(--brass); }

.custom-logo { max-height: 48px; width: auto; }

.nav {
	margin-inline-start: auto;
	display: flex;
	align-items: center;
	gap: var(--gap);
}

.nav__list {
	display: flex;
	align-items: center;
	gap: 22px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav__list a {
	color: var(--paper);
	text-decoration: none;
	font-size: 0.94rem;
	font-weight: 600;
	opacity: 0.85;
}

.nav__list a:hover,
.nav__list .current-menu-item > a { opacity: 1; color: var(--brass); }

.nav__list .sub-menu {
	display: none;
	position: absolute;
	background: var(--ink-soft);
	padding: 10px 0;
	list-style: none;
	min-width: 190px;
	border-radius: var(--radius);
}

.nav__list li:hover > .sub-menu,
.nav__list li:focus-within > .sub-menu { display: block; }
.nav__list .sub-menu a { display: block; padding: 8px 18px; }
.nav__list li { position: relative; }

.nav__actions { display: flex; align-items: center; gap: 14px; }

.nav__phone {
	color: var(--paper);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.92rem;
	white-space: nowrap;
}

.nav__phone:hover { color: var(--brass); }

.navtoggle {
	display: none;
	margin-inline-start: auto;
	width: 44px;
	height: 44px;
	background: none;
	border: 0;
	cursor: pointer;
	position: relative;
}

.navtoggle__bar,
.navtoggle__bar::before,
.navtoggle__bar::after {
	position: absolute;
	inset-inline-start: 10px;
	width: 24px;
	height: 2px;
	background: var(--paper);
	transition: transform 180ms ease, opacity 180ms ease;
}

.navtoggle__bar { top: 21px; }
.navtoggle__bar::before { content: ""; inset-inline-start: 0; top: -7px; }
.navtoggle__bar::after { content: ""; inset-inline-start: 0; top: 7px; }

.navtoggle[aria-expanded="true"] .navtoggle__bar { background: transparent; }
.navtoggle[aria-expanded="true"] .navtoggle__bar::before { transform: translateY(7px) rotate(45deg); }
.navtoggle[aria-expanded="true"] .navtoggle__bar::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
	.navtoggle { display: block; }

	.nav {
		position: absolute;
		inset-inline: 0;
		top: 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		background: var(--ink-soft);
		padding: 14px var(--gap) 22px;
		display: none;
	}

	.nav.is-open { display: flex; }
	.nav__list { flex-direction: column; align-items: stretch; gap: 0; }
	.nav__list a { display: block; padding: 13px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.09); }
	.nav__list .sub-menu { position: static; display: block; padding-inline-start: 16px; background: none; }
	.nav__actions { margin-top: 16px; justify-content: space-between; }
}

/* ---------------------------------------------------------------- Context bar */

.context {
	background: var(--ink-soft);
	color: var(--paper);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	position: sticky;
	top: 0;
	z-index: 35;
}

.context__inner {
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: 46px;
	flex-wrap: wrap;
	padding-block: 6px;
}

.context__branch,
.context__pick {
	display: grid;
	gap: 0;
	background: none;
	border: 0;
	padding: 0;
	color: inherit;
	cursor: pointer;
	text-align: start;
	font-family: inherit;
}

.context__key {
	font-size: 0.62rem;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	opacity: 0.55;
}

.context__val { font-size: 0.9rem; font-weight: 600; }

.context__pick {
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.context__sep { width: 1px; height: 24px; background: rgba(255, 255, 255, 0.16); }

.context__state {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	padding: 3px 9px;
	border-radius: 999px;
}

.context__state--open { background: rgba(70, 87, 58, 0.55); color: #d7e6c6; }
.context__state--shut { background: rgba(142, 36, 32, 0.5); color: #f6cfc9; }

.context__cart {
	margin-inline-start: auto;
	color: var(--paper);
	text-decoration: none;
	font-size: 0.88rem;
	font-weight: 600;
	display: inline-flex;
	gap: 10px;
	align-items: baseline;
}

.context__cart:hover { color: var(--brass); }
.context__carttotal { color: var(--brass); }

/* ---------------------------------------------------------------- Branch first run */

.pickfirst {
	background: var(--ink);
	color: var(--paper);
	padding-block: clamp(2.5rem, 7vw, 4.5rem);
}

.pickfirst__inner { max-width: 720px; }

.pickfirst__title {
	font-size: clamp(1.8rem, 5vw, 2.8rem);
	color: var(--paper);
	margin-bottom: 0.4em;
}

.pickfirst__sub { opacity: 0.78; margin-bottom: 1.8rem; max-width: 48ch; }

.pickfirst__list {
	list-style: none;
	margin: 0 0 1.2rem;
	padding: 0;
	display: grid;
	gap: 10px;
}

.pickfirst__branch {
	display: grid;
	gap: 3px;
	width: 100%;
	padding: 16px 20px;
	text-align: start;
	background: rgba(255, 255, 255, 0.05);
	border: 1.5px solid rgba(255, 255, 255, 0.16);
	border-radius: 10px;
	color: var(--paper);
	font: inherit;
	cursor: pointer;
	transition: border-color 140ms ease, background-color 140ms ease;
}

.pickfirst__branch:hover { border-color: var(--brass); background: rgba(255, 255, 255, 0.09); }
.pickfirst__name { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.pickfirst__addr { font-size: 0.85rem; opacity: 0.6; }

.pickfirst__state {
	justify-self: start;
	margin-top: 4px;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 2px 8px;
	border-radius: 999px;
}

.pickfirst__state--open { background: rgba(70, 87, 58, 0.6); color: #d7e6c6; }
.pickfirst__state--shut { background: rgba(142, 36, 32, 0.55); color: #f6cfc9; }

.pickfirst__near {
	background: none;
	border: 0;
	color: var(--brass);
	font: inherit;
	font-size: 0.9rem;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	padding: 0;
}

/* ---------------------------------------------------------------- Header actions */

.masthead__actions { margin-inline-start: auto; display: flex; align-items: center; gap: 16px; }

.masthead__phone {
	color: var(--paper);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.92rem;
	white-space: nowrap;
}

.masthead__phone:hover { color: var(--brass); }

.masthead__cart {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 9px 16px;
	border-radius: 999px;
	background: var(--sumac);
	color: var(--paper);
	text-decoration: none;
	font-weight: 700;
	font-size: 0.9rem;
}

.masthead__cart:hover { background: var(--brass); color: var(--ink); }

.masthead__cartcount {
	display: inline-grid;
	place-items: center;
	min-width: 22px;
	height: 22px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.22);
	font-size: 0.78rem;
}

.masthead__carttotal { font-variant-numeric: tabular-nums; }

@media (max-width: 560px) {
	.masthead__phone { display: none; }
}

/* ---------------------------------------------------------------- Pages */

.page {
	padding-block: clamp(2rem, 5vw, 3.5rem);
}

.page--full { padding-block: 0; }
.page__body { max-width: 100%; }

.page__title { font-size: clamp(1.9rem, 4.4vw, 2.9rem); }
.page__intro { color: var(--ash); margin-bottom: 1.5rem; }

.prose { max-width: 68ch; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.4em; }
.prose img { border-radius: var(--radius); margin-block: 1.5em; }
.prose blockquote {
	margin: 1.6em 0;
	padding-inline-start: 20px;
	border-inline-start: 3px solid var(--brass);
	font-size: 1.08rem;
	color: var(--ink-soft);
}

.cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: var(--gap);
}

.card {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
}

.card__media img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.card__body { padding: 18px; }
.card__title { font-size: 1.12rem; margin-bottom: 0.3em; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--sumac); }
.card__excerpt { font-size: 0.9rem; color: var(--ash); margin: 0; }

.entry__meta { font-size: 0.8rem; color: var(--ash); text-transform: uppercase; letter-spacing: 0.09em; }
.entry__media { margin: 0 0 1.6em; }
.entry__media img { border-radius: var(--radius); }


.searchform { display: flex; gap: 8px; }
.searchform__input { flex: 1; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--radius); font: inherit; }
.searchform__go { padding: 10px 18px; background: var(--ink); color: var(--paper); border: 0; border-radius: var(--radius); font-family: var(--display); font-weight: 700; cursor: pointer; }

.pagination { margin-top: 2.5rem; }
.pagination .page-numbers {
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	margin-inline-end: 6px;
	text-decoration: none;
	color: var(--ink);
}
.pagination .current { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------------------------------------------------------------- 404 */

.notfound { text-align: center; padding-block: clamp(4rem, 12vw, 8rem); }
.notfound__code {
	font-family: var(--display);
	font-weight: 900;
	font-size: clamp(4rem, 16vw, 9rem);
	line-height: 1;
	color: var(--brass);
	margin: 0;
	letter-spacing: -0.05em;
}
.notfound__title { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.notfound__sub { color: var(--ash); max-width: 44ch; margin-inline: auto; margin-bottom: 2rem; }
.notfound__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Footer */

.colophon {
	background: var(--ink);
	color: var(--paper);
	margin-top: clamp(2rem, 5vw, 3.5rem);
}

.colophon__inner {
	padding-block: 26px;
	display: grid;
	gap: 8px;
	text-align: center;
}

.colophon__name { font-family: var(--display); font-weight: 900; font-size: 1.2rem; margin: 0; }
.colophon__branch { margin: 0; font-size: 0.9rem; opacity: 0.75; }
.colophon__branch a { color: var(--brass); text-decoration: none; }

.colophon__menu {
	list-style: none;
	margin: 6px 0 0;
	padding: 0;
	display: flex;
	gap: 18px;
	justify-content: center;
	flex-wrap: wrap;
	font-size: 0.88rem;
}

.colophon__menu a { color: var(--brass); text-decoration: none; }
.colophon__menu a:hover { color: var(--paper); }
.colophon__legal { margin: 8px 0 0; font-size: 0.78rem; opacity: 0.5; }

/* The ordering UI is the page, so it should not sit in a narrow column. */
.homeorder { padding-block: 0; }
.homeorder .mataam-order { padding-inline: 0; max-width: none; }
.homeorder .mataam-order__bar { border-radius: 0; }

/* ---------------------------------------------------------------- WooCommerce */

.page--shop .woocommerce-message,
.page--shop .woocommerce-info,
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-top: 0;
	border-inline-start: 3px solid var(--brass);
	background: var(--paper-dim);
	border-radius: 0 var(--radius) var(--radius) 0;
	padding: 14px 18px;
}

.woocommerce-error { border-inline-start-color: var(--sumac); }

.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: var(--display); font-weight: 700; font-size: 1.02rem; }
.woocommerce ul.products li.product .price { color: var(--ink); font-weight: 700; }

.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
	background: var(--sumac);
	color: var(--paper);
	border-radius: var(--radius);
	font-family: var(--display);
	font-weight: 700;
	padding: 12px 22px;
}

.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover { background: var(--ink); color: var(--paper); }

.woocommerce-checkout h3,
.woocommerce-billing-fields h3 { font-size: 1.25rem; }

.woocommerce table.shop_table { border-radius: var(--radius); border-color: var(--line); }
.woocommerce-checkout #payment { background: var(--paper-dim); border-radius: var(--radius); }

/* Let the plugin's own map keep its inline height — never override it. */
.woocommerce .mataam-map { max-width: none; }

/* The ordering UI embedded on the home page. */
.homeorder { padding-block: clamp(2rem, 5vw, 3.5rem); }
.homeorder .mataam-order { padding-inline: 0; }
.homeorder .mataam-order__bar { margin-inline: 0; border-radius: var(--radius); }

/* ---------------------------------------------------------------- Banner

   A photograph of the food is the one image that reliably sells a restaurant,
   so it gets real height rather than being squeezed into a strip. The dark
   gradient over it is not decoration: white text on an arbitrary photo is a
   contrast gamble, and the person who loses it is the one choosing dinner on a
   phone in daylight.
   ------------------------------------------------------------------------ */

.banner {
	position: relative;
	display: grid;
	align-items: center;
	background-color: var(--ink);
	/* The URL arrives inline on the element; this is only the fallback path. */
	background-image: var(--banner-img, none);
	background-size: cover;
	background-position: center;
	color: var(--paper);
	isolation: isolate;
}

.banner::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(23, 19, 14, 0.35) 0%, rgba(23, 19, 14, 0.78) 100%);
}

.banner--short { min-height: clamp(160px, 22vw, 260px); }
.banner--medium { min-height: clamp(240px, 34vw, 420px); }
.banner--tall { min-height: clamp(320px, 56vw, 620px); }

.banner__inner {
	padding-block: clamp(2rem, 5vw, 3.5rem);
	max-width: 720px;
	margin-inline: auto;
	text-align: center;
}

.banner__title {
	font-family: var(--display);
	font-weight: 900;
	font-size: clamp(1.8rem, 5.5vw, 3.2rem);
	line-height: 1.08;
	letter-spacing: -0.03em;
	color: var(--paper);
	margin: 0 0 0.4em;
	text-wrap: balance;
}

.banner__sub {
	font-size: clamp(0.95rem, 1.8vw, 1.12rem);
	opacity: 0.88;
	margin: 0 auto 1.6rem;
	max-width: 46ch;
}
