/* =========================================================================
 * About page — page-specific styles (page ID 43)
 *
 * Direction: Modern Classic Minimal.
 * The design is carried entirely by typography and whitespace — no borders,
 * no icons, no boxes, no rules, no background fills. Restraint is the point.
 *
 * Loaded only on that one page via bsc_enqueue_scripts() in functions.php,
 * so nothing here can affect any other page of the site.
 *
 * Every selector is scoped to either:
 *   - body.mg-about-page  (body class added on this page only), or
 *   - .mg-about*          (component classes used nowhere else)
 * ========================================================================= */

/* -------------------------------------------------------------------------
 * Canvas
 *
 * The parent theme renders pages inside `.content.narrow` (max-width 900px)
 * with 40px of vertical padding. For this page we keep the measure narrow on
 * purpose — a long line of Persian text is tiring — but give it far more air
 * above and below than the theme default.
 * ---------------------------------------------------------------------- */
body.mg-about-page .content {
	padding-top: clamp(56px, 8vw, 112px);
	padding-bottom: clamp(64px, 9vw, 128px);
}

body.mg-about-page .content.narrow {
	max-width: 760px;
}

body.mg-about-page .entry {
	line-height: inherit;
}

/* The content opens with its own heading ("درباره مارک گالری"), which is a
 * better title than the theme's generic page title. The theme's is hidden so
 * the page never shows two competing titles. */
body.mg-about-page .page-title {
	display: none;
}

/* -------------------------------------------------------------------------
 * Measure
 *
 * 34em at 17.5px works out to roughly 60–65 characters per line — the classic
 * range for comfortable continuous reading. Centred so the text block sits
 * calm in the middle of the page rather than hugging one edge.
 * ---------------------------------------------------------------------- */
.mg-about {
	max-width: 34em;
	margin: 0 auto;
	direction: rtl;
	text-align: right;
}

/* -------------------------------------------------------------------------
 * Title
 *
 * Light weight and a large size: the contrast between a thin display face and
 * heavier body copy is what reads as "classic" rather than "default". Persian
 * is a connected script, so letter-spacing stays at zero — spacing it out
 * breaks the joins between letters.
 * ---------------------------------------------------------------------- */
.mg-about__title {
	margin: 0 0 clamp(34px, 4.5vw, 52px);
	font-family: var(--mg-font-display, var(--mg-font));
	font-size: clamp(28px, 4.4vw, 44px);
	font-weight: 300;
	line-height: 1.45;
	color: var(--ink, #0a0a0a);
	letter-spacing: 0;
	text-wrap: balance;
}

/* -------------------------------------------------------------------------
 * Body copy
 *
 * Slightly softer than pure black: full-black Persian text at this size reads
 * harsh on a white page. 2.1 line-height is generous enough for the descenders
 * and diacritic space Persian needs.
 * ---------------------------------------------------------------------- */
.mg-about__body p {
	margin: 0 0 1.6em;
	font-family: var(--mg-font);
	font-size: clamp(16px, 1.15vw, 17.5px);
	font-weight: 400;
	line-height: 2.1;
	color: #333;
	letter-spacing: 0;
	text-align: right;
	text-wrap: pretty;
	orphans: 2;
	widows: 2;
}

.mg-about__body p:last-of-type {
	margin-bottom: 0;
}

/* -------------------------------------------------------------------------
 * Signature row — the closing line and the MARK GALLERY logotype.
 *
 * The line reads as a sign-off and the mark sits beside it like a signature
 * on a letter: sentence on the right (where the RTL reading starts), logotype
 * on the left, both centred on the same optical line. No rule, no divider, no
 * box — the space between them is the only separator.
 *
 * flex-wrap is a safety net: on a very narrow phone the two items stack rather
 * than force a horizontal scrollbar, and they stay centred when they do.
 * ---------------------------------------------------------------------- */
.mg-about__signature {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: clamp(14px, 2.4vw, 30px);
	margin-top: clamp(38px, 5vw, 58px);
}

/* The logotype is decorative in weight but meaningful in content, so it keeps
 * its alt text. width/height on the <img> reserves the space before load, so
 * the page never jumps. It scales down on narrow screens instead of wrapping. */
.mg-about__logo {
	flex: none;
	width: clamp(88px, 22vw, 120px);
	margin: 0;
}

.mg-about__logo img {
	display: block;
	width: 100%;
	height: auto;
}

/* -------------------------------------------------------------------------
 * Closing line — "مارک گالری؛ انتخابی فراتر از پوشش."
 *
 * Set apart by weight rather than by decoration. Vertical rhythm now belongs
 * to the signature row, so the paragraph itself carries no top margin.
 * ---------------------------------------------------------------------- */
.mg-about__sign {
	margin: 0 !important;
	font-family: var(--mg-font-display, var(--mg-font)) !important;
	font-size: clamp(17px, 1.4vw, 19px) !important;
	font-weight: 500 !important;
	line-height: 1.9 !important;
	color: var(--ink, #0a0a0a) !important;
}

/* -------------------------------------------------------------------------
 * Phones
 *
 * Smaller type and tighter vertical rhythm, but the same proportion of air —
 * the page should feel like the same design, not a compressed one.
 * ---------------------------------------------------------------------- */
@media (max-width: 767px) {
	body.mg-about-page .content {
		padding-top: 44px;
		padding-bottom: 60px;
	}

	.mg-about {
		max-width: none;
	}

	.mg-about__title {
		margin-bottom: 28px;
		font-size: 26px;
		line-height: 1.5;
	}

	.mg-about__body p {
		margin-bottom: 1.5em;
		font-size: 16px;
		line-height: 2;
	}

	.mg-about__signature {
		margin-top: 34px;
		gap: 14px;
	}

	.mg-about__logo {
		width: 88px;
	}

	.mg-about__sign {
		font-size: 17px !important;
	}
}

/* Very small phones: the title no longer needs to shrink further, but the
 * body copy must stay at 16px — below that Persian becomes hard to read. */
@media (max-width: 359px) {
	.mg-about__title {
		font-size: 24px;
	}

	.mg-about__body p {
		font-size: 15.5px;
	}
}
