/*
 * Content Aggregator marketing site.
 *
 * One family, one accent, one radius scale. Every colour, size and radius is a
 * token declared on :root; the rules below only combine them. The accent is
 * the blue of the plugin's WordPress.org icon.
 */

@font-face {
	font-family: 'Geist';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('./fonts/geist-latin-wght-normal.woff2') format('woff2');
}

:root {
	color-scheme: light dark;

	--bg: #ffffff;
	--bg-subtle: #f6f7f9;
	--surface: #ffffff;
	--ink: #0b0d12;
	--ink-2: #4b5563;
	--ink-3: #6b7280;
	--line: #e8eaee;
	--line-strong: #d6d9e0;
	--brand: #147cc0;
	--on-brand: #ffffff;
	--accent: #0e6aaf;
	--accent-soft: #e9f3fb;
	--warn: #9a4f08;
	--warn-soft: #fdf2e1;
	--on-ink: #ffffff;
	--glow: rgba(20, 124, 192, 0.2);
	--shadow-card: 0 1px 2px rgba(11, 13, 18, 0.05);
	--shadow-menu: 0 12px 32px -8px rgba(11, 13, 18, 0.18);
	--shadow-window: 0 1px 2px rgba(11, 13, 18, 0.05), 0 28px 56px -20px rgba(11, 13, 18, 0.16), 0 56px 120px -56px rgba(20, 124, 192, 0.3);

	--font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	--text-2xs: 0.625rem;
	--text-xs: 0.75rem;
	--text-s: 0.8125rem;
	--text-m: 0.9375rem;
	--text-base: 1rem;
	--text-l: 1.125rem;
	--text-xl: 1.25rem;
	--text-h2: clamp(1.875rem, 4.2vw, 3rem);
	--text-h1: clamp(2.75rem, 7.6vw, 5.5rem);
	--text-h1-short: 4.25rem;
	--text-price: 3.5rem;

	--radius-s: 6px;
	--radius-m: 10px;
	--radius-l: 16px;
	--radius-pill: 999px;

	--width: 1120px;
	--gutter: 24px;
	--section: clamp(72px, 9vw, 120px);
	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #090a0d;
		--bg-subtle: #111318;
		--surface: #0e1014;
		--ink: #f3f5f8;
		--ink-2: #a9b0bd;
		--ink-3: #7f8796;
		--line: #1d2027;
		--line-strong: #2c303a;
		--brand: #2f93db;
		--on-brand: #ffffff;
		--accent: #6cb8f4;
		--accent-soft: #0e2233;
		--warn: #efb25c;
		--warn-soft: #2a1e0c;
		--on-ink: #090a0d;
		--glow: rgba(47, 147, 219, 0.24);
		--shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4);
		--shadow-menu: 0 12px 32px -8px rgba(0, 0, 0, 0.7);
		--shadow-window: 0 1px 2px rgba(0, 0, 0, 0.5), 0 28px 56px -20px rgba(0, 0, 0, 0.6), 0 56px 140px -56px rgba(47, 147, 219, 0.34);
	}
}

/* ------------------------------------------------------------------ base */

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

html {
	scroll-padding-top: 88px;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font);
	font-size: var(--text-base);
	line-height: 1.6;
	letter-spacing: -0.006em;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
ul,
ol {
	margin: 0;
}

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

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

button,
input {
	font: inherit;
	letter-spacing: inherit;
	color: inherit;
}

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

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

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

.skip-link {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 20;
	padding: 10px 14px;
	border-radius: var(--radius-m);
	background: var(--ink);
	color: var(--on-ink);
	font-size: var(--text-m);
	transform: translateY(-200%);
}

.skip-link:focus {
	transform: none;
}

/* --------------------------------------------------------------- buttons */

.button {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 20px;
	border: 1px solid transparent;
	border-radius: var(--radius-m);
	font-size: var(--text-m);
	font-weight: 500;
	white-space: nowrap;
	cursor: pointer;
	overflow: hidden;
	isolation: isolate;
	transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease), background-position 0.9s var(--ease);
}

/* A light inside the button, under the pointer. */
.button::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: radial-gradient(150px circle at var(--light-x, 50%) var(--light-y, 50%), var(--button-light), transparent 72%);
	opacity: 0;
	transition: opacity 0.3s var(--ease);
}

.button:hover::before {
	opacity: 1;
}

.button:hover {
	transform: translateY(-2px);
}

.button:active {
	transform: translateY(0) scale(0.98);
}

/*
 * The button that sells: it stands on a glow of the accent, a sheen crosses it
 * when the pointer comes, and its arrow leans towards where it leads.
 */
.button--primary {
	--button-light: color-mix(in srgb, var(--brand) 75%, transparent);

	background-color: var(--ink);
	background-image: linear-gradient(110deg, transparent 38%, color-mix(in srgb, var(--on-ink) 26%, transparent) 50%, transparent 62%);
	background-position: 130% 0;
	background-size: 260% 100%;
	background-repeat: no-repeat;
	color: var(--on-ink);
	box-shadow:
		inset 0 1px 0 color-mix(in srgb, var(--on-ink) 18%, transparent),
		0 2px 6px -2px color-mix(in srgb, var(--ink) 45%, transparent),
		0 14px 30px -14px var(--brand);
}

.button--primary:hover {
	background-position: -30% 0;
	box-shadow:
		inset 0 1px 0 color-mix(in srgb, var(--on-ink) 18%, transparent),
		0 4px 10px -2px color-mix(in srgb, var(--ink) 45%, transparent),
		0 22px 44px -14px var(--brand);
}

.button--primary::after {
	content: '';
	width: 7px;
	height: 7px;
	margin-left: 10px;
	border: solid currentColor;
	border-width: 1.6px 1.6px 0 0;
	transform: rotate(45deg);
	transition: transform 0.25s var(--ease);
}

.button--primary:hover::after {
	transform: translateX(4px) rotate(45deg);
}

.button--ghost {
	--button-light: var(--accent-soft);

	border-color: var(--line-strong);
	background: var(--surface);
	color: var(--ink);
}

.button--ghost:hover {
	border-color: var(--brand);
	box-shadow: 0 12px 28px -16px var(--brand);
}

.button--small {
	min-height: 36px;
	padding: 0 14px;
	font-size: var(--text-s);
}

.chip {
	display: inline-flex;
	align-items: center;
	padding: 2px 9px;
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	color: var(--ink-2);
	font-size: var(--text-xs);
	font-weight: 500;
}

.chip--accent {
	border-color: transparent;
	background: var(--accent-soft);
	color: var(--accent);
}

/* ---------------------------------------------------------------- header */

.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	border-bottom: 1px solid var(--line);
	background: color-mix(in srgb, var(--bg) 78%, transparent);
	-webkit-backdrop-filter: saturate(1.6) blur(14px);
	backdrop-filter: saturate(1.6) blur(14px);
}

.site-header__inner,
.site-footer__inner {
	width: min(100% - 2 * var(--gutter), var(--width));
	margin-inline: auto;
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 32px;
	height: 64px;
}

.brand,
.site-footer__brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.brand__name {
	font-size: var(--text-m);
	font-weight: 600;
	letter-spacing: -0.02em;
	white-space: nowrap;
}

.site-nav {
	display: flex;
	gap: 28px;
	margin-left: auto;
}

.site-nav a,
.site-footer__nav a {
	color: var(--ink-2);
	font-size: var(--text-s);
	font-weight: 500;
	transition: color 0.2s var(--ease);
}

.site-nav a:hover,
.site-footer__nav a:hover,
.site-footer__languages a:hover {
	color: var(--ink);
}

/* The language menu: a native disclosure, so it opens without scripts. */
.language {
	position: relative;
	margin-left: -8px;
}

.language summary {
	display: flex;
	align-items: center;
	gap: 6px;
	height: 36px;
	padding: 0 10px;
	border-radius: var(--radius-m);
	color: var(--ink-2);
	font-size: var(--text-s);
	font-weight: 500;
	list-style: none;
	cursor: pointer;
}

.language summary::-webkit-details-marker {
	display: none;
}

.language summary::after {
	content: '';
	width: 6px;
	height: 6px;
	margin-top: -3px;
	border: solid currentColor;
	border-width: 0 1.5px 1.5px 0;
	transform: rotate(45deg);
}

.language summary:hover,
.language[open] summary {
	background: var(--bg-subtle);
	color: var(--ink);
}

.language ul {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 148px;
	padding: 6px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-m);
	background: var(--surface);
	box-shadow: var(--shadow-menu);
}

.language a {
	display: block;
	padding: 7px 10px;
	border-radius: var(--radius-s);
	color: var(--ink-2);
	font-size: var(--text-s);
	font-weight: 500;
}

.language a:hover {
	background: var(--bg-subtle);
	color: var(--ink);
}

.language a[aria-current],
.site-footer__languages a[aria-current] {
	color: var(--ink);
}

/* ------------------------------------------------------------------ hero */

.hero {
	position: relative;
	padding: clamp(40px, 5vw, 64px) 0 var(--section);
	overflow: clip;
	isolation: isolate;
}

/* A faint grid and one glow, both fading out before the headline ends. */
.hero::before,
.hero::after {
	content: '';
	position: absolute;
	inset: 0 0 auto;
	z-index: -1;
	height: 720px;
	pointer-events: none;
}

.hero::before {
	background:
		linear-gradient(var(--line) 1px, transparent 1px) 50% 0 / 72px 72px,
		linear-gradient(90deg, var(--line) 1px, transparent 1px) 50% 0 / 72px 72px;
	-webkit-mask-image: radial-gradient(ellipse 60% 62% at 50% 0%, black, transparent);
	mask-image: radial-gradient(ellipse 60% 62% at 50% 0%, black, transparent);
	opacity: 0.7;
}

.hero::after {
	background: radial-gradient(ellipse 46% 52% at 50% 0%, var(--glow), transparent 100%);
}

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

.hero__copy {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

/* In place in well under a second: an entrance that lasts longer reads as a slow page. */
.hero__copy > *,
.stage {
	animation: rise 0.5s var(--ease) both;
	animation-delay: calc(var(--i, 0) * 40ms);
}

/* The words come into focus as they rise. */
.hero__copy > * {
	animation-name: focus-in;
}

@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
}

@keyframes focus-in {
	from {
		opacity: 0;
		filter: blur(8px);
		transform: translateY(10px);
	}
}

/* The second line of the title lights up when an article reaches it. */
.hero__title span.is-lit {
	animation: lit 1.2s var(--ease);
}

@keyframes lit {
	25% {
		text-shadow: 0 0 44px var(--brand), 0 0 14px var(--brand);
	}
}

.pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 12px 5px 10px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-pill);
	background: var(--surface);
	color: var(--ink-2);
	font-size: var(--text-s);
	font-weight: 500;
	box-shadow: var(--shadow-card);
}

.pill:hover {
	color: var(--ink);
}

.pill__dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--brand);
}

.hero__title {
	margin-top: 24px;
	font-size: var(--text-h1);
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.05em;
}

.hero__title span {
	display: block;
	text-wrap: balance;
}

.hero__title span:first-child {
	color: var(--ink-3);
}

.hero__lede {
	max-width: 600px;
	margin-top: 24px;
	color: var(--ink-2);
	font-size: var(--text-l);
	line-height: 1.55;
	text-wrap: pretty;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 32px;
}

.hero__meta {
	margin-top: 20px;
	color: var(--ink-3);
	font-size: var(--text-s);
}

.stage {
	position: relative;
	margin-top: clamp(40px, 5vw, 56px);
	perspective: 1800px;
}

/* The stream of headlines: behind the text, down to the window's top edge. */
.stream {
	position: absolute;
	inset: 0 auto auto 0;
	z-index: -1;
	width: 100%;
	pointer-events: none;
	-webkit-mask-image: linear-gradient(to bottom, black calc(100% - 80px), transparent);
	mask-image: linear-gradient(to bottom, black calc(100% - 80px), transparent);
}

.stream[hidden] {
	display: none;
}

/* An approved draft, on its way out of the window. */
.desk-output {
	position: absolute;
	z-index: 2;
	display: grid;
	gap: 4px;
	padding: 12px;
	border: 1px solid var(--brand);
	border-radius: var(--radius-m);
	background: var(--surface);
	box-shadow: var(--shadow-window), 0 0 0 4px var(--glow), 0 0 56px var(--brand);
	color: var(--ink);
	font-size: var(--text-s);
	line-height: 1.4;
	text-align: left;
	pointer-events: none;
}

.desk-output span {
	color: var(--accent);
	font-size: var(--text-xs);
	font-weight: 500;
}

.stage__caption {
	max-width: 560px;
	margin: 36px auto 0;
	color: var(--ink-3);
	font-size: var(--text-s);
	text-align: center;
	text-wrap: pretty;
}

/* ------------------------------------------------------------------ desk */

/*
 * The window lies back until the page is scrolled to it: the script moves
 * --upright from 0 to 1, and without the script it stands at 1.
 */
.desk {
	position: relative;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-l);
	background: var(--surface);
	box-shadow: var(--shadow-window);
	overflow: hidden;
	text-align: left;
	transform: rotateX(calc((1 - var(--upright, 1)) * 26deg)) scale(calc(0.88 + var(--upright, 1) * 0.12));
	transform-origin: 50% 0;
}

/* A light travels round the edge of the window, the accent used once. */
@property --beam {
	syntax: '<angle>';
	inherits: false;
	initial-value: 0deg;
}

.desk::after {
	content: '';
	position: absolute;
	inset: 0;
	padding: 1.5px;
	border-radius: var(--radius-l);
	background: conic-gradient(from var(--beam), transparent 0 76%, var(--brand) 92%, transparent 100%);
	-webkit-mask: linear-gradient(black, black) content-box, linear-gradient(black, black);
	-webkit-mask-composite: xor;
	mask: linear-gradient(black, black) content-box exclude, linear-gradient(black, black);
	opacity: 0;
	transition: opacity 0.6s var(--ease);
	pointer-events: none;
}

/* It travels while the scene plays and stops with it: the pause button stops everything that moves. */
.desk[data-scene-playing]::after {
	opacity: 1;
	animation: beam 7s linear infinite;
}

@keyframes beam {
	to {
		--beam: 360deg;
	}
}

.desk__bar {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	height: 46px;
	padding: 0 16px;
	border-bottom: 1px solid var(--line);
	background: var(--bg-subtle);
	color: var(--ink-3);
	font-size: var(--text-s);
}

.desk__dots {
	display: flex;
	gap: 6px;
}

.desk__dots i {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--line-strong);
}

.desk__title {
	color: var(--ink-2);
	font-size: var(--text-s);
	font-weight: 500;
}

.desk__status {
	display: flex;
	align-items: center;
	justify-self: end;
	gap: 12px;
}

.desk__left {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* Plays or pauses the demo: a triangle, or two bars while it plays. */
.desk__play {
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 1px solid var(--line-strong);
	border-radius: 50%;
	background: var(--surface);
	color: var(--ink-2);
	cursor: pointer;
}

.desk__play[hidden] {
	display: none;
}

.desk__play::before {
	content: '';
	margin-left: 2px;
	border: solid transparent;
	border-width: 4.5px 0 4.5px 7px;
	border-left-color: currentColor;
}

.desk__play[data-playing]::before {
	width: 8px;
	height: 9px;
	margin: 0;
	border: solid currentColor;
	border-width: 0 2.5px;
}

.desk__left b {
	color: var(--ink);
	font-weight: 600;
}

.desk__panes {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	/* The tallest draft of the three languages, so the page does not move while the demo plays. */
	min-height: 564px;
}

.desk__pane {
	min-width: 0;
	padding: 18px 16px;
}

.desk__pane + .desk__pane {
	border-left: 1px solid var(--line);
}

.desk__pane--draft {
	padding-inline: 22px;
	background: var(--bg-subtle);
}

.desk__label {
	margin: 0 8px 10px;
	color: var(--ink-3);
	font-size: var(--text-xs);
	font-weight: 500;
}

/* Topics */

.desk-topics {
	display: grid;
	gap: 2px;
}

.desk-topic {
	transition: transform 0.45s var(--ease);
}

.desk-topic__pick {
	display: grid;
	grid-template-columns: 24px minmax(0, 1fr) 52px;
	gap: 12px;
	width: 100%;
	padding: 12px 12px 12px 8px;
	border: 0;
	border-radius: var(--radius-m);
	background: none;
	text-align: left;
	cursor: pointer;
}

.desk-topic__pick:hover {
	background: var(--bg-subtle);
}

.desk-topic.is-selected .desk-topic__pick {
	background: var(--accent-soft);
}

/* A draft of the visitor's is in hand: the other stories do not answer until it is decided. */
[data-waiting] .desk-topic:not(.is-selected) .desk-topic__pick {
	background: none;
	cursor: default;
}

[data-waiting] .desk-topic:not(.is-selected) .desk-topic__pick > * {
	opacity: 0.5;
}

/* A dismissed story is dim, and still there to be picked and restored. */
.desk-topic.is-dismissed .desk-topic__pick > * {
	opacity: 0.5;
}

.desk-topic__rank {
	padding-top: 2px;
	color: var(--ink-3);
	font-size: var(--text-xs);
	font-variant-numeric: tabular-nums;
}

.desk-topic__body {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	min-width: 0;
}

.desk-topic__title {
	flex: none;
	width: 100%;
	color: var(--ink);
	font-size: var(--text-m);
	font-weight: 500;
	line-height: 1.35;
	letter-spacing: -0.012em;
}

.desk-topic__meta {
	color: var(--ink-3);
	font-size: var(--text-xs);
	font-variant-numeric: tabular-nums;
}

/* The tags flow on the line of the figures, and wrap one by one. */
.desk-topic__tags {
	display: contents;
}

.desk-tag {
	padding: 1px 8px;
	border-radius: var(--radius-pill);
	background: var(--bg-subtle);
	color: var(--ink-2);
	font-size: var(--text-xs);
	font-weight: 500;
}

.desk-topic.is-selected .desk-tag {
	background: var(--surface);
}

.desk-tag[data-tone='good'] {
	color: var(--accent);
}

.desk-tag[data-tone='warn'] {
	background: var(--warn-soft);
	color: var(--warn);
}

.desk-tag[data-tone='muted'] {
	color: var(--ink-3);
}

.desk-topic__score {
	display: grid;
	align-content: start;
	justify-items: end;
	gap: 6px;
}

.desk-topic__number {
	color: var(--ink);
	font-size: var(--text-xl);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
}

.desk-topic__bar {
	width: 100%;
	height: 3px;
	border-radius: var(--radius-pill);
	background: var(--line);
	overflow: hidden;
}

.desk-topic__bar b {
	display: block;
	height: 100%;
	border-radius: var(--radius-pill);
	background: var(--brand);
	transform-origin: left;
	transition: transform 0.45s var(--ease);
}

/* Draft */

.desk-draft {
	display: grid;
	gap: 14px;
	align-content: start;
	outline: 0;
}

.desk-draft__stage {
	color: var(--ink-3);
	font-size: var(--text-xs);
	font-weight: 500;
}

.desk-draft[data-phase='generating'] .desk-draft__stage,
.desk-draft[data-phase='review'] .desk-draft__stage,
.desk-draft[data-phase='approved'] .desk-draft__stage {
	color: var(--accent);
}

.desk-draft__title {
	font-size: var(--text-l);
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.02em;
}

.desk-draft__skeleton {
	display: grid;
	gap: 9px;
	padding: 4px 0 6px;
}

.desk-draft__skeleton i {
	height: 8px;
	border-radius: var(--radius-pill);
	background: var(--line);
}

.desk-draft__skeleton i:nth-child(2) {
	width: 92%;
}

.desk-draft__skeleton i:nth-child(3) {
	width: 97%;
}

.desk-draft__skeleton i:nth-child(4) {
	width: 58%;
}

.desk-draft__hint {
	color: var(--ink-2);
	font-size: var(--text-s);
	line-height: 1.5;
}

.desk-draft__hint strong,
.desk-draft__flag strong {
	color: var(--ink);
	font-weight: 600;
}

.desk-draft__body {
	color: var(--ink);
	font-size: var(--text-s);
	line-height: 1.62;
}

.desk-draft__body .w {
	opacity: 0.12;
	transition: opacity 0.5s var(--ease);
}

.desk-draft__body .w.is-on,
.desk-draft__body.is-written .w {
	opacity: 1;
}

.desk-ref {
	display: inline-grid;
	place-items: center;
	min-width: 15px;
	height: 15px;
	margin-inline: 2px 1px;
	border-radius: var(--radius-pill);
	background: var(--accent-soft);
	color: var(--accent);
	font-size: var(--text-2xs);
	font-weight: 600;
	line-height: 1;
	vertical-align: 1px;
}

.desk-draft__flag {
	padding: 10px 12px;
	border-radius: var(--radius-m);
	background: var(--warn-soft);
	color: var(--ink-2);
	font-size: var(--text-xs);
	line-height: 1.5;
}

.desk-draft__flag strong {
	color: var(--warn);
}

.desk-draft__flag.is-clear {
	background: var(--accent-soft);
}

.desk-draft__flag.is-clear strong {
	color: var(--accent);
}

.desk-draft__sources {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	color: var(--ink-2);
	font-size: var(--text-xs);
}

.desk-draft__sources .desk-ref {
	margin-inline: 0 5px;
}

.desk-draft__actions {
	display: flex;
	gap: 8px;
}

.desk-draft__actions .desk-button {
	flex: 1 1 auto;
}

.desk-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 14px;
	border: 1px solid transparent;
	border-radius: var(--radius-m);
	background: var(--ink);
	color: var(--on-ink);
	font-size: var(--text-s);
	font-weight: 500;
	cursor: pointer;
	transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.desk-button:hover {
	opacity: 0.86;
}

/* The demo presses a button as a finger would. */
.desk-button.is-pressed {
	box-shadow: 0 0 0 4px var(--accent-soft);
	transform: scale(0.97);
}

.desk-button--ghost {
	border-color: var(--line-strong);
	background: var(--surface);
	color: var(--ink);
}

.desk-wp {
	display: grid;
	gap: 6px;
	padding: 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius-m);
	background: var(--surface);
}

.desk-wp__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: var(--ink-3);
	font-size: var(--text-xs);
	font-weight: 500;
}

.desk-wp__row {
	color: var(--ink-2);
	font-size: var(--text-s);
	line-height: 1.4;
}

.desk-wp__row strong {
	color: var(--accent);
	font-weight: 600;
}

.desk-wp__meta {
	color: var(--ink-3);
	font-size: var(--text-xs);
}

/* -------------------------------------------------------------- sections */

.section {
	width: min(100% - 2 * var(--gutter), var(--width));
	margin-inline: auto;
	padding: var(--section) 0;
	border-top: 1px solid var(--line);
}

.section__head {
	max-width: 720px;
	margin: 0 auto clamp(40px, 6vw, 72px);
	text-align: center;
}

.label {
	margin-bottom: 14px;
	color: var(--accent);
	font-size: var(--text-s);
	font-weight: 500;
}

.h2 {
	font-size: var(--text-h2);
	font-weight: 600;
	line-height: 1.08;
	letter-spacing: -0.04em;
	text-wrap: balance;
}

/* A sentence of a heading stays whole when the line can hold it. */
.h2 span {
	display: inline-block;
}

.section__lede {
	max-width: 580px;
	margin: 20px auto 0;
	color: var(--ink-2);
	font-size: var(--text-l);
	line-height: 1.55;
	text-wrap: balance;
}

.section__note {
	max-width: 640px;
	margin: 32px auto 0;
	color: var(--ink-3);
	font-size: var(--text-s);
	text-align: center;
	text-wrap: pretty;
}

.section__note a {
	color: var(--ink-2);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.reveal {
	opacity: 0;
	transform: translateY(18px);
}

.reveal.is-in {
	opacity: 1;
	transform: none;
	transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

/* Workflow */

.steps {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 32px;
}

.step {
	padding-top: 20px;
	border-top: 1px solid var(--line-strong);
}

.step__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}

.step__number {
	color: var(--ink-3);
	font-size: var(--text-s);
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}

.step h3,
.card h3 {
	margin-bottom: 8px;
	font-size: var(--text-l);
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.02em;
}

.step p:last-child,
.card p {
	color: var(--ink-2);
	font-size: var(--text-m);
}

/* Control */

.cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.card,
.plan,
.enterprise,
.lead-form {
	border: 1px solid var(--line);
	border-radius: var(--radius-l);
	background: var(--surface);
	box-shadow: var(--shadow-card);
}

.card {
	padding: 28px;
}

/* A soft light follows the pointer over a card or a plan. */
.card,
.plan {
	position: relative;
	overflow: hidden;
}

.card::before,
.plan::before {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(360px circle at var(--light-x, 50%) var(--light-y, 0%), var(--accent-soft), transparent 72%);
	opacity: 0;
	transition: opacity 0.35s var(--ease);
	pointer-events: none;
}

.card:hover::before,
.plan:hover::before {
	opacity: 1;
}

.card > *,
.plan > * {
	position: relative;
}

.card__icon {
	display: block;
	width: 40px;
	height: 40px;
	margin-bottom: 20px;
	padding: 9px;
	border-radius: var(--radius-m);
	background: var(--accent-soft);
	fill: none;
	stroke: var(--accent);
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Pricing */

.checkout-notice {
	max-width: 880px;
	margin: 0 auto 24px;
	padding: 12px 16px;
	border-radius: var(--radius-m);
	background: var(--warn-soft);
	color: var(--warn);
	font-size: var(--text-m);
	text-align: center;
}

.checkout-notice:empty {
	display: none;
}

.plans,
.enterprise {
	max-width: 880px;
	margin-inline: auto;
}

.plans {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

.plan {
	display: flex;
	flex-direction: column;
	padding: 32px;
}

.plan--featured {
	border-color: var(--brand);
	box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-card);
}

.plan__name {
	font-size: var(--text-m);
	font-weight: 600;
}

.plan__price {
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin-top: 16px;
}

.plan__price b {
	font-size: var(--text-price);
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.05em;
	font-variant-numeric: tabular-nums;
}

.plan__price span,
.plan__for,
.enterprise p {
	color: var(--ink-2);
	font-size: var(--text-m);
}

.plan__founder {
	margin-top: 10px;
	color: var(--ink-3);
	font-size: var(--text-s);
}

.plan__founder b {
	color: var(--ink-2);
	font-weight: 500;
}

.plan__for {
	margin-top: 24px;
	padding-top: 24px;
	border-top: 1px solid var(--line);
}

.plan__list {
	display: grid;
	gap: 10px;
	margin: 20px 0 32px;
	font-size: var(--text-m);
}

.plan__list li {
	position: relative;
	padding-left: 26px;
}

.plan__list li::before {
	content: '';
	position: absolute;
	top: 0.45em;
	left: 2px;
	width: 11px;
	height: 6px;
	border: solid var(--brand);
	border-width: 0 0 1.8px 1.8px;
	transform: rotate(-45deg);
}

.plan .button {
	width: 100%;
	margin-top: auto;
}

.enterprise {
	display: flex;
	align-items: center;
	gap: 32px;
	margin-top: 20px;
	padding: 24px 32px;
}

.enterprise p {
	margin-top: 6px;
}

/* FAQ */

.faq {
	max-width: 760px;
	margin-inline: auto;
	border-bottom: 1px solid var(--line);
}

.faq__item {
	border-top: 1px solid var(--line);
}

.faq__item summary {
	position: relative;
	padding: 22px 44px 22px 0;
	font-size: var(--text-l);
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: -0.015em;
	list-style: none;
	cursor: pointer;
}

.faq__item summary::-webkit-details-marker {
	display: none;
}

.faq__item summary::before,
.faq__item summary::after {
	content: '';
	position: absolute;
	top: 50%;
	right: 6px;
	width: 14px;
	height: 1.5px;
	background: var(--ink-3);
	transition: transform 0.25s var(--ease);
}

.faq__item summary::after {
	transform: rotate(90deg);
}

/* The sign turns back as soon as an answer starts to fold, not when it is gone. */
.faq__item[open]:not(.is-closing) summary::after {
	transform: none;
}

.faq__body {
	display: grid;
	gap: 12px;
	overflow: hidden;
	padding: 0 44px 26px 0;
	color: var(--ink-2);
	font-size: var(--text-m);
}

/* Contact */

.lead-form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px 16px;
	max-width: 640px;
	margin-inline: auto;
	padding: 32px;
}

.lead-form__full {
	grid-column: 1 / -1;
}

.lead-form label {
	display: grid;
	gap: 6px;
	font-size: var(--text-s);
	font-weight: 500;
}

.lead-form input:not([type='checkbox']) {
	width: 100%;
	height: 44px;
	padding: 0 12px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-m);
	background: var(--bg);
	font-size: var(--text-m);
	font-weight: 400;
}

.lead-form input::placeholder {
	color: var(--ink-3);
}

.lead-form input:focus-visible {
	border-color: var(--brand);
	outline: 3px solid var(--accent-soft);
	outline-offset: 0;
}

.lead-form .consent-field {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--ink-2);
	font-weight: 400;
}

.consent-field input {
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--brand);
}

.lead-form .trap-field {
	position: absolute;
	left: -9999px;
}

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

.form-status {
	color: var(--accent);
	font-size: var(--text-m);
}

.form-status[data-state='error'] {
	color: var(--warn);
}

.form-note {
	color: var(--ink-3);
	font-size: var(--text-s);
}

/* -------------------------------------------------------------- documents */

.document {
	width: min(100% - 2 * var(--gutter), 720px);
	margin-inline: auto;
	padding: clamp(56px, 8vw, 96px) 0 var(--section);
}

.document section {
	margin-top: 40px;
}

.document h2 {
	margin-bottom: 10px;
	font-size: var(--text-l);
	font-weight: 600;
	letter-spacing: -0.02em;
}

.document p,
.document dl {
	margin-top: 12px;
	color: var(--ink-2);
	font-size: var(--text-m);
}

.document > p:first-of-type {
	margin-top: 0;
}

.document__note {
	color: var(--ink-3);
}

.document dl div {
	display: flex;
	gap: 8px;
}

.document dt {
	color: var(--ink-3);
}

.document dt::after {
	content: ' ·';
}

.document dd {
	margin: 0;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
	border-top: 1px solid var(--line);
}

.site-footer__inner {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 16px 32px;
	padding: 40px 0;
}

.site-footer__nav,
.site-footer__languages {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 24px;
}

.site-footer__fine {
	color: var(--ink-3);
	font-size: var(--text-s);
}

.site-footer__languages a {
	color: var(--ink-3);
	font-size: var(--text-s);
	font-weight: 500;
	transition: color 0.2s var(--ease);
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1040px) {
	/* The demo plays where the list and the draft sit side by side. */
	.desk__play {
		display: none;
	}

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

	.desk__pane + .desk__pane {
		border-top: 1px solid var(--line);
		border-left: 0;
	}

	.desk-draft {
		max-width: 560px;
	}

	.steps {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 40px 32px;
	}
}

@media (max-width: 760px) {
	body {
		--gutter: 20px;
	}

	.site-nav {
		display: none;
	}

	.site-header__inner {
		justify-content: space-between;
	}

	.hero__actions,
	.hero__actions .button {
		width: 100%;
	}

	.desk__pane--draft {
		padding-inline: 16px;
	}

	.desk-topic__pick {
		grid-template-columns: 20px minmax(0, 1fr) 44px;
		gap: 10px;
	}

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

	.plan,
	.lead-form {
		padding: 24px;
	}

	.enterprise {
		flex-direction: column;
		align-items: stretch;
		gap: 20px;
		padding: 24px;
	}

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

	.faq__item summary {
		font-size: var(--text-base);
	}

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

	/* Name, language and the way to the prices on one line, down to 360px. */
	.site-header__inner {
		gap: 6px;
	}

	.site-header .brand {
		gap: 8px;
	}

	.site-header .brand__name {
		font-size: var(--text-s);
	}

	.language {
		margin-left: auto;
	}

	.language summary {
		padding: 0 6px;
	}

	.site-header .button {
		padding: 0 10px;
	}

	.site-header .button::after {
		display: none;
	}

	.desk__bar {
		display: flex;
		justify-content: space-between;
	}

	.desk__dots {
		display: none;
	}
}

/* A wide but short screen, a 13-inch laptop: the headline gives room so the window and its demo are in the first screen. */
@media (min-width: 1041px) and (max-height: 820px) {
	.hero {
		padding-top: 32px;
	}

	.hero__title {
		margin-top: 20px;
		font-size: var(--text-h1-short);
	}

	.hero__lede {
		margin-top: 16px;
	}

	.hero__actions {
		margin-top: 24px;
	}

	.stage {
		margin-top: 32px;
	}
}

/* ----------------------------------------------------------------- motion */

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
}
