/* ==========================================================================
   Nujisa Scents – Our Story / brand page layout (v1.2.1)
   Additive: uses Stage 1 tokens. Applies to pages whose first group carries "nj-brand-page".
   ========================================================================== */

.nj-prose--wide { max-width: calc(var(--nj-container) + 2 * var(--nj-gutter)); }

.nj-brand-section {
	display: grid;
	row-gap: 0;
	padding-block: clamp(2.5rem, 5vw, 4.5rem);
	border-top: 1px solid var(--nj-rule);
}
.nj-brand-section:first-child { padding-top: 0; border-top: 0; }
.nj-prose .nj-brand-section > h2 {
	margin: 0;
	font-size: clamp(2rem, 3.6vw, 3.25rem);
	font-weight: 400;
	line-height: 1.1;
	color: var(--nj-black);
}
.nj-brand-section > p { max-width: 38rem; margin: 1.25rem 0 0; }
.nj-brand-section > p:first-of-type {
	font-family: var(--nj-font-display);
	font-size: var(--nj-fs-lead);
	line-height: 1.5;
	color: var(--nj-black);
}
@media (min-width: 62em) {
	.nj-brand-section { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); column-gap: 5rem; }
	.nj-prose .nj-brand-section > h2 { grid-column: 1; grid-row: 1 / span 6; }
	.nj-brand-section > p:first-of-type { margin-top: 0; }
	.nj-brand-section > p { grid-column: 2; }
}

/* --------------------------------------------------------------------------
   v1.3.0: text on the left, image on the right in every section.
   The plugin wraps each section's text in .nj-brand-text and adds .nj-brand-figure.
   Sections without a recognised heading keep the layout above.
   -------------------------------------------------------------------------- */
/* Stacked layout (below 62em): text first, then the image with a 10px space between. */
.nj-brand-section.has-figure { grid-template-columns: 1fr; row-gap: 10px; column-gap: 0; align-items: center; }
/* WordPress adds div.wp-block-group__inner-container inside every Group block on themes without theme.json
   (after this layout is built). Let that wrapper dissolve so the text and image stay the direct grid items. */
.nj-brand-section > .wp-block-group__inner-container { display: contents; }
/* Keep the image area full width of its column even if the editor saved the group with auto side margins. */
.nj-brand-section.has-figure .nj-brand-figure { width: 100%; }
.nj-brand-text > * + * { margin-top: 1.25rem; }
.nj-prose .nj-brand-text > h2 {
	margin: 0;
	font-size: clamp(2rem, 3.6vw, 3.25rem);
	font-weight: 400;
	line-height: 1.1;
	color: var(--nj-black);
}
.nj-brand-text > p { max-width: 38rem; margin-bottom: 0; }
.nj-brand-text > h2 + p { margin-top: 1.5rem; }
.nj-brand-text > p:first-of-type {
	font-family: var(--nj-font-display);
	font-size: var(--nj-fs-lead);
	line-height: 1.5;
	color: var(--nj-black);
}
.nj-brand-figure { margin: 0; max-width: 36rem; }
.nj-media--story { aspect-ratio: 4 / 3; }
.nj-media--story .nj-ph { min-height: 0; }
@media (min-width: 62em) {
	.nj-brand-section.has-figure { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(3rem, 6vw, 5.5rem); }
	.nj-brand-figure { max-width: none; }
}
/* Uploaded images are not pre-cropped to 4:3: fill the frame and honour the focal point. */
.nj-media--story img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
