/*
 * MHG main stylesheet.
 * Base resets, global typography and layout primitives only.
 * Component- and page-specific styles live alongside this in components/ and pages/.
 */

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

html {
	font-size: 100%;
}

body {
	margin: 0;
	font-family: var(--mhg-font-body);
	font-size: var(--mhg-font-size-body);
	line-height: var(--mhg-line-height-body);
	color: var(--mhg-color-dark-grey);
	background-color: var(--mhg-color-white);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	/* Clips any spillover from full-bleed sections that use the 100vw +
	   negative-margin pattern (e.g. .mhg-hero). Without this, the hero's
	   100vw width can momentarily trigger a horizontal scrollbar on systems
	   where the body is narrower than the viewport (vertical scrollbar
	   reduces body width but not 100vw). */
	overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--mhg-font-heading);
	color: var(--mhg-color-charcoal);
	margin: 0 0 var(--mhg-space-sm);
	line-height: var(--mhg-line-height-tight);
	font-weight: 700;
}

p {
	margin: 0 0 var(--mhg-space-sm);
}

a {
	color: var(--mhg-color-teal);
	text-decoration: none;
	transition: color var(--mhg-transition-fast);
}

a:hover,
a:focus {
	color: var(--mhg-color-teal-dark);
}

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

:focus-visible {
	outline: 2px solid var(--mhg-color-gold);
	outline-offset: 2px;
}

/* Skip link — visible only when focused via keyboard */
.mhg-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
}

.mhg-skip-link:focus {
	position: absolute;
	left: var(--mhg-space-sm);
	top: var(--mhg-space-sm);
	z-index: 1000;
	padding: var(--mhg-space-xs) var(--mhg-space-sm);
	background: var(--mhg-color-teal);
	color: var(--mhg-color-white);
	border-radius: var(--mhg-radius-sm);
}

/* Reusable container */
.mhg-container {
	width: 100%;
	max-width: var(--mhg-container-max);
	margin: 0 auto;
	padding: 0 var(--mhg-space-sm);
}

@media (min-width: 768px) {
	.mhg-container {
		padding: 0 var(--mhg-space-md);
	}
}

/* Section label / "eyebrow" — used at the top of most sections */
.mhg-eyebrow {
	display: inline-block;
	margin: 0 0 var(--mhg-space-sm);
	font-family: var(--mhg-font-body);
	font-size: var(--mhg-font-size-eyebrow);
	font-weight: 600;
	color: var(--mhg-color-teal);
	text-transform: uppercase;
	letter-spacing: var(--mhg-letter-spacing-eyebrow);
}
