/* Small extras that theme.json can't express. */

/* Header, main and footer sit flush against each other. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* Header: logo left, nav centred on the page. */
.wp-block-group.site-header {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
}
.site-header__nav .wp-block-navigation-item__content {
	text-decoration: underline;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 0.3em;
	text-decoration-color: transparent;
	transition: text-decoration-color 0.2s ease;
}
.site-header__nav .wp-block-navigation-item__content:hover,
.site-header__nav .wp-block-navigation-item__content:focus-visible {
	text-decoration-color: currentColor;
}
.site-header__logo,
.site-header__logo a,
.site-header__logo img {
	display: block;
	margin: 0;
}

/* Hero: Montserrat Light with Lora Italic emphasis */
.hero__title {
	line-height: 1.3;
}
.hero__title em {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.079em; /* 82px against the 76px heading */
	font-weight: 400;
	line-height: 1.1;
}

/* Project cards */
.project-card .wp-block-post-featured-image {
	overflow: hidden;
	margin: 0;
}
.project-card .wp-block-post-featured-image img {
	transition: transform 0.4s ease;
}
.project-card:hover .wp-block-post-featured-image img {
	transform: scale(1.03);
}
.project-card__title {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 400;
	line-height: 1.5;
}
.project-card__title a {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--10);
	text-decoration: none;
	border-bottom: 1.5px solid var(--wp--preset--color--border);
}
.project-card__title a::after {
	content: "";
	flex: none;
	width: 21px;
	height: 21px;
	background: url("../images/icon-arrow-outward.svg") center / contain no-repeat;
}

/* Case study */
.project-intro {
	align-items: center;
	column-gap: var(--wp--preset--spacing--40);
}
.project-intro__title {
	font-family: var(--wp--preset--font-family--serif);
	font-style: italic;
	font-weight: 400;
	line-height: 1.1;
}
.project-details {
	line-height: 1.5;
}
/* Label and value flow as one line of text and wrap naturally. */
.wp-block-group.project-details__row {
	display: block;
}
.project-details__row > p {
	display: inline;
	margin: 0;
}
/* Hide a details row when its field is empty. */
.project-details__row:has(> p:last-child:empty) {
	display: none;
}
.project-separator.project-separator {
	margin-block: 0;
	border-top-width: 1px;
}
.project-content {
	line-height: 1.5;
}
.project-image-pair .wp-block-image {
	margin: 0;
}

/* About */
.about__portrait img {
	border-radius: 50%;
}
.about__art .wp-block-image {
	margin: 0;
	padding-bottom: var(--wp--preset--spacing--30);
}
.about__art .is-cropped-top img {
	object-position: top;
}

/* Button with a trailing arrow */
.wp-block-button.has-arrow .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
}
.wp-block-button.has-arrow .wp-block-button__link::after {
	content: "";
	flex: none;
	width: 21px;
	height: 21px;
	background: url("../images/icon-arrow-outward-light.svg") center / contain no-repeat;
}

/* Buttons never wrap their label. */
.wp-block-button__link {
	white-space: nowrap;
}

/* Phones (below WordPress's 600px navigation breakpoint) */
@media (max-width: 599px) {
	/* Logo left, menu button right. */
	.wp-block-group.site-header {
		grid-template-columns: auto 1fr;
	}
	.site-header .site-header__nav.wp-block-navigation {
		justify-content: flex-end;
	}
	/* Case study sections use the page gutter only. */
	.wp-block-group.project-intro,
	.project-content > .wp-block-columns.alignwide {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
	/* About artwork: one column, full content width. */
	.wp-block-group.about__art {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
}

/* Generic pages (privacy policy etc.) */
.page-title {
	font-family: var(--wp--preset--font-family--serif);
	font-style: italic;
	font-weight: 400;
	line-height: 1.1;
}
/* Outline buttons: dark border on the cream background. */
.wp-block-button.is-style-outline .wp-block-button__link {
	border: 1.5px solid var(--wp--preset--color--contrast);
	background: transparent;
	color: var(--wp--preset--color--contrast);
	padding: calc(var(--wp--preset--spacing--20) - 1.5px) calc(var(--wp--preset--spacing--30) - 1.5px);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}
.page-content h2 {
	margin-top: var(--wp--preset--spacing--50);
}

/* Footer: divider line, then copyright and links */
.site-footer__separator {
	width: 100%;
	margin-top: 0;
	margin-bottom: 31.25px;
	border: 0;
	border-top: 1.5px solid var(--wp--preset--color--border);
	opacity: 1;
}

/* Contact form (Contact Form 7) */
.contact__form .wpcf7-form > p {
	margin: 0 0 var(--wp--preset--spacing--40);
}
.contact__form label {
	display: block;
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--contrast);
}
.contact__form .wpcf7-form-control-wrap {
	display: block;
	margin-top: var(--wp--preset--spacing--20);
}
.contact__form input[type="text"],
.contact__form input[type="email"],
.contact__form textarea {
	box-sizing: border-box;
	width: 100%;
	padding: var(--wp--preset--spacing--20) 0;
	border: 0;
	border-bottom: 1.5px solid var(--wp--preset--color--border);
	border-radius: 0;
	background: transparent;
	color: var(--wp--preset--color--contrast);
	font: inherit;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
}
.contact__form textarea {
	resize: vertical;
}
.contact__form input:focus-visible,
.contact__form textarea:focus-visible {
	outline: 2px solid var(--wp--preset--color--ink);
	outline-offset: 4px;
}
.contact__form .wpcf7-submit {
	padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
	border: 0;
	border-radius: 0;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	font: inherit;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
	cursor: pointer;
}
.contact__form .wpcf7-submit:hover,
.contact__form .wpcf7-submit:focus-visible {
	background: var(--wp--preset--color--ink);
}
.contact__form .contact__privacy {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}
.contact__form .contact__privacy a {
	color: inherit;
}
.contact__form .wpcf7-spinner {
	vertical-align: middle;
}
.contact__form .wpcf7-not-valid-tip {
	margin-top: var(--wp--preset--spacing--20);
	color: #b3261e;
	font-size: var(--wp--preset--font-size--small);
}
.contact__form .wpcf7 form .wpcf7-response-output {
	margin: 0;
	padding: var(--wp--preset--spacing--30);
	border: 1.5px solid currentColor;
	font-size: var(--wp--preset--font-size--medium);
}

