/* Quiet Handyman. One stylesheet for the whole site. */

@font-face {
	font-family: "Zen Maru Gothic";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("fonts/zen-maru-gothic-latin-400-normal.woff2") format("woff2");
}

@font-face {
	font-family: "Zen Maru Gothic";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("fonts/zen-maru-gothic-latin-500-normal.woff2") format("woff2");
}

@font-face {
	font-family: "Zen Maru Gothic";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("fonts/zen-maru-gothic-latin-700-normal.woff2") format("woff2");
}

:root {
	--qh-fog: #edf1f4;
	--qh-paper: #ffffff;
	--qh-ink: #18233a;
	--qh-indigo: #24375f;
	--qh-steel: #54647a;
	--qh-line: #d3dbe3;
	--qh-hinoki: #c8a46a;
	--qh-hinoki-soft: #f1e6cf;
	--qh-ok-bg: #e2efe6;
	--qh-ok-ink: #17402a;
	--qh-bad-bg: #fae8e5;
	--qh-bad-ink: #7c2015;
	--qh-font: "Zen Maru Gothic", ui-rounded, "Hiragino Maru Gothic ProN", "Segoe UI", system-ui, sans-serif;
	--qh-measure: 34rem;
	--qh-wide: 70rem;
	--qh-gutter: clamp(1rem, 4vw, 2.5rem);
	--qh-space: clamp(4rem, 9vw, 7.5rem);
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--qh-fog);
	color: var(--qh-ink);
	font-family: var(--qh-font);
	font-size: 1.0625rem;
	font-weight: 400;
	line-height: 1.65;
}

h1,
h2,
h3 {
	margin: 0;
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

h1 {
	font-size: clamp(2.25rem, 1.2rem + 4.6vw, 4rem);
	line-height: 1.08;
}

h2 {
	font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
}

h3 {
	font-size: 1.1875rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0;
}

p {
	margin: 0 0 1em;
}

a {
	color: var(--qh-indigo);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

a:hover {
	text-decoration-thickness: 0.15em;
}

:focus-visible {
	outline: 3px solid var(--qh-indigo);
	outline-offset: 3px;
	border-radius: 4px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.qh-skip {
	position: absolute;
	left: 1rem;
	top: -4rem;
	z-index: 10;
	padding: 0.6rem 1rem;
	background: var(--qh-paper);
	border-radius: 0.5rem;
	font-weight: 700;
}

.qh-skip:focus {
	top: 1rem;
}

.qh-wrap {
	width: min(100% - 2 * var(--qh-gutter), var(--qh-wide));
	margin-inline: auto;
}

.qh-quiet {
	color: var(--qh-steel);
	font-size: 0.9375rem;
}

/* Header */

.qh-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1rem;
	padding-block: 1.25rem;
}

.qh-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 2.75rem;
	color: var(--qh-ink);
	font-size: 1.125rem;
	font-weight: 700;
	text-decoration: none;
}

.qh-brand svg {
	width: 2.5rem;
	height: 1rem;
	color: var(--qh-indigo);
}

.qh-nav {
	display: flex;
	align-items: center;
	gap: clamp(0.75rem, 3vw, 1.75rem);
}

.qh-nav a:not(.qh-button) {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	color: var(--qh-ink);
	font-weight: 500;
	text-decoration: none;
}

.qh-nav a:not(.qh-button):hover,
.qh-nav a:not(.qh-button)[aria-current="page"] {
	text-decoration: underline;
}

/* Buttons */

.qh-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3rem;
	padding: 0.7rem 1.5rem;
	border: 2px solid var(--qh-indigo);
	border-radius: 999px;
	background: var(--qh-indigo);
	color: #fff;
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.qh-button:hover {
	border-color: var(--qh-ink);
	background: var(--qh-ink);
}

.qh-button:focus-visible {
	border-radius: 999px;
}

.qh-button--quiet {
	background: transparent;
	color: var(--qh-indigo);
}

.qh-button--quiet:hover {
	background: var(--qh-paper);
	color: var(--qh-ink);
}

.qh-button--small {
	min-height: 2.75rem;
	padding: 0.45rem 1.1rem;
	font-size: 0.9375rem;
}

.qh-button[disabled] {
	opacity: 0.6;
	cursor: progress;
}

.qh-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 2rem;
}

/* Home: headline and the example conversation */

.qh-hero {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	align-items: center;
	gap: clamp(2rem, 6vw, 5rem);
	padding-top: clamp(2.5rem, 7vw, 6rem);
}

.qh-hero__lede {
	max-width: 32rem;
	margin: 1.5rem 0 0;
	font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
	line-height: 1.55;
}

.qh-hero__area {
	margin: 1.25rem 0 0;
	color: var(--qh-steel);
	font-size: 0.9375rem;
}

.qh-thread {
	margin: 0;
}

.qh-thread__list {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.qh-msg {
	max-width: 86%;
	padding: 0.75rem 1rem;
	border-radius: 1.25rem;
	font-size: 1rem;
	line-height: 1.45;
}

.qh-msg p {
	margin: 0;
}

.qh-msg--you {
	align-self: flex-end;
	border-bottom-right-radius: 0.35rem;
	background: var(--qh-indigo);
	color: #fff;
}

.qh-msg--qh {
	align-self: flex-start;
	border-bottom-left-radius: 0.35rem;
	background: var(--qh-paper);
}

.qh-msg__who {
	display: block;
	margin-bottom: 0.2rem;
	font-size: 0.8125rem;
	font-weight: 700;
}

.qh-msg--you .qh-msg__who {
	color: #d5def0;
}

.qh-msg--qh .qh-msg__who {
	color: var(--qh-steel);
}

.qh-photo {
	display: block;
	width: 9.5rem;
	margin-top: 0.6rem;
	overflow: hidden;
	border-radius: 0.75rem;
}

.qh-photo svg {
	display: block;
	width: 100%;
	height: auto;
}

.qh-slip {
	margin-top: 0.6rem;
	padding: 0.6rem 0.8rem;
	border-left: 3px solid var(--qh-hinoki);
	border-radius: 0.2rem 0.6rem 0.6rem 0.2rem;
	background: var(--qh-fog);
	font-size: 0.9375rem;
}

.qh-slip ul {
	margin: 0;
	padding-left: 1.1rem;
}

.qh-thread figcaption {
	margin-top: 1rem;
	color: var(--qh-steel);
	font-size: 0.9375rem;
}

@media (prefers-reduced-motion: no-preference) {
	.qh-msg {
		opacity: 0;
		transform: translateY(0.4rem);
		animation: qh-arrive 0.5s ease-out forwards;
	}

	.qh-msg:nth-child(1) {
		animation-delay: 0.3s;
	}

	.qh-msg:nth-child(2) {
		animation-delay: 1.1s;
	}

	.qh-msg:nth-child(3) {
		animation-delay: 2s;
	}

	.qh-msg:nth-child(4) {
		animation-delay: 2.7s;
	}
}

@keyframes qh-arrive {
	to {
		opacity: 1;
		transform: none;
	}
}

/* Sections */

.qh-section {
	margin-top: var(--qh-space);
}

.qh-section__head {
	max-width: var(--qh-measure);
	margin-bottom: 2rem;
}

.qh-section__head p {
	margin: 0.75rem 0 0;
	color: var(--qh-steel);
}

.qh-steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
	gap: 2rem 2.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: qh-step;
}

.qh-steps > li {
	padding-top: 1rem;
	border-top: 2px solid var(--qh-ink);
	counter-increment: qh-step;
}

.qh-steps > li::before {
	content: counter(qh-step);
	display: block;
	margin-bottom: 0.35rem;
	color: var(--qh-steel);
	font-size: 0.9375rem;
	font-weight: 700;
}

.qh-steps h3 {
	margin-bottom: 0.4rem;
}

.qh-steps p {
	margin: 0;
}

.qh-reasons {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 2rem 3rem;
}

.qh-reasons h3 {
	margin-bottom: 0.4rem;
}

.qh-reasons p {
	margin: 0;
}

.qh-services {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	gap: 2.25rem 2.5rem;
}

.qh-services h3 {
	margin-bottom: 0.6rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--qh-line);
}

.qh-services ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.qh-services li {
	padding-block: 0.2rem;
}

.qh-note {
	max-width: var(--qh-measure);
	margin-top: 2rem;
}

.qh-note p {
	margin-bottom: 0.4rem;
}

.qh-about {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: start;
	gap: clamp(2rem, 6vw, 5rem);
}

.qh-about__text {
	max-width: var(--qh-measure);
}

.qh-about__text h2 {
	margin-bottom: 1.25rem;
}

.qh-said {
	display: grid;
	gap: 1.25rem;
}

.qh-said blockquote {
	margin: 0;
	padding: 1.25rem 1.5rem;
	border-radius: 1.25rem 1.25rem 1.25rem 0.35rem;
	background: var(--qh-paper);
}

.qh-said blockquote p {
	margin: 0;
}

.qh-said blockquote footer {
	margin-top: 0.6rem;
	color: var(--qh-steel);
	font-size: 0.9375rem;
}

/* Closing invitation */

.qh-band {
	margin-top: var(--qh-space);
	padding: clamp(2rem, 6vw, 4rem);
	border-radius: 1.75rem;
	background: var(--qh-indigo);
	color: #fff;
}

.qh-band h2 {
	max-width: 28rem;
}

.qh-band p {
	max-width: 30rem;
	margin: 0.75rem 0 0;
	color: #dbe3f0;
}

.qh-band .qh-button {
	border-color: #fff;
	background: #fff;
	color: var(--qh-indigo);
}

.qh-band .qh-button:hover {
	border-color: var(--qh-hinoki-soft);
	background: var(--qh-hinoki-soft);
	color: var(--qh-ink);
}

.qh-band .qh-button--quiet {
	background: transparent;
	color: #fff;
}

.qh-band .qh-button--quiet:hover {
	background: #fff;
	color: var(--qh-indigo);
}

.qh-band :focus-visible {
	outline-color: #fff;
}

/* Footer */

.qh-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1.5rem 3rem;
	margin-top: var(--qh-space);
	padding-block: 2.5rem 3rem;
	border-top: 1px solid var(--qh-line);
	color: var(--qh-steel);
	font-size: 0.9375rem;
}

.qh-footer p {
	margin: 0 0 0.3rem;
}

.qh-footer strong {
	color: var(--qh-ink);
}

.qh-footer nav {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.qh-footer__legal {
	flex-basis: 100%;
}

/* Inner pages */

.qh-page {
	padding-top: clamp(2rem, 6vw, 4.5rem);
}

.qh-page__head {
	max-width: var(--qh-measure);
}

.qh-page__head p {
	margin: 1rem 0 0;
	font-size: 1.125rem;
}

.qh-page__body {
	margin-top: 3rem;
}

.qh-prose {
	max-width: var(--qh-measure);
	margin-top: 2rem;
}

.qh-prose h2 {
	margin: 2rem 0 0.5rem;
	font-size: 1.375rem;
}

.qh-prose ul {
	padding-left: 1.2rem;
}

.qh-quote {
	display: grid;
	grid-template-columns: minmax(0, 34rem) minmax(0, 1fr);
	align-items: start;
	gap: clamp(2rem, 6vw, 5rem);
	margin-top: 2.5rem;
}

.qh-aside h2 {
	margin-bottom: 0.35rem;
	font-size: 1.1875rem;
	font-weight: 700;
	letter-spacing: 0;
}

.qh-aside p {
	margin-bottom: 1.5rem;
}

/* Quote form (markup comes from the QH Quote plugin) */

.qhq-form {
	display: grid;
	gap: 1.4rem;
	padding: clamp(1.25rem, 4vw, 2rem);
	border-radius: 1.25rem;
	background: var(--qh-paper);
}

.qhq-field {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.qhq-field > label,
.qhq-field > legend {
	display: block;
	margin-bottom: 0.35rem;
	padding: 0;
	font-weight: 700;
}

.qhq-optional {
	color: var(--qh-steel);
	font-weight: 400;
}

.qhq-hint {
	display: block;
	margin-bottom: 0.45rem;
	color: var(--qh-steel);
	font-size: 0.9375rem;
}

.qhq-field input[type="text"],
.qhq-field input[type="tel"],
.qhq-field input[type="email"],
.qhq-field textarea,
.qhq-field select {
	width: 100%;
	min-height: 3rem;
	padding: 0.65rem 0.8rem;
	border: 1.5px solid #8492a5;
	border-radius: 0.6rem;
	background: #fff;
	color: var(--qh-ink);
	font: inherit;
}

.qhq-field textarea {
	min-height: 9rem;
	resize: vertical;
}

.qhq-field [aria-invalid="true"] {
	border-color: var(--qh-bad-ink);
	border-width: 2px;
}

.qhq-choices {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.75rem;
}

.qhq-choices label {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 2.75rem;
	font-weight: 400;
	cursor: pointer;
}

.qhq-choices input {
	width: 1.25rem;
	height: 1.25rem;
	margin: 0;
	accent-color: var(--qh-indigo);
}

.qhq-error {
	margin: 0.35rem 0 0;
	color: var(--qh-bad-ink);
	font-size: 0.9375rem;
	font-weight: 500;
}

.qhq-trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.qhq-status {
	padding: 0.9rem 1rem;
	border-radius: 0.6rem;
	font-weight: 500;
}

.qhq-status:empty {
	display: none;
}

.qhq-status--ok {
	background: var(--qh-ok-bg);
	color: var(--qh-ok-ink);
}

.qhq-status--error {
	background: var(--qh-bad-bg);
	color: var(--qh-bad-ink);
}

.qhq-fineprint {
	margin: 0;
	color: var(--qh-steel);
	font-size: 0.9375rem;
}

[hidden] {
	display: none !important;
}

/* Narrow screens */

@media (max-width: 52rem) {
	.qh-hero,
	.qh-about,
	.qh-quote {
		grid-template-columns: minmax(0, 1fr);
	}

	.qh-thread {
		max-width: 28rem;
	}
}

@media (max-width: 30rem) {
	.qh-actions .qh-button {
		flex: 1 1 100%;
	}
}

@media print {
	.qh-nav,
	.qh-band,
	.qh-skip {
		display: none;
	}

	body {
		background: #fff;
	}
}
