/**
 * Hero style: Content + Media
 *
 * Copy on six columns, portrait on the six opposite breaking 42px past the grid. Both edges
 * and the breakout land on existing values with no rounding.
 */

.module.hero.style-content-media .container {
	align-items: center;
}

.module.hero.style-content-media .breadcrumbs + .container {
	margin-top: var(--text-spacing-large);
}

.module.hero.style-content-media .content,
.module.hero.style-content-media .media {
	grid-row: 1;
}

.module.hero.style-content-media .content {
	grid-column: 1 / span 6;
	padding-right: var(--text-spacing-small);
}

.module.hero.style-content-media .content > * {
	margin: 0;
}

.module.hero.style-content-media .content > * + * {
	margin-top: var(--text-spacing-small);
}

.module.hero.style-content-media .content > * + .buttons {
	margin-top: var(--text-spacing-large);
}

.module.hero.style-content-media .media {
	aspect-ratio: 620 / 680;
	border-radius: 10px;
	grid-column: 7 / span 6;
	margin-right: var(--container-breakout);
}

.module.hero.style-content-media.image-left .content {
	grid-column: 7 / span 6;
	padding-left: var(--text-spacing-small);
	padding-right: 0;
}

.module.hero.style-content-media.image-left .media {
	grid-column: 1 / span 6;
	margin-left: var(--container-breakout);
	margin-right: 0;
}

/***************************************************************************************************************************************************************************************/
/* MQ MAX-WIDTH 950 - Tablet Sizes */
/***************************************************************************************************************************************************************************************/

@media only screen and (max-width: calc(950rem/16)) {

	.module.hero.style-content-media .container {
		display: block;
	}

	.module.hero.style-content-media .content,
	.module.hero.style-content-media.image-left .content {
		padding-left: 0;
		padding-right: 0;
	}

	/* Stacked, the copy is a lockup over the photograph rather than a column beside it, so it
	   centres on the page instead of on a half that is no longer there. */
	.module.hero.style-content-media .content {
		text-align: center;
	}

	.module.hero.style-content-media .buttons {
		justify-content: center;
	}

	/* The container's width and a landscape crop, capped at 500. The portrait ratio is the desktop
	   column's shape — at full width it made a photograph taller than the screen it sits on. */
	.module.hero.style-content-media .media,
	.module.hero.style-content-media.image-left .media {
		aspect-ratio: 3 / 2;
		margin-top: var(--text-spacing-xlarge);
		max-height: 500px;
		max-width: none;
		/* Stated, or the ratio carries the height cap across into the width and the crop comes in
		   from the sides instead of losing height. */
		width: 100%;
	}

}

/***************************************************************************************************************************************************************************************/
/* MQ 651-950 - Tablet Sizes Only */
/***************************************************************************************************************************************************************************************/

@media only screen and (min-width: calc(651rem/16)) and (max-width: calc(950rem/16)) {

	/* The trail and the header sit closer together here than on a wide screen, so the lockup needs
	   to start clear of them rather than a text step below. */
	.module.hero.style-content-media .breadcrumbs + .container {
		margin-top: var(--module-spacing-medium);
	}

	.module.hero.style-content-media .content > * + * {
		margin-top: var(--text-spacing-xxsmall);
	}

	/* Out past the container to a gutter of its own — the copy keeps the container's measure. The
	   width answers the same pull on both sides, because the rule above states one and a negative
	   margin alone would move the crop rather than widen it. */
	.module.hero.style-content-media .media,
	.module.hero.style-content-media.image-left .media {
		margin-inline: calc(var(--viewport-edge) + var(--text-spacing-small));
		width: calc(100% - 2 * (var(--viewport-edge) + var(--text-spacing-small)));
	}

}

/***************************************************************************************************************************************************************************************/
/* MQ MAX-WIDTH 650 - Mobile Sizes */
/***************************************************************************************************************************************************************************************/

@media only screen and (max-width: calc(650rem/16)) {

	/* The trail is hidden here, but a hidden sibling still matches. The band opens on its own step
	   off the header instead — the trail used to carry that room. */
	.module.hero.style-content-media .container,
	.module.hero.style-content-media .breadcrumbs + .container {
		margin-top: 64px;
	}

	/* The crop takes the screen, corners and all: held to the container it is a photograph with a
	   margin either side too narrow to read as one. */
	.module.hero.style-content-media .media,
	.module.hero.style-content-media.image-left .media {
		border-radius: 0;
		margin-inline: var(--viewport-edge);
		width: auto;
	}

	.module.hero.style-content-media .content > * + * {
		margin-top: var(--text-spacing-xxsmall);
	}

	.module.hero.style-content-media .content > * + .buttons {
		margin-top: var(--text-spacing-small);
	}

	.module.hero.style-content-media .buttons {
		gap: var(--text-spacing-small);
	}

}
