/* GetnDrive Visual Rebrand — public brand lockup. v0.2.10.14 (footer lockup resized in v0.2.10.21)

   Loaded on every public request right after the main stylesheet (which is SHA-frozen by the
   rendered-evidence checkers, so it is not edited). Presentation only; two scopes:

   1. Dark footer lockup: the compact double chevron sits on a square light plate, the coloured
      accent line is removed, and the brand name is the approved lettering image
      `getndrive-footer-wordmark-white.png` (white letters, teal `n`) rendered by PHP.
      v0.2.10.21 (ADR-215): a smaller plate, a larger wordmark, one shared measure with the brand
      paragraph (see the section comment).
   2. Desktop header (>= 1025px, `#main-header` only): the logo slot starts 20px further left via a
      negative inline margin, so the left header section is 20px narrower and the navigation
      section is 20px wider. The artwork keeps its size. Mobile header (< 1025px) is untouched.
*/

/* --- 1. Footer lockup ------------------------------------------------------------------------ */
/* v0.2.10.21 (ADR-215) — sizing and alignment only; the approved assets are unchanged.

   - The plate height equals the cap height of the `G`. Measured in the wordmark asset (1022x177), the
     `G` ink is 158px of 177px (0.893) with symmetric 9px bands, so a centred 47px wordmark has a 42px cap
     height: plate 42px, wordmark 47px, gap 12px.
   - The lockup (42 + 12 + 47 x 1022/177 = 325px) ends on the shared 328px brand measure, which is also
     the brand paragraph's max-width, so both right edges line up.
   - Narrow brand columns (1025-1100px desktop, 320px phones) scale the wordmark and plate together from
     the brand column's own width (container query units), keeping plate = 0.893 x wordmark height. A
     browser without container units keeps the fixed 47 / 42px values. */
body.getndrive-visual-rebrand .sch-footer .sch-footer__brand {
	--gnd-footer-brand-measure: 328px;
	--gnd-footer-wordmark-h: 47px;
	--gnd-footer-mark-plate: 42px;
}

@supports (width: 1cqi) {
	body.getndrive-visual-rebrand .sch-footer .sch-footer__brand {
		container-type: inline-size;
	}

	/* (column - gap) / (plate 0.893 + wordmark 1022/177) = the wordmark height that fills the column. */
	body.getndrive-visual-rebrand .sch-footer .sch-footer__brand .sch-footer__brand-name {
		--gnd-footer-wordmark-h: min(47px, calc((100cqi - 12px) / 6.667));
		--gnd-footer-mark-plate: min(42px, calc((100cqi - 12px) / 6.667 * 0.893));
	}
}

body.getndrive-visual-rebrand .sch-footer .sch-footer__brand-name {
	flex-direction: row !important;
	align-items: center !important;
	gap: 12px !important;
	max-width: var(--gnd-footer-brand-measure) !important;
	line-height: 1 !important;
}

body.getndrive-visual-rebrand .sch-footer .sch-footer__brand-name::before {
	flex: 0 0 auto !important;
	box-sizing: border-box !important;
	width: var(--gnd-footer-mark-plate) !important;
	height: var(--gnd-footer-mark-plate) !important;
	padding: 0 !important;
	border-radius: 10px !important;
	background-origin: padding-box !important;
	background-clip: padding-box !important;
	background-position: center !important;
	/* 800x441 mark canvas at 0.6 x the plate: the same chevron-to-plate balance as the 0.2.10.14 68px / 40px. */
	background-size: auto calc(var(--gnd-footer-mark-plate) * 0.6) !important;
}

body.getndrive-visual-rebrand .sch-footer .sch-footer__brand-name::after {
	content: none !important;
	display: none !important;
}

body.getndrive-visual-rebrand .sch-footer .sch-footer__brand-name .gnd-footer-wordmark {
	display: block !important;
	flex: 0 0 auto !important;
	width: auto !important;
	height: var(--gnd-footer-wordmark-h) !important;
	max-width: 100% !important;
	margin: 0 !important;
}

/* The brand paragraph shares the lockup measure. `pretty` keeps a short last line off the ragged edge
   (the Russian copy wraps to three lines); no justification and no manual line breaks. */
body.getndrive-visual-rebrand .sch-footer.gnd-footer--editorial .sch-footer__brand p:not(.gnd-footer-brand__market) {
	max-width: var(--gnd-footer-brand-measure) !important;
	text-wrap: pretty;
}

/* --- 2. Desktop header logo slot ------------------------------------------------------------- */
@media (min-width: 1025px) {
	body.getndrive-visual-rebrand #main-header .site-branding a.brand {
		margin-left: -20px;
	}
}
