/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
	--color-bg: #ffffff;
	--color-surface: rgb(59 130 246 / 10%);
	--color-border: #e3e6eb;
	--color-text: #111111;
	--color-muted: #5d6676;
	--color-primary: #0066b3;
	--color-primary-hover: #005999;
	--color-primary-soft: #e5f0f8;
	--color-on-primary: #ffffff;
	--color-hero: #101826;
	--color-on-hero: #ffffff;
	--color-gradient-from: #3b82f6;
	--color-gradient-to: #9333ea;

	--font-sans: Outfit, sans-serif;
	--radius: 10px;
	--radius-small: 6px;
	--shadow: 0 1px 2px rgb(16 24 38 / 6%), 0 4px 16px rgb(16 24 38 / 6%);
	--shadow-hover: 0 2px 4px rgb(16 24 38 / 8%), 0 12px 28px rgb(16 24 38 / 12%);
	--container: 1400px;
	--gutter: 16px;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-sans);
	font-size: 18px;
	line-height: 1.8;
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: var(--color-primary);
}

a:hover {
	color: var(--color-primary-hover);
}

h1,
h2,
h3 {
	line-height: 1.2;
	margin: 0 0 0.5em;
}

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

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

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	padding: 8px 16px;
	background: var(--color-primary);
	color: var(--color-on-primary);
}

.skip-link:focus {
	left: 8px;
	top: 8px;
}

.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.section {
	padding-top: 48px;
	padding-bottom: 48px;
}

.section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
}

.section__head h2 {
	margin: 0;
	font-size: 1.5rem;
}

/* ==========================================================================
   Buttons, chips, badges
   ========================================================================== */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px 20px;
	border: 1px solid var(--color-primary);
	border-radius: var(--radius-small);
	background: var(--color-primary);
	color: var(--color-on-primary);
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s;
}

.button:hover {
	background: var(--color-primary-hover);
	border-color: var(--color-primary-hover);
	color: var(--color-on-primary);
}

.button--ghost {
	background: transparent;
	color: inherit;
	border-color: currentColor;
}

.button--ghost:hover {
	background: rgb(127 127 127 / 12%);
	border-color: currentColor;
	color: inherit;
}

.button--block {
	width: 100%;
}

.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
}

.chips--header {
	margin-top: 20px;
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--color-primary-soft);
	color: var(--color-primary);
	font-size: 0.85rem;
	text-decoration: none;
}

a.chip:hover {
	background: var(--color-primary);
	color: var(--color-on-primary);
}

.chip--muted {
	background: var(--color-surface);
	color: var(--color-muted);
}

.chip--large {
	padding: 8px 14px;
	font-size: 0.95rem;
}

.chip__count {
	opacity: 0.7;
	font-size: 0.85em;
}

.badge {
	display: inline-block;
	margin-bottom: 8px;
	color: var(--color-primary);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* ==========================================================================
   Header & footer
   ========================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgb(255 255 255 / 92%);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 64px;
}

.site-brand {
	color: var(--color-text);
	font-size: 1.15rem;
	font-weight: 700;
	text-decoration: none;
}

.custom-logo-link {
	display: block;
}

.custom-logo {
	width: auto;
	height: 24px;
}

.site-nav .menu {
	display: flex;
	gap: 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav a {
	color: var(--color-text);
	font-weight: 500;
	text-decoration: none;
}

.site-nav a:hover,
.site-nav .current-menu-item > a {
	color: var(--color-primary);
}

.nav-toggle {
	display: none;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
	display: block;
	width: 22px;
	height: 2px;
	margin: 0 auto;
	background: var(--color-text);
	position: relative;
	transition: transform 0.2s;
}

.nav-toggle__bar::before,
.nav-toggle__bar::after {
	content: "";
	position: absolute;
	left: 0;
}

.nav-toggle__bar::before {
	top: -7px;
}

.nav-toggle__bar::after {
	top: 7px;
}

.site-footer {
	margin-top: 48px;
	padding: 32px 0;
	background: var(--color-surface);
	border-top: 1px solid var(--color-border);
	color: var(--color-muted);
	font-size: 0.9rem;
}

.site-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.site-footer p {
	margin: 0;
}

.back-to-top {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: linear-gradient(99deg, #0066b3, #00a5cf);
	color: #fff;
	box-shadow: 0 6px 16px rgb(0 102 179 / 30%);
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}

.back-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.back-to-top:hover,
.back-to-top:focus-visible {
	background: linear-gradient(99deg, #005999, #0090b5);
	color: #fff;
	transform: translateY(-2px);
}

@media (max-width: 720px) {
	.back-to-top {
		right: 16px;
		bottom: 16px;
		width: 44px;
		height: 44px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.back-to-top {
		transition: none;
	}
}

.footer-nav .menu {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-nav a {
	color: var(--color-muted);
}

/* ==========================================================================
   Hero & page header
   ========================================================================== */

.hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: min(calc(100vh - 64px), 900px);
	min-height: min(calc(100svh - 64px), 900px);
	padding: 96px 0;
	overflow: hidden;
	background:
		linear-gradient(to top, var(--color-bg), transparent 45%),
		linear-gradient(135deg, rgb(59 130 246 / 20%), rgb(22 163 74 / 20%), rgb(147 51 234 / 20%));
	text-align: center;
}

/* Subtle film grain, as on the reference design. */
.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	opacity: 0.04;
	pointer-events: none;
	mix-blend-mode: soft-light;
	background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero--has-image {
	background: var(--color-bg);
}

.hero__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

.hero__inner {
	position: relative;
}

.hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 24px;
	padding: 8px 16px;
	border: 1px solid rgb(59 130 246 / 20%);
	border-radius: 999px;
	color: var(--color-primary);
	font-size: 16px;
	font-weight: 500;
}

.hero__title {
	margin: 0 auto 24px;
	max-width: 960px;
	font-size: clamp(2.5rem, 1.6rem + 4vw, 4.5rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.hero__lead {
	max-width: 672px;
	margin: 0 auto 40px;
	color: var(--color-muted);
	font-size: clamp(1.125rem, 1rem + 0.4vw, 1.25rem);
	line-height: 1.65;
}

.hero__lead > :first-child {
	margin-top: 0;
}

.hero__lead > :last-child {
	margin-bottom: 0;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.hero .hero__actions {
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
}

@media (min-width: 640px) {
	.hero .hero__actions {
		flex-direction: row;
	}
}

.button--large {
	min-height: 44px;
	padding: 10px 32px;
	font-size: 20px;
	font-weight: 500;
	box-shadow: 0 1px 3px rgb(16 24 38 / 12%);
	transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
	background: linear-gradient(99deg, #0066b3, #00a5cf);
	border: 1px solid transparent; /* Reserves the hover border's space so the button doesn't grow. */
	border-radius: 8px;
}

.button--large:hover {
	border: 1px solid var(--color-border);
	background: var(--color-bg);
	color: var(--color-text);
}

.button--large:active {
	transform: scale(0.98);
}

.button--outline {
	border: 1px solid var(--color-border);
	background: var(--color-bg);
	color: var(--color-text);
}

.button--outline:hover {
	border-color: transparent;
	background: linear-gradient(99deg, #0066b3, #00a5cf);
	color: #fff;
}

.button__arrow {
	transition: transform 0.2s;
}

.button:hover .button__arrow {
	transform: translateX(4px);
}

/* Featured work */

.featured {
	padding: 96px 0;
}

.featured__head {
	max-width: 672px;
	margin: 0 auto 64px;
	text-align: center;
}

.featured__title {
	margin: 0 0 16px;
	font-size: clamp(30px, 20px + 2.5vw, 45px); /* 30px on phones, scaling up to 45px from 1000px wide. */
	font-weight: 700;
}

.featured__lead {
	margin: 0;
	color: var(--color-muted);
	font-size: 1.125rem;
}

.featured__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
}

@media (min-width: 768px) {
	.featured__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.featured__more {
	margin: 48px 0 0;
	text-align: center;
}

.feature-card {
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 10px 15px -3px rgb(0 0 0 / 10%), 0 4px 6px -4px rgb(0 0 0 / 10%);
	transition: box-shadow 0.5s;
}

.feature-card:hover,
.feature-card:focus-within {
	box-shadow: 0 25px 50px -12px rgb(0 0 0 / 25%);
}

.feature-card__link {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	color: #fff;
	text-decoration: none;
}

.feature-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center; /* Project images are full-page screenshots: show the top of the site. */
	transform-origin: top center;
	transition: transform 0.7s;
}

.feature-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--color-gradient-from), var(--color-gradient-to));
	font-size: 4rem;
	font-weight: 700;
}

.feature-card__link:hover .feature-card__image,
.feature-card__link:focus-visible .feature-card__image {
	transform: scale(1.1);
}

.feature-card__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-end;
	padding: 32px;
	background: linear-gradient(to top, rgb(0 0 0 / 80%), rgb(0 0 0 / 20%) 50%, transparent);
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.5s, transform 0.5s;
}

.feature-card__link:hover .feature-card__overlay,
.feature-card__link:focus-visible .feature-card__overlay {
	opacity: 1;
	transform: none;
}

/* Touch screens have no hover: always show the title. */
@media (hover: none) {
	.feature-card__overlay {
		opacity: 1;
		transform: none;
	}
}

.feature-card__badge {
	margin-bottom: 14px;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 500;
	background: #0066b3;
	color: #fff;
}

.feature-card__title {
	margin: 0;
	color: #fff;
	font-size: clamp(1.25rem, 1rem + 1vw, 1.5rem);
	font-weight: 700;
}

@media (max-width: 720px) {
	.hero {
		min-height: 0;
		padding: 72px 0 64px;
	}

	.featured {
		padding: 64px 0;
	}

	.featured__head {
		margin-bottom: 40px;
	}

	.feature-card__overlay {
		padding: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.feature-card__image,
	.feature-card__overlay,
	.button__arrow {
		transition: none;
	}
}

.page-header {
	padding: 48px 0 40px;
	background: var(--color-surface);
	border-bottom: 1px solid var(--color-border);
}

.page-header__eyebrow {
	margin: 0 0 8px;
	color: var(--color-primary);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.page-header__title {
	margin: 0;
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	letter-spacing: -0.01em;
}

.page-header__lead,
.page-header__description {
	margin: 8px 0 0;
	max-width: 720px;
	color: var(--color-muted);
}

.page-header .search-form {
	display: flex;
	gap: 8px;
	max-width: 480px;
	margin-top: 20px;
}

.back-link {
	display: inline-block;
	margin-bottom: 12px;
	font-size: 0.9rem;
	text-decoration: none;
}

/* ==========================================================================
   Filters
   ========================================================================== */

.filters {
	margin-bottom: 32px;
}

.filters__bar {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 8px;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.filters__menu {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.filters__trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 14px;
	border: 0;
	border-radius: var(--radius-small);
	background: transparent;
	color: var(--color-text);
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}

.filters__trigger:hover,
.filters__item.is-open .filters__trigger {
	background: var(--color-primary-soft);
	color: var(--color-primary);
}

.filters__chevron {
	flex: none;
	transition: transform 0.2s;
}

.filters__item.is-open .filters__chevron {
	transform: rotate(180deg);
}

/* Full-width panel: positioned against .filters__bar, so it spans the whole bar. */
.filters__panel {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 20;
	max-height: min(70vh, 560px);
	overflow-y: auto;
	padding: 24px;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-hover);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity 0.15s, transform 0.15s, visibility 0s 0.15s;
}

/* Bridge the gap above the panel so the pointer can move into it without it closing. */
.filters__panel::before {
	content: "";
	position: absolute;
	top: -9px;
	left: 0;
	right: 0;
	height: 9px;
}

.filters__item.is-open .filters__panel,
.filters:not(.has-js) .filters__item:focus-within .filters__panel {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity 0.15s, transform 0.15s, visibility 0s;
}

.filters__panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
}

.filters__panel-title {
	margin: 0;
	color: var(--color-muted);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.filters__terms {
	columns: 4 180px;
	column-gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.filters__terms li {
	break-inside: avoid;
}

.filters__terms a {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	padding: 4px 8px;
	border-radius: var(--radius-small);
	color: var(--color-text);
	font-size: 0.95rem;
	line-height: 1.5;
	text-decoration: none;
}

.filters__terms a:hover {
	background: var(--color-primary-soft);
	color: var(--color-primary);
}

.filters__terms a[aria-current] {
	background: var(--color-primary);
	color: var(--color-on-primary);
}

.filters__count {
	color: var(--color-muted);
	font-size: 0.89rem;
}

.filters__terms a[aria-current] .filters__count {
	color: inherit;
}

.filters__empty {
	margin: 0;
	color: var(--color-muted);
	font-size: 0.9rem;
}

.filters__panel--groups {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 24px;
}

.filters__panel--groups .filters__panel-title {
	margin-bottom: 8px;
}

.filters__panel--groups .filters__terms {
	columns: 1;
}

.filters input[type="search"],
.search-form input[type="search"] {
	width: 100%;
	height: 44px;
	padding: 8px 12px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-small);
	background: var(--color-bg);
	color: var(--color-text);
	font: inherit;
}

.filters input.filters__find {
	max-width: 280px;
	font-size: 0.9rem;
}

.filters__search {
	display: flex;
	flex: 0 1 360px;
	gap: 8px;
}

.filters__search .button {
	height: 44px;
}

.filters__chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
}

.filters__chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--color-primary-soft);
	color: var(--color-primary);
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
}

.filters__chip:hover {
	background: var(--color-primary);
	color: var(--color-on-primary);
}

.filters__reset {
	font-size: 0.85rem;
}

/* ==========================================================================
   Card grid
   ========================================================================== */

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

.card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
	box-shadow: var(--shadow-hover);
	transform: translateY(-2px);
}

.card__media {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--color-surface);
}

.card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
}

.card__placeholder {
	display: grid;
	place-items: center;
	height: 100%;
	color: var(--color-muted);
	font-size: 3rem;
	font-weight: 700;
}

.card__body {
	padding: 16px 20px 20px;
}

.card__title {
	margin: 0 0 4px;
	font-size: 20px;
}

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

.card__title a::after {
	/* Make the whole card clickable. */
	content: "";
	position: absolute;
	inset: 0;
}

.card {
	position: relative;
}

.card__meta {
	margin: 0;
	color: var(--color-muted);
	font-size: 0.9rem;
}

.empty-state {
	padding: 64px 16px;
	text-align: center;
}

.empty-state p {
	color: var(--color-muted);
}

/* Pagination */

.pagination {
	margin-top: 40px;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-small);
	color: var(--color-text);
	text-decoration: none;
}

.pagination .page-numbers.current {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: var(--color-on-primary);
}

.pagination a.page-numbers:hover {
	border-color: var(--color-primary);
	color: var(--color-primary);
}

/* ==========================================================================
   Single project
   ========================================================================== */

.project__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 40px;
	align-items: start;
}

.project__image {
	margin: 0 0 32px;
	overflow: hidden;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.project__image img {
	width: 100%;
}

.details {
	position: sticky;
	top: 88px;
	padding: 24px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
}

.details__heading {
	font-size: 1.1rem;
	margin-bottom: 16px;
}

.details__list {
	margin: 20px 0 0;
}

.details__row {
	padding: 12px 0;
	border-top: 1px solid var(--color-border);
}

.details__row dt {
	margin-bottom: 6px;
	color: var(--color-muted);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.details__row dd {
	margin: 0;
}

.project__nav {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding-top: 24px;
	border-top: 1px solid var(--color-border);
}

.project__nav a {
	text-decoration: none;
	font-weight: 600;
}

.project__nav-next {
	margin-left: auto;
	text-align: right;
}

.entry-content h2,
.entry-content h3 {
	margin-top: 1.75em;
}

.entry-content li + li {
	margin-top: 8px;
}

.entry-content > :first-child {
	margin-top: 0;
}

/* ==========================================================================
   Contact page
   ========================================================================== */

.contact {
	padding: 80px 0 96px;
}

.contact__head {
	max-width: 672px;
	margin: 0 auto 64px;
	text-align: center;
}

.contact__title {
	margin: 0 0 24px;
	font-size: clamp(2.25rem, 1.5rem + 3vw, 3.75rem);
	letter-spacing: -0.02em;
}

.contact__intro {
	margin: 0;
	color: var(--color-muted);
	font-size: 1.125rem;
	line-height: 1.65;
}

.contact__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 64px;
}

@media (min-width: 1024px) {
	.contact__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* Desktop: contact details on the left, form on the right. Phones keep the form first. */
	.contact__aside {
		order: -1;
	}
}

.contact__heading {
	margin: 0 0 32px;
	font-size: 1.5rem;
}

.contact__subheading {
	margin: 0 0 16px;
	font-size: 1.25rem;
}

.contact__muted {
	margin: 0;
	color: var(--color-muted);
}

.contact__notice {
	padding: 16px;
	border: 1px dashed var(--color-border);
	border-radius: var(--radius);
	color: var(--color-muted);
}

.contact__aside {
	display: flex;
	flex-direction: column;
	gap: 48px;
}

/* Form (Contact Form 7 markup) */

.contact-form {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.contact-form__field label {
	display: block;
	margin-bottom: 8px;
	font-size: 1.0rem;
	font-weight: 500;
}

.contact-form .wpcf7-form-control-wrap {
	display: block;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-small);
	background: var(--color-bg);
	color: var(--color-text);
	font: inherit;
	font-size: 1rem;
	box-shadow: 0 1px 2px rgb(16 24 38 / 5%);
	transition: border-color 0.15s, box-shadow 0.15s;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"] {
	height: 44px;
}

.contact-form textarea {
	height: 160px;
	min-height: 100px;
	resize: vertical;
}

.contact-form ::placeholder {
	color: var(--color-muted);
	opacity: 0.8;
}

.contact-form input:focus,
.contact-form textarea:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.contact-form .contact-form__submit {
	width: 100%;
	padding-left: 44px;
	--send-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z'/%3E%3Cpath d='m21.854 2.147-10.94 10.939'/%3E%3C/svg%3E");
	background-image: var(--send-icon), linear-gradient(99deg, #0066b3, #00a5cf);
	background-repeat: no-repeat;
	background-position: calc(50% - 80px) center, 0 0;
}

/* The send icon is white, so this button keeps a (darker) gradient on hover. */
.contact-form .contact-form__submit:hover {
	border-color: transparent;
	background-image: var(--send-icon), linear-gradient(99deg, #005999, #0090b5);
	color: #fff;
}

.contact-form .wpcf7-spinner {
	display: none;
	margin: 12px auto 0;
}

.contact-form.submitting .wpcf7-spinner {
	display: block;
}

.contact-form .wpcf7-not-valid-tip {
	margin-top: 6px;
	color: #c62828;
	font-size: 0.85rem;
}

.contact-form .wpcf7-not-valid {
	border-color: #c62828;
}

.wpcf7 form .wpcf7-response-output {
	margin: 24px 0 0;
	padding: 12px 16px;
	border-radius: var(--radius-small);
	font-size: 0.9rem;
}

/* Contact details */

.contact-cards {
	display: flex;
	flex-direction: column;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.contact-card {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 16px;
	border-radius: 12px;
	background: rgb(243 244 246 / 60%);
	color: var(--color-text);
	text-decoration: none;
	transition: background-color 0.2s;
}

a.contact-card:hover {
	background: var(--color-surface);
	color: var(--color-text);
}

.contact-card__icon {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 8px;
	background: rgb(59 130 246 / 10%);
	color: var(--color-primary);
}

.contact-card__label {
	display: block;
	margin-bottom: 4px;
	color: var(--color-muted);
	font-size: 1.0rem;
	font-weight: 500;
}

.contact-card__value {
	display: block;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.social-links {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
}

.social-links__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--color-text);
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
	transition: color 0.3s;
}

.social-links__link--instagram:hover { color: #e4405f; }
.social-links__link--twitter:hover { color: #1da1f2; }
.social-links__link--linkedin:hover { color: #0077b5; }
.social-links__link--dribbble:hover { color: #ea4c89; }
.social-links__link--facebook:hover { color: #1877f2; }
.social-links__link--github:hover { color: #6e5494; }
.social-links__link--youtube:hover { color: #ff0000; }

.contact-note {
	padding: 24px;
	border: 1px solid rgb(59 130 246 / 20%);
	border-radius: 16px;
	background: linear-gradient(135deg, rgb(59 130 246 / 10%), rgb(22 163 74 / 5%), rgb(147 51 234 / 10%));
}

.contact-note__title {
	margin: 0 0 8px;
	font-size: 1.125rem;
}

@media (max-width: 720px) {
	.contact {
		padding: 48px 0 64px;
	}

	.contact__head {
		margin-bottom: 40px;
	}

	.contact__grid,
	.contact__aside {
		gap: 48px;
	}
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
	.grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.filters__bar {
		flex-direction: column;
		align-items: stretch;
	}

	.filters__search {
		flex-basis: auto;
	}

	.project__layout {
		grid-template-columns: 1fr;
	}

	.details {
		position: static;
	}
}

@media (max-width: 720px) {
	.nav-toggle {
		display: block;
	}

	.site-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		padding: 8px var(--gutter) 16px;
		background: var(--color-bg);
		border-bottom: 1px solid var(--color-border);
	}

	.site-nav.is-open {
		display: block;
	}

	.site-nav .menu {
		flex-direction: column;
		gap: 0;
	}

	.site-nav .menu a {
		display: block;
		padding: 10px 0;
	}

	.grid {
		grid-template-columns: 1fr;
	}

	/* Phones: panels open in place under their trigger, like an accordion. */
	.filters__menu {
		flex-direction: column;
	}

	.filters__trigger {
		width: 100%;
	}

	.filters__chevron {
		margin-left: auto;
	}

	.filters__panel {
		position: static;
		display: none;
		max-height: 50vh;
		margin: 4px 0 8px;
		padding: 16px;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.filters__panel::before {
		display: none;
	}

	.filters__item.is-open .filters__panel,
	.filters:not(.has-js) .filters__item:focus-within .filters__panel {
		display: block;
	}

	.filters__panel--groups.filters__panel {
		grid-template-columns: 1fr;
	}

	.filters__item.is-open .filters__panel--groups,
	.filters:not(.has-js) .filters__item:focus-within .filters__panel--groups {
		display: grid;
	}

	.filters__panel-head {
		flex-direction: column;
		align-items: stretch;
	}

	.filters input.filters__find {
		max-width: none;
	}

	.project__nav {
		flex-direction: column;
	}

	.project__nav-next {
		margin-left: 0;
		text-align: left;
	}
}
