/*
 * Base styles. No colours of their own: the kit's global styles (Elementor Site Settings)
 * and each widget's settings decide how things look. Spacing is in em, so padding grows and
 * shrinks with the text it surrounds.
 */

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

html {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	line-height: 1.5;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: var(--ksb-body-font, inherit);
	color: var(--ksb-text, #333);
	background-color: #fff;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.5em;
	line-height: 1.2;
	color: inherit;
}

p {
	margin: 0 0 1em;
}

a {
	color: var(--ksb-link, inherit);
	text-decoration: none;
}

img,
svg,
video,
iframe {
	max-width: 100%;
}

img,
video {
	height: auto;
}

figure {
	margin: 0 0 1em;
}

hr {
	border: 0;
	border-top: 1px solid rgba(127, 127, 127, 0.3);
	margin: 1.5em 0;
}

table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	padding: 0.5em;
	border-bottom: 1px solid rgba(127, 127, 127, 0.3);
	text-align: start;
}

/* Buttons take the colours the design gives them and inherit the rest. */
button,
input,
select,
optgroup,
textarea {
	font: inherit;
	color: inherit;
	margin: 0;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
	display: inline-block;
	padding: 0.5em 1em;
	border: 1px solid transparent;
	border-radius: 3px;
	background-color: transparent;
	line-height: 1.2;
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
	transition: all 0.3s;
	-webkit-appearance: none;
	appearance: none;
}

button:focus:not(:focus-visible),
[type="button"]:focus:not(:focus-visible),
[type="submit"]:focus:not(:focus-visible) {
	outline: none;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="range"]):not([type="color"]),
select,
textarea {
	width: 100%;
	padding: 0.5em 0.75em;
	border: 1px solid rgba(127, 127, 127, 0.45);
	border-radius: 3px;
	background-color: transparent;
	line-height: 1.4;
}

textarea {
	resize: vertical;
}

label {
	display: inline-block;
	line-height: 1.4;
}

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

.skip-link:focus {
	position: fixed !important;
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	clip: auto;
	padding: 0.75em 1em;
	background: #fff;
	color: #000;
}

/* Posts and plain pages: the kit's container width, with side padding that scales. */
.ksb-wrap,
body:not([class*="elementor-page-"]) .site-main {
	width: 100%;
	max-width: calc(var(--ksb-width, 1140px) + 2 * clamp(16px, 4vw, 32px));
	margin-inline: auto;
	padding-inline: clamp(16px, 4vw, 32px);
}

body:not([class*="elementor-page-"]) .site-main {
	padding-block: clamp(32px, 6vw, 80px);
}

/* Posts and products shown in the kit's layout: the layout sets its own width and spacing. */
body .site-main.ksb-layout {
	max-width: none;
	padding: 0;
}

.ksb-entry {
	max-width: 780px;
	margin-inline: auto;
}

.ksb-entry-header {
	margin-bottom: 1.5em;
}

.ksb-meta {
	opacity: 0.7;
	font-size: 0.875em;
}

.ksb-thumb {
	display: block;
	margin-bottom: 1.5em;
}

.ksb-thumb img {
	display: block;
	width: 100%;
	border-radius: 4px;
}

.ksb-posts {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: clamp(20px, 3vw, 40px);
}

.ksb-card .entry-title {
	font-size: 1.25em;
}

.ksb-card .entry-title a {
	color: inherit;
}

.alignwide {
	margin-inline: calc(-1 * clamp(0px, 5vw, 120px));
}

.alignfull {
	margin-inline: calc(50% - 50vw);
	max-width: 100vw;
}

.wp-caption-text,
figcaption {
	font-size: 0.875em;
	opacity: 0.75;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin-top: 2em;
}

.nav-links .page-numbers {
	padding: 0.25em 0.75em;
	border: 1px solid rgba(127, 127, 127, 0.3);
	border-radius: 3px;
}

.ksb-comments {
	max-width: 780px;
	margin: 3em auto 0;
}

/* Plain header and footer, used only when the kit has none. */
.ksb-plain .ksb-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	padding-block: 1.25em;
}

.ksb-site-title {
	font-size: 1.25em;
	font-weight: 700;
	color: inherit;
}

.ksb-menu ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em 1.5em;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ksb-menu a {
	color: inherit;
}

.ksb-menu .sub-menu {
	display: none;
}

.site-footer.ksb-plain p {
	margin: 0;
	opacity: 0.7;
}

/* Title banner on pages with no Elementor design. It starts behind a see-through header. */
.ksb-hero {
	position: relative;
	margin-top: calc(-1 * var(--ksb-header-pull, 0px));
	padding: calc(var(--ksb-header-h, 0px) + clamp(48px, 8vw, 112px)) 0 clamp(40px, 6vw, 88px);
	background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), var(--ksb-hero-image, none) center / cover no-repeat, var(--e-global-color-primary, #1d2327);
	color: #fff;
}

.ksb-hero-band {
	padding: calc(var(--ksb-header-h, 0px) + 1px) 0 0;
}

body:not(.ksb-header-over) .ksb-hero-band {
	display: none;
}

.ksb-hero-inner {
	max-width: calc(var(--ksb-width, 1140px) + 2 * clamp(16px, 4vw, 32px));
	margin-inline: auto;
	padding-inline: clamp(16px, 4vw, 32px);
}

.ksb-hero .entry-title {
	max-width: 24ch;
	margin: 0;
	color: #fff;
	font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem);
	line-height: 1.12;
	letter-spacing: normal;
	overflow-wrap: break-word;
	hyphens: auto;
}

.ksb-hero .ksb-meta {
	margin: 1em 0 0;
	color: rgba(255, 255, 255, 0.82);
	opacity: 1;
}

/* Article headings at reading size: a kit's heading styles are made for heroes. */
.ksb-content .entry-content h1,
.ksb-content .entry-content h2 {
	font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.25rem);
	line-height: 1.2;
	overflow-wrap: break-word;
}

.ksb-content .entry-content h3 {
	font-size: clamp(1.3rem, 1rem + 0.9vw, 1.7rem);
	line-height: 1.25;
}

.ksb-content .entry-content h4,
.ksb-content .entry-content h5,
.ksb-content .entry-content h6 {
	font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
	line-height: 1.3;
}

.ksb-content .ksb-card .entry-title,
.ksb-comments h2,
.ksb-comments .comment-reply-title {
	font-size: clamp(1.2rem, 1rem + 0.6vw, 1.5rem);
	line-height: 1.25;
}
