/* מתחם הריהוט — base layer: reset + typography + layout primitives.
 * Component-level styles (header, footer, commerce, home) live in their own
 * modules across E03+. This carries the scaffold's minimal chrome.
 */

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

html { -webkit-text-size-adjust: 100%; }
/* Guard against stray horizontal overflow (wide embeds, zoom images). Use `clip`
 * not `hidden` — `hidden` makes body a scroll container and breaks the sticky
 * header; `clip` kills the overflow without that side effect. */
html, body { overflow-x: clip; max-width: 100%; }
img { max-width: 100%; height: auto; }

body {
	margin: 0;
	background: var(--mr-bg);
	color: var(--mr-text);
	font-family: var(--mr-font);
	font-size: var(--fs-body);
	font-weight: var(--fw-regular);
	line-height: var(--lh-body);
	direction: rtl;
	text-align: right;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
	margin: 0 0 var(--sp-4);
	font-weight: var(--fw-bold);
	line-height: var(--lh-heading);
	color: var(--mr-ink);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { margin: 0 0 var(--sp-4); }

a { color: var(--mr-primary); text-decoration: none; transition: color var(--mr-transition); }
a:hover { color: var(--mr-accent); }

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

/* ---- Layout ---- */
.mr-container {
	width: 100%;
	max-width: var(--mr-container);
	margin-inline: auto;
	padding-inline: var(--sp-5);
}
.mr-container--narrow { max-width: var(--mr-container-narrow); }

.mr-main { display: block; min-height: 40vh; }

/* ---- Accessibility ---- */
.mr-skip-link {
	position: absolute;
	right: -9999px;
	top: 0;
	background: var(--mr-navy);
	color: var(--mr-white);
	padding: var(--sp-3) var(--sp-4);
	z-index: 1000;
}
.mr-skip-link:focus { right: var(--sp-4); }

/* ---- Header (E02 minimal — replaced in E03) ---- */
.mr-header {
	background: var(--mr-white);
	border-bottom: 1px solid var(--mr-border);
}
.mr-header__inner {
	display: flex;
	align-items: center;
	min-height: 64px;
}
.mr-header__logo {
	font-size: var(--fs-h4);
	font-weight: var(--fw-black);
	color: var(--mr-navy);
}
.mr-header__logo:hover { color: var(--mr-navy); }

/* ---- Footer (E02 minimal — replaced in E03) ---- */
.mr-footer {
	margin-top: var(--sp-section);
	background: var(--mr-navy);
	color: var(--mr-white);
}
.mr-footer__inner {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-3);
	align-items: center;
	justify-content: space-between;
	padding-block: var(--sp-5);
}
.mr-footer__brand { font-weight: var(--fw-bold); }
.mr-footer__copy { color: rgba(255,255,255,.75); font-size: var(--fs-small); }

/* ---- Buttons ---- */
.mr-btn {
	display: inline-block;
	align-self: flex-start; /* pill hugs its content — never stretches in column-flex parents */
	padding: var(--sp-3) var(--sp-6);
	border-radius: var(--r-pill);
	font-weight: var(--fw-bold);
	line-height: 1;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background var(--mr-transition), color var(--mr-transition);
}
.mr-btn--primary { background: var(--mr-navy); color: var(--mr-white); }
.mr-btn--primary:hover { background: var(--mr-accent); color: var(--mr-white); }

/* ---- Prose (page / post content) ---- */
.mr-prose { line-height: var(--lh-body); }
.mr-prose h2, .mr-prose h3 { margin-top: var(--sp-6); }

/* ---- 404 ---- */
.mr-404 { text-align: center; padding-block: var(--sp-7); }
.mr-404__code { display: block; font-size: clamp(64px, 12vw, 120px); font-weight: var(--fw-black); color: var(--mr-navy); line-height: 1; }
.mr-404__title { margin-top: var(--sp-4); }
.mr-404__text { color: var(--mr-text-muted); margin-bottom: var(--sp-5); }
