/**
 * Tim Scott: base.
 *
 * Fonts, then the element defaults: only the bootstrap/_reboot.scss,
 * bootstrap/_type.scss, _elements.scss and 01-atoms/form rules that matched
 * on the old site (dream-used.css), values verbatim. The scroll offset and
 * the reduced-motion guard replace the old smoothScroll() jQuery animation.
 *
 * @package TSC
 */

/* Fonts */

/*
 * Butler, self-hosted. The woff2 files are the old whitelabel7
 * dist/wp/fonts/ ones, copied as they were (Butler-Bold.woff2,
 * Butler-Medium.woff2, Butler.woff2). Only the three faces dream.css sets
 * on rendered elements, all on /stories/: .story-title (butlerbold),
 * .story-subtitle (butlermedium) and .story-text (butlerregular). Black,
 * ExtraBold, Light and UltraLight were declared but never used. Each weight
 * keeps its own family name and weight descriptor, as in dream.css, so the
 * old font-family rules pick the same face. butler-bold.woff2 is preloaded
 * on /stories/ from inc/assets.php with this exact URL.
 */
@font-face {
	font-family: "butlerbold";
	src: url("../fonts/butler-bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "butlermedium";
	src: url("../fonts/butler-medium.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "butlerregular";
	src: url("../fonts/butler-regular.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

/* ==========================================================================
   Reboot
   ========================================================================== */

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

html {
	font-family: sans-serif;
	font-size: var(--tsc-font-size-root);
	line-height: 1.15;
	min-height: 100%;
	-webkit-text-size-adjust: 100%;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
	/*
	 * In-page links land 221px below the top, where the old smoothScroll()
	 * put them, and glide there unless the reader asked for less motion.
	 */
	scroll-behavior: smooth;
	scroll-padding-top: var(--tsc-anchor-offset);
}

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

/*
 * The white frame round every page is body padding (_elements.scss);
 * body.stories drops it (wordpress/_stories.scss, routes/listings.css).
 */
body {
	position: relative;
	margin: 0;
	padding: var(--tsc-body-padding);
	font-family: var(--tsc-font-body);
	font-size: var(--tsc-font-size-body);
	font-weight: 400;
	line-height: var(--tsc-line-height-body);
	color: var(--body-text);
	text-align: left;
	background-color: var(--body-bg);
}

@media (min-width: 48em) {
	body {
		padding: var(--tsc-body-padding-lg);
	}
}

/* The open mobile nav covers the page; the page stops scrolling under it. */
body.nav-open {
	overflow: hidden;
}

[tabindex="-1"]:focus:not(:focus-visible) {
	outline: 0 !important;
}

[hidden] {
	display: none !important;
}

/* ==========================================================================
   Type
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
	margin-top: 0;
	margin-bottom: 0.625rem;
	font-family: var(--tsc-font-heading);
	/* 900 asks for a face the kit does not have: the 700 face renders. */
	font-weight: var(--tsc-heading-weight);
	line-height: var(--tsc-heading-line-height);
}

h1 {
	font-size: var(--tsc-font-size-h1);
}

h2 {
	font-size: var(--tsc-font-size-h2);
}

h3 {
	font-size: var(--tsc-font-size-h3);
}

h4 {
	font-size: var(--tsc-font-size-h4);
}

h5 {
	font-size: var(--tsc-font-size-h5);
}

h6 {
	font-size: var(--tsc-font-size-h6);
}

.display-3 {
	font-size: var(--tsc-font-size-display-3);
	font-weight: 300;
	line-height: 1;
}

.small {
	font-size: 0.875em;
	font-weight: 400;
}

p {
	margin-top: 0;
	margin-bottom: 1rem;
}

li,
p {
	font-size: var(--tsc-font-size-copy);
	line-height: var(--tsc-line-height-body);
}

ul {
	margin-top: 0;
	margin-bottom: 1rem;
}

blockquote {
	margin: 0 0 1rem;
}

strong {
	font-weight: bolder;
}

a {
	color: var(--link);
	text-decoration: none;
	background-color: transparent;
	transition: color var(--tsc-transition);
	will-change: color;
}

a:hover {
	color: var(--link-hover);
	text-decoration: underline;
}

code,
kbd,
pre,
samp {
	font-family: var(--tsc-font-mono);
}

/* Bootstrap's rule (post 1296's separator block; core's .wp-block-separator sets the line). */
hr {
	box-sizing: content-box;
	height: 0;
	margin-top: 1rem;
	margin-bottom: 1rem;
	overflow: visible;
	border: 0;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Media
   ========================================================================== */

figure {
	margin: 0 0 1rem;
}

img {
	border-style: none;
}

img,
svg {
	vertical-align: middle;
}

svg {
	overflow: hidden;
}

/* ==========================================================================
   Forms
   ========================================================================== */

label {
	display: inline-block;
	margin-bottom: 0.5rem;
}

button {
	border-radius: 0;
	text-transform: none;
}

button:focus:not(:focus-visible) {
	outline: 0;
}

button,
input {
	margin: 0;
	overflow: visible;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
}

[type="button"],
button {
	-webkit-appearance: button;
}

[type="button"]:not(:disabled),
button:not(:disabled) {
	cursor: pointer;
}

fieldset {
	min-width: 0;
	padding: 0;
	margin: 0;
	border: 0;
}

legend {
	display: block;
	width: 100%;
	max-width: 100%;
	padding: 0;
	margin-bottom: 0.5rem;
	font-size: 1.5rem;
	line-height: inherit;
	color: inherit;
	white-space: normal;
}

::-webkit-file-upload-button {
	font: inherit;
	-webkit-appearance: button;
}

/* 01-atoms/form/_form.scss: the pill inputs (footer form 5 and any other). */
input {
	font-family: var(--tsc-font-body);
	font-size: 1rem;
	line-height: 1;
	text-transform: none;
	padding: 0.90625rem 1rem;
	background-color: var(--white);
	border: 0.03125rem solid var(--tertiary);
	border-radius: 1.5rem;
	box-shadow: var(--tsc-input-shadow);
	transition-property: background-color, padding-left;
	transition-duration: var(--tsc-duration);
	transition-timing-function: var(--tsc-ease);
	will-change: background-color, padding-left;
}

input:focus,
input:hover {
	outline: none;
	padding-left: 1.25rem;
}

input:focus {
	background-color: var(--light);
}

::placeholder {
	color: var(--tertiary);
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/*
 * Visually hidden, still read. Core's block-library common CSS prints this
 * exact pair on every page; it is repeated here, values identical, so it
 * holds even where that sheet is not printed (and Gravity Forms' hidden
 * sub-labels rely on it).
 */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	border: 0;
	word-wrap: normal !important;
	word-break: normal !important;
}

.screen-reader-text:focus {
	top: 5px;
	left: 5px;
	z-index: 100000;
	display: block;
	width: auto;
	height: auto;
	padding: 15px 23px 14px;
	font-size: 1em;
	line-height: normal;
	color: #444;
	text-decoration: none;
	background-color: #ddd;
	clip-path: none;
}

/*
 * The skip link (01-atoms/skip-nav), with .screen-reader-text as before:
 * off-screen until focused, then across the top of the page.
 */
.skip-nav {
	position: absolute;
	top: -62.5rem;
	left: -62.5rem;
	z-index: var(--tsc-z-skip);
	display: block;
	width: 0.0625rem;
	height: 0.0625rem;
	padding: 1.25rem;
	overflow: hidden;
	color: #fff;
	text-align: left;
	background-color: #000;
	border: none;
}

.skip-nav:active,
.skip-nav:focus,
.skip-nav:hover {
	top: 0;
	right: 0;
	left: 0;
	width: auto;
	height: auto;
	overflow: visible;
	color: #fff;
	text-decoration: none;
}
