/* ==========================================================================
   Binham — reset, element defaults, typography, accessibility primitives
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--bnh-nav-h) + var(--bnh-s4));
}

body {
	margin: 0;
	background: var(--bnh-white);
	color: var(--bnh-ink);
	font-family: var(--bnh-font-sans);
	font-size: var(--bnh-fs-body);
	line-height: var(--bnh-lh);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 var(--bnh-s3);
	color: var(--bnh-navy-800);
	font-weight: 700;
	line-height: var(--bnh-lh-tight);
	text-wrap: balance;
}

h1 { font-size: var(--bnh-fs-h1); }
h2 { font-size: var(--bnh-fs-h2); }
h3 { font-size: var(--bnh-fs-h3); }
h4 { font-size: 1.125rem; }

p {
	margin: 0 0 var(--bnh-s4);
	text-wrap: pretty;
}

p:last-child { margin-bottom: 0; }

a {
	color: var(--bnh-navy);
	text-decoration-color: color-mix(in srgb, var(--bnh-navy) 35%, transparent);
	text-underline-offset: 3px;
	transition: color .2s var(--bnh-ease);
}

a:hover { color: var(--bnh-orange); }

ul, ol {
	margin: 0 0 var(--bnh-s4);
	padding-left: 1.25rem;
}

img, picture, svg, video, canvas {
	max-width: 100%;
	height: auto;
	display: block;
}

img { border-style: none; }

figure { margin: 0; }

blockquote {
	margin: 0 0 var(--bnh-s5);
	padding: var(--bnh-s4) var(--bnh-s5);
	border-left: 4px solid var(--bnh-orange);
	background: var(--bnh-grey-050);
	border-radius: 0 var(--bnh-r) var(--bnh-r) 0;
	font-style: italic;
}

hr {
	height: 1px;
	margin: var(--bnh-s6) 0;
	border: 0;
	background: var(--bnh-line);
}

code, pre, kbd, samp {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: .9em;
}

pre {
	padding: var(--bnh-s4);
	overflow-x: auto;
	background: var(--bnh-navy-900);
	color: var(--bnh-white);
	border-radius: var(--bnh-r);
}

table {
	width: 100%;
	margin-bottom: var(--bnh-s5);
	border-collapse: collapse;
}

th, td {
	padding: var(--bnh-s3);
	border-bottom: 1px solid var(--bnh-line);
	text-align: left;
}

th { font-weight: 600; }

/* --- Forms ------------------------------------------------------------- */

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

button { cursor: pointer; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"],
input[type="date"],
input[type="password"],
select,
textarea {
	width: 100%;
	padding: .75rem 1rem;
	background: var(--bnh-white);
	border: 1px solid var(--bnh-line);
	border-radius: var(--bnh-r-sm);
	color: var(--bnh-ink);
	transition: border-color .2s var(--bnh-ease), box-shadow .2s var(--bnh-ease);
	appearance: none;
}

textarea {
	min-height: 8rem;
	resize: vertical;
}

select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235C6B78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 9 7 7 7-7'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	padding-right: 2.5rem;
	cursor: pointer;
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--bnh-orange);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--bnh-orange) 22%, transparent);
	outline: none;
}

input::placeholder,
textarea::placeholder {
	color: var(--bnh-muted);
	opacity: 1;
}

label {
	display: block;
	margin-bottom: var(--bnh-s2);
	font-size: var(--bnh-fs-sm);
	font-weight: 500;
	color: var(--bnh-navy-800);
}

fieldset {
	margin: 0 0 var(--bnh-s5);
	padding: 0;
	border: 0;
}

legend {
	padding: 0;
	margin-bottom: var(--bnh-s3);
	font-weight: 600;
	color: var(--bnh-navy-800);
}

/* --- Accessibility ------------------------------------------------------ */

:focus-visible {
	outline: 3px solid var(--bnh-orange);
	outline-offset: 2px;
	border-radius: var(--bnh-r-sm);
}

.bnh-skip {
	position: absolute;
	top: -100px;
	left: var(--bnh-s4);
	z-index: 999;
	padding: var(--bnh-s3) var(--bnh-s5);
	background: var(--bnh-orange);
	color: var(--bnh-white);
	border-radius: 0 0 var(--bnh-r) var(--bnh-r);
	font-weight: 600;
	text-decoration: none;
	transition: top .18s var(--bnh-ease);
}

.bnh-skip:focus {
	top: 0;
	color: var(--bnh-white);
}

.screen-reader-text,
.bnh-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	position: static !important;
	width: auto;
	height: auto;
	clip: auto;
	clip-path: none;
	white-space: normal;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }

	*,
	*::before,
	*::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
		scroll-behavior: auto !important;
	}
}

/* --- WordPress core classes -------------------------------------------- */

.alignleft { float: left; margin: 0 var(--bnh-s5) var(--bnh-s4) 0; }
.alignright { float: right; margin: 0 0 var(--bnh-s4) var(--bnh-s5); }
.aligncenter { display: block; margin: 0 auto var(--bnh-s4); }
.alignwide { width: min(100%, 1100px); margin-inline: auto; }
.alignfull { width: 100%; }

.wp-caption { max-width: 100%; }

.wp-caption-text,
.wp-element-caption {
	margin-top: var(--bnh-s2);
	color: var(--bnh-muted);
	font-size: var(--bnh-fs-sm);
	text-align: center;
}

.sticky .bnh-card { border-color: var(--bnh-orange); }
