/* Inter (text) and Libre Baskerville (only the name Happy Hacks, as in its own app), local;
   from Google Fonts, SIL Open Font License. */

@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 300 600;
	font-display: swap;
	src: url(/fonts/inter-normal-latin-ext.woff2) format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 300 600;
	font-display: swap;
	src: url(/fonts/inter-normal-latin.woff2) format('woff2');
	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;
}
@font-face {
	font-family: 'Libre Baskerville';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url(/fonts/libre-baskerville-normal-latin-ext.woff2) format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Libre Baskerville';
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url(/fonts/libre-baskerville-normal-latin.woff2) format('woff2');
	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;
}

:root {
	/* Fragmented */
	--color-ground: #FFFFFF;
	--color-surface: #F7F7F5;
	--color-text: #141414;
	--color-muted: #5C5C5A;
	--color-line: #E6E6E3;
	--color-accent: #D23A1E;
	--color-accent-text: #FFFFFF;
	--color-placeholder: #FFF2B8;

	--color-band: #F0F0EE;
	--color-shadow: rgba(20, 20, 20, 0.35);
	--color-shadow-line: rgba(20, 20, 20, 0.08);

	--font-text: 'Inter', system-ui, sans-serif;
	--font-hh: 'Libre Baskerville', Georgia, serif;

	--size-body: 1.0625rem;
	--size-small: 0.875rem;
	--size-h1: clamp(2.25rem, 1.4rem + 4vw, 4rem);
	--size-h2: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);
	--size-lead: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);

	--wrap: 1080px;
	--gutter: 16px;
	--section: clamp(64px, 10vw, 128px);
	--radius: 12px;
}

@media (min-width: 720px) {
	:root {
		--gutter: 40px;
	}
}

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

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

body {
	margin: 0;
	background: var(--color-ground);
	color: var(--color-text);
	font-family: var(--font-text);
	font-size: var(--size-body);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

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

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

a:focus-visible,
.button:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 3px;
	border-radius: 2px;
}

h1,
h2,
h3 {
	margin: 0;
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

p {
	margin: 0 0 1em;
}

figure {
	margin: 0;
}

.wrap {
	max-width: calc(var(--wrap) + 2 * var(--gutter));
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.skip {
	position: absolute;
	left: var(--gutter);
	top: -100px;
	padding: 8px 12px;
	background: var(--color-surface);
	border-radius: 6px;
}

.skip:focus {
	top: 8px;
}

/* placeholder for company details that are still missing (LLM/TODO.md) */
.placeholder {
	background: var(--color-placeholder);
	padding: 0 4px;
	border-radius: 3px;
}

/* header */

.header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	padding-top: 24px;
	padding-bottom: 24px;
}

/* phone: logo and language switch on the first line, the menu below; from 720px all on one line */
.header .logo {
	flex: 1;
}

.header .nav {
	order: 3;
	flex-basis: 100%;
}

@media (min-width: 720px) {
	.header .nav {
		order: 0;
		flex-basis: auto;
	}
}

.logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 1.1875rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	text-decoration: none;
}

.logo__mark {
	width: 24px;
	height: 24px;
	color: var(--color-accent);
}

.nav {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
	font-size: var(--size-small);
}

.nav a {
	color: var(--color-muted);
	text-decoration: none;
}

.nav a:hover,
.nav a[aria-current] {
	color: var(--color-text);
}

.header__lang {
	color: var(--color-muted);
	font-size: var(--size-small);
	font-weight: 600;
	text-decoration: none;
}

.header__lang:hover {
	color: var(--color-text);
}

/* home: intro */

.hero {
	padding-top: clamp(48px, 9vw, 120px);
	padding-bottom: var(--section);
}

/* a page that starts with the intro and goes on with text blocks (Westerdijk 52) */
.hero + .split {
	padding-top: 0;
}

.hero h1 {
	max-width: 13em;
	font-size: var(--size-h1);
}

.lead {
	max-width: 34em;
	margin-top: 24px;
	color: var(--color-muted);
	font-size: var(--size-lead);
	line-height: 1.55;
}

/* home: Happy Hacks */

.product {
	padding: var(--section) 0;
	background: var(--color-band);
}

.product__text {
	max-width: 36em;
}

.eyebrow {
	margin-bottom: 12px;
	color: var(--color-accent);
	font-size: var(--size-small);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.product__name {
	margin-bottom: 20px;
	font-family: var(--font-hh);
	font-size: var(--size-h2);
	font-weight: 400;
	letter-spacing: 0;
}

.facts {
	margin: 24px 0 32px;
	padding: 0;
	list-style: none;
}

.facts li {
	position: relative;
	padding-left: 22px;
	margin-bottom: 8px;
}

.facts li::before {
	content: '';
	position: absolute;
	left: 2px;
	top: 0.62em;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--color-accent);
}

.button {
	display: inline-block;
	padding: 12px 22px;
	border-radius: 999px;
	background: var(--color-text);
	color: var(--color-accent-text);
	font-weight: 500;
	text-decoration: none;
}

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

/* the screenshots: a row that scrolls sideways on a phone, three in a row from 720px */
.phones {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: min(68vw, 260px);
	gap: 16px;
	margin: 48px calc(-1 * var(--gutter)) 0;
	padding: 8px var(--gutter) 24px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding: 0 var(--gutter);
	list-style: none;
}

.phones li {
	scroll-snap-align: start;
}

/* the screenshot has the app's own rounded corners (40px on 390×844); the same radius in % hides them */
.phones img {
	border-radius: 10.4% / 4.8%;
	box-shadow: 0 0 0 1px var(--color-shadow-line), 0 18px 40px -18px var(--color-shadow);
	background: var(--color-surface);
}

.phones figcaption {
	margin-top: 14px;
	color: var(--color-muted);
	font-size: var(--size-small);
	text-align: center;
}

@media (min-width: 720px) {
	.phones {
		grid-auto-flow: row;
		grid-template-columns: repeat(3, minmax(0, 280px));
		justify-content: center;
		gap: clamp(20px, 4vw, 48px);
		margin: 64px 0 0;
		padding: 0;
		overflow: visible;
	}

	.phones li:nth-child(2) {
		transform: translateY(-24px);
	}
}

/* home: other projects */

.projects {
	padding-top: var(--section);
}

.projects h2 {
	margin-bottom: 32px;
	font-size: var(--size-h2);
}

.projects__list {
	display: grid;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 720px) {
	.projects__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
	}
}

.project {
	display: flex;
	flex-direction: column;
	padding: 28px;
	border: 1px solid var(--color-line);
	border-radius: var(--radius);
	background: var(--color-surface);
}

.project__eyebrow {
	margin-bottom: 8px;
	color: var(--color-accent);
	font-size: var(--size-small);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.project__name {
	margin-bottom: 12px;
	font-size: 1.375rem;
}

.project__link {
	margin-top: auto;
	color: var(--color-accent);
	font-weight: 500;
	text-decoration: none;
}

.project__link:hover {
	text-decoration: underline;
}

/* home: about and contact */

.split {
	display: grid;
	gap: 16px 48px;
	padding-top: var(--section);
}

.split h2 {
	font-size: var(--size-h2);
}

.split__body {
	max-width: 36em;
}

@media (min-width: 720px) {
	.split {
		grid-template-columns: 1fr 2fr;
	}
}

.contact {
	padding-bottom: var(--section);
}

.contact__mail {
	font-size: var(--size-lead);
	font-weight: 500;
}

.muted {
	color: var(--color-muted);
}

/* footer */

.footer {
	padding: 40px 0 48px;
	border-top: 1px solid var(--color-line);
	color: var(--color-muted);
	font-size: var(--size-small);
}

.footer__inner {
	display: grid;
	gap: 16px 48px;
}

.footer p {
	margin: 0;
}

.footer__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
}

@media (min-width: 720px) {
	.footer__inner {
		grid-template-columns: 1fr auto;
		align-items: start;
	}
}

/* privacy statement and other text pages */

.text-page {
	max-width: calc(40em + 2 * var(--gutter));
	padding-top: clamp(32px, 6vw, 72px);
	padding-bottom: var(--section);
}

.text-page h1 {
	margin-bottom: 8px;
	font-size: var(--size-h2);
}

.text-page h2 {
	margin: 40px 0 12px;
	font-size: 1.25rem;
	letter-spacing: -0.01em;
}

.text-page ul {
	margin: 0 0 1em;
	padding-left: 1.2em;
}

.text-page li {
	margin-bottom: 6px;
}

.updated {
	color: var(--color-muted);
	font-size: var(--size-small);
}

.address {
	font-size: var(--size-lead);
	line-height: 1.5;
}
