/*
 * Nonstop Law theme styles.
 *
 * The site is a dark wood interior: espresso and walnut surfaces, cream
 * lettering taken from the ויצמן שמיר logo, and parchment for anything that is
 * a document. There is no separate accent colour. The only staged animation is
 * the opening of the home page; everything after it responds to the visitor.
 *
 * Layout uses logical properties (inline-start, block-end) so it follows the
 * page direction. The site is Hebrew, right to left.
 *
 * Order: fonts, tokens, base, shared pieces, header, home sections, footer,
 * opening sequence, narrow screens.
 */

/* ---------- Fonts (self-hosted, variable weight) ---------- */

/* Frank Ruhl is the face of Israeli law books and court decisions: it carries headlines and quotes. */
@font-face {
	font-family: "Frank Ruhl Libre";
	src: url("../fonts/frank-ruhl-libre-hebrew.woff2") format("woff2");
	font-weight: 300 900;
	font-display: swap;
	unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

@font-face {
	font-family: "Frank Ruhl Libre";
	src: url("../fonts/frank-ruhl-libre-latin.woff2") format("woff2");
	font-weight: 300 900;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Assistant is the plain voice: running text, buttons, forms. */
@font-face {
	font-family: "Assistant";
	src: url("../fonts/assistant-hebrew.woff2") format("woff2");
	font-weight: 200 800;
	font-display: swap;
	unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

@font-face {
	font-family: "Assistant";
	src: url("../fonts/assistant-latin.woff2") format("woff2");
	font-weight: 200 800;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */

:root {
	--espresso: #170b09;
	--walnut: #24130f;
	--walnut-light: #3a221a;
	--cream: #f0ecde;
	--parchment: #e7dcc4;
	--ink: #24100f;

	--cream-muted: rgb(240 236 222 / 0.74);
	--ink-muted: rgb(36 16 15 / 0.74);
	--line: rgb(240 236 222 / 0.16);
	--line-ink: rgb(36 16 15 / 0.22);
	--star: #f2ae00;

	/*
	 * Wood grain, drawn by the browser from a few bytes of SVG noise instead of
	 * a photo. The noise is stretched along one axis, so it reads as fibres.
	 * It is laid over a brown base with the "overlay" blend, which lightens and
	 * darkens the base rather than covering it.
	 */
	--grain-vertical: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='960'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.22 0.004' numOctaves='3' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0.95 0 0 0 0.03 0.95 0 0 0 0.03 0.95 0 0 0 0.03 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
	--grain-horizontal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='960' height='480'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.004 0.22' numOctaves='3' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0.95 0 0 0 0.03 0.95 0 0 0 0.03 0.95 0 0 0 0.03 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");

	--font-display: "Frank Ruhl Libre", "Times New Roman", serif;
	--font-body: "Assistant", system-ui, "Segoe UI", Arial, sans-serif;

	--container: 80rem;
	--gutter: clamp(1.25rem, 4vw, 3rem);
	/* Distance from the window edge for the header and the hero, which run the full width of the window. It matches the space the hero photo leaves beside the partners, so the first screen is balanced on any monitor. */
	--edge: clamp(1.25rem, 3.4vw, 5rem);
	--section-space: clamp(4.5rem, 9vw, 8.5rem);
	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);

	/* When the doors play, the rest of the opening waits this long for them. */
	--after-doors: 0s;
}

html.intro {
	--after-doors: 0.75s;
}

/* ---------- Base ---------- */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-block-start: 5.5rem;
	background: var(--espresso);
}

body {
	margin: 0;
	min-height: 100dvh;
	background: var(--espresso);
	color: var(--cream);
	font-family: var(--font-body);
	font-size: clamp(1.0625rem, 0.35vw + 1rem, 1.1875rem);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

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

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd,
figure,
blockquote {
	margin: 0;
}

ol,
ul {
	padding: 0;
	list-style: none;
}

a {
	color: inherit;
	text-decoration: none;
}

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

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

::selection {
	background: var(--cream);
	color: var(--ink);
}

.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	inset-inline-start: 1rem;
	inset-block-start: -10rem;
	z-index: 1000;
	padding: 0.75rem 1rem;
	background: var(--cream);
	color: var(--ink);
}

.skip-link:focus {
	inset-block-start: 1rem;
}

/* ---------- Shared pieces ---------- */

.section-title {
	font-family: var(--font-display);
	font-size: clamp(2.1rem, 4.2vw, 3.6rem);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.95rem 1.75rem;
	border: 1px solid var(--cream);
	border-radius: 2px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}

.button--solid {
	background: var(--cream);
	color: var(--ink);
}

.button--solid:hover,
.button--solid:focus-visible {
	border-color: #fff;
	background: #fff;
}

.button--line:hover,
.button--line:focus-visible {
	background: rgb(240 236 222 / 0.12);
}

.button--ink {
	width: 100%;
	border-color: var(--ink);
	background: var(--ink);
	color: var(--cream);
}

.button--ink:hover,
.button--ink:focus-visible {
	border-color: var(--walnut-light);
	background: var(--walnut-light);
}

.text-link {
	display: inline-block;
	margin-block-start: 1.1rem;
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.3em;
}

.text-link:hover,
.text-link:focus-visible {
	text-decoration-thickness: 2px;
}

.google-mark {
	flex: none;
}

.stars {
	color: var(--star);
	letter-spacing: 0.08em;
	line-height: 1;
}

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

.site-header {
	position: fixed;
	inset-block-start: 0;
	inset-inline: 0;
	z-index: 50;
	padding-block: 1.1rem;
	border-block-end: 1px solid transparent;
	transition: background-color 0.22s var(--ease), border-color 0.22s var(--ease), padding 0.22s var(--ease);
}

/* Opaque enough that text scrolling underneath never shows through the logo. */
.site-header.is-scrolled {
	padding-block: 0.55rem;
	border-block-end-color: var(--line);
	background: rgb(23 11 9 / 0.95);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}

.site-header__inner {
	max-width: none;
	padding-inline: var(--edge);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
}

.site-header__brand img {
	width: auto;
	height: clamp(3.6rem, 5.2vw, 4.75rem);
	transition: height 0.22s var(--ease);
}

.site-header.is-scrolled .site-header__brand img {
	height: 3rem;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: clamp(1.25rem, 2.5vw, 2.5rem);
	transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}

/*
 * On the home page, at the very top, the menu stays out of the way of the hero.
 * It returns as soon as the page scrolls, or when keyboard focus moves into it.
 * Every other page shows it from the start.
 * Without scripts it is simply always visible.
 */
html.js .home .site-header:not(.is-scrolled) .site-nav:not(:focus-within) {
	opacity: 0;
	pointer-events: none;
	transform: translateY(-0.5rem);
}

.site-nav__list {
	display: flex;
	gap: clamp(1.25rem, 2.5vw, 2.5rem);
}

.site-nav__list a {
	padding-block: 0.35rem;
	font-weight: 600;
	text-decoration: underline transparent 1px;
	text-underline-offset: 0.35em;
	transition: text-decoration-color 0.25s;
}

.site-nav__list a:hover,
.site-nav__list a:focus-visible {
	text-decoration-color: currentColor;
}

.site-nav__phone {
	padding: 0.5rem 1.15rem;
	border: 1px solid var(--cream);
	border-radius: 2px;
	font-weight: 700;
	transition: background-color 0.25s, color 0.25s;
}

.site-nav__phone:hover,
.site-nav__phone:focus-visible {
	background: var(--cream);
	color: var(--ink);
}

.nav-toggle {
	display: none;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 1px solid var(--line);
	border-radius: 2px;
	background: none;
	cursor: pointer;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
	display: block;
	width: 1.25rem;
	height: 1.5px;
	margin-inline: auto;
	background: var(--cream);
	transition: transform 0.3s var(--ease), background-color 0.2s;
}

.nav-toggle__bars {
	position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
	content: "";
	position: absolute;
	inset-inline: 0;
}

.nav-toggle__bars::before {
	transform: translateY(-6px);
}

.nav-toggle__bars::after {
	transform: translateY(6px);
}

.nav-open .nav-toggle__bars {
	background: transparent;
}

.nav-open .nav-toggle__bars::before {
	transform: rotate(45deg);
}

.nav-open .nav-toggle__bars::after {
	transform: rotate(-45deg);
}

/* ---------- Hero ---------- */

/*
 * A room, back to front: the wood wall with a pool of light, the headline
 * mounted on it, and the two partners standing in front of the headline. The
 * desk in front of them is the next section.
 */

.hero {
	position: relative;
	display: flex;
	flex-direction: column;
	/* Exactly the first screen. */
	min-height: 100svh;
	isolation: isolate;
	overflow: clip;
}

.hero__wall {
	position: absolute;
	inset: 0;
	z-index: -1;
	/* Shown for the moment before the photo arrives, and wherever the photo does not reach. */
	background: linear-gradient(180deg, #34201a 0%, #26140f 55%, #150907 100%);
}

/* The photo covers the wall. It is anchored to its left edge, where the partners stand, so narrower windows crop empty wall, never people. */
.hero__wall img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: left 30%;
}

/* A soft shadow over the side that carries the headline, so cream type always has dark wood behind it. */
.hero__wall::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent 38%, rgb(12 5 4 / 0.5) 75%);
}

.hero__inner {
	position: relative;
	z-index: 1;
	max-width: none;
	padding-inline: var(--edge);
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	/* The bottom padding keeps the text and buttons above the strip at the foot. */
	padding-block: clamp(5.75rem, 7vw, 6.5rem) 8.75rem;
}

.hero__title {
	position: relative;
	z-index: 1;
	font-family: var(--font-display);
	/* Sized by the smaller of width and height, so three lines never push the table off the first screen. */
	font-size: clamp(3.4rem, min(8.9vw, 15svh), 11rem);
	font-weight: 800;
	line-height: 0.96;
	letter-spacing: -0.02em;
	white-space: nowrap;
	text-shadow: 0 0.03em 0.12em rgb(0 0 0 / 0.45);
}

/* Each line sits in its own clipping box so it can rise into place. */
.hero__title .line {
	display: block;
	padding-block: 0.06em;
	overflow: hidden;
}

.hero__title .line > span {
	display: block;
}

.hero__pitch {
	position: relative;
	z-index: 3;
	max-width: 33rem;
	margin-block-start: clamp(1rem, 2vw, 1.75rem);
}

.hero__lead {
	color: var(--cream-muted);
	font-size: 1.1em;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem;
	margin-block-start: 1.6rem;
}

/* ---------- Foot of the hero ---------- */

/*
 * The room fades to black at the bottom of the first screen. On the black sit
 * the Google rating (reading side), a cue to scroll (middle) and TheMarker
 * (far side), all in white so they read as one quiet line.
 */
.hero__foot {
	position: absolute;
	inset-inline: 0;
	inset-block-end: 0;
	z-index: 4;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 2rem;
	/* Set well in from the window edges, so the line reads as one centred group and clears the WhatsApp button in the corner. */
	/* The inset grows faster than the window, so large monitors get a tight centred line and laptops keep room between the three groups. */
	padding: 0 clamp(1.5rem, calc(22vw - 14rem), 13rem) 2rem;
	color: #fff;
	pointer-events: none;
}

.hero__foot a {
	pointer-events: auto;
}

.hero__foot a:hover,
.hero__foot a:focus-visible {
	opacity: 0.8;
}

/* The fade itself lies over the photo but under the headline and the buttons, so those stay at full strength. */
.hero::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	inset-block-end: 0;
	z-index: 0;
	height: min(48%, 26rem);
	background: linear-gradient(180deg, transparent 0%, rgb(0 0 0 / 0.5) 38%, rgb(0 0 0 / 0.9) 68%, #000 100%);
	pointer-events: none;
}

.hero__foot a {
	pointer-events: auto;
}

.proof {
	display: inline-flex;
	align-items: center;
	gap: 0.9rem;
	justify-self: start;
	font-weight: 700;
	line-height: 1;
}

.proof--press {
	justify-self: end;
	gap: 1.4rem;
}

.proof .stars {
	color: #fff;
	font-size: 1.5rem;
}

.proof__score {
	font-family: var(--font-display);
	font-size: 1.7rem;
}

.proof__label {
	font-size: 1rem;
	font-weight: 600;
	opacity: 0.75;
}

.proof__outlet {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 1.2rem;
	white-space: nowrap;
}

.proof__outlet img {
	width: 1.5rem;
	height: 1.5rem;
}

.wordmark {
	display: block;
	width: auto;
	flex: none;
}

/* The Google letters have a descender, so the mark is set a little taller and nudged down to sit on the same line. */
.wordmark--google {
	height: 2.2rem;
	translate: 0 0.28rem;
}

.wordmark--themarker {
	height: 1.6rem;
}

.scroll-cue {
	display: grid;
	justify-items: center;
	gap: 0.2rem;
	font-size: 1.15rem;
	font-weight: 600;
	text-align: center;
}

/* The one moving thing on the first screen after the opening: the arrow dips, to say there is more below. */
.scroll-cue__arrow {
	animation: dip 1.8s ease-in-out infinite;
}

@keyframes dip {
	0%,
	100% {
		transform: translateY(0);
		opacity: 0.6;
	}

	50% {
		transform: translateY(0.4rem);
		opacity: 1;
	}
}

/* ---------- Desk: reviews and press ---------- */

/*
 * The desk stands in front of the partners and is seen from above.
 *
 * The desk is one photograph (walnut top, a cup, a stamp, glasses, a pen and
 * books along its edges, all lit by one lamp at the upper left). The notes are
 * real text printed on photographs of blank paper, and every shadow they cast
 * falls the way the shadows in the photograph do: short, to the lower right.
 *
 * This first block is what every screen gets: a readable stack of papers.
 * The hand-arranged scene comes further down, for wide screens only.
 */

.table {
	position: relative;
	z-index: 4;
	/* Wood drawn by the browser, visible until the photograph of the desk has loaded. */
	background:
		var(--grain-horizontal),
		linear-gradient(180deg, #2c1810 0%, #1c0e09 100%);
	background-blend-mode: overlay, normal;
	overflow: clip;
}

/* The desk sinks into the black band of client logos below it. */
.table::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	inset-block-end: 0;
	z-index: 70;
	height: 9rem;
	background: linear-gradient(180deg, transparent, #000);
	pointer-events: none;
}

/* The desk comes out of the black at the foot of the hero. */
.table::before {
	content: "";
	position: absolute;
	inset-inline: 0;
	inset-block-start: 0;
	z-index: 70;
	height: 5rem;
	background: linear-gradient(180deg, #000, transparent);
	pointer-events: none;
}

/* The heading is there for screen readers and search engines; sighted visitors see the papers themselves. */
.table__title {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.desk {
	position: relative;
	padding: 2.25rem var(--gutter) var(--section-space);
	isolation: isolate;
}

.desk__surface {
	position: absolute;
	inset: 0;
	z-index: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	/* In the stacked layout the box is tall and narrow: show the empty middle of the desk, so no object ends up under a paper. */
	object-position: center;
}

/* Papers far from the lamp sit in a little more shade, as the wood under them does. A plain dark veil, with no blending, so it costs nothing to draw. */
.desk::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 60;
	background: radial-gradient(ellipse 95% 95% at 8% 0%, transparent 45%, rgb(20 9 5 / 0.2) 100%);
	pointer-events: none;
}

.desk__papers {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.6rem;
	max-width: 30rem;
	margin-inline: auto;
}

.paper {
	position: relative;
	width: 90%;
	rotate: calc(var(--turn, 0deg) * 0.6);
	font-size: 1rem;
}

/* In the stack, papers alternate sides and tuck slightly under each other. */
.paper:nth-child(odd) {
	justify-self: start;
}

.paper:nth-child(even) {
	justify-self: end;
	margin-block: -0.4rem;
}

.paper--article,
.paper--lead {
	width: 100%;
}

/*
 * The sheet holds the text. The paper itself is a separate layer behind it
 * (::before): a photograph of blank paper stretched to the size of the note,
 * with a shadow drawn from the paper's own outline (torn edge, folded corner).
 *
 * The two are kept apart on purpose. A shadow filter on the element that
 * holds the text made Chromium redraw the text through the filter, and lines
 * of it flickered or vanished while the pointer moved over the desk. With the
 * filter on a layer that contains only a picture, the text is drawn normally.
 */
.paper__sheet {
	position: relative;
	color: var(--ink);
	isolation: isolate;
	transition: translate 0.2s var(--ease);
}

.paper__sheet::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--paper-image, url("../img/desk/paper-card.webp")) center / 100% 100% no-repeat;
	filter: drop-shadow(0.5px 1px 0.5px rgb(0 0 0 / 0.55)) drop-shadow(5px 8px 7px rgb(0 0 0 / 0.5));
}

.paper--pad {
	--paper-image: url("../img/desk/paper-pad.webp");
}

.paper--dogear {
	--paper-image: url("../img/desk/paper-dogear.webp");
}

.paper .stars {
	display: block;
	font-size: 1.05em;
}

.paper--note .paper__sheet {
	padding: 1.25em 1.4em 1.15em;
}

/* The torn edge of a notepad sheet takes a little room at the top. */
.paper--pad .paper__sheet {
	padding-block-start: 1.6em;
}

.paper--note p {
	margin-block: 0.55em 0.8em;
	font-family: var(--font-display);
	font-size: 1.12em;
	line-height: 1.5;
}

.paper--note footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	padding-block-start: 0.6em;
	border-block-start: 1px solid rgb(36 16 15 / 0.16);
	font-size: 0.82em;
	font-weight: 700;
}

.paper__source {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	color: var(--ink-muted);
	font-weight: 400;
}

.paper__source .google-mark {
	width: 1.1em;
	height: 1.1em;
}

/* The review that opens the spread is set larger, like a letter kept on top of the pile. */
.paper--lead .paper__sheet {
	padding: 1.5em 1.7em 1.35em;
}

.paper--lead p {
	font-size: 1.45em;
	line-height: 1.4;
}

.paper--rating {
	width: 60%;
}

.paper__rating {
	display: grid;
	justify-items: center;
	gap: 0.3em;
	padding: 1.2em 0.8em 1.1em;
	text-align: center;
}

.paper__rating .google-mark {
	width: 1.7em;
	height: 1.7em;
}

.paper__score {
	font-family: var(--font-display);
	font-size: 3.4em;
	font-weight: 600;
	line-height: 1;
}

.paper__small {
	font-size: 0.82em;
	font-weight: 700;
}

/* Newspaper clipping: the article printed on a photographed piece of newsprint, edge to edge. */
.paper--article {
	--paper-image: url("../img/desk/paper-news.webp");
}

.paper--article .paper__sheet {
	padding: 0.5em 0.5em 0;
}

/* The page is printed onto the newsprint: its white becomes the paper's colour. The blending is confined to this one box. */
.paper--article .paper__image {
	isolation: isolate;
	background: #f3e5cc;
}

.paper--article .paper__image img {
	mix-blend-mode: multiply;
}

/* Photo print: a thin white border and a little gloss. Drawn, because a print really is a flat white rectangle. */
.paper--photo .paper__sheet {
	padding: 0.4em 0.4em 0;
}

.paper--photo .paper__sheet::before {
	background: #f8f6f0;
	filter: none;
	box-shadow: 0.5px 1px 1px rgb(0 0 0 / 0.55), 5px 8px 12px -2px rgb(0 0 0 / 0.55);
}

.paper--photo .paper__image::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(118deg, rgb(255 255 255 / 0.28), transparent 30%);
	pointer-events: none;
}

.paper__image {
	position: relative;
	overflow: hidden;
}

.paper__image img {
	width: 100%;
}

.paper figcaption {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.1em 0.8em;
	padding: 0.6em 0.5em 0.7em;
	font-size: 0.84em;
	line-height: 1.35;
}

.paper figcaption span {
	color: var(--ink-muted);
}

.paper__action {
	margin-inline-start: auto;
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.25em;
}

.paper__link {
	display: block;
}

@media (hover: hover) {
	/*
	 * The article and the interview stills are links. Under the pointer they lift
	 * off the desk and flutter once; that, and the note beside the pointer, says
	 * they can be opened. Review notes do nothing: they are read where they lie.
	 */
	.paper[data-hint]:hover,
	.paper[data-hint]:focus-within {
		z-index: 50;
	}

	.paper[data-hint]:hover .paper__sheet,
	.paper[data-hint]:focus-within .paper__sheet {
		translate: -2px -5px;
		animation: flutter 0.55s var(--ease);
	}

	@keyframes flutter {
		0% {
			rotate: 0deg;
		}

		30% {
			rotate: 1.6deg;
		}

		60% {
			rotate: -0.9deg;
		}

		100% {
			rotate: 0deg;
		}
	}
}

/* The note that follows the pointer over the article and the interview stills; placed by main.js. */
.desk__hint {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 150;
	padding: 0.3rem 0.7rem;
	border-radius: 2px;
	background: var(--ink);
	color: var(--cream);
	font-size: 0.875rem;
	font-weight: 700;
	white-space: nowrap;
	box-shadow: 0 0.4rem 1rem rgb(0 0 0 / 0.5);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s;
}

.desk__hint.is-visible {
	opacity: 1;
}

/* ---------- Desk on wide screens: the arranged scene ---------- */

@media (min-width: 75rem) {
	/*
	 * The desk becomes one square picture that scales with the window: every
	 * position and size inside it is measured in hundredths of its width (cqw),
	 * so the papers keep their places relative to the objects in the photograph
	 * from a laptop to a large monitor. Beyond 1920 px it stops growing and its
	 * sides fade into the wood behind.
	 */
	.desk {
		container-type: inline-size;
		aspect-ratio: 1;
		max-width: 120rem;
		margin-inline: auto;
		padding: 0;
	}

	@media (min-width: 120.01rem) {
		.desk__surface,
		.desk::after {
			mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
		}
	}

	.desk__papers {
		position: absolute;
		inset: 0;
		display: block;
		max-width: none;
	}

	.paper {
		position: absolute;
		left: calc(var(--x) * 1cqw);
		top: calc(var(--y) * 1cqw);
		z-index: var(--z, 2);
		width: calc(var(--w) * 1cqw);
		margin: 0;
		rotate: var(--turn, 0deg);
		font-size: 1.2cqw;
	}

	.paper:nth-child(even) {
		margin-block: 0;
	}
}

/* ---------- Clients ---------- */

/*
 * A black band between the desk and the partners. The desk sinks into it and
 * the next section rises out of it (see the fades on .table and .partners).
 */
.clients {
	position: relative;
	z-index: 5;
	padding-block: 2.5rem 2.25rem;
	background: #000;
	color: #fff;
}

/*
 * Set like the other section headings on the page, only centred, with a curved
 * stroke drawn under it: thicker in the middle and tapering to both ends, like
 * one pass of a brush. The stroke is as wide as the words, whatever they are.
 */
.clients__title {
	position: relative;
	width: fit-content;
	margin-inline: auto;
	margin-block-end: 3.25rem;
	padding-inline: 0.4em;
	color: var(--cream);
	font-size: clamp(2.2rem, 3.8vw, 3.4rem);
	text-align: center;
}

.clients__title::after {
	content: "";
	position: absolute;
	inset-inline: -4%;
	inset-block-start: calc(100% - 0.05em);
	height: 0.42em;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cpath fill='%23f0ecde' d='M2 15C70 4 215 0 298 9C215 5 80 9 2 15Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* The strip fades out at both ends, so logos arrive from the dark instead of from a hard edge. */
.clients__strip {
	overflow: hidden;
	mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.clients__track {
	display: flex;
	width: max-content;
	/* Four copies of the list; moving by one copy's width loops without a seam. */
	animation: clients-drift 70s linear infinite;
}

/* Stops under the pointer, so a logo can be looked at. */
.clients__track:hover {
	animation-play-state: paused;
}

@keyframes clients-drift {
	to {
		transform: translateX(25%);
	}
}

[dir="ltr"] .clients__track {
	animation-name: clients-drift-ltr;
}

@keyframes clients-drift-ltr {
	to {
		transform: translateX(-25%);
	}
}

.clients__list {
	display: flex;
	flex: none;
	align-items: flex-start;
}

.client {
	display: grid;
	justify-items: center;
	gap: 0.7rem;
	/* Room above for the logo to grow on hover, and below for its name, which drops a little as it appears. The strip clips whatever leaves its box. */
	padding: 1.1rem clamp(2rem, 3.6vw, 3.75rem) 1.4rem;
}

.client__mark {
	position: relative;
	display: grid;
	place-items: center;
	height: 3.6rem;
	/* Grows upward from its base, so the name underneath stays clear. */
	transform-origin: 50% 100%;
	transition: scale 0.25s var(--ease);
}

/*
 * Both versions of the logo share one cell; the colour one waits, hidden, on its plate.
 * Each logo's height comes from the template (--logo-height), worked out from its
 * proportions so that a very wide logo does not dwarf the others.
 */
.client__mark img {
	grid-area: 1 / 1;
	width: auto;
	height: var(--logo-height, 3.6rem);
	max-width: none;
	transition: opacity 0.25s var(--ease);
}

.client__white {
	opacity: 0.85;
}

.client__colour {
	padding: 0.35rem 0.6rem;
	border-radius: 6px;
	background: #fff;
	box-sizing: content-box;
	opacity: 0;
}

.client--dark .client__colour {
	background: #3a3a3a;
}

.client__name {
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
	opacity: 0;
	translate: 0 -0.3rem;
	transition: opacity 0.25s var(--ease), translate 0.25s var(--ease);
}

.client:hover .client__mark {
	scale: 1.14;
}

.client:hover .client__white {
	opacity: 0;
}

.client:hover .client__colour {
	opacity: 1;
}

.client:hover .client__name {
	opacity: 1;
	translate: 0 0.55rem;
}

/* ---------- Partners ---------- */

/*
 * The two partners stand on the wood wall, each in a pool of warm light, cut
 * out of one photograph so they are the same size and lit the same way. Their
 * legs dissolve into the dark, and the name is set over that fade. Under each
 * name: a line about them.
 */

.partners {
	position: relative;
	padding-block: var(--section-space);
	background: var(--grain-vertical), linear-gradient(180deg, #1f100c, var(--espresso));
	background-blend-mode: overlay, normal;
}

/* The section rises out of the black band above it. */
.partners::before {
	content: "";
	position: absolute;
	inset-inline: 0;
	inset-block-start: 0;
	height: 7rem;
	background: linear-gradient(180deg, #000, transparent);
	pointer-events: none;
}

.partners__title {
	position: relative;
	text-align: center;
}

.partners__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(2rem, 6vw, 7rem);
	max-width: 68rem;
	margin-inline: auto;
	margin-block-start: clamp(1.5rem, 3vw, 2.5rem);
}

.partner__figure {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	height: clamp(24rem, 40vw, 36rem);
	overflow: hidden;
	/* The light on the wall behind the figure. */
	background: radial-gradient(ellipse 70% 66% at 50% 42%, rgb(255 190 125 / 0.34), transparent 72%);
	/* Everything in the frame dissolves into the dark toward the bottom. */
	mask-image: linear-gradient(180deg, #000 62%, transparent 99%);
}

/* The photo is much taller than its frame, so the frame shows each partner large, from the waist up. */
.partner__figure img {
	flex: none;
	width: auto;
	height: 172%;
	max-width: none;
	/* Toned a little toward the room. */
	filter: brightness(0.93) contrast(1.04) saturate(0.92);
}

/* The name sits over the fade at the bottom of the figure. */
.partner__body {
	position: relative;
	margin-block-start: -3.5rem;
	text-align: center;
}

.partner__name {
	font-family: var(--font-display);
	font-size: clamp(2.2rem, 3.6vw, 3.1rem);
	font-weight: 700;
	line-height: 1.1;
	text-shadow: 0 0.05em 0.35em rgb(0 0 0 / 0.7);
}

.partner__role {
	margin-block: 0.4rem 0.9rem;
	color: var(--cream);
	font-weight: 700;
}

.partner__text {
	max-width: 27rem;
	margin-inline: auto;
	color: var(--cream-muted);
}

.partner__cta {
	margin-block-start: 1.75rem;
}

/* ---------- Library: the four practice areas ---------- */

/*
 * Four leather-bound volumes stand on a walnut shelf, one per practice area.
 * The shelf is a single photograph of four blank books; the title and topics
 * are real text laid on each cover, in the colour of gold leaf, so they read
 * as stamped into the leather. Each volume is a link to its area's page.
 *
 * Nothing here follows the pointer or the scroll. A volume under the pointer
 * (or under keyboard focus) simply catches more of the lamp light.
 *
 * Sizes inside a volume are measured against the volume's own width (cqw), so
 * the lettering fits the cover on every screen.
 */

.library {
	position: relative;
	background: var(--grain-vertical), linear-gradient(180deg, var(--espresso), #130807);
	background-blend-mode: overlay, normal;
}

/* The section begins with the photograph itself. Its top comes out of the dark above it: black after the band of client logos on the home page, the page colour elsewhere. */
.library::before {
	content: "";
	position: absolute;
	inset-inline: 0;
	inset-block-start: 0;
	z-index: 2;
	height: clamp(2.5rem, 3.6vw, 4rem);
	background: linear-gradient(180deg, var(--espresso), transparent);
	pointer-events: none;
}

.home .library::before {
	background: linear-gradient(180deg, #000, transparent);
}

.shelf {
	position: relative;
	max-width: 104rem;
	margin-inline: auto;
	/* The proportions of the photograph. Sizes inside are measured against its width (cqw). */
	aspect-ratio: 1536 / 936;
	container-type: inline-size;
}

/* The heading stands on the wall above the books. */
.library__head {
	position: absolute;
	inset-inline: 0;
	/* The wall above the books is 14.5% of the photo's width tall; the heading sits in the middle of it. */
	inset-block-start: 4.4cqw;
	z-index: 1;
	padding-inline: var(--gutter);
	text-align: center;
}

.library__title {
	font-size: clamp(1.9rem, 3.5cqw, 3.6rem);
	text-shadow: 0 0.04em 0.3em rgb(0 0 0 / 0.6);
}

.library__lead {
	margin-block-start: 0.2rem;
	color: var(--cream-muted);
	font-size: clamp(0.95rem, 1.25cqw, 1.25rem);
}

/* The photograph has no hard lower edge: it melts into the section below. */
.shelf__photo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	mask-image: linear-gradient(180deg, #000 90%, transparent);
}

/* Wider than the photograph: its sides fade into the wall too. */
@media (min-width: 104.01rem) {
	.shelf__photo {
		mask-image: linear-gradient(180deg, #000 90%, transparent), linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
		mask-composite: intersect;
	}
}

.volume {
	position: absolute;
	left: calc(var(--x) * 1%);
	top: calc(var(--y) * 1%);
	width: calc(var(--w) * 1%);
	height: calc(var(--h) * 1%);
	container-type: inline-size;
}

.volume__cover {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 100%;
	/* Inside the gold line tooled around the cover. */
	padding: 17cqw 13cqw 13cqw;
	color: #e6cf9a;
	text-align: center;
}

/* The lamp light a volume catches when it is pointed at. Painted over the leather, under the lettering. */
.volume__cover::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse 90% 70% at 35% 25%, rgb(255 214 150 / 0.2), transparent 75%);
	opacity: 0;
	transition: opacity 0.3s var(--ease);
	pointer-events: none;
}

.volume__cover:hover::before,
.volume__cover:focus-visible::before {
	opacity: 1;
}

.volume__cover:focus-visible {
	outline-offset: -0.5rem;
}

/* Gold leaf pressed into leather: a dark edge below each letter, a faint light one above. */
.volume__title,
.volume__topics,
.volume__open {
	position: relative;
	text-shadow: 0 1px 1px rgb(0 0 0 / 0.75), 0 -1px 0 rgb(255 236 190 / 0.12);
}

.volume__title {
	font-family: var(--font-display);
	font-size: 13.5cqw;
	font-weight: 800;
	line-height: 1.05;
}

/* A short rule under the title, as bookbinders set between title and contents. */
.volume__title::after {
	content: "";
	display: block;
	width: 22cqw;
	height: 1px;
	margin: 7cqw auto 0;
	background: currentColor;
	opacity: 0.7;
}

.volume__topics {
	display: grid;
	gap: 2.6cqw;
	margin-block-start: 7cqw;
	font-size: 6cqw;
	font-weight: 600;
	line-height: 1.3;
}

.volume__open {
	margin-block-start: auto;
	font-size: 5.4cqw;
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.3em;
	opacity: 0.8;
	transition: opacity 0.3s var(--ease);
}

.volume__cover:hover .volume__open,
.volume__cover:focus-visible .volume__open {
	opacity: 1;
}

/* Until the photograph exists, each volume is drawn as a plain leather-coloured board. */
.library--plain .volume__cover,
.area__book--plain {
	border: 1px solid rgb(230 207 154 / 0.5);
	outline: 1px solid rgb(230 207 154 / 0.35);
	outline-offset: -0.7rem;
	background: linear-gradient(120deg, #4a2118, #2b120d);
	box-shadow: 0.5rem 0.8rem 1.6rem rgb(0 0 0 / 0.6);
}

/* ---------- Practice area page (placeholder) ---------- */

.page-top {
	height: clamp(4.5rem, 7vw, 6rem);
}

.area,
.plain-page {
	padding-block: clamp(8rem, 12vw, 11rem) var(--section-space);
	background:
		radial-gradient(ellipse 45% 40rem at 80% 12rem, rgb(255 190 125 / 0.14), transparent 70%),
		var(--grain-vertical),
		linear-gradient(180deg, #1f100c, var(--espresso));
	background-blend-mode: normal, overlay, normal;
}

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

/* The area's own volume: the same photograph as the shelf, cropped to this one book. */
.area__book {
	position: sticky;
	inset-block-start: 7rem;
	container-type: inline-size;
	display: grid;
	place-items: start center;
	aspect-ratio: calc(var(--w) * 1536) / calc(var(--h) * 936);
	padding-block-start: 22%;
	color: #e6cf9a;
	background-image: var(--photo);
	background-size: calc(10000% / var(--w)) calc(10000% / var(--h));
	background-position: calc(var(--x) / (100 - var(--w)) * 100%) calc(var(--y) / (100 - var(--h)) * 100%);
	box-shadow: 0.6rem 1rem 2rem rgb(0 0 0 / 0.6);
}

.area__crumb a {
	color: var(--cream-muted);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.3em;
}

.area__title {
	margin-block: 0.5rem 1rem;
	font-family: var(--font-display);
	font-size: clamp(2.8rem, 6vw, 5rem);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -0.015em;
}

.area__lead {
	max-width: 38rem;
	color: var(--cream-muted);
	font-size: 1.2em;
}

.area__subtitle {
	margin-block: clamp(2.5rem, 5vw, 3.5rem) 0.5rem;
	font-family: var(--font-display);
	font-size: clamp(1.5rem, 2.4vw, 2rem);
	font-weight: 600;
}

.area__topics {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: clamp(1.5rem, 4vw, 4rem);
	max-width: 46rem;
}

.area__topics li {
	padding-block: 0.85rem;
	border-block-end: 1px solid var(--line);
	font-family: var(--font-display);
	font-size: clamp(1.2rem, 1.7vw, 1.45rem);
}

.area__note {
	max-width: 38rem;
	margin-block-start: 2rem;
	padding: 1rem 1.25rem;
	border-inline-start: 2px solid var(--cream);
	background: rgb(240 236 222 / 0.06);
	color: var(--cream-muted);
}

.area__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem;
	margin-block-start: 2rem;
}

.area__others ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 2.5rem;
}

.area__others a {
	font-family: var(--font-display);
	font-size: clamp(1.3rem, 2vw, 1.7rem);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.3em;
}

.plain-page__inner {
	max-width: 50rem;
}

/*
 * Text written in the editor, including the stored text of the old site's
 * pages and articles: readable defaults for whatever markup it contains.
 */
.entry-content {
	margin-block-start: 2rem;
	color: var(--cream-muted);
	overflow-wrap: break-word;
}

.entry-content > * + * {
	margin-block-start: 1.1em;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5 {
	margin-block-start: 1.6em;
	color: var(--cream);
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.25;
}

.entry-content h1,
.entry-content h2 {
	font-size: 1.7em;
}

.entry-content h3,
.entry-content h4,
.entry-content h5 {
	font-size: 1.3em;
}

.entry-content a {
	color: var(--cream);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.25em;
}

.entry-content ul,
.entry-content ol {
	padding-inline-start: 1.4em;
	list-style: revert;
}

.entry-content li + li {
	margin-block-start: 0.4em;
}

.entry-content strong,
.entry-content b {
	color: var(--cream);
}

/* Old pages carry small inline icons; without a size they would fill the column. */
.entry-content svg {
	display: inline-block;
	width: 1.2em;
	height: 1.2em;
	fill: currentColor;
	vertical-align: middle;
}

.entry-content img,
.entry-content video {
	border-radius: 2px;
}

.entry-content iframe {
	width: 100%;
	max-width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	border: 0;
}

.entry + .entry {
	margin-block-start: 1.25rem;
	padding-block-start: 1.25rem;
	border-block-start: 1px solid var(--line);
}

.entry__title {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 500;
}

.entry__title a:hover,
.entry__title a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

/* ---------- Founder ---------- */

.founder {
	padding-block: var(--section-space);
	background:
		radial-gradient(ellipse 40% 55% at 78% 40%, rgb(255 196 120 / 0.16), transparent 70%),
		var(--grain-vertical),
		var(--espresso);
	background-blend-mode: normal, overlay, normal;
}

.founder__inner {
	display: grid;
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
	gap: clamp(2rem, 6vw, 6rem);
	align-items: start;
}

/* His wall: the portrait in the same frame as the partner photos, with the police keepsake hung over its corner. */
.founder__wall {
	position: sticky;
	inset-block-start: 6rem;
	justify-self: center;
	width: min(100%, 26rem);
	padding-block-end: 4rem;
}

.founder__figure {
	padding: 0.7rem;
	background: var(--parchment);
	box-shadow: 0 2rem 3rem rgb(0 0 0 / 0.55);
}

.founder__figure img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	object-position: 50% 12%;
}

.founder__keepsake {
	position: absolute;
	inset-inline-end: -2.5rem;
	inset-block-end: 0;
	width: 52%;
	box-shadow: 0 1.5rem 2.5rem rgb(0 0 0 / 0.6);
}

.founder__keepsake img {
	width: 100%;
}

.founder__keepsake figcaption {
	position: absolute;
	inset-inline: 0;
	inset-block-start: calc(100% + 0.6rem);
	color: var(--cream-muted);
	font-size: 0.8125rem;
	line-height: 1.4;
}

.founder__motto {
	margin-block-start: 1rem;
	font-family: var(--font-display);
	font-size: 1.3rem;
	color: var(--cream) !important;
}

.founder__lead {
	margin-block: 1.75rem 1rem;
	font-size: 1.2em;
	line-height: 1.6;
}

.founder__text > p:not(.founder__lead) {
	color: var(--cream-muted);
}

/* The three stops of his career, in order. */
.timeline {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
	margin-block-start: 2.75rem;
}

.timeline li {
	position: relative;
	padding-block-start: 1.3rem;
	border-block-start: 1px solid var(--line);
}

.timeline li::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	inset-block-start: -0.3rem;
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 50%;
	background: var(--cream);
}

.timeline__place {
	display: block;
	font-family: var(--font-display);
	font-size: 1.35rem;
	line-height: 1.25;
}

.timeline__role {
	display: block;
	margin-block-start: 0.3rem;
	color: var(--cream-muted);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.media {
	margin-block-start: 3rem;
}

.media__title {
	margin-block-end: 0.5rem;
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 600;
}

.media__list li {
	border-block-end: 1px solid var(--line);
}

.media__list a {
	display: block;
	padding-block: 1rem;
}

.media__outlet {
	display: block;
	color: var(--cream-muted);
	font-size: 0.875rem;
	font-weight: 600;
}

.media__headline {
	display: block;
	font-family: var(--font-display);
	font-size: 1.25rem;
	line-height: 1.35;
	text-decoration: underline transparent 1px;
	text-underline-offset: 0.25em;
	transition: text-decoration-color 0.25s;
}

.media__list a:hover .media__headline,
.media__list a:focus-visible .media__headline {
	text-decoration-color: currentColor;
}

/* ---------- Contact ---------- */

.contact {
	padding-block: var(--section-space);
	background: var(--grain-horizontal), var(--walnut);
	background-blend-mode: overlay, normal;
}

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

.contact__lead {
	max-width: 30rem;
	margin-block-start: 1.25rem;
	color: var(--cream-muted);
}

.contact__details {
	display: grid;
	margin-block-start: 2.5rem;
}

.contact__details > div {
	display: grid;
	grid-template-columns: 7.5rem 1fr;
	gap: 1rem;
	padding-block: 1.2rem;
	border-block-start: 1px solid var(--line);
}

.contact__details dt {
	color: var(--cream-muted);
	font-weight: 600;
}

.contact__details a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.3em;
}

/* A sheet of paper on the desk: ink on parchment, blanks to fill in. */
.wa-form {
	display: grid;
	gap: 1.5rem;
	padding: clamp(1.5rem, 3.5vw, 3rem);
	background: var(--parchment);
	color: var(--ink);
	box-shadow: 0 2.5rem 4rem rgb(0 0 0 / 0.55);
}

.wa-form :focus-visible {
	outline-color: var(--ink);
}

.field {
	display: grid;
	gap: 0.35rem;
}

.field label {
	font-size: 0.9375rem;
	font-weight: 700;
}

.field__optional {
	color: var(--ink-muted);
	font-weight: 400;
}

.field input,
.field select,
.field textarea {
	width: 100%;
	padding: 0.75rem 0;
	border: 0;
	border-block-end: 1px solid var(--ink-muted);
	border-radius: 0;
	background: transparent;
}

.field textarea {
	resize: vertical;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
	outline: none;
	border-block-end-color: var(--ink);
	box-shadow: 0 1px 0 0 var(--ink);
}

.wa-form__note {
	color: var(--ink-muted);
	font-size: 0.875rem;
	text-align: center;
}

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

.site-footer {
	background: #0e0605;
	color: var(--cream-muted);
	font-size: 0.9375rem;
}

.site-footer__inner {
	display: grid;
	grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
	gap: clamp(2rem, 4vw, 4rem);
	padding-block: clamp(3.5rem, 7vw, 6rem) clamp(2.5rem, 5vw, 4rem);
}

.site-footer__brand img {
	width: min(100%, 15rem);
}

.site-footer__title {
	margin-block-end: 0.9rem;
	color: var(--cream);
	font-family: var(--font-display);
	font-size: 1.2rem;
	font-weight: 600;
}

.site-footer p + p {
	margin-block-start: 0.6rem;
}

.site-footer__links li + li {
	margin-block-start: 0.4rem;
}

.site-footer a:hover,
.site-footer a:focus-visible {
	color: var(--cream);
	text-decoration: underline;
	text-underline-offset: 0.3em;
}

.site-footer__bottom {
	padding-block: 1.4rem;
	border-block-start: 1px solid var(--line);
	font-size: 0.875rem;
}

.whatsapp-float {
	position: fixed;
	inset-inline-end: clamp(1rem, 2.5vw, 2rem);
	inset-block-end: clamp(1rem, 2.5vw, 2rem);
	z-index: 40;
	display: grid;
	place-items: center;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 50%;
	background: var(--cream);
	color: var(--ink);
	box-shadow: 0 0.6rem 1.8rem rgb(0 0 0 / 0.5);
	transition: transform 0.3s var(--ease), background-color 0.3s;
}

.whatsapp-float:hover,
.whatsapp-float:focus-visible {
	background: #fff;
	transform: translateY(-0.2rem);
}

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

/*
 * The home page opens once and then stays still.
 *
 * With the doors (first view in a visit): two wooden doors carrying the logo
 * part, and the room is revealed while its light comes up. Without them the
 * room simply lights up. Either way everything has settled in about two
 * seconds, and text is readable well before that.
 *
 * These rules need html.js, which the small script in header.php sets. With
 * scripts off, or with reduced motion requested, the page is just there.
 */

.doors {
	display: none;
}

html.intro .doors {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: block;
	pointer-events: none;
	animation: doors-clear 0s linear 1.65s both;
}

.door {
	position: absolute;
	inset-block: 0;
	width: 50.1%;
	overflow: hidden;
	background:
		var(--grain-vertical),
		linear-gradient(90deg, #22120d, #33201a 50%, #22120d);
	background-blend-mode: overlay, normal;
}

/* A recessed panel on each door. */
.door::before {
	content: "";
	position: absolute;
	inset: 8% 13%;
	border: 1px solid rgb(255 220 170 / 0.16);
	box-shadow: inset 0 0 0 0.75rem rgb(0 0 0 / 0.16), 0 0 0 1px rgb(0 0 0 / 0.45);
}

.door--right {
	right: 0;
	box-shadow: inset 2px 0 0 rgb(0 0 0 / 0.65);
	animation: door-right 1s cubic-bezier(0.77, 0, 0.18, 1) 0.55s both;
}

.door--left {
	left: 0;
	box-shadow: inset -2px 0 0 rgb(0 0 0 / 0.65);
	animation: door-left 1s cubic-bezier(0.77, 0, 0.18, 1) 0.55s both;
}

/* The logo is centred on the seam: each door carries half of it. */
.door img {
	position: absolute;
	top: 50%;
	width: min(54vw, 34rem);
	max-width: none;
}

.door--right img {
	left: 0;
	transform: translate(-50%, -50%);
}

.door--left img {
	right: 0;
	transform: translate(50%, -50%);
}

@keyframes door-right {
	to {
		transform: translateX(101%);
	}
}

@keyframes door-left {
	to {
		transform: translateX(-101%);
	}
}

@keyframes doors-clear {
	to {
		visibility: hidden;
	}
}

html.js .hero__wall {
	animation: light-up 1.9s var(--ease) var(--after-doors) both;
}

@keyframes light-up {
	from {
		filter: brightness(0.45);
		scale: 1.07;
	}
}

html.js .hero__title .line > span {
	animation: line-up 0.85s var(--ease) both;
}

html.js .hero__title .line:nth-child(1) > span {
	animation-delay: calc(var(--after-doors) + 0.1s);
}

html.js .hero__title .line:nth-child(2) > span {
	animation-delay: calc(var(--after-doors) + 0.18s);
}

html.js .hero__title .line:nth-child(3) > span {
	animation-delay: calc(var(--after-doors) + 0.26s);
}

@keyframes line-up {
	from {
		transform: translateY(110%);
	}
}

html.js .hero__pitch {
	animation: rise 0.7s var(--ease) calc(var(--after-doors) + 0.5s) both;
}

@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(1.25rem);
	}
}

/* Leaving the hero: as the page scrolls, the room dims and sinks a little behind the table. */
@supports (animation-timeline: scroll()) {
	html.js .hero__inner {
		animation: room-out linear both;
		animation-timeline: scroll(root);
		animation-range: 0 90vh;
	}

	@keyframes room-out {
		to {
			opacity: 0.35;
			translate: 0 6%;
		}
	}
}

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

	*,
	*::before,
	*::after {
		animation: none !important;
		transition-duration: 0.01ms !important;
	}

	.doors {
		display: none !important;
	}

	.clients__strip {
		mask-image: none;
	}

	.clients__track {
		width: auto;
		justify-content: center;
	}

	.clients__list {
		flex-wrap: wrap;
		justify-content: center;
		row-gap: 1rem;
	}

	.clients__list[aria-hidden="true"] {
		display: none;
	}
}

/* ---------- Narrow screens ---------- */

@media (max-width: 60rem) {
	.nav-toggle {
		display: block;
		position: relative;
		z-index: 2;
	}

	.site-header__brand {
		position: relative;
		z-index: 2;
	}

	/* The menu is a full-screen panel here, opened with the button. */
	.site-nav,
	html.js .home .site-header:not(.is-scrolled) .site-nav:not(:focus-within) {
		position: fixed;
		inset: 0;
		z-index: 1;
		flex-direction: column;
		justify-content: center;
		gap: 2.5rem;
		padding: 6rem var(--gutter) 3rem;
		background: var(--espresso);
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transform: none;
		transition: opacity 0.35s var(--ease), visibility 0.35s;
	}

	.nav-open .site-nav,
	html.js.nav-open .site-header .site-nav {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}

	.site-nav__list {
		flex-direction: column;
		align-items: center;
		gap: 1.5rem;
		font-family: var(--font-display);
		font-size: 1.9rem;
	}

	.hero {
		min-height: 0;
	}

	/* On narrow screens the headline comes first on plain wood, and the photo follows as its own block. */
	.hero {
		flex-direction: column-reverse;
		background: linear-gradient(180deg, #2b1711 0%, #1b0d0a 100%);
	}

	.hero__wall {
		position: relative;
		inset: auto;
		z-index: 0;
	}

	.hero__wall img {
		aspect-ratio: 4 / 4.4;
		object-position: 30% top;
	}

	/* The photo blends into the text above it and into the black band below it. */
	.hero__wall::after {
		background: linear-gradient(180deg, #1b0d0a 0%, transparent 22%, transparent 68%, #000 100%);
	}

	.hero__inner {
		display: block;
		flex: none;
		padding-block-end: 1.5rem;
	}

	/* On narrow screens the strip is its own black band under the photo, one item per line. */
	.hero::after {
		display: none;
	}

	.hero__foot {
		position: static;
		/* The hero is laid out bottom-up here, so the lowest order comes last on screen. */
		order: -1;
		grid-template-columns: minmax(0, 1fr);
		justify-items: center;
		gap: 1.1rem;
		padding: 0.5rem var(--gutter) 1.5rem;
		background: #000;
	}

	.proof,
	.proof--press {
		justify-self: center;
		flex-wrap: wrap;
		justify-content: center;
		gap: 0.7rem 1.1rem;
	}

	.proof__label {
		flex-basis: 100%;
		text-align: center;
	}

	.wordmark--google {
		height: 1.9rem;
	}

	.wordmark--themarker {
		height: 1.35rem;
	}

	.proof__outlet {
		font-size: 1.05rem;
	}

	.scroll-cue {
		grid-row: 3;
	}

	.hero__title {
		font-size: clamp(3rem, 15vw, 6rem);
	}


	.founder__inner,
	.contact__inner,
	.area__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	/* The shelf becomes a row that scrolls sideways: one book at a time, the next one showing at the edge. */
	.library {
		padding-block-start: clamp(4rem, 12vw, 6rem);
	}

	.shelf {
		aspect-ratio: auto;
		max-width: none;
	}

	.library__head {
		position: static;
		margin-block-end: 1.5rem;
	}

	.shelf__photo {
		display: none;
	}

	.shelf__volumes {
		display: flex;
		gap: 1rem;
		padding: 0.5rem var(--gutter) 2.5rem;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: var(--gutter);
	}

	.volume {
		position: relative;
		inset: auto;
		flex: 0 0 min(72vw, 19rem);
		width: auto;
		height: auto;
		aspect-ratio: calc(var(--w) * 1536) / calc(var(--h) * 936);
		scroll-snap-align: start;
		background-image: var(--photo);
		background-size: calc(10000% / var(--w)) calc(10000% / var(--h));
		background-position: calc(var(--x) / (100 - var(--w)) * 100%) calc(var(--y) / (100 - var(--h)) * 100%);
		box-shadow: 0.4rem 0.7rem 1.4rem rgb(0 0 0 / 0.6);
	}

	.area__book {
		position: relative;
		inset-block-start: auto;
		width: min(60vw, 15rem);
		margin-inline: auto;
	}

	.area__topics {
		grid-template-columns: minmax(0, 1fr);
	}

	.founder__wall {
		position: relative;
		inset-block-start: auto;
		padding-block-end: 5.5rem;
	}

	.founder__keepsake {
		inset-inline-end: 0;
	}

	.site-footer__inner {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.site-footer__brand {
		grid-column: 1 / -1;
	}

}

@media (max-width: 36rem) {
	/* On a phone the desk shows the first ten papers; the full spread is for larger screens. */
	.paper:nth-child(n + 11) {
		display: none;
	}

	.partners__grid,
	.timeline {
		grid-template-columns: minmax(0, 1fr);
	}

	.partners__grid {
		row-gap: 3.5rem;
	}

	.hero__actions .button {
		flex: 1 1 100%;
	}

	.contact__details > div {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.2rem;
	}
}
