/*
 * Maria Perlman theme: global and home-page component CSS.
 *
 * What theme.json can say (palette, type, spacing, buttons) lives there. This is
 * the rest, ported from theme/assets/critical.css and the {% stylesheet %}
 * blocks of the Shopify sections. The brush images arrive as --stroke-* and
 * --edge-* custom properties from functions.php.
 */

:root {
	--page-width: 77.5rem;
	--page-margin: 40px;
	--paper: var(--wp--preset--color--paper);
	--paper-light: var(--wp--preset--color--paper-light);
	--ink: var(--wp--preset--color--ink);
	--muted: var(--wp--preset--color--muted);
	--pine: var(--wp--preset--color--pine);
	--olive: var(--wp--preset--color--olive);
	--blue: var(--wp--preset--color--blue);
	--blue-pale: var(--wp--preset--color--blue-pale);
	--rule: var(--wp--preset--color--rule);
	--serif: var(--wp--preset--font-family--serif);
	--sans: var(--wp--preset--font-family--sans);
}

/* Base ---------------------------------------------------------------- */

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 92px;
}

body {
	-webkit-font-smoothing: antialiased;
	min-height: 100svh;
}

.wp-site-blocks {
	display: flex;
	flex-direction: column;
	min-height: 100svh;
}

.wp-site-blocks > main {
	flex: 1 0 auto;
}

img,
svg {
	max-width: 100%;
	height: auto;
}

input,
textarea,
select {
	font: inherit;
	border-radius: 0;
}

select {
	background-color: var(--paper-light);
	color: currentcolor;
}

p {
	text-wrap: pretty;
	overflow-wrap: break-word;
}

p:empty {
	display: none;
}

a {
	text-decoration-color: var(--olive);
	text-underline-offset: 4px;
}

:focus-visible {
	outline: 2px solid var(--pine);
	outline-offset: 5px;
}

::selection {
	background: #dfe2d2;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	overflow-wrap: break-word;
	margin-block: 0;
}

h2 em,
h1 em {
	color: var(--pine);
}

.section {
	padding-block: 120px;
}

.text-link,
.wp-block-read-more.text-link {
	display: inline-block;
	padding: 2px 0;
	border-bottom: 1px solid var(--olive);
	color: var(--pine);
	font-size: 14px;
	line-height: 1.7;
	text-decoration: none;
}

.wp-block-buttons {
	gap: 12px;
}

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

/* Section heading with an intro column (concept G). */
.section-head {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 24px;
	align-items: end;
	margin-bottom: 60px;
}

.section-head > .section-head__title {
	grid-column: 1 / 8;
	margin: 0;
}

.section-head__intro {
	grid-column: 9 / 13;
	margin: 0;
	color: var(--muted);
	font-size: 15px;
}

/* Maria's handwriting, painted in watercolour: image blocks sized by height. */
.wp-block-image.hw {
	margin: 0 0 18px;
}

.wp-block-image.hw img {
	display: block;
	width: auto;
	height: var(--h, 46px);
	aspect-ratio: var(--ar);
}

.hw--signature { --ar: 5.16; margin: 0; }
.hw--art-that-inspires { --ar: 4.84; }
.hw--watercolours { --ar: 4.29; }
.hw--about-the-artist { --ar: 6.59; }
.hw--bespoke-art { --ar: 3.15; }
.hw--connect-with-me { --ar: 6.06; }

/* Header --------------------------------------------------------------- */

.wp-site-blocks > header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: color-mix(in srgb, var(--paper) 96%, transparent);
	border-bottom: 1px solid var(--rule);
	backdrop-filter: blur(10px);
}

body.admin-bar .wp-site-blocks > header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.wp-block-group.site-header__inner {
	min-height: 84px;
	gap: 30px;
	flex-wrap: nowrap;
}

.site-header__logo {
	margin: 0;
	flex: none;
}

.site-header__logo a {
	display: block;
}

.wp-block-image.site-header__logo img {
	display: block;
	width: 200px;
	height: auto;
	margin-block: 4px;
}

.site-header__inner > .site-header__menu {
	margin-left: auto;
	gap: 28px;
}

.site-header__menu .wp-block-navigation__container {
	gap: 28px;
}

.site-header__menu a {
	border-bottom: 1px solid transparent;
	font-size: 14px;
	text-decoration: none;
}

.site-header__menu a:hover,
.site-header__menu a[aria-current] {
	border-color: var(--olive);
}

/* Basket: "Basket" and a ringed count, in place of WooCommerce's cart icon. */
.site-header__cart {
	flex: none;
	padding: 8px 0 8px 26px;
	border-left: 1px solid var(--rule);
	font-size: 14px;
}

.site-header__cart .wc-block-mini-cart__button {
	padding: 0;
	background: none;
	color: inherit;
	font-size: 14px;
	text-decoration: none;
}

.site-header__cart .wc-block-mini-cart__button:hover {
	opacity: 1;
	background: none;
}

.site-header__cart .wc-block-mini-cart__quantity-badge {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.site-header__cart .wc-block-mini-cart__icon {
	display: none;
}

.site-header__cart .wc-block-mini-cart__badge {
	position: static;
	display: inline-grid;
	place-items: center;
	min-width: 24px;
	height: 24px;
	margin: 0;
	padding: 0 4px;
	border: 1px solid var(--pine);
	border-radius: 50%;
	background: none !important;
	color: var(--pine) !important;
	font-size: 13px;
	line-height: 1;
	transform: none;
}

.site-header__cart .wc-block-mini-cart__badge[hidden] {
	display: none;
}

/* Footer --------------------------------------------------------------- */

.site-footer {
	padding-block: 50px 35px;
}

.wp-block-group.site-footer__top {
	gap: 40px;
	align-items: flex-start;
}

.site-footer__signature {
	--h: 52px;
	margin-bottom: 10px;
}

.site-footer__tagline,
.site-footer__bottom {
	font-size: 12px;
}

.site-footer__tagline {
	margin: 0;
}

.site-footer__links {
	gap: 22px;
	font-size: 14px;
}

.site-footer__links .wp-block-navigation__container {
	gap: 22px;
}

.site-footer__links a {
	text-decoration: underline;
}

.site-footer__bottom {
	margin-top: 50px;
	padding-top: 48px;
	background: var(--stroke-1) no-repeat center top / 100% auto;
	color: var(--muted);
}

.site-footer__bottom p {
	margin: 0;
}

/* Hero ----------------------------------------------------------------- */

.hero {
	position: relative;
	padding-top: 76px;
}

/* A large painting fading into the paper behind the title page. */
.hero > .hero__backdrop {
	position: absolute;
	z-index: 0;
	inset: 0 0 auto;
	width: 100%;
	max-width: none;
	height: 640px;
	margin: 0 !important;
	overflow: hidden;
	pointer-events: none;
}

.wp-block-image.hero__backdrop img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.3;
	filter: blur(2px) saturate(0.7);
	-webkit-mask-image: radial-gradient(ellipse 60% 70% at 70% 40%, #000 20%, transparent 75%);
	mask-image: radial-gradient(ellipse 60% 70% at 70% 40%, #000 20%, transparent 75%);
}

.hero__inner {
	position: relative;
	z-index: 1;
}

.hero__title {
	max-width: 960px;
	margin-left: 7%;
}

.hero__kicker {
	--h: 50px;
}

.hero h1 {
	margin-bottom: 32px;
	line-height: 0.99;
	letter-spacing: -0.047em;
}

/* The soft olive wash behind the italic word. */
.hero h1 em {
	position: relative;
	display: inline-block;
	white-space: nowrap;
	z-index: 0;
}

.hero h1 em::before {
	content: "";
	position: absolute;
	z-index: -1;
	width: 112%;
	height: 120%;
	left: -5%;
	top: -8%;
	background: var(--olive);
	opacity: 0.16;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 130' preserveAspectRatio='none'%3E%3Cpath d='M8 77C83 34 157 45 216 53s113 4 176-18c-18 34-5 63-31 73-73 13-153-8-225 2-51 7-92 3-128-33Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 130' preserveAspectRatio='none'%3E%3Cpath d='M8 77C83 34 157 45 216 53s113 4 176-18c-18 34-5 63-31 73-73 13-153-8-225 2-51 7-92 3-128-33Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

.hero__intro {
	max-width: 520px;
	margin: 0 0 38px 34%;
	font: 20px/1.65 var(--serif);
}

.hero__action {
	margin-left: 34%;
}

.hero .hero__plate {
	margin-top: 76px;
	margin-bottom: 0;
}

.wp-block-image.hero__plate img {
	width: 100%;
	max-width: none;
	height: min(62vw, 690px);
	min-height: 400px;
	object-fit: cover;
	object-position: center 53%;
}

.wp-block-group.hero__signature {
	gap: 18px;
	margin-top: 32px;
	color: var(--muted);
	font: italic 14px var(--serif);
}

.hero__signature p {
	margin: 0;
}

.hero__signature-mark {
	--h: 40px;
}

/* Featured paintings --------------------------------------------------- */

.featured-paintings {
	background: var(--stroke-1) no-repeat center top / min(100%, 1100px) auto;
	margin-top: 70px;
}

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

/* A painted wash edge rises from the section into the paper above. */
.about {
	position: relative;
}

.about::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: calc(100% - 1px);
	height: clamp(40px, 6vw, 90px);
	pointer-events: none;
	background: var(--paper-light);
	-webkit-mask: var(--edge-1) no-repeat center / 100% 100%;
	mask: var(--edge-1) no-repeat center / 100% 100%;
}

.about__layout {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 28px;
}

.about__title {
	grid-column: 1 / 5;
}

.about__copy {
	grid-column: 6 / 12;
	padding-top: 10px;
}

.about__copy > p {
	margin: 0 0 1em;
	font: 21px/1.75 var(--serif);
}

.wp-block-group.about__signoff {
	gap: 20px;
	margin-top: 35px;
	padding-top: 22px;
	background: var(--stroke-2) no-repeat left top / 100% auto;
}

.about__signature {
	--h: 56px;
}

.about__note {
	max-width: 220px;
	margin: 0;
	color: var(--muted);
	font-size: 11px;
	text-align: right;
}

/* Bespoke -------------------------------------------------------------- */

/* Painted wash edges above and below; the lower one is the other brush edge, flipped. */
.bespoke {
	position: relative;
}

.bespoke::before,
.bespoke::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: clamp(40px, 6vw, 90px);
	pointer-events: none;
	background: var(--blue-pale);
	-webkit-mask: var(--edge) no-repeat center / 100% 100%;
	mask: var(--edge) no-repeat center / 100% 100%;
}

.bespoke::before {
	--edge: var(--edge-2);
	bottom: calc(100% - 1px);
}

.bespoke::after {
	--edge: var(--edge-1);
	top: calc(100% - 1px);
	transform: scale(-1, -1);
}

.bespoke__layout {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 28px;
	align-items: start;
}

.bespoke__main {
	grid-column: 1 / 8;
}

.bespoke__kicker {
	--h: 48px;
}

.bespoke h2 {
	margin-bottom: 24px;
}

.bespoke__text {
	max-width: 570px;
	margin: 0;
	font: 20px/1.65 var(--serif);
}

.bespoke__details {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	max-width: 570px;
	margin: 42px 0 0;
}

.bespoke__term {
	margin: 0;
	padding-top: 14px;
	background: var(--stroke-3) no-repeat left top / 100% auto;
	font: italic 17px var(--serif);
}

.bespoke__detail {
	margin: 4px 0 0;
	color: var(--muted);
	font-size: 13px;
}

.bespoke__aside {
	grid-column: 9 / 13;
}

/* Newsletter ----------------------------------------------------------- */

.newsletter {
	padding-block: 85px;
	background: var(--stroke-3) no-repeat center bottom / min(80%, 900px) auto;
}

.newsletter__layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10%;
	align-items: end;
}

.newsletter h2 {
	margin-bottom: 12px;
	font-size: clamp(34px, 4vw, 50px);
}

.newsletter__text {
	max-width: 480px;
	margin: 0;
	font-size: 14px;
}

/* Basic templates ------------------------------------------------------ */

.posts-list {
	list-style: none;
	margin: 40px 0;
	padding: 0;
}

.posts-list > li {
	margin-bottom: 36px;
}

.wp-block-search__input {
	border: 0;
	border-bottom: 1px solid var(--ink);
	background: transparent;
	color: var(--ink);
}

.wp-block-query-pagination {
	margin-top: 60px;
	gap: 14px;
}

/* Responsive ----------------------------------------------------------- */

@media (max-width: 900px) {
	.hero__title {
		margin-left: 0;
	}

	.hero__intro,
	.hero__action {
		margin-left: 22%;
	}

	.about__copy {
		grid-column: 5 / 13;
	}

	.bespoke__main {
		grid-column: 1 / 7;
	}

	.bespoke__aside {
		grid-column: 7 / 13;
	}

	.bespoke__details {
		grid-template-columns: 1fr;
		gap: 0;
	}

	.bespoke__detail {
		margin-bottom: 14px;
	}
}

@media (max-width: 650px) {
	html body {
		font-size: 16px;
	}

	.section {
		padding-block: 78px;
	}

	.section-head {
		display: block;
		margin-bottom: 40px;
	}

	.section-head > .section-head__title {
		margin-bottom: 22px;
	}

	.section-head__intro {
		margin: 0;
	}

	/* Header: the menu drops to its own scrollable row, with 44px-tall tap targets. */
	.wp-block-group.site-header__inner {
		min-height: 64px;
		flex-wrap: wrap;
		gap: 0 16px;
		padding-block: 10px;
	}

	.site-header__inner > .site-header__cart {
		margin-left: auto;
		padding-left: 0;
		border-left: 0;
	}

	.site-header__inner > .site-header__menu {
		order: 3;
		width: 100%;
		margin: 2px 0 -10px;
		gap: 22px;
		overflow-x: auto;
		white-space: nowrap;
	}

	.site-header__menu .wp-block-navigation__container {
		width: 100%;
		justify-content: space-between;
		gap: 22px;
	}

	.site-header__menu a {
		display: flex;
		align-items: center;
		min-height: 44px;
		font-size: 15px;
	}

	.wp-block-image.site-header__logo img {
		width: 160px;
	}

	.site-footer__top,
	.site-footer__bottom {
		display: block;
	}

	.site-footer__links {
		margin-top: 22px;
	}

	.hero {
		padding-top: 48px;
	}

	.hero__kicker {
		--h: 36px;
	}

	.hero h1 {
		font-size: clamp(40px, 11.5vw, 58px);
		line-height: 1.03;
	}

	.hero__intro,
	.hero__action {
		margin-left: 10%;
	}

	.hero__intro {
		font-size: 18px;
	}

	.hero .hero__plate {
		margin-top: 52px;
	}

	.wp-block-image.hero__plate img {
		min-height: 0;
		height: 64vh;
		max-height: 520px;
	}

	.about__layout,
	.bespoke__layout {
		display: block;
	}

	.about__title {
		margin-bottom: 35px;
	}

	.about__copy > p {
		font-size: 19px;
	}

	.bespoke__text {
		font-size: 18px;
	}

	.bespoke__aside {
		margin-top: 50px;
	}

	.newsletter__layout {
		grid-template-columns: 1fr;
		gap: 35px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
}

/* Search */
.wp-block-search {
	margin: 24px 0 30px;
}

.wp-block-query-title {
	margin-bottom: 24px;
}
