/* ==========================================================================
   valentinlako.com
   Light editorial design. Newsreader (serif) for reading and display,
   Archivo in a wide cut for navigation, buttons and small meta text.
   ========================================================================== */

:root {
	--paper: #F6F5F2;
	--ink: #15171C;
	--graphite: #575B64;
	--rule: #D9D8D2;
	--accent: #2A3F8F;
	--mist: #EAECF1;

	--serif: 'Newsreader', Georgia, 'Times New Roman', serif;
	--sans: 'Archivo', 'Helvetica Neue', Arial, sans-serif;

	--wrap: 1320px;
	--gutter: clamp(20px, 4.5vw, 64px);
	--section-pad: clamp(72px, 10vw, 140px);
}

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 19px;
	line-height: 1.6;
	font-optical-sizing: auto;
	font-variant-numeric: lining-nums;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
main { flex: 1 0 auto; }

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

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a {
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
	transition: color .2s ease, text-decoration-color .2s ease;
}
a:hover { color: var(--accent); text-decoration-color: currentColor; }

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

h1, h2, h3 {
	margin: 0;
	font-weight: 300;
	letter-spacing: -0.015em;
}

.skip-link {
	position: absolute;
	left: var(--gutter);
	top: -100px;
	z-index: 10;
	padding: 10px 16px;
	background: var(--ink);
	color: var(--paper);
	font-family: var(--sans);
	font-size: 14px;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

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

/* Small sans text: navigation, buttons, meta lines
   ========================================================================== */
.ui {
	font-family: var(--sans);
	font-stretch: 112%;
	font-size: 14px;
	line-height: 1.5;
	letter-spacing: 0.01em;
}

/* Header
   ========================================================================== */
.site-header {
	padding-block: 28px;
}
.site-header .wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px 32px;
}
.wordmark {
	font-family: var(--serif);
	font-size: 22px;
	font-weight: 400;
	letter-spacing: -0.01em;
	text-decoration: none;
}
.site-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.site-nav a {
	text-decoration: none;
	padding-block: 4px;
	border-bottom: 1px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
	color: var(--ink);
	border-bottom-color: var(--ink);
}

/* Buttons
   ========================================================================== */
.button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 15px 24px;
	border: 1px solid var(--ink);
	border-radius: 2px;
	background: var(--ink);
	color: var(--paper);
	font-family: var(--sans);
	font-stretch: 112%;
	font-size: 14px;
	letter-spacing: 0.01em;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.button:hover {
	background: var(--accent);
	border-color: var(--accent);
	color: #FFF;
}
.button-quiet {
	background: transparent;
	color: var(--ink);
}
.button-quiet:hover {
	background: transparent;
	color: var(--accent);
}

/* Hero
   ========================================================================== */
.hero {
	padding-block: clamp(48px, 6.5vw, 96px) clamp(48px, 5.5vw, 80px);
}
.hero h1 {
	font-size: clamp(54px, 9vw, 136px);
	line-height: 0.98;
	letter-spacing: -0.035em;
	font-variation-settings: 'opsz' 72;
}
.hero-row {
	display: grid;
	grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
	gap: 56px clamp(40px, 7vw, 120px);
	align-items: end;
	margin-top: clamp(36px, 4.5vw, 64px);
}
.hero .lede {
	max-width: 34ch;
	font-size: clamp(21px, 1.9vw, 27px);
	line-height: 1.45;
	color: var(--graphite);
}
.hero .actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 28px;
	margin-top: clamp(28px, 3.5vw, 44px);
}

/* The test ledger: one circle per completed A/B test
   ========================================================================== */
.ledger {
	margin: 0;
	justify-self: end;
	width: 100%;
	max-width: 520px;
}
.ledger svg {
	width: 100%;
	overflow: visible;
}
.ledger circle {
	fill: transparent;
	stroke: var(--graphite);
	stroke-opacity: 0.45;
	stroke-width: 1;
}
.ledger circle.won {
	fill: var(--accent);
	stroke: var(--accent);
	stroke-opacity: 1;
}
.ledger figcaption {
	margin-top: 20px;
	color: var(--graphite);
}
.ledger .key {
	display: inline-block;
	width: 9px;
	height: 9px;
	margin-right: 6px;
	border-radius: 50%;
	vertical-align: 0;
}
.ledger .key-won { background: var(--accent); }
.ledger .key-line { display: block; }
.ledger .key-test { border: 1px solid var(--graphite); }

/* The single animated moment: winners fill in once, on load. */
@media (prefers-reduced-motion: no-preference) {
	.js .ledger circle.won {
		animation: ledger-fill .5s ease-out both;
		animation-delay: calc(700ms + var(--i) * 38ms);
	}
	@keyframes ledger-fill {
		from { fill: transparent; stroke: var(--graphite); stroke-opacity: .45; }
		to { fill: var(--accent); stroke: var(--accent); stroke-opacity: 1; }
	}
}

/* Proof strip: four statements in a row
   ========================================================================== */
.proof {
	padding-block: clamp(40px, 5vw, 64px);
	border-top: 1px solid var(--rule);
	border-bottom: 1px solid var(--rule);
}
.stats {
	display: grid;
	grid-template-columns: 1fr 1fr 1.55fr 1.15fr;
	margin: 0;
	padding: 0;
	list-style: none;
}
.stats li {
	padding-inline: clamp(16px, 2.2vw, 32px);
	border-left: 1px solid var(--rule);
}
.stats li:first-child { padding-left: 0; border-left: none; }
.stats li:last-child { padding-right: 0; }
.stats .figure {
	display: block;
	font-size: clamp(34px, 3.2vw, 50px);
	font-weight: 300;
	line-height: 1.05;
	letter-spacing: -0.03em;
	font-variation-settings: 'opsz' 72;
}
.stats .figure-long {
	font-size: clamp(29px, 2.75vw, 43px);
	line-height: 1.22;
	white-space: nowrap;
}
.stats .label {
	display: block;
	max-width: 24ch;
	margin-top: 10px;
	font-size: 17px;
	line-height: 1.45;
	color: var(--graphite);
}

/* Sections: title in the left column, content in the right
   ========================================================================== */
.section {
	padding-block: var(--section-pad);
	border-top: 1px solid var(--rule);
}
.section-grid {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
	gap: 40px clamp(40px, 7vw, 120px);
	align-items: start;
}
.section-title {
	font-size: clamp(38px, 4.6vw, 66px);
	font-style: italic;
	font-weight: 300;
	line-height: 1.04;
	letter-spacing: -0.025em;
	font-variation-settings: 'opsz' 72;
}
.section-head .ui {
	margin-top: 20px;
	color: var(--graphite);
}
.section-head .intro {
	max-width: 32ch;
	margin-top: 24px;
	color: var(--graphite);
}
.section-head .company {
	margin-top: 28px;
	font-size: clamp(26px, 2.4vw, 34px);
	line-height: 1.15;
	letter-spacing: -0.02em;
}
.section-head .company + .ui { margin-top: 6px; }
@media (min-width: 992px) {
	.section-head {
		position: sticky;
		top: 40px;
	}
}

.section-mist {
	background: var(--mist);
	border-top: none;
}
.section-mist + .section,
.proof + .section { border-top: none; }

/* Entries: stacked items separated by rules (services, products) */
.entries > * {
	padding-block: 36px;
	border-top: 1px solid var(--rule);
}
.entries > *:first-child { padding-top: 0; border-top: none; }
.entries > *:last-child { padding-bottom: 0; }
.entries h3 {
	margin-bottom: 14px;
	font-size: clamp(26px, 2.4vw, 34px);
	line-height: 1.15;
	font-weight: 400;
	letter-spacing: -0.02em;
}
.entries p { max-width: 62ch; }
.section-mist .entries > * { border-color: #D3D6DF; }

/* Lists with small hollow circles, echoing the ledger */
.dots {
	margin: 0;
	padding: 0;
	list-style: none;
}
.dots li {
	position: relative;
	max-width: 62ch;
	padding-left: 26px;
	margin-bottom: 14px;
}
.dots li:last-child { margin-bottom: 0; }
.dots li::before {
	position: absolute;
	content: "";
	left: 2px;
	top: 0.62em;
	width: 8px;
	height: 8px;
	border: 1px solid var(--accent);
	border-radius: 50%;
}
.dots strong { font-weight: 500; }

/* Product entries */
.product-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 18px;
	margin-bottom: 14px;
}
.product-head h3 { margin-bottom: 0; }
.status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--graphite);
}
.status::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--accent);
}
.status.closed::before {
	background: transparent;
	border: 1px solid var(--graphite);
}
.stack {
	margin-top: 16px;
	color: var(--graphite);
}
.product-link { margin-top: 18px; }

/* Client work
   ========================================================================== */
.work-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px 40px;
	margin-bottom: clamp(40px, 5vw, 72px);
}
.work-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(28px, 4vw, 56px) clamp(20px, 3vw, 40px);
}
.work-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.work-card { margin: 0; }
.work-card .frame {
	display: block;
	overflow: hidden;
	background: #E4E3DE;
	aspect-ratio: 3 / 2;
}
.work-grid.three .work-card .frame { aspect-ratio: 4 / 3; }
.work-card img,
.work-card video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.work-card a.frame:hover img { transform: scale(1.02); }
.work-card figcaption {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 4px 16px;
	margin-top: 16px;
}
.work-card .name {
	font-size: 23px;
	font-weight: 400;
	letter-spacing: -0.01em;
}
.work-card .ui { color: var(--graphite); }

/* Contact
   ========================================================================== */
.contact-links {
	margin: 0 0 48px;
	padding: 0;
	list-style: none;
}
.contact-links li { margin-bottom: 8px; }
.contact-links .email {
	font-size: clamp(26px, 3vw, 40px);
	font-weight: 300;
	letter-spacing: -0.02em;
}
.contact-links .more {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 28px;
	margin-top: 16px;
}

.form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	max-width: 760px;
}
.form .full { grid-column: 1 / -1; }
.form label {
	display: block;
	margin-bottom: 8px;
	font-family: var(--sans);
	font-stretch: 112%;
	font-size: 14px;
	color: var(--graphite);
}
.form input,
.form textarea,
.form select {
	width: 100%;
	padding: 14px 0;
	border: none;
	border-bottom: 1px solid #B9B8B1;
	border-radius: 0;
	background: transparent;
	color: var(--ink);
	font-family: var(--serif);
	font-size: 19px;
	-webkit-appearance: none;
	appearance: none;
}
.form select {
	background-image: linear-gradient(45deg, transparent 50%, var(--graphite) 50%), linear-gradient(135deg, var(--graphite) 50%, transparent 50%);
	background-position: calc(100% - 12px) 50%, calc(100% - 6px) 50%;
	background-size: 6px 6px;
	background-repeat: no-repeat;
}
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus,
.form textarea:focus,
.form select:focus {
	outline: none;
	border-bottom-color: var(--accent);
	box-shadow: 0 1px 0 0 var(--accent);
}
.form .note { color: var(--graphite); }

/* Footer
   ========================================================================== */
.site-footer {
	padding-block: 40px 48px;
	border-top: 1px solid var(--rule);
	color: var(--graphite);
}
.site-footer .wrap {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 16px 32px;
}
.site-footer ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* Inner pages
   ========================================================================== */
.page-head {
	padding-block: clamp(56px, 9vw, 128px) clamp(40px, 6vw, 88px);
}
.page-head h1 {
	font-size: clamp(48px, 7.4vw, 112px);
	line-height: 1;
	letter-spacing: -0.035em;
	font-variation-settings: 'opsz' 72;
}
.page-head .lede {
	max-width: 40ch;
	margin-top: 24px;
	font-size: clamp(20px, 1.7vw, 24px);
	line-height: 1.45;
	color: var(--graphite);
}

.about-grid {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
	gap: 48px clamp(40px, 7vw, 120px);
	align-items: start;
	padding-bottom: var(--section-pad);
}
.about-photo img {
	width: 100%;
	aspect-ratio: 623 / 852;
	object-fit: cover;
}
.about-photo figcaption {
	margin-top: 12px;
	color: var(--graphite);
}
.prose {
	max-width: 64ch;
	font-size: 21px;
	line-height: 1.65;
}
.prose h2 {
	margin: 1.6em 0 0.5em;
	font-size: 30px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.015em;
}
.prose h2:first-child { margin-top: 0; }
.signature {
	width: 160px;
	margin-top: 40px;
}

.article-image {
	margin: 0 0 clamp(40px, 6vw, 72px);
}
.article-image img {
	width: 100%;
	max-height: 560px;
	object-fit: cover;
}
.article {
	padding-bottom: var(--section-pad);
}
.article .prose { margin-inline: auto; }

.post-list {
	margin: 0;
	padding: 0 0 var(--section-pad);
	list-style: none;
}
.post-item {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
	gap: 32px clamp(40px, 7vw, 120px);
	padding-top: 40px;
	border-top: 1px solid var(--rule);
}
.post-item img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.post-item h2 {
	font-size: clamp(28px, 2.8vw, 40px);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: -0.02em;
}
.post-item h2 a { text-decoration: none; }
.post-item p { max-width: 60ch; margin-top: 16px; color: var(--graphite); }

/* Responsive
   ========================================================================== */
@media (max-width: 991px) {
	.hero-row,
	.section-grid,
	.about-grid,
	.post-item {
		grid-template-columns: minmax(0, 1fr);
	}
	.ledger { justify-self: start; }
	.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
	.stats li:nth-child(odd) { padding-left: 0; border-left: none; }
	.work-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	body { font-size: 18px; }
	.site-header { padding-block: 20px; }
	.site-nav ul { gap: 6px 20px; }
	.work-grid,
	.work-grid.three { grid-template-columns: minmax(0, 1fr); }
	.form { grid-template-columns: minmax(0, 1fr); }
	.stats { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
	.stats li { padding: 22px 0; border-left: none; border-top: 1px solid var(--rule); }
	.stats li:first-child { padding-top: 0; border-top: none; }
	.stats li:last-child { padding-bottom: 0; }
	.stats .label { max-width: none; }
	.prose { font-size: 19px; }
	.about-photo { max-width: 360px; }
}
