/* Homepage stylesheet.
   Rules: dark text on warm off-white, no caps, left-aligned, one accent
   (the booking button), WCAG 2.2 AAA contrast, fonts from the device.
   Headlines and scan-only things use the device's sans-serif; everything
   people read is Charter. */

:root {
	--ink: #111111; /* 17.7:1 on paper */
	--ink-soft: #444444; /* 9.1:1 on paper, 8.4:1 on band */
	--paper: #faf7f0;
	--band: #f2ede3; /* ink is 16:1 on it */
	--rule: #ddd5c6;
	--radius: 10px;
	--accent: #1fc95c; /* brand green, used only on booking buttons; ink on it is 8.6:1 */
	--accent-hover: #22d363; /* ink on it is 9.5:1 */
	--focus: #111111;

	--serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--measure: 40rem; /* about 64 characters of Charter at 20px; AAA asks for 80 or fewer */
	--gutter: 1.25rem;
	--wide: 72rem;
	--header-h: 4.75rem;
	--space: clamp(4.5rem, 3rem + 5vw, 8rem); /* between sections */

	color-scheme: light;
}

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

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 1.25rem; /* 20px */
	line-height: 1.6;
}

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

/* One warm treatment for every photo, so they sit on the cream page */
.photo {
	filter: sepia(0.14) saturate(0.94);
}

/* ---------- Type ---------- */

h1,
h2,
h3,
.button,
.site-header__name,
.hero__proof,
.stats,
.quote__name,
.featured-quote__who,
.site-footer {
	font-family: var(--sans);
}

h1,
h2,
h3 {
	font-weight: 700;
	line-height: 1.2;
	text-wrap: balance;
	margin: 0;
}

h1 {
	font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4.25rem);
	line-height: 1.08;
	letter-spacing: -0.025em;
}

h2 {
	font-size: clamp(1.875rem, 1.5rem + 1.6vw, 2.625rem);
	line-height: 1.15;
	letter-spacing: -0.02em;
}

h3 {
	font-size: 1.375rem;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

/* Opening quote marks hang outside the text edge */
.hang {
	text-indent: -0.42em;
}

p,
ul,
ol,
blockquote,
figure {
	margin: 0;
}

/* AAA 1.4.8: paragraph spacing at least 1.5x the line spacing */
.prose > * + * {
	margin-top: 1.5em;
}

.prose > * + h2,
.prose > * + h3 {
	margin-top: 2em;
}

.prose > h2 + *,
.prose > h3 + * {
	margin-top: 0.75em;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

a:hover {
	text-decoration-thickness: 2px;
}

:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 3px;
}

.kicker {
	font-size: 1.125rem;
	color: var(--ink-soft);
	font-style: italic;
	margin-bottom: 0.5rem;
}

.subhead {
	font-size: 1.375rem;
	line-height: 1.5;
}

/* Copy Ben still has to write: quiet, but easy to spot. Remove before going live. */
.todo {
	background: none;
	color: var(--ink-soft);
	font-style: italic;
	text-decoration: underline dashed 1px;
	text-underline-offset: 0.2em;
}

/* ---------- Layout ---------- */

.wide {
	width: 100%;
	max-width: calc(var(--wide) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.section {
	padding-block: var(--space);
}

.section--band {
	background: var(--band);
}

/* The editorial grid. Each .split__row pairs a heading (left) with its
   text (right) on desktop. Photos and loud rows (.split__full) sit between
   rows at full width. Headings stick while their own text scrolls, and stop
   at the end of their row, so they never slide over anything else. */
.split > * + * {
	margin-top: 3rem;
}

.split__row {
	display: grid;
	row-gap: 1.25rem;
}

@media (min-width: 64em) {
	.split > * + * {
		margin-top: 4rem;
	}

	.split__row {
		grid-template-columns: minmax(0, 1fr) minmax(0, var(--measure));
		column-gap: clamp(3rem, 6vw, 6rem);
		align-items: start;
	}

	.split__head {
		grid-column: 1;
		position: sticky;
		top: calc(var(--header-h) + 2rem);
	}

	.split__body {
		grid-column: 2;
	}
}

/* ---------- Skip link ---------- */

.skip-link {
	position: absolute;
	left: var(--gutter);
	top: -100px;
	background: var(--ink);
	color: var(--paper);
	padding: 0.5em 1em;
	z-index: 10;
}

.skip-link:focus {
	top: 0.5rem;
}

/* ---------- Header ---------- */

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: var(--header-h);
}

.site-header__name {
	font-weight: 700;
	font-size: 1.375rem;
	letter-spacing: -0.01em;
	text-decoration: none;
}

/* Tablet and up: the header stays on screen, so the booking button is
   always one click away. scroll-padding keeps focused items from hiding
   under it (AAA 2.4.12). */
@media (min-width: 48em) {
	html {
		scroll-padding-top: calc(var(--header-h) + 1.5rem);
	}

	.site-header {
		position: sticky;
		top: 0;
		z-index: 5;
		background: var(--paper);
		border-bottom: 1px solid var(--rule);
		transition: background-color 0.2s, border-color 0.2s;
	}
}

/* Desktop: at the very top, the header sits on the opening photo with no
   bar of its own. JavaScript adds .is-clear only while at the top, so
   without JavaScript the header simply stays solid. */
@media (min-width: 64em) {
	.site-header.is-clear {
		background: transparent;
		border-bottom-color: transparent;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-header {
		transition: none;
	}
}

/* ---------- Footer ---------- */

.site-footer {
	border-top: 1px solid var(--rule);
	font-size: 1rem;
	color: var(--ink-soft);
}

.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1rem 2rem;
	padding-block: 2rem;
}

.site-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	list-style: none;
	padding: 0;
}

/* ---------- Button: the only green on the page ---------- */

.button {
	/* flex keeps the label centred when min-height makes the button taller than its text */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--accent);
	color: var(--ink);
	border: 2px solid transparent; /* drawn as a real outline in Windows high-contrast mode */
	font-weight: 600;
	font-size: 1.125rem;
	line-height: 1.3;
	text-decoration: none;
	padding: calc(1em - 2px) calc(1.5em - 2px);
	border-radius: 999px;
	min-height: 44px; /* AAA 2.5.5 target size */
}

.button:hover {
	background: var(--accent-hover);
}

.button--small {
	font-size: 1rem;
	padding: calc(0.65em - 2px) calc(1.15em - 2px);
}

.button-note {
	margin-top: 0.75rem !important;
	font-size: 1.125rem;
	color: var(--ink-soft);
}

/* ---------- Captions ---------- */

figcaption {
	margin-top: 0.75rem;
	font-size: 1.125rem;
	line-height: 1.5;
	color: var(--ink-soft);
	max-width: var(--measure);
}

.credit {
	display: block;
	margin-top: 0.25rem;
	font-size: 1rem;
}

/* ---------- Opening ---------- */

.hero__figure img {
	width: 100%;
	aspect-ratio: 16 / 10; /* shallow on phones, so the button shows on the first screen */
	object-fit: cover;
	object-position: 78% 30%;
}

.hero__text {
	padding-block: 2rem 3.5rem;
}

.hero__text > * + * {
	margin-top: 1.25rem;
}

.hero__text .button {
	margin-top: 2rem;
}

/* Over the photo, grey drops below 7:1 on the darker wall, so use black */
.hero .button-note {
	color: var(--ink);
}

@media (min-width: 64em) {
	/* The photo runs up under the header */
	.hero {
		display: grid;
		margin-top: calc(-1 * var(--header-h) - 1px);
	}

	.hero__figure,
	.hero__text {
		grid-area: 1 / 1;
	}

	.hero__figure {
		position: relative;
	}

	.hero__figure img {
		aspect-ratio: auto;
		height: clamp(36rem, 100vh, 60rem);
		object-position: center 30%;
	}

	/* A faint light fade behind the text and the header keeps contrast
	   well above 7:1 however the photo is cropped */
	.hero__figure::after {
		content: "";
		position: absolute;
		inset: 0;
		background:
			linear-gradient(to bottom, rgba(250, 247, 240, 0.55), rgba(250, 247, 240, 0) 7rem),
			linear-gradient(to right, rgba(250, 247, 240, 0.5) 0%, rgba(250, 247, 240, 0.4) 35%, rgba(250, 247, 240, 0) 55%);
	}

	/* Same left edge as everything else, and kept on the plain wall.
	   The photo's filter puts it on its own layer, so lift the text above it. */
	.hero__text {
		position: relative;
		z-index: 1;
		align-self: center;
		margin: 0;
		max-width: none;
		width: min(40rem, 44vw);
		/* Line up with .wide: the same left edge as the header and every section.
		   100% is the opening's own width, so the scrollbar can't shift it. */
		padding: calc(var(--header-h) + 1.5rem) 0 2.5rem max(var(--gutter), calc((100% - var(--wide)) / 2));
		box-sizing: content-box;
	}

	/* Four lines, not five, and never taller than a laptop screen */
	.hero h1 {
		font-size: clamp(2.75rem, min(1rem + 2.9vw, 7.4vh), 4rem);
	}
}

/* The headline's second half starts on its own line, same style */
.h1__line {
	display: block;
}

/* ---------- Proof line inside the opening ---------- */

/* Each item carries its dot in front. The list starts 1.5rem early and
   clips that strip, so the dot that lands at the start of a line is hidden
   and no line ever ends on a dangling dot. */
.hero__proof {
	list-style: none;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0;
	margin-left: -1.5rem;
	clip-path: inset(0 0 0 1.5rem);
	font-family: var(--sans);
	font-size: 1rem;
	font-weight: 600;
}

.hero__proof li {
	position: relative;
	padding-left: 1.5rem;
}

.hero__proof li::before {
	content: "·";
	position: absolute;
	left: 0.55rem;
}

.hero .hero__proof {
	margin-top: 2rem;
}

/* ---------- Letter and video ---------- */

.signature {
	font-family: var(--sans);
}

.signature strong {
	display: block;
}

.signature span {
	font-size: 1rem;
	color: var(--ink-soft);
}

.drawing {
	display: block;
	width: 100%;
	height: auto;
	color: var(--ink);
}

.video__frame {
	aspect-ratio: 16 / 9;
	width: 100%;
	display: grid;
	place-items: center;
	border: 1px dashed #a89c86;
	border-radius: var(--radius);
	color: var(--ink-soft);
	font-style: italic;
	text-align: center;
	padding: 1rem;
}

/* ---------- Testimonials ---------- */

.featured-quote__text {
	font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem);
	line-height: 1.4;
}

.featured-quote__lead {
	font-size: 1.25rem;
	line-height: 1.6;
	margin-top: 1rem;
}

.featured-quote__who {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-top: 1.75rem;
	font-size: 1rem;
	font-weight: 600;
}

.featured-quote__who img {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
}

.quotes {
	list-style: none;
	padding: 2.5rem 0 0;
	border-top: 1px solid var(--rule);
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
	gap: 2.5rem 3rem;
}

/* Fairness note under the quotes: starts on the grid's left edge, like a caption */
.split > .quotes__note {
	margin-top: 2.5rem; /* same gap as between the quotes */
	font-size: 1.125rem;
	color: var(--ink-soft);
}

.quote__title {
	font-weight: 700;
}

.quote__title + p {
	margin-top: 0.5em;
}

.quote__name {
	margin-top: 1rem;
	font-size: 1rem;
	font-weight: 600;
	color: var(--ink-soft);
}

/* ---------- Steps ---------- */

.steps {
	list-style: none;
	padding: 0;
	counter-reset: step;
}

.steps > li {
	counter-increment: step;
}

.steps > li + li {
	margin-top: 2.25rem;
}

.steps h3::before {
	content: counter(step) ". ";
}

.steps h3 + p {
	margin-top: 0.5em;
}

/* ---------- Photos ---------- */

.rounded {
	border-radius: var(--radius);
}

/* ---------- Big numbers (a loud row) ---------- */

.stats {
	list-style: none;
	padding: 2.5rem 0 0;
	border-top: 1px solid var(--rule);
	display: flex;
	flex-wrap: wrap;
	gap: 2rem clamp(2.5rem, 6vw, 6rem);
}

.stats li {
	font-size: 1.125rem;
	color: var(--ink-soft);
	line-height: 1.3;
}

.stats strong {
	display: block;
	font-size: clamp(3.5rem, 2rem + 6vw, 7rem);
	font-weight: 700;
	letter-spacing: -0.04em;
	line-height: 1;
	color: var(--ink);
}

/* ---------- Credentials ---------- */

.badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.5rem 2.5rem;
	list-style: none;
	padding: 0;
}

/* Same size, same grey, white backgrounds blended into the page */
.badges img {
	height: 64px;
	width: auto;
	filter: grayscale(1) contrast(1.05);
	mix-blend-mode: multiply;
}

/* ---------- Closing ---------- */

.portrait img {
	width: 100%;
	max-width: 22rem;
	aspect-ratio: 3 / 4;
	object-fit: cover;
}

.closing h3 {
	font-size: 1.25rem;
}

/* ---------- Phones: booking bar at the bottom ---------- */

@media (min-width: 48em) {
	.book-bar {
		display: none !important;
	}
}

@media (max-width: 47.99em) {
	html {
		scroll-padding-bottom: 6rem;
	}

	body {
		padding-bottom: 5.5rem;
	}

	.book-bar {
		position: fixed;
		inset: auto 0 0 0;
		z-index: 5;
		background: var(--paper);
		border-top: 1px solid var(--rule);
		padding: 0.75rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom));
	}

	.book-bar .button {
		display: flex;
		width: 100%;
	}

	.book-bar[hidden] {
		display: none;
	}
}

/* Very short screens (a phone in landscape, or a page zoomed in a lot):
   the bar would take too much of the screen, so leave it out. The header
   button and the buttons in the page are still there. */
@media (max-width: 47.99em) and (max-height: 30em) {
	.book-bar {
		display: none !important;
	}

	body {
		padding-bottom: 0;
	}
}

/* ---------- Inline client quotes inside the reading column ---------- */

.prose > blockquote {
	font-size: 1.375rem;
	line-height: 1.45;
}

.prose > blockquote + .quote__name {
	margin-top: 0.5rem;
}

/* ---------- Price ---------- */

.price {
	font-family: var(--sans);
	font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
	letter-spacing: -0.02em;
	line-height: 1.1;
}
