:root {
	--raph-font: Inter, system-ui, sans-serif;
	--raph-ink: #1f1f1f;
	--raph-muted: #4a4a4a;
	--raph-soft: #808080;
	--raph-line: rgba(31, 31, 31, 0.06);
	--raph-max: 1600px;
	--raph-pad-x: 32px;
	--raph-pad-title-top: 80px; /* same air as home hero bottom */
	--raph-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--raphbatte-font: var(--raph-font);
}

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

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

body {
	margin: 0;
	font-family: var(--raph-font);
	font-size: 16px;
	line-height: 24px;
	letter-spacing: normal;
	color: var(--raph-ink);
	background: #fff;
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: inherit;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ——— Header ——— */
.raph-header {
	position: sticky;
	top: 0;
	z-index: 100;
	transition: transform 0.45s var(--raph-ease);
	will-change: transform;
}

.raph-header::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(255, 255, 255, 0.72);
	backdrop-filter: blur(16px) saturate(1.2);
	-webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.raph-header--hidden {
	transform: translateY(-110%);
}

.raph-header__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	width: 100%;
	max-width: var(--raph-max);
	margin: 0 auto;
	padding: 16px var(--raph-pad-x);
	min-height: 88px;
}

.raph-header__logo {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex-shrink: 0;
	width: 60px;
	height: 60px;
	text-decoration: none;
}

.raph-header__logo img {
	display: block;
	width: auto;
	height: 60px;
	margin: 0;
}

/* Single trailing cluster: logo | …… | (nav + Contact [+ burger]) */
.raph-header__end {
	display: flex;
	align-items: center;
	gap: 24px;
	flex-shrink: 0;
	margin-left: auto;
}

.raph-header__actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	flex-shrink: 0;
}

.raph-header__contact {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 24px;
	font-size: 16px;
	font-weight: 500;
	line-height: 24px;
	text-decoration: none;
	color: #fff;
	background: #1f1f1f;
	border-radius: 999px;
	white-space: nowrap;
}

.raph-header__contact:hover {
	background: #000;
}

.raph-header__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	cursor: pointer;
	color: #1f1f1f;
}

.raph-header__toggle-box {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 18px;
}

.raph-header__toggle-bar {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
	transition: transform 0.35s var(--raph-ease), opacity 0.25s var(--raph-ease);
	transform-origin: center;
}

.raph-nav--desktop {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}

.raph-nav__list {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.raph-nav__link {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 16px;
	font-size: 16px;
	font-weight: 500;
	line-height: 24px;
	text-decoration: none;
	color: inherit;
}

.raph-nav__link::after {
	content: '';
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: 12px;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.45s var(--raph-ease);
}

.raph-nav__link:hover::after,
.raph-nav__link:focus-visible::after,
.raph-nav__link.is-current::after {
	transform: scaleX(1);
}

/* Shared tag links → /work/#filter/{slug} */
.raph-tag,
.raph-tag__sep {
	font-size: inherit;
	font-weight: 400;
	line-height: inherit;
	color: var(--raph-soft);
	text-decoration: none;
}

.raph-tag__sep {
	white-space: pre;
}

.raph-tag {
	position: relative;
	cursor: pointer;
}

.raph-tag::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.45s var(--raph-ease);
}

.raph-tag:hover::after,
.raph-tag:focus-visible::after,
.raph-tag.is-active::after {
	transform: scaleX(1);
}

.raph-mobile-nav {
	display: none;
}

.raph-mobile-nav[hidden] {
	display: none !important;
}

@media (max-width: 899px) {
	.raph-header {
		z-index: 220;
	}

	.raph-header__toggle {
		display: inline-flex;
	}

	.raph-nav--desktop {
		display: none;
	}

	/* Open: same header chrome on dark panel (logo | Contact + X) */
	body.raph-nav-open .raph-header::before {
		background: #131212;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
	}

	body.raph-nav-open .raph-header__contact {
		color: #131212;
		background: #fff;
	}

	body.raph-nav-open .raph-header__contact:hover {
		background: #f0f0f0;
	}

	body.raph-nav-open .raph-header__toggle {
		color: #fff;
	}

	body.raph-nav-open .raph-header__logo img {
		filter: invert(1);
	}

	body.raph-nav-open .raph-header__toggle-bar:first-child {
		transform: translateY(4px) rotate(45deg);
	}

	body.raph-nav-open .raph-header__toggle-bar:last-child {
		transform: translateY(-4px) rotate(-45deg);
	}

	.raph-mobile-nav:not([hidden]) {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 210;
		padding: 88px var(--raph-pad-x) 48px;
		background: #131212;
		color: #fff;
		overflow: auto;
		box-sizing: border-box;
	}

	.raph-mobile-nav__inner {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		gap: 48px;
		min-height: calc(100vh - 88px - 48px);
		max-width: var(--raph-max);
		margin: 0 auto;
	}

	.raph-nav--mobile {
		display: block;
		margin: 0;
		padding-top: 24px;
	}

	.raph-nav--mobile .raph-nav__list {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}

	.raph-nav--mobile .raph-nav__item {
		width: 100%;
	}

	.raph-nav--mobile .raph-nav__link {
		justify-content: flex-start;
		min-height: 56px;
		padding: 8px 0;
		font-size: 40px;
		font-weight: 500;
		line-height: 1.15;
		color: #fff;
	}

	.raph-nav--mobile .raph-nav__link::after {
		display: none;
	}

	.raph-nav--mobile .raph-nav__link.is-current,
	.raph-nav--mobile .raph-nav__link:hover,
	.raph-nav--mobile .raph-nav__link:focus-visible {
		color: #fff;
		opacity: 1;
	}

	.raph-mobile-nav__meta {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
		padding-bottom: 8px;
	}

	.raph-mobile-nav__meta-link {
		font-size: 16px;
		font-weight: 500;
		line-height: 24px;
		color: #fff;
		text-decoration: underline;
		text-underline-offset: 3px;
	}
}

@media (max-width: 767px) {
	:root {
		--raph-pad-x: 24px;
		--raph-pad-title-top: 96px;
	}

	.raph-header__inner {
		padding: 12px var(--raph-pad-x);
		min-height: 72px;
	}

	.raph-header__logo {
		width: 40px;
		height: 40px;
	}

	.raph-header__logo img {
		width: auto;
		height: 40px;
	}

	.raph-header__contact {
		min-height: 36px;
		padding: 0 16px;
		font-size: 14px;
	}

	.raph-header__toggle {
		width: 36px;
		height: 36px;
	}

	.raph-mobile-nav:not([hidden]) {
		padding-top: 72px;
	}

	.raph-mobile-nav__inner {
		min-height: calc(100vh - 72px - 48px);
	}

	.raph-nav--mobile .raph-nav__link {
		font-size: 36px;
		min-height: 48px;
	}
}

/* ——— Footer ——— */
.raph-footer {
	width: 100%;
	min-height: 528px;
	padding: 160px 96px 96px;
	margin: 0;
	background: #131212;
	color: #fff;
}

.raph-footer__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 1400px;
	margin: 0 auto;
	width: 100%;
}

.raph-footer__title {
	margin: 0;
	font-size: 48px;
	font-weight: 500;
	line-height: 1.12;
	text-align: center;
}

.raph-footer__title-line {
	display: block;
	white-space: nowrap;
}

.raph-footer__buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin: 48px 0 0;
	padding: 0;
}

.raph-footer__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 60px;
	padding: 16px 44px;
	border: 1px solid #fff;
	border-radius: 48px;
	color: #fff;
	text-decoration: none;
	font-size: 16px;
	line-height: 24px;
	transition: background-color 0.2s ease;
}

.raph-footer__btn:hover {
	background: rgba(255, 255, 255, 0.1);
}

.raph-footer__legal {
	margin: 96px 0 0;
	font-size: 12px;
	line-height: 16px;
	color: #969696;
	text-align: center;
}

@media (max-width: 1024px) {
	.raph-footer {
		min-height: 0;
		padding: 120px 48px 72px;
	}
}

@media (max-width: 767px) {
	.raph-footer {
		padding: 80px 24px 56px;
	}

	.raph-footer__title {
		font-size: 32px;
	}

	.raph-footer__title-line {
		white-space: normal;
	}
}

/* ——— Generic page ——— */
.raph-page {
	padding: var(--raph-pad-title-top) var(--raph-pad-x) 128px;
}

.raph-page__inner {
	max-width: 800px;
	margin: 0 auto;
}

.raph-page__title {
	margin: 0 0 32px;
	font-size: 40px;
	font-weight: 500;
	line-height: 48px;
}

.raph-page__hero-media {
	margin: 0 0 32px;
}

.raph-page__hero-media img {
	width: 100%;
	height: auto;
}

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

.raph-page__content > *:first-child {
	margin-top: 0;
}

.raph-page--portfolio .raph-page__inner {
	max-width: 1120px;
}
