/* Palet: klei en natuurlijke materialen */
:root {
	--linen: #9f9b95;
	--ink: #2b2521;
	--umber: #4b3b31;
	--stone: #3d3530;
	--clay: #b5654a;
	--sage: #8f9b8b;
}

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

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

body {
	background: var(--linen);
	color: var(--ink);
	font-family: 'Jost', system-ui, sans-serif;
	font-weight: 300;
	line-height: 1.7;
	min-height: 100vh;
	overflow-x: hidden;
}

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

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

/* ---------- Hamburger menu ---------- */

.menu-toggle {
	position: fixed;
	top: 1.25rem;
	right: 1.25rem;
	z-index: 20;
	width: 44px;
	height: 44px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 7px;
	background: none;
	border: 0;
	color: var(--ink);
	cursor: pointer;
}

.menu-toggle span {
	display: block;
	width: 24px;
	height: 1px;
	background: currentColor;
	transition: transform 0.4s ease, opacity 0.3s ease;
}

body.is-home .menu-toggle {
	color: var(--linen);
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

body.menu-open .menu-toggle {
	color: var(--ink);
	text-shadow: none;
}

body.menu-open .menu-toggle span:first-child {
	transform: translateY(4px) rotate(45deg);
}

body.menu-open .menu-toggle span:last-child {
	transform: translateY(-4px) rotate(-45deg);
}

.menu {
	position: fixed;
	inset: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--linen);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.4s ease, visibility 0.4s ease;
}

body.menu-open .menu {
	opacity: 1;
	visibility: visible;
}

body.menu-open {
	overflow: hidden;
}

.menu ul {
	list-style: none;
	display: grid;
	gap: 1.25rem;
	text-align: center;
}

.menu a {
	font-family: 'Cormorant Garamond', serif;
	font-size: clamp(2rem, 6vw, 3rem);
	font-weight: 400;
	letter-spacing: 0.02em;
	transition: color 0.3s ease;
}

.menu a:hover,
.menu a[aria-current='page'] {
	color: var(--ink);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

/* ---------- Home ---------- */

body.is-home {
	background: #1b1a19;
	min-height: 0;
}

/* Home: subtiele header in plaats van het hamburgermenu */
body.is-home .menu-toggle,
body.is-home .menu {
	display: none;
}

.home-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 5;
	padding: 1.75rem 1.5rem;
}

.home-header nav {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.6rem clamp(1.25rem, 4vw, 2.5rem);
}

.home-header a {
	font-size: 0.7rem;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	color: var(--linen);
	opacity: 0.75;
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
	transition: opacity 0.3s ease;
}

.home-header a:hover,
.home-header a[aria-current='page'] {
	opacity: 1;
}

/* Op de overige pagina's staat de header op de grijze achtergrond */
body:not(.is-home) .home-header a {
	color: var(--ink);
	text-shadow: none;
}

.home {
	position: fixed;
	inset: 0;
	overflow: hidden;
	background: #1b1a19;
}

.home img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 40%;
}

.home::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(20, 16, 14, 0.55), rgba(20, 16, 14, 0) 45%);
}

.home-name {
	position: absolute;
	left: 0;
	right: 0;
	bottom: clamp(2rem, 7vh, 4.5rem);
	z-index: 1;
	text-align: center;
	color: var(--linen);
	padding: 0 1.5rem;
}

.home-name h1 {
	font-family: 'Cormorant Garamond', serif;
	font-style: italic;
	font-weight: 400;
	font-size: clamp(2.75rem, 8vw, 6rem);
	line-height: 1;
	letter-spacing: 0.02em;
}

.home-name p {
	margin-top: 0.9rem;
	font-size: 0.7rem;
	letter-spacing: 0.35em;
	text-transform: uppercase;
	opacity: 0.85;
}

/* ---------- Shared pagina-opbouw ---------- */

.page {
	max-width: 1200px;
	margin: 0 auto;
	padding: 7rem 1.5rem 6rem;
}

.page-title {
	font-family: 'Cormorant Garamond', serif;
	font-weight: 400;
	font-size: clamp(2.5rem, 6vw, 4rem);
	line-height: 1.1;
	margin-bottom: 3rem;
}

.eyebrow {
	font-size: 0.72rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--stone);
}

/* ---------- Portfolio grid ---------- */

.grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 3.5rem 2rem;
}

@media (min-width: 700px) {
	.grid {
		grid-template-columns: 1fr 1fr;
		gap: 4rem 3rem;
	}
}

.card {
	display: block;
	overflow: hidden;
}

.card img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1), filter 0.6s ease;
}

.card:hover img {
	transform: scale(1.03);
	filter: blur(3px) brightness(0.75);
}

.card:focus-visible {
	outline: 1px solid var(--umber);
	outline-offset: 8px;
}

.card-title {
	display: inline-block;
	font-family: 'Cormorant Garamond', serif;
	font-size: 1.7rem;
	line-height: 1.2;
	margin-top: 1rem;
}

.card-meta {
	margin-top: 0.3rem;
}

/* Hover over de foto: die wordt wazig en "View this work" komt eroverheen, met een met de hand getekende lijn die links naar rechts verschijnt */
.card-media {
	position: relative;
	overflow: hidden;
}

.card-view {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	padding-bottom: 0.7rem;
	white-space: nowrap;
	font-size: 0.75rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: #f5f3ef;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
	opacity: 0;
	transition: opacity 0.6s ease;
}

.card-line {
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 8px;
	overflow: visible;
}

.card-line path {
	fill: none;
	stroke: #f5f3ef;
	stroke-width: 1.2;
	stroke-linecap: round;
	vector-effect: non-scaling-stroke;
	stroke-dasharray: 100;
	stroke-dashoffset: 100;
	transition: stroke-dashoffset 1.1s cubic-bezier(0.65, 0, 0.35, 1) 0.25s;
}

.card:hover .card-view,
.card:focus-visible .card-view {
	opacity: 1;
}

.card:hover .card-line path,
.card:focus-visible .card-line path {
	stroke-dashoffset: 0;
}

/* ---------- Project ---------- */

.back {
	display: inline-block;
	font-size: 0.72rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--stone);
	transition: color 0.3s ease;
}

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

.project-head {
	max-width: 1200px;
	margin: 0 auto;
	padding: 7rem 1.5rem 3rem;
}

.project-head h1 {
	font-family: 'Cormorant Garamond', serif;
	font-weight: 400;
	font-size: clamp(2.75rem, 7vw, 5rem);
	line-height: 1.05;
	margin-top: 1.5rem;
}

.project-head .eyebrow {
	margin-top: 0.75rem;
}

.project-text {
	max-width: 560px;
	margin-top: 1.5rem;
	color: var(--umber);
}

/* Foto's naast elkaar: horizontaal scrollen (telefoon) */
.gallery {
	display: flex;
	gap: clamp(1.5rem, 4vw, 3rem);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	padding: 0 1.5rem 6rem;
	scroll-padding-inline: 1.5rem;
}

.gallery figure {
	flex: 0 0 auto;
	scroll-snap-align: start;
}

.gallery img {
	height: min(70vh, 720px);
	width: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

.gallery figure:last-child {
	padding-right: 1.5rem;
}

/* Telefoon: kleinere foto's, zodat de volgende foto er een beetje naast te zien is */
@media (max-width: 899px) {
	.gallery img {
		width: 70vw;
		height: auto;
		max-width: 480px;
	}
}

/* Eén foto: gecentreerd */
.gallery:has(> figure:only-child) {
	justify-content: center;
}

.gallery:has(> figure:only-child) figure:last-child {
	padding-right: 0;
}

.gallery-wrap {
	display: flex;
	align-items: center;
}

.stage {
	flex: 1 1 auto;
	min-width: 0;
}

.gallery-arrow {
	display: none;
}

/* Laptop: hoofdfoto in het midden, buurfoto's klein en wazig ernaast; de rij schuift mee */
@media (min-width: 900px) {
	.gallery-wrap {
		gap: clamp(0.5rem, 1.5vw, 1.25rem);
		padding: 0 6vw 6rem;
	}

	.stage {
		overflow: hidden;
		height: min(70vh, 720px);
	}

	.gallery {
		position: relative;
		display: flex;
		align-items: center;
		gap: clamp(2rem, 5vw, 4.5rem);
		height: min(70vh, 720px);
		padding: 0;
		overflow: visible;
		scroll-snap-type: none;
		will-change: transform;
		transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1);
	}

	.gallery figure {
		flex: 0 0 auto;
		margin: 0;
		padding: 0;
		opacity: 0.3;
		filter: blur(3px);
		transform: scale(0.72);
		transition: opacity 0.9s cubic-bezier(0.65, 0, 0.35, 1), filter 0.9s cubic-bezier(0.65, 0, 0.35, 1), transform 0.9s cubic-bezier(0.65, 0, 0.35, 1);
	}

	.gallery figure:last-child {
		padding-right: 0;
	}

	.gallery figure.is-before {
		transform: scale(0.72) rotate(-4deg);
	}

	.gallery figure.is-after {
		transform: scale(0.72) rotate(4deg);
	}

	.gallery figure.is-active {
		opacity: 1;
		filter: none;
		transform: none;
	}

	.gallery-arrow {
		display: grid;
		place-items: center;
		flex: 0 0 auto;
		width: 56px;
		height: 56px;
		background: none;
		border: 0;
		color: var(--ink);
		cursor: pointer;
		opacity: 0.7;
		transition: opacity 0.3s ease;
	}

	.gallery-arrow:hover {
		opacity: 1;
	}

	.gallery-arrow svg {
		width: 40px;
		height: 16px;
		fill: none;
		stroke: currentColor;
		stroke-width: 1;
	}
}

/* ---------- About ---------- */

.about {
	max-width: 1000px;
	margin: 0 auto;
	padding: 7rem 1.5rem 6rem;
	display: grid;
	gap: 3rem;
}

.about img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

.about h1 {
	font-family: 'Cormorant Garamond', serif;
	font-weight: 400;
	font-size: clamp(2.5rem, 6vw, 4rem);
	line-height: 1.1;
	margin-bottom: 1.5rem;
}

.about p + p {
	margin-top: 1rem;
}

.about-text {
	color: var(--umber);
}

@media (min-width: 800px) {
	.about {
		grid-template-columns: 1fr 1.1fr;
		align-items: center;
		gap: 5rem;
	}
}

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

.contact {
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	max-width: 1000px;
	margin: 0 auto;
	padding: 6rem 1.5rem;
}

.contact h1 {
	font-family: 'Cormorant Garamond', serif;
	font-weight: 400;
	font-size: clamp(2.5rem, 6vw, 4rem);
	line-height: 1.1;
	margin-bottom: 2.5rem;
}

.contact-link {
	font-family: 'Cormorant Garamond', serif;
	font-size: clamp(1.6rem, 4vw, 2.4rem);
	border-bottom: 1px solid var(--stone);
	padding-bottom: 0.2rem;
	transition: color 0.3s ease, border-color 0.3s ease;
}

.contact-link:hover {
	color: var(--ink);
	border-color: var(--ink);
}

/* Contact en projecttekst */
.contact-text {
	margin-bottom: 1.5rem;
	color: var(--umber);
}

.contact p + .contact-link,
.contact-text + .contact-link {
	margin-bottom: 1.5rem;
}

.project-text a,
.contact-text a {
	border-bottom: 1px solid currentColor;
}

/* Contactregel onder de foto's */
.project-contact {
	padding: 0 1.5rem 6rem;
	text-align: center;
	color: var(--umber);
}

.project-contact a {
	border-bottom: 1px solid currentColor;
}
